File: Mathlib/NumberTheory/FLT/Four.lean

full_name: Fermat42
code: /-- 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. -/
def Fermat42 (a b c : ℤ) : Prop 
goal: Prop

full_name: Fermat42.comm
code: theorem comm {a b c : ℤ} : Fermat42 a b c ↔ Fermat42 b a c 
goal: Fermat42 a b c ↔ Fermat42 b a c

full_name: Fermat42.mul
code: theorem mul {a b c k : ℤ} (hk0 : k ≠ 0) :
    Fermat42 a b c ↔ Fermat42 (k * a) (k * b) (k ^ 2 * c) 
goal: Fermat42 a b c ↔ Fermat42 (k * a) (k * b) (k ^ 2 * c)

full_name: Fermat42.ne_zero
code: theorem ne_zero {a b c : ℤ} (h : Fermat42 a b c) : c ≠ 0 
goal: c ≠ 0

full_name: Fermat42.Minimal
code: /-- 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). -/
def Minimal (a b c : ℤ) : Prop 
goal: Prop

full_name: Fermat42.exists_minimal
code: /-- if we have a solution to `a ^ 4 + b ^ 4 = c ^ 2` then there must be a minimal one. -/
theorem exists_minimal {a b c : ℤ} (h : Fermat42 a b c) : ∃ a0 b0 c0, Minimal a0 b0 c0 
goal: ∃ a0 b0 c0, Fermat42.Minimal a0 b0 c0

full_name: Fermat42.coprime_of_minimal
code: /-- a minimal solution to `a ^ 4 + b ^ 4 = c ^ 2` must have `a` and `b` coprime. -/
theorem coprime_of_minimal {a b c : ℤ} (h : Minimal a b c) : IsCoprime a b 
goal: IsCoprime a b

full_name: Fermat42.minimal_comm
code: /-- We can swap `a` and `b` in a minimal solution to `a ^ 4 + b ^ 4 = c ^ 2`. -/
theorem minimal_comm {a b c : ℤ} : Minimal a b c → Minimal b a c 
goal: Fermat42.Minimal a b c → Fermat42.Minimal b a c

full_name: Fermat42.neg_of_minimal
code: /-- We can assume that a minimal solution to `a ^ 4 + b ^ 4 = c ^ 2` has positive `c`. -/
theorem neg_of_minimal {a b c : ℤ} : Minimal a b c → Minimal a b (-c) 
goal: Fermat42.Minimal a b c → Fermat42.Minimal a b (-c)

full_name: Fermat42.exists_odd_minimal
code: /-- We can assume that a minimal solution to `a ^ 4 + b ^ 4 = c ^ 2` has `a` odd. -/
theorem exists_odd_minimal {a b c : ℤ} (h : Fermat42 a b c) :
    ∃ a0 b0 c0, Minimal a0 b0 c0 ∧ a0 % 2 = 1 
goal: ∃ a0 b0 c0, Fermat42.Minimal a0 b0 c0 ∧ a0 % 2 = 1

full_name: Fermat42.exists_pos_odd_minimal
code: /-- We can assume that a minimal solution to `a ^ 4 + b ^ 4 = c ^ 2` has
`a` odd and `c` positive. -/
theorem exists_pos_odd_minimal {a b c : ℤ} (h : Fermat42 a b c) :
    ∃ a0 b0 c0, Minimal a0 b0 c0 ∧ a0 % 2 = 1 ∧ 0 < c0 
goal: ∃ a0 b0 c0, Fermat42.Minimal a0 b0 c0 ∧ a0 % 2 = 1 ∧ 0 < c0

full_name: Int.coprime_of_sq_sum
code: theorem Int.coprime_of_sq_sum {r s : ℤ} (h2 : IsCoprime s r) : IsCoprime (r ^ 2 + s ^ 2) r 
goal: IsCoprime (r ^ 2 + s ^ 2) r

full_name: Int.coprime_of_sq_sum'
code: theorem Int.coprime_of_sq_sum' {r s : ℤ} (h : IsCoprime r s) :
    IsCoprime (r ^ 2 + s ^ 2) (r * s) 
goal: IsCoprime (r ^ 2 + s ^ 2) (r * s)

full_name: Fermat42.not_minimal
code: theorem not_minimal {a b c : ℤ} (h : Minimal a b c) (ha2 : a % 2 = 1) (hc : 0 < c) : False 
goal: False

full_name: not_fermat_42
code: theorem not_fermat_42 {a b c : ℤ} (ha : a ≠ 0) (hb : b ≠ 0) : a ^ 4 + b ^ 4 ≠ c ^ 2 
goal: a ^ 4 + b ^ 4 ≠ c ^ 2

full_name: fermatLastTheoremFour
code: /--
Fermat's Last Theorem for $n=4$: if `a b c : ℕ` are all non-zero
then `a ^ 4 + b ^ 4 ≠ c ^ 4`.
-/
theorem fermatLastTheoremFour : FermatLastTheoremFor 4 
goal: FermatLastTheoremFor 4

full_name: FermatLastTheorem.of_odd_primes
code: /--
To prove Fermat's Last Theorem, it suffices to prove it for odd prime exponents.
-/
theorem FermatLastTheorem.of_odd_primes
    (hprimes : ∀ p : ℕ, Nat.Prime p → Odd p → FermatLastTheoremFor p) : FermatLastTheorem 
goal: FermatLastTheorem