Step 25 / 64

University

Two right triangles inside every suspect

The Pythagorean classification turns a⁴ + b⁴ = c² into chains of smaller squares.

Start with a concrete example

With m=3,n=2, the three numbers m²−n²,2mn,m²+n² are 5,12,13, and 25+144=169. This is a concrete use of the right-triangle parametrization.

A small check: try the idea

Think with the concrete example above. You can try again.

For m=3,n=2, what does m²−n² equal?

Read the answer and reasoning

5. Compute 9−4=5. Squaring the difference instead would give (3−2)²=1, which is a different expression.

Build the idea in three steps

  1. The core theorem not_minimal assumes a minimal suspect that is tidy enough — a odd, c positive — and derives False: death by too much structure.
  2. First structure: a ^ 4 + b ^ 4 = c ^ 2 means (a ^ 2) ^ 2 + (b ^ 2) ^ 2 = c ^ 2, a Pythagorean triple. The coprime classification produces m and n with a ^ 2 = m ^ 2 - n ^ 2, b ^ 2 = 2 * m * n and c = m ^ 2 + n ^ 2.
  3. The comments say what the reader should hear: from a ^ 2 = m ^ 2 - n ^ 2 once again a = r ^ 2 - s ^ 2, n = 2 * r * s, m = r ^ 2 + s ^ 2 — the same classification applied to the smaller triple it just made.

A small example

A familiar triple: 3² + 4² = 5². Then m = 3, n = 2 gives m ^ 2 - n ^ 2 = 5, 2 * m * n = 12, m ^ 2 + n ^ 2 = 13, and indeed 5² + 12² = 13². Every coprime triple arises this way, with one leg odd.

Use in Lean · original excerpt

Mathlib · db584cd · Four.lean

theorem not_minimal {a b c : ℤ} (h : Minimal a b c) (ha2 : a % 2 = 1) (hc : 0 < c) : False := by  -- Use the fact that a ^ 2, b ^ 2, c form a pythagorean triple to obtain m and n such that  -- a ^ 2 = m ^ 2 - n ^ 2, b ^ 2 = 2 * m * n and c = m ^ 2 + n ^ 2  -- first the formula:  have ht : PythagoreanTriple (a ^ 2) (b ^ 2) c := by    delta PythagoreanTriple    linear_combination h.1.2.2  -- coprime requirement:  have h2 : Int.gcd (a ^ 2) (b ^ 2) = 1 :=    Int.isCoprime_iff_gcd_eq_one.mp (coprime_of_minimal h).pow  -- in order to reduce the possibilities we get from the classification of pythagorean triples  -- it helps if we know the parity of a ^ 2 (and the sign of c):  have ha22 : a ^ 2 % 2 = 1 := by    rw [sq, Int.mul_emod, ha2]    decide  obtain ⟨m, n, ht1, ht2, ht3, ht4, ht5, ht6⟩ := ht.coprime_classification' h2 ha22 hc  -- Now a, n, m form a pythagorean triple and so we can obtain r and s such that  -- a = r ^ 2 - s ^ 2, n = 2 * r * s and m = r ^ 2 + s ^ 2  -- formula:  have htt : PythagoreanTriple a n m := by    delta PythagoreanTriple    linear_combination ht1  -- a and n are coprime, because a ^ 2 = m ^ 2 - n ^ 2 and m and n are coprime.  have h3 : Int.gcd a n = 1 := by    apply Int.isCoprime_iff_gcd_eq_one.mp    apply @IsCoprime.of_mul_left_left _ _ _ a    rw [← sq, ht1, (by ring : m ^ 2 - n ^ 2 = m ^ 2 + -n * n)]    exact (Int.isCoprime_iff_gcd_eq_one.mpr ht4).pow_left.add_mul_right_left (-n)

How to read this Lean

ht builds the triple from the equation itself — linear_combination shuffles the target equation into the triple’s shape, pure algebra bookkeeping. The classification receives three prepared facts: coprime legs (the pow of the neighboring coprime_of_minimal), the odd leg (ha22), and a positive hypotenuse. Deeper in this same theorem, the second triple a, n, m is classified again — nested structure, exactly what the descent consumes.

Where this idea is used

7. The veterans’ cabinet
I’m lost · Help

Mika’s help desk

Two right triangles inside every suspect

One thing at a time

Read the three explanation steps first. The Lean source is there for a closer look afterwards; you do not have to read it first.

In simpler words

The Pythagorean classification turns a⁴ + b⁴ = c² into chains of smaller squares.

Earlier ideas are listed under “Start with these ideas” on this page.

A small clue

A familiar triple: 3² + 4² = 5². Then m = 3, n = 2 gives m ^ 2 - n ^ 2 = 5, 2 * m * n = 12, m ^ 2 + n ^ 2 = 13, and indeed 5² + 12² = 13². Every coprime triple arises this way, with one leg odd.

Close this panel to return to the exact place you were reading. These are prepared hints for this page.

Start with the first small story →