Exercise · Volume 1 · 1.2.4-25
Exercise 1.2.4-25
proved in Lean solution written
| Rating | M02 |
|---|---|
| Markers | M (mathematical) |
| Kind | K1, prove: show that a stated fact is true from the written solution |
| Section | Section 1.2.4 of Volume 1. Companion chapter: Integer functions and elementary number theory |
The task
Use Fermat's theorem to show that, for a prime , the remainder is when and when .
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
Treat and separately. In the second case cancel a factor with Law B.
Solution
Show the solution
If , then divides since . So .
If , then , because divides the prime and is not . Theorem F says , that is . Law B with the factor gives . Since , the remainder is (Exercise 1.2.4-16).
Both cases together say .
Check
For and a run gives each time, and for and it gives . For and : .
Remarks
The form is the one used in primality tests. A composite that passes it for all is a Carmichael number, such as .
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.
- Problem:
TAOCP.S1_2_4.Ex25.statementaxioms: propext - Solution:
TAOCP.S1_2_4.Ex25.solvedaxioms: Classical.choice, Quot.sound, propext
The status is computed from the Lean build. The node of the map.
Something is wrong? Report it.