Intuition. The
product of two integers
coprime with
n is still
coprime with
n, and that holds in
modular systems as well.
Proof. Take
aˉ,bˉ∈(Z/n)×. Let
a,b be the
unique representatives of
aˉ,bˉ that lie within
[0,n). Since
aˉ,bˉ∈(Z/n)× then
a,b are
coprime with
n, and thus so is
ab pf. Since
ab is
coprime with
n, then
mod(ab,n) is, as well
pf. Since
mod(ab,n) is
coprime with
n, and since
0≤mod(ab,n)<n, we have that
mod(ab,n)∈(Z/n)×. Finally, by rules of
modular arithmetic,
aˉ⋅bˉ=ab=mod(ab,n); thus,
ab∈(Z/n)×.
Prop. If
a,b∈Z are
coprime with
n, then
ab is
coprime with
n.
Proof. Take
a,b. Assume for contradiction that
ab is not
coprime with
n. Then exists some
f≥2 dividing both
ab and
n. Since
f divides
ab, then it must divide either
a or
b, which makes either
a or
b share a factor with
n; contradiction.
Prop. If
x is
coprime with
n, then
mod(x,n) is
coprime with
n.
Proof. Note that for some
k we have
x=nk+mod(x,n). Now assume for contradiction that
mod(x,n) shares a factor
f with
n. Then we have
mod(x,n)=fκ1 and
n=fκ2 for some
κ1,κ2. Plugging this into
x=nk+mod(x,n) we get
x=(fκ2)k+fκ1=f(κ2k+κ1). Thus
f∣x, meaning that it is not
coprime with
n; contradiction.