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-22

Exercise 1.2.4-22

proved in Lean solution written

RatingM10
MarkersM (mathematical), recommended
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

Give integers for which Law B fails because aa and mm are not relatively prime.

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

Take a modulus with a small divisor, and let aa be that divisor.

Hint 2

Take b=ab = a. Then the hypothesis a≡ba \equiv b is true, and you need ax≡ayax \equiv ay with x≢yx \not\equiv y.

Solution

Show the solution

Take m=6m = 6, a=b=2a = b = 2, x=1x = 1 and y=4y = 4.

The hypothesis a≡b(mod6)a \equiv b \pmod 6 is true since a=ba = b. Also ax=2ax = 2 and by=8by = 8 and 8−2=68 - 2 = 6, so ax≡by(mod6)ax \equiv by \pmod 6. The conclusion x≡y(mod6)x \equiv y \pmod 6 is false: 4−1=34 - 1 = 3 is not a multiple of 66. Here gcd⁡(2,6)=2≠1\gcd(2, 6) = 2 \ne 1.

Check

In general, with d=gcd⁡(a,m)>1d = \gcd(a, m) > 1, the numbers x=0x = 0 and y=m/dy = m/d give ax=0ax = 0 and ay=am/day = a m/d, a multiple of mm, while yy is not a multiple of mm. For m=6m = 6 and a=2a = 2 this gives y=3y = 3 and the pair 2⋅0≡2⋅3(mod6)2 \cdot 0 \equiv 2 \cdot 3 \pmod 6 with 0≢30 \not\equiv 3.

Remarks

Exercise 1.2.4-20 proves Law B under a⊥ma \perp m, so every counterexample has gcd⁡(a,m)>1\gcd(a, m) > 1. When the factor is not relatively prime, the correct cancellation is modulo m/gcd⁡(a,m)m/\gcd(a, m).

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.