TITLE: Ring endomorphism of $p$-adic integers
QUESTION [5 upvotes]: I am doing an individual study of an abstract algebra for number theory course online. I just started, so I hope my question just note come off as too trivial. The lecture notes state that the ring of $p$-adic integers does not have a ring endomorphism.
Questions:
1. Does not the identity mapping work as a counterexample?
Then, assuming they meant: "no endomorphism except the trivial case", so the entire thing is not just a mistake:
2. I still cannot convince myself that there is no other ring endomorphism of $p$-adic integers. Could you please give me a hint how to prove it or point me to literature where such a proof is shown?

REPLY [2 votes]: For your reference, there is a more general perspective from the theory of "Witt vectors". Throughout, we let $p$ denote a fixed prime and $\mathbb{F}_p$ the finite field with $p$ elements.
The p-adic integers $\mathbb{Z}_p$ are an example of a strict $p$-ring, which  is a ring $A$ such that

$p$ is not a zero divisor in $A$,
$A$ is $p$-adically complete and Hausdorff, and
$A/(p)$ is a perfect ring (for example, a finite field).

Then we have the following theorem: if $A$ and $B$ are strict $p$-rings, then there is a natural "mod $p$" bijection between  ring homomorphisms $A \to B$ and ring homomorphisms $A/(p) \to B/(p)$ (see theorem 1.2 in https://arxiv.org/abs/1409.7445, which is an expository paper on Witt vectors, and/or Chapter II of Serre's Local Fields). Taking $A = \mathbb{Z}_p = B$, we have a bijection between endomorphisms of $\mathbb{Z}_p$ and endomorphisms of $\mathbb{Z}_p/(p) =  \mathbb{F}_p$. The only ring endomorphism of $\mathbb{F}_p$ is the identity, so the same holds for $\mathbb{Z}_p$.