Step 24 / 64

University

Choose the smallest suspect, again

Rank Fermat42 solutions by |c|: a smallest badge must exist.

Start with a concrete example

If hypothetical solutions had sizes 10,6,9, the smallest would be 6. A proof cannot just choose any solution and call it smallest: the minimum property must also be justified.

A small check: try the idea

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

May we call any chosen solution “smallest” without further evidence?

Read the answer and reasoning

No. If sizes 10 and 6 are both available, choosing 10 does not make it smaller than 6. Minimality is an additional property to establish.

Build the idea in three steps

  1. Minimal a b c packs the suspect: it is a Fermat42 solution, and among all Fermat42 solutions its |c| is the smallest — the ranking rule is Int.natAbs, the absolute value.
  2. exists_minimal proves the smallest exists: gather every |c| that solutions realize into a set of natural numbers; it is non-empty, for the given solution witnesses it, so Nat.find reads off the least.
  3. This is the same well-ordering step the case of three leans on — a descent needs a gauge, and here the gauge is |c|.

A small example

Candidates are ranked strictly: a solution with c = 10 loses to a solution with c = 6, so only the smallest badge can remain — the descent will need exactly that certificate.

Lean definition · original excerpt

Mathlib · db584cd · Four.lean

/-- We say a solution to `a ^ 4 + b ^ 4 = c ^ 2` is minimal if there is no other solution witha smaller `c` (in absolute value). -/def Minimal (a b c : ℤ) : Prop :=  Fermat42 a b c ∧ ∀ a1 b1 c1 : ℤ, Fermat42 a1 b1 c1 → Int.natAbs c ≤ Int.natAbs c1 /-- 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 := by  classical  let S : Set ℕ := { n | ∃ s : ℤ × ℤ × ℤ, Fermat42 s.1 s.2.1 s.2.2 ∧ n = Int.natAbs s.2.2 }  have S_nonempty : S.Nonempty := by    use Int.natAbs c    rw [Set.mem_ofPred_eq]    use ⟨a, ⟨b, c⟩⟩  let m : ℕ := Nat.find S_nonempty  have m_mem : m ∈ S := Nat.find_spec S_nonempty  rcases m_mem with ⟨s0, hs0, hs1⟩  use s0.1, s0.2.1, s0.2.2, hs0  intro a1 b1 c1 h1  rw [← hs1]  apply Nat.find_min'  use ⟨a1, ⟨b1, c1⟩⟩

How to read this Lean

The proof is mechanical well-ordering: the set S collects the |c| values that solutions realize; S_nonempty installs the given solution; Nat.find picks its least member; Nat.find_min' turns that into the universal claim over all solutions. The witness tuple s is unpacked by rcases on the way. From here a descent can always speak of “the smallest gauge”.

Where this idea is used

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

Mika’s help desk

Choose the smallest suspect, again

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

Rank Fermat42 solutions by |c|: a smallest badge must exist.

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

A small clue

Candidates are ranked strictly: a solution with c = 10 loses to a solution with c = 6, so only the smallest badge can remain — the descent will need exactly that certificate.

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 →