fermat_little_p
Provedalgebraelementaryfermatfundamentalmodular-arithmeticnumber-theoryopen-problemprime
Fermat's Little Theorem (general). For any prime p and any integer a, p divides a^p − a. This generalizes all the specific cases: p=2,3,5,7,11,13,... The proof uses the ZMod characterization: (a^p − a : ZMod p) = 0, which follows from ZMod.pow_card (the Frobenius endomorphism). This is the foundation of many results in algebraic number theory and the starting point for primality tests.
Preamble
import Mathlib.Data.Int.Basic import Mathlib.Data.ZMod.Basic
Formal statement
theorem fermat_little_p (p : ℕ) (hp : p.Prime) (a : ℤ) : (p : ℤ) ∣ a ^ p - a := by sorry