fltp_residue_constraint
Provedfermatfltmodular-arithmeticnumber-theoryopen-problemprime
For any prime p and integers a, b, c satisfying a^p+b^p=c^p, p divides a+b-c. This is the general version of flt7_residue_constraint. Proof: Fermat's Little Theorem gives p | a^p-a, p | b^p-b, p | c^p-c; adding the first two and subtracting the third gives p | (a^p+b^p-c^p)-(a+b-c) = 0-(a+b-c), so p | a+b-c.
Preamble
import Mathlib.Data.ZMod.Basic import Mathlib.FieldTheory.Finite.Basic import Mathlib.Data.Nat.GCD.Basic
Formal statement
theorem fltp_residue_constraint (p : ℕ) [hp : Fact (Nat.Prime p)] (a b c : ℤ) (h_eq : a^p+b^p = c^p) : (p:ℤ) ∣ a+b-c := by sorry
Source