module public import Quintic85.Cert @[expose] public section /-! # Two routes to the same algebra: Magma certificates vs. `grind` `Quintic85.Cert` contains identities whose certificates were *found by Magma* and are *checked by Lean* (`linear_combination`). Lean's `grind` tactic (Lean ≥ 4.22) has a built-in commutative-ring solver in the spirit of Gröbner-basis completion; here it re-proves the key elimination steps of Theorem 1.1 **without any external certificate**. Both routes end in ordinary proof terms checked by the kernel (and audited: only `propext`, `Classical.choice`, `Quot.sound`). Each theorem below restates a lemma of `Quintic85.Cert` and is proved by `grind` alone. -/ namespace Quintic85.GrindDemo variable {K : Type*} [Field K] [CharZero K] /-- `R(r) = r⁴ - 6r² - 3` has simple roots (cf. `Quintic85.Cert.R_simple`). -/ theorem R_simple {r : K} (h : r ^ 4 - 6 * r ^ 2 - 3 = 0) (h' : 4 * r ^ 3 - 12 * r = 0) : False := by grind /-- The four good pairs (cf. `Quintic85.Cert.good_pair`, which needs a Magma resultant and an ideal-membership certificate). -/ theorem good_pair {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 set_option maxHeartbeats 4000000 in /-- The quartic `Q_r` has simple roots unless `t² = t` (cf. `Quintic85.Cert.Q_simple`, whose certificate comes from a Magma elimination). -/ theorem Q_simple {r t u : K} (hR : r ^ 4 - 6 * r ^ 2 - 3 = 0) (h : r ^ 2 * u ^ 4 + (3 + r ^ 2) * u ^ 3 - t * (9 - r ^ 2) * u - t * (6 - r ^ 2) = 0) (h' : 4 * r ^ 2 * u ^ 3 + 3 * (3 + r ^ 2) * u ^ 2 - t * (9 - r ^ 2) = 0) : t ^ 2 - t = 0 := by grind omit [CharZero K] in /-- One step of the fourth-power argument: `κ c₁c₂³ = κ c₁³c₂ = 0`, `κ ≠ 0` force `c₁c₂ = 0`. -/ theorem fourth_power_step {c1 c2 κ : K} (hκ : κ ≠ 0) (Y1 : κ * (c1 * c2 ^ 3) = 0) (_Y3 : κ * (c1 ^ 3 * c2) = 0) : c1 * c2 = 0 := by grind end Quintic85.GrindDemo