taocp

This site has no text of the book. Keep your own copy of TAOCP next to it. See what is checked.

Exercise · Volume 1 · 1.2.4-18

Exercise 1.2.4-18

proved in Lean solution written

RatingM15
MarkersM (mathematical)
KindK1, prove: show that a stated fact is true from the written solution
SectionSection 1.2.4 of Volume 1. Companion chapter: Integer functions and elementary number theory

The task

Show that if a≡ba \equiv b modulo rr and modulo ss, and r⊥sr \perp s, then a≡ba \equiv b modulo rsrs. Use Law B.

The exact wording is in your copy of the book.

Hints

Open one hint at a time. Try the exercise again after each.

Hint 1

Write a−b=rka - b = rk and look at the factor kk.

Hint 2

The congruence modulo ss says that ss divides rkrk. Apply Law B to rk≡r⋅0(mods)rk \equiv r \cdot 0 \pmod s.

Solution

Show the solution

Since a≡b(modr)a \equiv b \pmod r, the difference is a−b=rka - b = rk for an integer kk (Exercise 1.2.4-17). Since a≡b(mods)a \equiv b \pmod s, the number ss divides rkrk, so rk≡0(mods)rk \equiv 0 \pmod s, and this is the congruence r⋅k≡r⋅0(mods)r \cdot k \equiv r \cdot 0 \pmod s.

Apply Law B with the factor rr on both sides: r⊥sr \perp s and r⋅k≡r⋅0(mods)r \cdot k \equiv r \cdot 0 \pmod s give k≡0(mods)k \equiv 0 \pmod s. So k=slk = sl for an integer ll, and a−b=rsla - b = rsl. Hence a≡b(modrs)a \equiv b \pmod{rs}. □\square

Check

r=4r = 4, s=9s = 9: a=40a = 40 and b=4b = 4 differ by 3636. Both 44 and 99 divide 3636, and so does 4⋅9=364 \cdot 9 = 36. For a pair that is not relatively prime (Exercise 1.2.4-23), r=s=2r = s = 2, a=2a = 2, b=0b = 0 satisfies both premises and the conclusion fails.

Remarks

With Exercise 1.2.4-17 this gives Law D in full. Repeated use gives: if r1,…,rtr_1, \ldots, r_t are pairwise relatively prime, a congruence modulo each rir_i is a congruence modulo the product.

This solution is checked, and a person has not reviewed it yet. The source.

In Lean

proved The statement and its proof are in Lean. The kernel accepts the proof, and it uses the standard axioms only.

The status is computed from the Lean build. The node of the map.

Something is wrong? Report it.