The areas / V12. Number theory
Mathlib.NumberTheory.FLT.Four
17 declarations. Mathlib docs · Source
Fermat's Last Theorem for the case n = 4
There are no non-zero integers a, b and c such that a ^ 4 + b ^ 4 = c ^ 4.
def Fermat42 E1 #
ℤ → ℤ → ℤ → Prop
Shorthand for three non-zero integers a, b, and c satisfying a ^ 4 + b ^ 4 = c ^ 2.
We will show that no integers satisfy this equation. Clearly Fermat's Last theorem for n = 4
follows.
theorem Fermat42.comm E1 #
∀ {a b c : ℤ}, Fermat42 a b c ↔ Fermat42 b a c
theorem Fermat42.mul E1 #
∀ {a b c k : ℤ}, k ≠ 0 → (Fermat42 a b c ↔ Fermat42 (k * a) (k * b) (k ^ 2 * c))
theorem Fermat42.ne_zero E1 #
∀ {a b c : ℤ}, Fermat42 a b c → c ≠ 0
def Fermat42.Minimal E1 #
ℤ → ℤ → ℤ → Prop
We say a solution to a ^ 4 + b ^ 4 = c ^ 2 is minimal if there is no other solution with
a smaller c (in absolute value).
theorem Fermat42.exists_minimal E1 #
∀ {a b c : ℤ}, Fermat42 a b c → ∃ a0 b0 c0, Fermat42.Minimal a0 b0 c0
if we have a solution to a ^ 4 + b ^ 4 = c ^ 2 then there must be a minimal one.
theorem Fermat42.coprime_of_minimal E1 #
∀ {a b c : ℤ}, Fermat42.Minimal a b c → IsCoprime a b
a minimal solution to a ^ 4 + b ^ 4 = c ^ 2 must have a and b coprime.
theorem Fermat42.minimal_comm E1 #
∀ {a b c : ℤ}, Fermat42.Minimal a b c → Fermat42.Minimal b a c
We can swap a and b in a minimal solution to a ^ 4 + b ^ 4 = c ^ 2.
theorem Fermat42.neg_of_minimal E1 #
∀ {a b c : ℤ}, Fermat42.Minimal a b c → Fermat42.Minimal a b (-c)
We can assume that a minimal solution to a ^ 4 + b ^ 4 = c ^ 2 has positive c.
theorem Fermat42.exists_odd_minimal E1 #
∀ {a b c : ℤ}, Fermat42 a b c → ∃ a0 b0 c0, Fermat42.Minimal a0 b0 c0 ∧ a0 % 2 = 1
We can assume that a minimal solution to a ^ 4 + b ^ 4 = c ^ 2 has a odd.
theorem Fermat42.exists_pos_odd_minimal E1 #
∀ {a b c : ℤ}, Fermat42 a b c → ∃ a0 b0 c0, Fermat42.Minimal a0 b0 c0 ∧ a0 % 2 = 1 ∧ 0 < c0
We can assume that a minimal solution to a ^ 4 + b ^ 4 = c ^ 2 has
a odd and c positive.
theorem Int.isCoprime_of_sq_sum E1 #
∀ {r s : ℤ}, IsCoprime s r → IsCoprime (r ^ 2 + s ^ 2) r
theorem Int.isCoprime_of_sq_sum' E1 #
∀ {r s : ℤ}, IsCoprime r s → IsCoprime (r ^ 2 + s ^ 2) (r * s)
theorem Fermat42.not_minimal E1 #
∀ {a b c : ℤ}, Fermat42.Minimal a b c → a % 2 = 1 → 0 < c → False
theorem not_fermat_42 E1 #
∀ {a b c : ℤ}, a ≠ 0 → b ≠ 0 → a ^ 4 + b ^ 4 ≠ c ^ 2
theorem fermatLastTheoremFour E1 #
FermatLastTheoremFor 4
Fermat's Last Theorem for $n=4$: if a b c : ℕ are all non-zero
then a ^ 4 + b ^ 4 ≠ c ^ 4.
theorem FermatLastTheorem.of_odd_primes E1 #
(∀ (p : ℕ), Nat.Prime p → Odd p → FermatLastTheoremFor p) → FermatLastTheorem
To prove Fermat's Last Theorem, it suffices to prove it for odd prime exponents.