44. The square root of 2 is irrational

HardChallengeProofAcademy Pass80 points

The square root of 2 is irrational: there is no fraction a / b with (a / b)² = 2. Clearing the denominator, that says a * a = 2 * (b * b) has no solution in natural numbers with b > 0. Prove it.

This is a challenge and it is Mathlib-free: there are no real numbers, no ring and no Nat.Prime lemmas, only Lean’s core library. omega handles linear arithmetic but treats a * a as an unknown, so the nonlinear steps are yours.

Running and submitting solutions, the hints and the editorial come with the Academy Pass. The daily problem is open to every account.

Solution.lean
1theorem solution (a b : Nat) (hb : 0 < b) : a * a ≠ 2 * (b * b) := by
given
Loading editor…

Where you start. Everything above ⊢ may be assumed; the line below it is what you must prove.

a b:Nat
hb:0 < b
⊢a * a ≠ 2 * (b * b)
ReadyLn 1, Col 1Lean 4
Draft saved in this browser