In the book The Art of Computer Programming, Vol 3, section 6.4 Hashing, there is a statement paraphrased here as the following:
If A is relatively prime to w, we can find a constant A' with AA' mod w = 1; this implies that K = (A'(AK mod w)) mod w.
I understand the first part, which is modular inverse. But I'm struggling to prove the second part.
Working in the ring of integers modulo $w$ we thus have that $K = 1\cdot K = (A' \cdot A) \cdot K = A' \cdot (A \cdot K)$.
This is what this statement is saying.