Neat way to show that $\mathbb{Z}_p$ is a principal ideal domain via inverse limit definition I have encountered the ring of $p$-adic integers $\mathbb{Z}_p$ defined purely algebraically as the inverse limit of the rings $\mathbb{Z}/p^k\mathbb{Z}$ for $k\geq1$, and am curious to see if there is a neat way to show that this is a principal ideal domain using a purely algebraic argument i.e. without showing that the inverse limit is equivalent to the topological definition via completions.
I have managed to show from the inverse limit definition that $\mathbb{Z}_p$ is an integral domain, and must classify the ideals to show that they are all principal. So I must show that the only non-zero ideals are $(p^k)$ for $k\geq 0$.
If we let $J$ be an ideal in $\mathbb{Z}_p$ and $A=\{k\geq0:p^k\in J\}$, then clearly $A$ is either empty or $\mathbb{Z}_{\geq n}$ for some $n\geq 0$. It seems like it will be necessary to show that each non-zero $a\in\mathbb{Z}_p$ has the form $p^ku$ for unique $k\geq0$ and $u\in\mathbb{Z}_p^\times$. I have shown that the units are those 'sequences' $(a_k+p^k\mathbb{Z})$ where the first term is non-zero and have found an expression of the form $a=p^m(b_k+p^k\mathbb{Z})$ but I can't quite make $(b_k)$ satisfy $b_k-b_l\in p^k\mathbb{Z}$ for $k\leq l$.
Is there a neat way to prove that $\mathbb{Z}_p$ is a PID using the inverse limit definition?
 A: With a little refinement, the method I suggested in my comment works. The refinement comes from the
Fact: The only ideals of the ring $\mathbb Z/p^k \mathbb Z$ are the ones generated by $p^\ell$ for $0 \le \ell \le k$.
So let $I$ be an ideal of $\mathbb Z_p$, defined as per projective limit. Then for each $k$, its projection $I_k$ is an ideal in $\mathbb Z/p^k \mathbb Z$, so we can choose as its generator $p^{\ell(k)}$ for a certain $0 \le \ell(k) \le k$. By compatibility in the projective limit, for $n \ge k$, the projection of $I_n$ to $\mathbb Z/p^k \mathbb Z$ is $I_k$. This implies that

*

*either $\ell(k) = k$ for all $k$; then all $I_k = (0)$ and $I = (0)$;

*or there is a minimal $k_I \ge 1$ such that $\ell(k_I) \neq k_I$; by minimality, $\ell(k_I)=k_I -1$, and by compatibility in the projective limit, $I_n = (p^{k_I-1})$ for all $n \ge k_I$, consequently $(p^{k_I-1})_n$ is a compatible system of generators in the projective limit, which generates $I$ (and we identify it with $p^{k_I-1}$).

As for the property of being a domain: Let $x=(x_k)_k, y=(y_k)_k$ be in the projective limit so that $x\cdot y=0$. That means that for each $k$, either $x_k$ or $y_k$ is in $p^{\lfloor k/2 \rfloor} \mathbb Z/ p^k \mathbb Z$. In particular, at least one of $x,y$ (say, $x$) has the property that for each $m \in \mathbb N$, there is $n \ge m$ such that $x_n \in p^m \mathbb Z / p^n \mathbb Z$. By compatibility, that means that for all $m$, $x_m$ is the zero element of $\mathbb Z / p^m$, i.e. $x=0$.
A: First, let us note the following theorem:

Theorem: if $a \in \mathbb{Z}_p$ is distinct from zero, then $a = u p^k$ for some unit $u$ and natural number $k$.

