module import all Quintic85.Defs import all Quintic85.Smooth import all Quintic85.Cert import all Quintic85.Roots import all Quintic85.Spans import all Quintic85.Families import all Quintic85.Lines import all Quintic85.GrindDemo import all Quintic85.Rational /-! # Live demo for the SFARA talk (19 Nov 2026) Not part of any library target; it is checked on demand. From the repository root: tools/wmi.sh lean demo/LiveDemo.lean The file is sent to a compute node of the WMI cluster and all messages (`#check`, `#print`, errors) come back to the terminal. Edit, re-run, repeat. The `import all` lines make `#print axioms` see the proofs and not only the exported statements. -/ open Quintic85 /-! ## 1. What exactly is proved? -/ -- Theorem 1.1, as checked by the kernel: #check @ncard_lines -- the definitions it talks about (only Mathlib notions: MvPolynomial, Submodule, finrank): #print IsLineOn -- and it rests only on the three standard axioms: #print axioms ncard_lines -- Finding F7: the *classification* of the lines needs only characteristic zero -- (no `IsAlgClosed` argument); algebraic closure is used only to count roots. #check @lines_eq -- ... so Lean can answer a question the paper does not ask: over `ℚ`, `L₁` is the only line. #check @Rational.lines_rat #print axioms Rational.lines_rat /-! ## 2. Magma finds, Lean checks -/ -- `R(r) = r⁴ - 6r² - 3` has simple roots. Magma's extended gcd gives the multipliers; -- `linear_combination` checks the identity `1 = a·R + b·R'` by `ring`. example {K : Type*} [Field K] [CharZero K] {r : K} (h : r ^ 4 - 6 * r ^ 2 - 3 = 0) (h' : 4 * r ^ 3 - 12 * r = 0) : (1 : K) = 0 := by linear_combination (1/12*r^2 - 1/3) * h + (-1/48*r^3 + 7/48*r) * h' /-! ## 3. ... or no certificate at all: `grind` -/ example {K : Type*} [Field K] [CharZero K] {r : K} (h : r ^ 4 - 6 * r ^ 2 - 3 = 0) (h' : 4 * r ^ 3 - 12 * r = 0) : False := by grind -- Break it on purpose: `r⁴ - 6r² + 9 = (r² - 3)²` has double roots, so the same statement is -- false and `grind` must fail. Uncomment and re-run: -- example {K : Type*} [Field K] [CharZero K] {r : K} (h : r ^ 4 - 6 * r ^ 2 + 9 = 0) -- (h' : 4 * r ^ 3 - 12 * r = 0) : False := by -- grind -- The four good pairs `(r, v)` of the skew lines: the paper's "one checks", Magma's resultant, -- or simply `grind`. example {K : Type*} [Field K] [CharZero K] {r v u : K} (h4 : 9+3*r^2-6*u+6*r^2*u+12*r*v+6*r*u*v+2*r^3*u*v+3*v^2-3*r^2*v^2 = 0) (h5 : 6-9*u+3*r^2*u+6*r*v+12*r*u*v+6*v^2+3*u*v^2+3*r^2*u*v^2-2*r*v^3 = 0) (hR : r ^ 4 - 6 * r ^ 2 - 3 = 0) (hV : v ^ 4 + 6 * v ^ 2 - 3 = 0) : r ^ 2 + 2 * r * v - 3 = 0 := by grind /-! ## 4. Where "for every t ∉ {0, 1}" lives -/ -- `Q_r(u)` has a double root only if `t² = t`: the hardest elimination of the paper -- (a few seconds; the Magma certificate is in `Quintic85.Cert.Q_simple`). #check @GrindDemo.Q_simple