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

Exercise 1.2.4-20

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

Prove Law B from the law of inverses and Law A.

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′a' with aa′≡1(modm)aa' \equiv 1 \pmod m and multiply a congruence by it.

Solution

Show the solution

Let ax≡byax \equiv by and a≡b(modm)a \equiv b \pmod m with a⊥ma \perp m. Law A applied to a≡ba \equiv b and y≡yy \equiv y gives ay≡byay \equiv by. Together with ax≡byax \equiv by this gives ax≡ayax \equiv ay (a congruence is an equality of remainders, so it is transitive).

By the law of inverses there is an integer a′a' with a′a≡1(modm)a'a \equiv 1 \pmod m. Multiply the congruence ax≡ayax \equiv ay by a′a' (Law A): a′ax≡a′aya'ax \equiv a'ay. Since a′a≡1a'a \equiv 1, Law A gives a′ax≡xa'ax \equiv x and a′ay≡ya'ay \equiv y. So x≡y(modm)x \equiv y \pmod m. □\square

Check

Modulo 77 with a=3a = 3 (here a′=5a' = 5 since 15≡115 \equiv 1): 3⋅4=12≡53 \cdot 4 = 12 \equiv 5 and 3⋅11=33≡53 \cdot 11 = 33 \equiv 5, so 4≡11(mod7)4 \equiv 11 \pmod 7, which holds. If a⊥ma \perp m fails, cancelling can fail (Exercise 1.2.4-22).

Remarks

The proof of Fermat's theorem in the section uses Law B to cancel a product. Law B also shows that the inverse of Exercise 1.2.4-19 is unique modulo mm: if nn′≡nn′′≡1nn' \equiv nn'' \equiv 1, then Law B with a=b=na = b = n gives n′≡n′′n' \equiv n''.

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.