4

That is $b=ua$ with $u\in\mathbb{Z}_n^*$ if and only if $(a,n)=(b,n)$. It is easy enough to prove the forward direction using the Bezout identity, and easy enough to find the requisite unit in practice by solving $ax\equiv b\pmod n$. Dividing out the $\gcd=d$, we can solve $(a/d)x\equiv b/d\pmod{n/d}$ because $a/d$ is a unit modulo $n/d$, and then select a unit modulo $n$ from the $d$ solutions $x=x_0+t\,n/d$ with $t=0,\dots,d-1$. What is hard is to prove that there is always a unit modulo $n$ among them. Not all of them are, $8\equiv2\cdot4$ modulo $12$ does not work, but $8\equiv5\cdot4$ does.

The above construction does show that if $(a,n)=(b,n)$ then $b=xa$ and $a=yb$, so $a$ and $b$ are "associates" in the terminology of Anderson et al., and generate the same ideal in $\mathbb{Z}_n$. However, the only proof I know that they are "strong associates", i.e. $b=ua$ with a unit $u$, is rather involved, see In $\mathbb{Z}/(n)$, does $(a) = (b)$ imply that $a$ and $b$ are associates? It uses the above ideal, reduction to prime powers and Chinese remainder theorem. Is there a proof that uses elementary properties of gcd and modular arithmetic? For example, a direct proof that if $(x_0,m)=1$ then $(x_0+tm,md)=1$ for some $t=0,\dots,d-1$?

user26857
  • 52,094
Conifold
  • 11,756

1 Answers1

0

Below is a simple proof of the title claim. The idea for the `hard' direction is due to @BillDubuque, see his answer in Prove: If $\gcd(a,b,c)=1$ then there exists $z$ such that $\gcd(az+b,c) = 1$. A key observation, apparently, goes back to Stiltjes: if two numbers split the prime factors of $n$ disjointly then their sum is relatively prime to $n$. Other proofs in that thread, and in Show that if $a$, $b$, and $c$ are integers such that $(a, b) = 1$, then there is an integer $n$ such that $(an + b, c) = 1$, can also be adapted.

Proof: Suppose $b=ua$ with a unit $u$, then $(u,n)=1$. By the Bezout identity twice, $1=xu+yn$ and $$(a,n)=sa+tn=sa(xu+yn)+tn=(sx)b+(say+t)n.$$ Therefore, any common divisor of $b$ and $n$ divides $(a,n)$, and, in particular, $(b,n)\mid(a,n)$. By a symmetric argument, $(a,n)\mid(b,n)$, so $(a,n)=(b,n)$.

Conversely, suppose $(a,n)=(b,n)=:d$, then $(a/d,n/d)=(b/d,n/d)=1$, and $a/d,\,b/d$ are both units modulo $n/d$. Let $x_0$ be a solution to $(a/d)x\equiv b/d\pmod{n/d}$, for example $x_0=(a/d)^{-1}b/d$. Then $x=x_0+t\,n/d$ are solutions to $ax\equiv b\pmod{n}$. Note that $(x_0,n/d)=1$, as $x_0$ is the product of units modulo $n/d$.

We need to find $t$ such that $(x,n)=1$, then $u=x$ will be the required unit. To do so, choose $t$ to be the product of all prime factors that divide $n$ but not $n/d$ or $x_0$. If there are no such factors choose $t=1$. Since $(x_0,n/d)=1$ and $t$ can only have factors not in both, $(x_0,t\,n/d)=1$. If a prime $p\mid(x,n)$, then, in particular, $p\mid n$. By construction of $t$, we have $p\mid x_0$ or $p\mid t\,n/d=x-x_0$. Since also $p\mid x$ it must divide both, contradiction. Thus, no such $p$ exists and $(x,n)=1$ as required. $\square$

The proof also tells us when $x_0$ would already work. We need $t=d$ for that, and so $d$ must be relatively prime to both $n/d$ and $x_0$. In other words, $d$ must split $n$ into relatively prime divisors and $x_0$ must be relatively prime to $n$.

Conifold
  • 11,756
  • You don't need the Bezout theorem for the first implication. Euclid's lemma is enough. That is, if $x\mid yz$ and $\gcd(x,y)=1$, then $x\mid z$. – user26857 Jan 28 '24 at 11:58