flt7_fermat_little
Provedfermatflt-7modular-arithmeticnumber-theoryproved
Fermat's Little Theorem for exponent 7: for all integers a, 7 divides a^7 - a. This is the special case p=7 of Fermat's Little Theorem (7 ∣ a^p - a for all a when p is prime). Proved by checking all 7 residue classes in ZMod 7 (by decide) and lifting to ℤ via ZMod.intCast_zmod_eq_zero_iff_dvd.
Preamble
import Mathlib.Data.ZMod.Basic import Mathlib.Data.Int.Basic
Formal statement
theorem flt7_fermat_little (a : ℤ) : (7 : ℤ) ∣ a^7 - a := by sorry
Source