Below is not a completed proof but a logical structure i am unsure of. Given line 1, i do not understand line 2. I would understand it if it were:
The case when $m=p_1n+r_1=p_2n+r_2$ and $r_1\ne r_2$ and $p_1=p_2$ implies a contradiction that $p_1\ne p_2$ This case makes more sense to me because it includes $p_1=p_2$.
Can someone explain exactly how this should be done and if the proof below is correct could you explain line 2 to me and why line 3 works as well, sorry i am quite confused about this. It is the logic which i dont quite get.
i understand simple proof by contradiction but when there are not 'or' statements involved i find it quite confusing Thank you for your help.
What i want to prove
If, $m=p_1n+r_1=p_2n+r_2$ then $p_1=p_2$ and $r_1=r_2$ with $0\le r_1,r_2\lt n$
Start of proof (basic outline)
Assume $m=p_1n+r_1=p_2n+r_2$ and $p_1\ne p_2$ or $r_1\ne r_2$ with $0\le r_1,r_2\lt n$
The case when $m=p_1n+r_1=p_2n+r_2$ and $r_1\ne r_2$ implies a contradiction that $p_1\ne p_2$ as $p_1n-p_2n$ is not equal to 0.
This is equivalent to showing $m=p_1n+r_1=p_2n+r_2$ implies $r_1 = r_2$ is true
It follows that $m=p_1n+r_1=p_2n+r_2$ implies $r_1 = r_2$ and so $p_1=p_2$ must follow