Turing Decryption Example I know this exact same question exists but I am still having problems in understanding it. The following is given in the text:
The message m can be any integer in the set {0,1,2,…,p−1}; in par­ticular, the message is no longer required to be a prime(p is a prime). The sender encrypts the message m to produce m∗ by computing:
m∗=remainder(mk,p).
Multiplicative inverses are the key to decryption in Turing’s code. Specfically, we can recover the original message by multiplying the encoded message by the inverse of the key:

Let us name the equations from top to bottom from 1 to 3.
Now I am just writing what I understood and it maybe wrong, so I will appreciate if someone tells me where I am wrong.
We know m*=rem(mk, p)=mk%p, multiplying this equation by (k^-1) will give us equation 1.
Corollary 4.5.2 states that 'a is congruent to rem(a, n) modulo n'. Thus we obtained equation 2 by replacing equality with the congruency sign, as a=mk and rem(a,n)=m*, thus they are congruent to each other and multiplying by (k^-1) on both sides doesnt make a difference.
Now my confusion is (k^-1) != 1/k as k^-1 is not simply multiplicative inverse but multiplicative inverse modulo p, i.e., k.(k^-1) is congruent to 1 modulo p. Then how in equation 2 they replaced k.(k^-1) by 1 which resulted in equation 3.
And if k^-1=1/k, they wouldnt talk about finding k^-1 using the Pulverizer, which they later do.
 A: As you said, $k\cdot k^{-1} \equiv 1 \pmod p$. Therefore, whenever we have $k\cdot k^{-1}$ in a $\pmod p$ equation, we can replace it with $1$, since they are congruent in such a system.
Here's an example:
$$2x \equiv 3 \pmod{5}$$
Now, after doing some guess and check, you can find that $2\cdot 3 \equiv 1 \pmod 5$, meaning $2^{-1} \equiv 3 \pmod 5$. Notice that here, $2^{-1} \pmod 5$ is not just the same as $\frac 1 2$: This is because $\frac 1 2$ is the multiplicative inverse of $2$ in the rational numbers while $3 \pmod 5$ is the multiplicative inverse in the $\pmod 5$ numbers.
Now, multiply both sides by $3$:
$$6x \equiv 9 \pmod{5}$$
We have $6x-5x=x$ and $9-5=4$, so:
$$x \equiv 4 \pmod 5$$
Notice how, by multiplying both sides by $3$, we were able to replace the coefficient of $6$ with $1$ since $6 \equiv 1 \pmod 5$. This will always happen whenever we get $k\cdot k^{-1}$ in a modular equation: $k\cdot k^{-1}$ can always be replaced by just $1$ in a modular equation because that's how modular inverses work.
