Suppose that $a$ is coprime to n. Prove that there exists $z \in\mathbb Z$ such that $az \equiv 1\pmod n$.
Proof: By Bezout's Lemma, there exist integers $z$ and $y$ such that $az+ny=1$. So $az = 1+n(-y)$, so by definition of two numbers being congruent, we must have $az \equiv 1\pmod n$.
Suppose that $az \equiv 1\pmod n$. Prove that $a$ and $n$ are coprime.
Proof: By definition of congruence relations, there exists an integer $y$ such that $az = 1+ ny$, so $az + n(-y) = 1$. Let $h = \gcd(a,n)$. By definition, $h|a$ and $h\mid n$, so by a lemma, $h\mid az+n(-y)$. So $h=1$ or $h=-1$, but $h$ must be non-negative, so $h=1$. Hence, $a$ and $n$ are coprime.
Can I have some feedback on these proofs please ? Thanks.
solution-verification
question to be on topic you must specify precisely which step in the proof you question, and why so. This site is not meant to be an open-ended proof checking machine. – Bill Dubuque Dec 21 '22 at 15:19