I am working with $p$-adic numbers at the moment and am having some trouble with a basic fact.
I know that for $\frac{a}{b}\in\mathbb{Q}$ there is a solution $k\in\mathbb{Z}$ to $\frac{a}{b} \equiv k\pmod{p^n}$ iff $p^n$ does not divide b.
The condition that $p^n$ doesn't divide b makes sense to me as otherwise $b\equiv 0\pmod{p^n}$ and thus there would not be an inverse.
I know that i can view $\frac{a}{b} = a*b^{-1}$ but I still don't find it very intuitive to think of the equivalence class of a fraction in modular arithmetic.
Can somebody please explain to me in simple terms the connection between fractions and proving that they have an equivalence class in Z modulo a prime number?
From my understanding there would need to be a canonical homomorphism $\mathbb{Z}_{(p)} \mapsto \mathbb{Z}/ p^n$. Is there such a map and how do you define it and proof its existence and well definedness?
Edit:
And as a bonus question: How is $\frac{a}{b} \equiv k\pmod{p^n} \iff a \equiv bk\pmod{p^n}$ ?
It's probably very basic but I cant really wrap my head around it, as in general you can't always say $ab \equiv c \pmod{p}\iff a \equiv b^{-1}c \pmod{p^n}$