We can study the conjecture for locally compact rings as follows.

In [Kap] a subset $S$ of a topological ring is called *algebraically nilpotent* if for some $n$, $S^n=0$.

**Lemma 1.** [Kap, Theorem 2] A locally compact ring with no algebraically nilpotent ideals is the direct sum of a connected ring and a totally disconnected ring. The former is a semi-simple algebra of finite order over the real numbers.

Since Romain Gicquaud's comment rules out the connected ring case, it remains to consider locally compact totally disconnected rings. For this case we have the following structural lemma.

**Lemma 2.** [Kap, Lemma 4] A locally compact totally disconnected ring has a system of neighborhoods of $0$ which are compact open subrings.

**Lemma 3.** Let $R$ be a locally compact totally disconnected integral domain. Let $U$ be a compact open subring of $R$ such that $0\in U$ and $1\not\in U$. Then $1+U$ is a multiplicative topological group.

*Proof.* Since $U$ is a ring, $1+U$ is a multiplicative semigroup. Since $R$ is an integral domain and $0\not\in 1+U$, the multiplicative semigroup $1+U$ is cancellative. Since $1+U$ is compact, it is a multiplicative topological group, see, for instance, [AT, Theorem 2.5.2]. $\square$

**Proposition 4.** Let $R$ be a locally compact totally disconnected integral domain which is a union of less than $\mathfrak c$ many compact sets. If every closed ideal in $R$ is principal then each proper nonzero ideal $I$ of $R$ is closed, so $R$ is a principal ideal domain.

*Proof*. Pick an element $x\in R$ such that $(x)=\overline{I}$. By Lemma 2, there exists a compact open subring $U$ of $R$ such that $0\in U$ and $1\not\in U$. There exists a set $A$ of size less than $\mathfrak c$ and the family $\{K_\alpha:\alpha\in A\}$ of compact subsets of $R$ such that $R=\bigcup_{\alpha\in A} K_\alpha$. For each $\alpha\in A$ the family $\{a+U:a\in K_\alpha\}$ is an open cover of a compact set $K_\alpha$. Therefore there exists a finite subset $S_\alpha$ of $K_\alpha$ such that $K_\alpha\subset S_\alpha+U$. Put $S=\bigcup_{\alpha\in A} S_\alpha$. Then $|S|\le |A|\cdot \omega<\mathfrak c$ and $S+U=R$. Let $T$, $T=xR/xU$ be the quotient additive topological group and $q:xR\to T$ be the quotient map. By [AT, Proposition 3.1.23] the topological group $T$ is locally compact. Moreover, $T=xR/xU=q(xR)=q(x(S+U))=q(xS+xU)=q(xS)$, so $|T|<\mathfrak c$. Since a Hausdorff compact space without isolated points has size at least $\mathfrak c$, for instance, by Čech–Pospíšil theorem, see, for instance, [Hod, Theorem 7.19], the group $T$ is discrete, so the set $xU=q^{-1}(0_T)$ is a neighborhood of $0$ in the additive topological group $xR$. Therefore $x+xU$ is a neighborhood of $x$ in $xR$, so there exists a point $y\in I\cap (x+xU)$. That is $y=x+xu$ for some element $u\in U$. By Lemma 3, $1+U$ is a multiplicative topological group, so the element $1+u$ is invertible. Then $x\in I$, so $I=(x)=\overline{I}$. $\square$

Now we can describe the structure of compact topological principal ideal domains in more details applying the following results.

**Proposition 5.** [War, Theorem 1] Let $R$ be a compact Hausdorff ring, and let $\mathfrak r$ be the radical of $R$. Every ideal of $R$ is closed if and only if $R$ satisfies the ascending chain condition on ideals and every principal ideal of $R$ is closed. Under these circumstances, the topology of $R$ is the $\mathfrak r$-adic topology, either $R=\mathfrak r$ or $R/\mathfrak r$ is isomorphic to the Cartesian product of a finite family of finite simple rings, and consequently there are only finitely many regular maximal, regular maximal left, or regular maximal right ideals in $A$.

**Proposition 6.** [War, Theorem 2] Let $R$ be a topological ring with identity, and let $\mathfrak r$ be the radical of $R$. The following conditions are equivalent.

1)) $R$ is compact Hausdorff, and every left ideal of $R$ is closed.

2)) $R$ is compact Hausdorff and Noetherian.

3)) $R$ is compact Hausdorff and satisfies the ascending chain condition on closed left ideals.

4)) $R$ is Noetherian, the topology of $R$ is the $\mathfrak r$-adic topology, $R$ is complete for that topology, $\bigcap_{n=1}^\infty \mathfrak r^n=\{0\}$, and $R/\mathfrak r$ is a finite ring.

*References*

[AT] Alexander V. Arhangel'skii, Mikhail G. Tkachenko, *Topological groups and related structures*, Atlantis Press, Paris; World Sci. Publ., NJ, 2008.

[Eng] Ryszard Engelking, *General Topology*, 2nd ed., Heldermann, Berlin, 1989.

[Hod] R. Hodel, *Cardinal Functions I*, in: K.Kunen, J.E.Vaughan (eds.) *Handbook of Set-theoretic Topology*, Elsevier Science Publishers B.V., 1984.

[Kap] Irving Kaplansky, *Locally compact rings*, Am. J. Math. **70**:2 (Apr 1948) 447-459.

[War] Seth Warner, *Compact rings*, Mathematische Annalen **145** (Feb 1962) 52-63.