The code below compiles. It defines rad, states abc in an integer-exponent form, and checks small values. The definition ABC is a proposition. The file contains no proof of it.
Formal skeleton
rad, abc, and checked computations
Lean 4This file defines the radical, states the abc conjecture in an integer-exponent form, and machine-checks small values. The definition ABC is a statement, not a proof.
namespace ABC
/-- A computable primality test for small examples. -/
def isPrime (n : Nat) : Bool :=
if n < 2 then false
else
(List.range (n - 1)).all (fun k =>
let d := k + 2
d >= n || n % d != 0)
/-- Product of a list of naturals. -/
def prod : List Nat -> Nat
| [] => 1
| x :: xs => x * prod xs
/-- The primes dividing n, without repetition. -/
def primeFactors (n : Nat) : List Nat :=
(List.range (n + 1)).filter (fun p => isPrime p && decide (2 <= p) && n % p == 0)
/-- The radical of n: the product of its distinct prime divisors. -/
def rad (n : Nat) : Nat :=
if n = 0 then 0 else prod (primeFactors n)
/-- Coprimality, written without importing a library. -/
def Coprime (a b : Nat) : Prop := Nat.gcd a b = 1
/--
The abc conjecture, in an integer-exponent form.
For every rational exponent n / m > 1 there is a constant K such that
every coprime triple a + b = c satisfies c ^ m <= K * rad (a * b * c) ^ n.
This is a statement, not a theorem. No proof of ABC is given here.
-/
def ABC : Prop :=
forall (m n : Nat), 0 < m -> m < n ->
exists K : Nat, forall (a b c : Nat),
0 < a -> 0 < b -> a + b = c -> Coprime a b ->
c ^ m <= K * (rad (a * b * c)) ^ n
-- Checked computations. Each example is proved by evaluation.
#eval rad 12
#eval rad 64
example : rad 0 = 0 := by decide
example : rad 1 = 1 := by decide
example : rad 6 = 6 := by decide
example : rad 12 = 6 := by decide
example : rad 30 = 30 := by decide
example : rad 64 = 2 := by decide
example : rad 97 = 97 := by decide
-- A concrete instance of the inequality inside ABC, with m = 1 and n = 2.
example : (3 : Nat) ^ 1 <= 1 * (rad (1 * 2 * 3)) ^ 2 := by decide
end ABC
Try this: Change rad 12 to rad 18 and run it. Then change the final inequality to a false one and read the error. The checker verifies arithmetic; it does not prove ABC.
Checkedrad 12 = 6, rad 64 = 2, rad 97 = 97, and a concrete instance of the abc inequality.
StatedABC is a quantified proposition over all coprime triples. It is not proved.
MissingThe unit-family definitions, the exact Corollary 18 statement, and a definition of W(n).
The integer-exponent form is equivalent to the usual ε form: the exponent n / m plays the role of 1 + ε, and the constant absorbs the m-th root. The code states the shape of the conjecture, not a proof.