Proof: Identify $a$ with a sequence $(a_0 \in \mathbb{Z} / (p^0), a_1 \in \mathbb{Z} / (p^1), a_2 \in \mathbb{Z} / (p^2), \ldots)$.
How can we figure out which $k$ to use? Let us note that if $p^k$ is a factor of $a$, then we can conclude from $p^k_k = 0$ that $a_k = 0$. And if $a = u p^k$ with $u$ a unit, then $a$ is a factor of $p^k$; thus, we can conclude from $p^k_j \neq 0$ that $a_j \neq 0$ for all $j > k$. Therefore, we should be looking for the largest $k$ such that $a_k = 0$.
Indeed, take the largest $k$ such that $a_k = 0$. I claim that we can write $a = u p^k$ for some $u \in \mathbb{Z}_p$.
How can we find such a $u$? Let us suppose such a $u$ exists, and then examine its properties. In particular, what can we say about $u_j$?
We first write $u_{j + k} = \pi_{j + k}(m)$, and $a_{j + k} = \pi_{j + k}(n)$. Note that since $a_k = 0$, we must have $n \equiv 0 \mod p^k$; therefore, write $n = r p^k$.
Now we have $u_{j + k} p^k = a_{j + k}$. So in particular, we have $m p^k = r p^k \mod p^{k + j}$. Equivalently, we have $m = r \mod p^j$. That is, $u_j = \pi_j(m) = \pi_j(r)$. So if such a $u$ exists, we know exactly how to compute it.
I now claim that for all $j$, there exists a unique $u_j \in \mathbb{Z} / (p^j)$ such that there is some $r \in \mathbb{Z}$ where $u_j = \pi_j(r)$ and $a_{j + k} = \pi_{j + k}(r p^k)$. We have already shown that we can find some $r \in \mathbb{Z}$ such that $a_{j + k} = \pi_{j + k}(r p^k)$ and write $u_j = \pi_j(r)$; existence is thus satisfied. Suppose we could find some $r'$ such that $\pi_{j + k} (r' p^k) = a_{j + k}$. Then we would have $\pi_{j + k}(r' p^k) = \pi_{j + k}(r p^k)$; that is, $r' p^k \equiv r p^k \mod p^{j + k}$; that is, $r' \equiv r \mod p^j$; that is, $\pi_j(r) = \pi_j(r')$.
So we have shown that our choices of $u_j$ are all well-defined. We must now show that $u \in \mathbb{Z}_p$.
To do this, consider an arbitrary $j$, and write $u_{j + 1} = \pi_{j + 1}(r)$ where $a_{j + k + 1} = \pi_{j + k + 1} (r p^k)$. Then we see that $a_{j + k} = \pi_{j + k} (r p^k)$, and therefore $u_j = \pi_j(r)$. This is enough to show that $u \in \mathbb{Z}_p$.
Finally, we must show that $a = u p^k$. Consider some $j \in \mathbb{N}$. Write $u_j = \pi_j(m)$ for some $m$ such that $a_{j + k} = \pi_{j + k}(m p^k)$. Then we see that $a_j = \pi_j(m p^k) = \pi_j(m) p^k = u p^k$.
Now I claim that $u_1 \neq 0$. For if we had $u_1 = 0$, then write $u_1 = \pi_1(m)$ such that $a_{k + 1} = \pi_{k + 1}(mp^k)$. Then $m \equiv 0 \mod p$, so $m p^k \equiv 0 \mod p^{k + 1}$ and thus $a_{k + 1} = 0$. But this is impossible by the definition of $k$.
Then write $u_1 = \pi_1(w)$ for some $w \in \mathbb{Z}$. Note that $w$ is not $0$ mod $p$; therefore, $w$ is coprime with $p$.
Then in particular, for all $j \in \mathbb{N}$, we can write $u_j = \pi_j(w + p \cdot r)$ for some $r \in \mathbb{Z}$. And $w + p \cdot r$ is coprime with $p$, hence coprime with $p_n$. Therefore, $u_j$ is a unit in $\mathbb{Z} / (p^j)$; let its inverse be $y_j$.
Consider the canonical map $f_n : \mathbb{Z} / (p^{n + 1}) \to \mathbb{Z} / (p^n)$. We must show that for all $n$, $f_n(y_{n + 1}) = y_n$. Indeed, we see that $1 = f_n(y_{n + 1} \cdot u_{n + 1}) = f_n(y_{n + 1}) \cdot f_n(u_{n + 1}) = f_n(y_{n + 1}) \cdot u_n$. So $f_n(y_{n + 1})$ is the multiplicative inverse of $u_n$; hence, it equals $y_n$.
Therefore, $y = (y_1, y_2, \ldots, ) \in \mathbb{Z}_p$. And we see that $y \cdot u = 1$. So $u$ is a unit. $\square$
From here, consider the function $f(a) = $ the unique $k$ such that we can write $a = u p^k$ for $u$ a unit. This function makes $\mathbb{Z}_p$ into a Euclidean domain, hence a PID.
A: Time to use methods far too general and sophisticated for such a very specific algebraic problem (better get used to that quickly)!
Let $R=\mathbb{Z}_{(p)}$, it’s a local ring whose maximal ideal is $(p)$. Note that $\mathbb{Z}_p$ is the inverse limit of the $R/p^nR$.
I claim that there is a $R$-morphism $\psi: R[[X]] \rightarrow \mathbb{Z}_p$ mapping $X$ to $p$. The proof is obvious (just consider the product of the $R$-maps $\psi_n: R[[X]] \rightarrow R/p^kR$ mapping $X$ to $p$).
But I claim something more: this map is onto. Indeed, let $u=(u_n)_{n \geq 1} \in \mathbb{Z}_p$ with $u_n \in R/p^nR$. Let $v_n$ be a lift in $R$ of $u_n$, then we can write $v_{n+1}=v_n+w_n p^n$, and we set $w_0=v_1$. Now, let $f(X)=\sum_{n \geq 0}{w_nX^n}$. It’s easy to see that $\psi_n(f)=u_n$, thus $\psi(f)=u$.
As $R[[X]]$ is a local Noetherian ring with maximal ideal generated by $(p,X)$, it follows that $\mathbb{Z}_p$ is a local Noetherian ring with maximal ideal generated by $f(p)$ and $f(X)$ ie $p$. Note that $p$ isn’t nilpotent in $\mathbb{Z}_p$.
Consider now the set of principal ideals of $R$ which are not a power of $(p)$. Since $A$ is Noetherian, it contains a maximal element, let’s call it $(b)$. Then $(b) \neq A$, so $b$ is noninvertible, so $b \in (p)$, so we can write $b=pc$ with $c \in A$. But then $(b)=(c)(p) \subset (c)$ so $(c)$ cannot be a power of $(p)$ (since $(b)$ isn’t), thus by maximality of $(b)$, $(b)=(c)=(pc)$. In particular, we can write $c=db=dpc$, ie $(1-dp)c=0$. Since $R$ is local and $dp$ is in its maximal ideal, $1-dp$ is invertible and $c=0$, thus $(b)=0$.
In particular, every principal ideal of $R$ is a power of $(p)$ or $(0)$. It follows that every finitely generated ideal (so, all of them) of $R$ is principal.
Now we just have to prove that $R$ is a domain. Let $b,c \in R$ be nonzero with $bc=0$, then we can write $(b)=(p)^n$, $(c)=(p)^m$, then $(0)=(bc)=(p)^{n+m}$ so that $a^{n+m}=0$, a contradiction.

A lot in this argument can be generalized to other local rings.
One of these points is the definition of a local PID – that’s because an easier characterization is “Noetherian local rings whose maximal ideal is principal non-nilpotent”, or, in more advanced terms, the regular local rings of dimension one. The last part of the proof shows an ad-hoc version of that property.
The beginning of the proof deals with the $m$-adic completion $A’$ of a local ring $(A,m)$ (with $m$ finitely generated), defined as the inverse limit of the $A/m^n$. It can be shown in a very similar way (with multivariable formal power series corresponding to generators of $m$) that $A’$ is local and its maximal ideal is generated by $m$. If moreover $A$ is Noetherian, my proof shows that $A’$ is as well.
It can be shown as well that, in this case, $A$ and $A’$ have the same dimension, and “therefore” that $A’$ is regular if $A$ is (and the converse also holds).
