Let $p$ be a prime number. Define the $p$-adic valuation on $\mathbb{Z}$ as $v_p(p^kx) = p^{-k}$ where $x$ is not divisible by the prime $p$. Let $\mathbb{Z}_p$ (the $p$-adic integers) be a completion of $\mathbb{Z}$ under this valuation.
The problem is to prove that if an integer $z$ is not divisible by $p$, then it is invertible in the ring $\mathbb{Z}_p$.
My thoughts by now are the following:
For any such $z$ there are integers $q \neq 0$ and $-p<r < p$ such that $ z = qp + r $. Then we claim existence of $p$-adic integer $a = \sum^\infty_{n=0}a_np^n$ with the properties:
- $b_0 =\mathbf{a_0}(r + qp) + rp\mathbf{a_1} = 1 $
- $\forall k : \mathrm{even} . b_k = qa_{k-1} + \mathbf{a_k}(r + qp) + rp\mathbf{a_{k+1}} =0$
If such $a$ exists then $za = 1$ as $za = \sum^\infty_{n=0}b_{2n}p^n$.
We will try to derive coefficients of $a$ from this conditions starting from $a_0$ and $a_1$. If $r+qp$ and $rp$ are coprime then we are done. This will be true in case $\gcd(r,q) = 1$, otherwise we will have problem with solving for $a_1, a_0$ in first condition. However, if $m = gcd(r,q)$ then $m < p$ which gives us representation of form $m = p - (p-m)$ and, as $q$ in this representation is $1$, number $m$ must be divisible in $\mathbb{Z}_p$. Same holds for $m^{-1}z = m^{-1}qp +m^{-1}r$ as $\gcd(m^{-1}q,m^{-1}r) = 1$. Then we may construct $z^{-1} = m^{-1}(m^{-1}qp +m^{-1}r)^{-1}$ which completes the proof.
Is this proof correct?
Do you know better proofs of this fact?