These first questions were all with o4-mini. The theorem statements are all from this book. I found ChatGPT’s proofs more didactic than the originals.
To prove transitivity, start with the hypotheses:
-
$a \equiv b \pmod m$.
This means $m$ divides $a-b$, so there exists an integer $k$ such that
$$
a - b = km.
$$
-
$b \equiv c \pmod m$.
This means $m$ divides $b - c$, so there exists an integer $ℓ$ such that
$$
b - c = ℓm.
$$
Now consider $a - c$. We can write
$$
a - c \;=\; (a - b) + (b - c)
\;=\; km + ℓm
\;=\; (k + ℓ)\,m.
$$
Since $k + ℓ$ is an integer, this shows $m$ divides $a-c$. Hence
$$
a \equiv c \pmod m,
$$
which is exactly the statement of transitivity for congruence modulo $m$.
To show the two statements are equivalent, we prove each implication in turn.
1. If $a \equiv b \pmod m$, then $a$ and $b$ have the same remainder upon division by $m$.
Write the Euclidean divisions of $a$ and $b$ by $m$:
$$
\begin{aligned}
a &= q_a\,m + r_a, \quad 0 \le r_a < m,\\
b &= q_b\,m + r_b, \quad 0 \le r_b < m.
\end{aligned}
$$
Then
$$
a - b = (q_a - q_b)\,m + (r_a - r_b).
$$
If $a \equiv b \pmod m$, by definition $m$ divides $a - b$. But
$$
a - b = (q_a - q_b)\,m + (r_a - r_b)
$$
and $(q_a - q_b)\,m$ is already a multiple of $m$. For the whole sum to be a multiple of $m$, the “leftover” term $r_a - r_b$ must also be a multiple of $m$. Since
$$
|r_a - r_b| < m,
$$
the only multiple of $m$ in that range is $0$. Hence
$$
r_a - r_b = 0
\quad\Longrightarrow\quad
r_a = r_b.
$$
2. If $a$ and $b$ leave the same remainder upon division by $m$, then $a \equiv b \pmod m$.
Again write
$$
a = q_a\,m + r,\quad
b = q_b\,m + r
\quad\text{with }0 \le r < m.
$$
Then
$$
a - b = (q_a\,m + r) - (q_b\,m + r)
= (q_a - q_b)\,m,
$$
which is manifestly divisible by $m$. Therefore $a \equiv b \pmod m$.
Combining (1) and (2) shows the two characterizations are logically equivalent.
Proof. Fix an integer $m>1$. We must show that for any integer $a$ there is one—and only one—remainder $r$ with
$$
0 \le r \le m-1
$$
such that
$$
a \equiv r \pmod m.
$$
Existence
By the Division Algorithm, for any integer $a$ there exist unique integers $q$ and $r$ with
$$
a = q\,m + r
\quad\text{and}\quad
0 \,\le\, r \,<\, m.
$$
Rewriting gives
$$
a - r = q\,m,
$$
so $m$ divides $a-r$, i.e.\ $a\equiv r\pmod m$. Thus some $r$ in $\{0,1,\dots,m-1\}$ is congruent to $a$.
Uniqueness
Suppose $r$ and $s$ are two remainders in $\{0,1,\dots,m-1\}$ with
$$
a \equiv r \pmod m
\quad\text{and}\quad
a \equiv s \pmod m.
$$
Then $m$ divides both $a-r$ and $a-s$, so it also divides their difference:
$$
m \mid \bigl[(a-r) - (a-s)\bigr]
\;\Longrightarrow\;
m \mid (s - r).
$$
But $r$ and $s$ lie in the range $0\le r,s< m$, so $|s-r|<m$. The only multiple of $m$ in that range is $0$. Hence
$$
s - r = 0
\quad\Longrightarrow\quad
s = r.
$$
Combining these two parts shows each integer $a$ is congruent to exactly one element of $\{0,1,2,\dots,m-1\}$.
Proof. Let $m>1$ be fixed, and suppose
$$
a \equiv b \pmod m
\quad\text{and}\quad
c \equiv d \pmod m.
$$
By definition, there exist integers $k$ and $\ell$ such that
$$
a - b = k\,m,
\qquad
c - d = \ell\,m.
$$
(i) Addition
Consider
$$
(a + c) \;-\;(b + d)
= (a - b) + (c - d)
= k\,m + \ell\,m
= (k + \ell)\,m.
$$
Since $(k+\ell)$ is an integer, $m$ divides $(a+c)-(b+d)$. Hence
$$
a + c \equiv b + d \pmod m.
$$
(ii) Multiplication
Consider
$$
a\,c \;-\; b\,d
= a\,c \;-\; b\,c \;+\; b\,c \;-\; b\,d
= c\,(a - b) \;+\; b\,(c - d).
$$
Substituting the expressions above,
$$
c\,(a - b) + b\,(c - d)
= c\,(k\,m) + b\,(\ell\,m)
= (c\,k + b\,\ell)\,m,
$$
which shows $m$ divides $ac - bd$. Therefore
$$
ac \equiv bd \pmod m.
$$
Thus congruence modulo $m$ is compatible with both addition and multiplication.
Show that if a ≡ b (mod m), then a^n ≡ b^n (mod m), for every natural number n.
Proof by induction on $n$.
Fix a modulus $m>1$ and suppose $a \equiv b \pmod m$. We show $a^n \equiv b^n\pmod m$ for every natural number $n$.
Base case ($n=1$)
Trivially,
$$
a^1 = a \equiv b = b^1 \pmod m.
$$
Inductive step
Assume for some $k\ge1$ that
$$
a^k \equiv b^k \pmod m.
$$
We must show
$$
a^{k+1} \equiv b^{k+1} \pmod m.
$$
Notice
$$
a^{k+1} \;=\; a^k \cdot a,
\qquad
b^{k+1} \;=\; b^k \cdot b.
$$
By the inductive hypothesis $a^k \equiv b^k\pmod m$, and by our original assumption $a\equiv b\pmod m$. From the compatibility of congruence with multiplication (proved earlier), we conclude
$$
a^{k+1} = a^k\cdot a
\;\equiv\; b^k\cdot b = b^{k+1}
\pmod m.
$$
By induction, $a^n \equiv b^n \pmod m$ for all natural numbers $n$. This completes the proof.
Show that every natural number is congruent to the sum of its digits modulo 9.
Proof. Every natural number $N$ can be written in its decimal expansion as
$$
N = d_0 + d_1\cdot 10 + d_2\cdot 10^2 + \cdots + d_k\cdot 10^k,
$$
where each $d_i$ is one of the digits $0,1,\dots,9$. Call
$$
S = d_0 + d_1 + d_2 + \cdots + d_k
$$
the sum of its digits.
We will show
$$
N \equiv S \pmod 9.
$$
-
Observe that $10 \equiv 1 \pmod 9$.
Indeed, $10-1=9$ is divisible by 9.
-
Use the fact that congruence is compatible with powers and multiplication.
From $10\equiv1\pmod9$ it follows by induction (or by repeatedly applying the multiplicative property) that
$$
10^i \equiv 1^i = 1
\pmod 9
\quad\text{for every }i\ge0.
$$
-
Apply congruence to each term in the expansion of $N$.
$$
N = \sum_{i=0}^k d_i\,10^i
\equiv \sum_{i=0}^k d_i\cdot1
= \sum_{i=0}^k d_i
= S
\pmod 9.
$$
Since every step uses only the rules of congruence (namely that if $x\equiv y$ and $u\equiv v\pmod m$, then $xu\equiv yv\pmod m$ and sums likewise agree), we conclude
$$
N \equiv S \pmod 9,
$$
i.e.\ every natural number is congruent modulo 9 to the sum of its digits.
For this question I used o4-mini-high.
Here’s a bird’s‑eye view of what we’ve built up so far in our study of congruences modulo $m$, and why it matters:
1. Congruence as an Equivalence Relation
Together, these show congruence partitions the integers into equivalence classes.
2. Equivalence Classes and Canonical Representatives
-
Every integer $a$ is congruent to exactly one of
$$
\{0,1,2,\dots,m-1\},
$$
its remainder upon division by $m$.
-
Thus the set of all integers splits into $m$ classes, often denoted
$\Bbb Z/m\Bbb Z = \{[0],[1],\dots,[m-1]\}$.
3. Arithmetic in $\Bbb Z/m\Bbb Z$
Congruence “respects” the usual operations: if
$$
a\equiv b\pmod m,
\quad
c\equiv d\pmod m,
$$
then
-
Addition:
$(a+c)\equiv(b+d)\pmod m.$
-
Multiplication:
$a\,c\equiv b\,d\pmod m.$
-
Powers:
$a^n\equiv b^n\pmod m$ for all $n\in\Bbb N$.
Because of this, one can do arithmetic “mod $m$” and get a well‑defined algebraic system (a ring).
4. A Classic Application: The “Divisibility by 9” Test
-
Writing a decimal number $N$ as
$\sum d_i\,10^i$, and using $10\equiv1\pmod9$, shows
$$
N \equiv \sum d_i \pmod9.
$$
-
Hence a number is divisible by 9 exactly when the sum of its digits is.
5. Why This Matters
-
Number‑theoretic tools: solving linear congruences, understanding invertibility (“units” in $\Bbb Z/m\Bbb Z$), working toward Fermat’s Little Theorem and Euler’s Theorem.
-
Chinese Remainder Theorem: decomposing problems mod $m$ into simpler ones mod its prime‑power factors.
-
Cryptography & coding theory: RSA, Diffie–Hellman, checksums all rely on modular arithmetic.
-
Practical divisibility tests: beyond 9, there are tests for 3, 11, 7, etc., all built on the same congruence ideas.
In short, congruences give us a way to “collapse” the infinite set of integers into finitely many residue classes while still doing meaningful arithmetic—and that simple idea underpins huge swaths of both pure and applied mathematics.