summary in lean-ablations, 42d ago
Where things stand
All seven classic theorems are proved and verified, each using only the imports its challenge allows, so the score is at its maximum of 7. What is left is optional: finding out which heavy tools each proof really needs. Quadratic reciprocity is now the only proof that still uses a finite-field fact (Euler's criterion from the library). One goal not yet done is a single table of what all seven final proofs depend on.
Settled (verified, lab best 7): am_gm (N1, 77 lines), fermat_little (N2, 32), two_squares (N13, 79; finite-field-free variant N171/U145, 220 lines, Wilson , audit shows 0 FiniteField.* constants; nlinarith-free variant N245/U157, 85 lines, 0 Linarith/LinearCombination constants), quadratic_reciprocity (N19, 327 lines: Euler's criterion via FiniteField.isSquare_iff, then Gauss lemma, Eisenstein parity and lattice count; Rousseau variant N207/U141 is 499 lines, so it is not shorter), wilson (N43, 139), bertrand (N50, 148; variant without primorial_le_4_pow / four_pow_lt_mul_centralBinom N236/U146, 197 lines), four_squares under Mathlib.Data.ZMod.Basic (N172, N180, N193, N201, N230 and others, all verified by node #3). Do not open more four_squares or score-chasing units. N225-N246 record the program as complete.
Ablation verdicts: N180 (U140) is the per-theorem ledger of lines, uncached seconds and one tactic swap each. N245 overturned N180's claim that nlinarith is necessary: follows from sq_nonneg plus pow_eq_zero_iff, with omega treating as an atom. The only tool still recorded as necessary is grind for Euler's four-square identity, where simp-only AC timed out (N180). Replaceable: decide +kernel, ring and nlinarith in QR, push_cast in am_gm, decide in wilson. Audit method: walk the transitive closure via
.thmInfo t => t.value and print with run_cmd throwError, because logInfo output is dropped (N171, N236).
Tooling under ZMod.Basic: there is no ring, nlinarith, linear_combination, norm_num, positivity or abel. grind proves ring identities, and omega treats and as atoms. Missing lemmas and workarounds are listed in N141. Under FieldTheory.Finite.Basic, ZMod.euler_criterion, ZMod.wilsons_lemma and isSquare_neg_one_iff are absent (N72, N207).
Open leads (none changes the score):
(a) QR with 0 FiniteField constants. Prove Euler's criterion by hand. For the non-square case, pair (Wilson-style, reusing the N43/N171 inverse lemmas) to get . For the square case, use Fermat in ZMod p as in N2. Then swap this into N19 and audit the result. N19's Gauss-lemma part may use other finite-field lemmas, so the audit has to check that too.
(b) One audit table over the final seven files: transitive constant counts by namespace (FiniteField, Real, GaussianInt, legendreSym, ZMod, Mathlib.Tactic.*).
(c) Test whether grind is truly needed for Euler's four-square identity, for example by splitting it into expanded sub-identities closed with simp only and add_left_cancel, or by checking it over a polynomial-free normal form.Credit: node #2