module public import Quintic85.Smooth public import Quintic85.Spans public import Quintic85.Roots @[expose] public section /-! # The four families of lines on `X_t` (proof of Yu–Zhu, Theorem 1.1) For `t ≠ 0, 1` every line on `X_t` is exactly one of * `L₁ = V(x₃, x₄)` (1 line); * `infSpan c` — the lines in the plane `x₃ = 0` through `(0:0:0:1)`, `c⁴ + 6c² - 3 = 0` (4 lines); * `planeSpan μ c` — the lines in the plane `x₄ = μx₃` through its vertex `(0:0:1:μ)`, where `μ⁴ = tμ` and `q_μ(c) = 0` (4 × 4 = 16 lines); * `skewLine (r, u, λ)` — the lines skew to `L₁`, the graphs of `λ [[ru, v], [u, 1]]` with `v = (3 - r²)/(2r)`, `R(r) = 0`, `Q_r(u) = 0`, `λ⁴ = lamVal r u` (4 × 4 × 4 = 64 lines). This file proves, for each family, *soundness* (every member is a line on `X_t`) and *completeness* (every line of the corresponding normal form is a member). The algebra is the paper's; the identities are the Magma certificates checked in `Quintic85.Cert`. -/ namespace Quintic85 open Polynomial Submodule Quintic85.Cert open scoped Classical variable {K : Type*} [Field K] /-! ### Evaluating `F_t` on a span of two vectors -/ theorem eval_F_eq_Fv (t : K) (x : Fin 4 → K) : MvPolynomial.eval x (F t) = Fv t (x 0) (x 1) (x 2) (x 3) := by rw [eval_F]; rfl /-- `F_t` vanishes on `span {p, q}` iff it vanishes at every `a p + b q`. -/ theorem onSpan_iff (t : K) (p q : Fin 4 → K) : (∀ w ∈ span K ({p, q} : Set (Fin 4 → K)), MvPolynomial.eval w (F t) = 0) ↔ ∀ a b : K, Fv t (a * p 0 + b * q 0) (a * p 1 + b * q 1) (a * p 2 + b * q 2) (a * p 3 + b * q 3) = 0 := by constructor · intro h a b have hw := h (a • p + b • q) (mem_span_pair_iff.mpr ⟨a, b, rfl⟩) rw [eval_F_eq_Fv] at hw simpa [smul_eq_mul] using hw · intro h w hw obtain ⟨a, b, rfl⟩ := mem_span_pair_iff.mp hw rw [eval_F_eq_Fv] simpa [smul_eq_mul] using h a b theorem onSpan_vec_iff (t p0 p1 p2 p3 q0 q1 q2 q3 : K) : (∀ w ∈ span K ({![p0, p1, p2, p3], ![q0, q1, q2, q3]} : Set (Fin 4 → K)), MvPolynomial.eval w (F t) = 0) ↔ ∀ a b : K, Fv t (a * p0 + b * q0) (a * p1 + b * q1) (a * p2 + b * q2) (a * p3 + b * q3) = 0 := by rw [onSpan_iff] rfl /-! ### `L₁` -/ theorem L1_isLine (t : K) : IsLineOn t (L1 : Submodule K (Fin 4 → K)) := by refine ⟨finrank_L1, ?_⟩ unfold L1 rw [onSpan_vec_iff] intro a b simp [Fv] /-! ### Lines in the plane `x₃ = 0` -/ variable [CharZero K] theorem inf_on_iff (t c1 c2 d1 d2 : K) : (∀ w ∈ span K ({![c1, c2, 0, 0], ![d1, d2, 0, 1]} : Set (Fin 4 → K)), MvPolynomial.eval w (F t) = 0) ↔ infF0 t c1 c2 d1 d2 = 0 ∧ infF1 t c1 c2 d1 d2 = 0 ∧ infF2 t c1 c2 d1 d2 = 0 ∧ infF3 t c1 c2 d1 d2 = 0 ∧ infF4 t c1 c2 d1 d2 = 0 ∧ infF5 t c1 c2 d1 d2 = 0 := by have key : ∀ a b : K, Fv t (a * c1 + b * d1) (a * c2 + b * d2) (a * 0 + b * 0) (a * 0 + b * 1) = infF0 t c1 c2 d1 d2 * a ^ 5 + infF1 t c1 c2 d1 d2 * a ^ 4 * b + infF2 t c1 c2 d1 d2 * a ^ 3 * b ^ 2 + infF3 t c1 c2 d1 d2 * a ^ 2 * b ^ 3 + infF4 t c1 c2 d1 d2 * a * b ^ 4 + infF5 t c1 c2 d1 d2 * b ^ 5 := by intro a b simp only [Fv, infF0, infF1, infF2, infF3, infF4, infF5] ring rw [onSpan_vec_iff] constructor · intro h exact quintic_coeffs fun a b => (key a b) ▸ h a b · rintro ⟨e0, e1, e2, e3, e4, e5⟩ a b rw [key a b, e0, e1, e2, e3, e4, e5] ring omit [CharZero K] in theorem infSpan_isLine (t : K) {c : K} (hc : c ^ 4 + 6 * c ^ 2 - 3 = 0) : IsLineOn t (infSpan c) := by refine ⟨finrank_infSpan c, ?_⟩ unfold infSpan rw [onSpan_vec_iff] intro a b simp only [Fv] linear_combination (-(a ^ 4 * b)) * hc /-- Completeness in the plane `x₃ = 0`: such a line is `infSpan c` with `c⁴ + 6c² - 3 = 0`. -/ theorem inf_complete (t : K) {c1 c2 d1 d2 : K} (hc : c1 ≠ 0 ∨ c2 ≠ 0) (h : ∀ w ∈ span K ({![c1, c2, 0, 0], ![d1, d2, 0, 1]} : Set (Fin 4 → K)), MvPolynomial.eval w (F t) = 0) : ∃ c, c ^ 4 + 6 * c ^ 2 - 3 = 0 ∧ span K ({![c1, c2, 0, 0], ![d1, d2, 0, 1]} : Set (Fin 4 → K)) = infSpan c := by obtain ⟨_, f1, f2, f3, f4, f5⟩ := (inf_on_iff t c1 c2 d1 d2).mp h have hδ4 := inf_change f1 f2 f3 f4 f5 have hδ : c1 * d2 - c2 * d1 = 0 := by have : (c1 * d2 - c2 * d1) ^ 4 = 0 := by linear_combination hδ4 exact pow_eq_zero_iff (n := 4) (by norm_num) |>.mp this -- `P(c1, c2) = 0` (coefficient of `α⁴β`) have hP : c1 ^ 4 + 6 * c1 ^ 2 * c2 ^ 2 - 3 * c2 ^ 4 = 0 := by simp only [infF1] at f1; linear_combination -f1 have hc2 : c2 ≠ 0 := by intro h2 rcases hc with h1 | h1 · apply h1 rw [h2] at hP exact pow_eq_zero_iff (n := 4) (by norm_num) |>.mp (by linear_combination hP) · exact h1 h2 refine ⟨c1 / c2, ?_, ?_⟩ · field_simp linear_combination hP · apply span_inf_eq c1 c2 d1 d2 (d2 / c2) hc2 · field_simp; linear_combination -hδ · field_simp /-! ### Lines in the planes `x₄ = μ x₃` -/ theorem plane_on_iff (t c1 c2 d1 d2 mu : K) : (∀ w ∈ span K ({![c1, c2, 0, 0], ![d1, d2, 1, mu]} : Set (Fin 4 → K)), MvPolynomial.eval w (F t) = 0) ↔ planeF0 t c1 c2 d1 d2 mu = 0 ∧ planeF1 t c1 c2 d1 d2 mu = 0 ∧ planeF2 t c1 c2 d1 d2 mu = 0 ∧ planeF3 t c1 c2 d1 d2 mu = 0 ∧ planeF4 t c1 c2 d1 d2 mu = 0 ∧ planeF5 t c1 c2 d1 d2 mu = 0 := by have key : ∀ a b : K, Fv t (a * c1 + b * d1) (a * c2 + b * d2) (a * 0 + b * 1) (a * 0 + b * mu) = planeF0 t c1 c2 d1 d2 mu * a ^ 5 + planeF1 t c1 c2 d1 d2 mu * a ^ 4 * b + planeF2 t c1 c2 d1 d2 mu * a ^ 3 * b ^ 2 + planeF3 t c1 c2 d1 d2 mu * a ^ 2 * b ^ 3 + planeF4 t c1 c2 d1 d2 mu * a * b ^ 4 + planeF5 t c1 c2 d1 d2 mu * b ^ 5 := by intro a b simp only [Fv, planeF0, planeF1, planeF2, planeF3, planeF4, planeF5] ring rw [onSpan_vec_iff] constructor · intro h exact quintic_coeffs fun a b => (key a b) ▸ h a b · rintro ⟨e0, e1, e2, e3, e4, e5⟩ a b rw [key a b, e0, e1, e2, e3, e4, e5] ring omit [CharZero K] in theorem planeSpan_isLine (t : K) {mu c : K} (hB : mu ^ 4 - t * mu = 0) (hq : (1 - mu) * c ^ 4 - 6 * (1 + mu) * c ^ 2 - 3 * (1 - mu) = 0) : IsLineOn t (planeSpan mu c) := by refine ⟨finrank_planeSpan mu c, ?_⟩ unfold planeSpan rw [onSpan_vec_iff] intro a b simp only [Fv] linear_combination (a ^ 4 * b) * hq + b ^ 5 * hB /-- **The fourth-power argument** (Yu–Zhu, proof of Thm 1.1). A line in the plane `x₄ = μx₃` meeting `L₁` passes through the vertex `(0:0:1:μ)`, and then `μ(μ³ - t) = 0`. -/ theorem plane_complete {t : K} (ht1 : t ≠ 1) {c1 c2 d1 d2 mu : K} (hc : c1 ≠ 0 ∨ c2 ≠ 0) (h : ∀ w ∈ span K ({![c1, c2, 0, 0], ![d1, d2, 1, mu]} : Set (Fin 4 → K)), MvPolynomial.eval w (F t) = 0) : mu ^ 4 - t * mu = 0 ∧ ∃ c, (1 - mu) * c ^ 4 - 6 * (1 + mu) * c ^ 2 - 3 * (1 - mu) = 0 ∧ span K ({![c1, c2, 0, 0], ![d1, d2, 1, mu]} : Set (Fin 4 → K)) = planeSpan mu c := by obtain ⟨_, f1, f2, f3, f4, f5⟩ := (plane_on_iff t c1 c2 d1 d2 mu).mp h obtain ⟨y0, y1, y2, y3, y4⟩ := plane_change f1 f2 f3 f4 f5 -- the five identities in factored form (`δ = c1 d2 - c2 d1`, `κ = μ(μ³ - t)`) have Y0 : (c1 * d2 - c2 * d1) ^ 4 * (1 - mu) + mu * (mu ^ 3 - t) * c2 ^ 4 = 0 := by linear_combination y0 have Y1 : mu * (mu ^ 3 - t) * (c1 * c2 ^ 3) = 0 := by linear_combination (-1 / 4 : K) * y1 have Y2 : -6 * (c1 * d2 - c2 * d1) ^ 4 * (1 + mu) + 6 * (mu * (mu ^ 3 - t)) * c1 ^ 2 * c2 ^ 2 = 0 := by linear_combination y2 have Y3 : mu * (mu ^ 3 - t) * (c1 ^ 3 * c2) = 0 := by linear_combination (-1 / 4 : K) * y3 have Y4 : -3 * (c1 * d2 - c2 * d1) ^ 4 * (1 - mu) + mu * (mu ^ 3 - t) * c1 ^ 4 = 0 := by linear_combination y4 -- Step 1: `δ = 0` (the line passes through the vertex). have hδ : c1 * d2 - c2 * d1 = 0 := by by_contra hδ have hδ4 : (c1 * d2 - c2 * d1) ^ 4 ≠ 0 := pow_ne_zero 4 hδ by_cases hκ : mu * (mu ^ 3 - t) = 0 · -- then `Q_μ ≡ 0`: `1 - μ = 0` and `1 + μ = 0` have h1 : 1 - mu = 0 := by have : (c1 * d2 - c2 * d1) ^ 4 * (1 - mu) = 0 := by linear_combination Y0 - c2 ^ 4 * hκ exact (mul_eq_zero.mp this).resolve_left hδ4 have h2 : 1 + mu = 0 := by have : (c1 * d2 - c2 * d1) ^ 4 * (1 + mu) = 0 := by linear_combination (-1 / 6 : K) * Y2 + c1 ^ 2 * c2 ^ 2 * hκ exact (mul_eq_zero.mp this).resolve_left hδ4 have : (2 : K) = 0 := by linear_combination h1 + h2 norm_num at this · -- `κ ≠ 0`: then `c1 c2 = 0`, `μ = -1`, and the outer coefficients contradict have hc12 : c1 * c2 = 0 := by have a1 := (mul_eq_zero.mp Y1).resolve_left hκ rcases mul_eq_zero.mp a1 with h | h · simp [h] · have : c2 = 0 := pow_eq_zero_iff (n := 3) (by norm_num) |>.mp h simp [this] have hmu : 1 + mu = 0 := by have : (c1 * d2 - c2 * d1) ^ 4 * (1 + mu) = 0 := by linear_combination (-1 / 6 : K) * Y2 + (mu * (mu ^ 3 - t)) * c1 * c2 * hc12 exact (mul_eq_zero.mp this).resolve_left hδ4 rcases mul_eq_zero.mp hc12 with h | h · -- `c1 = 0`: then `Y4` gives `-6 δ⁴ = 0` have : (c1 * d2 - c2 * d1) ^ 4 = 0 := by rw [h] at Y4 ⊢ linear_combination (-1 / 6 : K) * Y4 + (1 / 2 : K) * (0 * d2 - c2 * d1) ^ 4 * hmu exact hδ4 this · have : (c1 * d2 - c2 * d1) ^ 4 = 0 := by rw [h] at Y0 ⊢ linear_combination (1 / 2 : K) * Y0 + (1 / 2 : K) * (c1 * d2 - 0 * d1) ^ 4 * hmu exact hδ4 this -- Step 2: `d = γ c`, hence `κ = 0`, and `c2 ≠ 0`. obtain ⟨γ, hd1, hd2⟩ : ∃ γ, d1 = γ * c1 ∧ d2 = γ * c2 := by rcases hc with h1 | h2 · refine ⟨d1 / c1, by field_simp, ?_⟩ field_simp linear_combination hδ · refine ⟨d2 / c2, ?_, by field_simp⟩ field_simp linear_combination -hδ have hQc : (1 - mu) * (c1 ^ 4 - 3 * c2 ^ 4) - 6 * (1 + mu) * c1 ^ 2 * c2 ^ 2 = 0 := by simp only [planeF1] at f1 linear_combination f1 have hκ : mu ^ 4 - t * mu = 0 := by simp only [planeF1, planeF5] at f1 f5 rw [hd1, hd2] at f5 linear_combination f5 - γ ^ 4 * f1 have hc2 : c2 ≠ 0 := by intro h2 have hc1 : c1 ≠ 0 := hc.resolve_right (not_not.mpr h2) rw [h2] at hQc have : (1 - mu) * c1 ^ 4 = 0 := by linear_combination hQc have h1 : 1 - mu = 0 := (mul_eq_zero.mp this).resolve_right (pow_ne_zero 4 hc1) have hm : mu = 1 := by linear_combination -h1 rw [hm] at hκ exact ht1 (by linear_combination -hκ) refine ⟨hκ, c1 / c2, ?_, ?_⟩ · field_simp linear_combination hQc · exact span_plane_eq c1 c2 d1 d2 mu γ hc2 hd1 hd2 /-! ### Lines skew to `L₁` -/ theorem skew_on_iff (t a11 a12 a21 a22 : K) : (∀ w ∈ skewSpan a11 a12 a21 a22, MvPolynomial.eval w (F t) = 0) ↔ skewE0 t a11 a12 a21 a22 = 0 ∧ skewE1 t a11 a12 a21 a22 = 0 ∧ skewE2 t a11 a12 a21 a22 = 0 ∧ skewE3 t a11 a12 a21 a22 = 0 ∧ skewE4 t a11 a12 a21 a22 = 0 ∧ skewE5 t a11 a12 a21 a22 = 0 := by have key : ∀ a b : K, Fv t (a * a11 + b * a12) (a * a21 + b * a22) (a * 1 + b * 0) (a * 0 + b * 1) = skewE0 t a11 a12 a21 a22 * a ^ 5 + skewE1 t a11 a12 a21 a22 * a ^ 4 * b + skewE2 t a11 a12 a21 a22 * a ^ 3 * b ^ 2 + skewE3 t a11 a12 a21 a22 * a ^ 2 * b ^ 3 + skewE4 t a11 a12 a21 a22 * a * b ^ 4 + skewE5 t a11 a12 a21 a22 * b ^ 5 := by intro a b simp only [Fv, skewE0, skewE1, skewE2, skewE3, skewE4, skewE5] ring unfold skewSpan rw [onSpan_vec_iff] constructor · intro h exact quintic_coeffs fun a b => (key a b) ▸ h a b · rintro ⟨e0, e1, e2, e3, e4, e5⟩ a b rw [key a b, e0, e1, e2, e3, e4, e5] ring /-- `D(r,u) = 6 - r² + (9-r²)u` does not vanish at the roots `u` of `Q_r` (for `t ≠ 0`). -/ theorem D_ne_zero {t r u : K} (ht0 : t ≠ 0) (hR : r ^ 4 - 6 * r ^ 2 - 3 = 0) (hQ : r ^ 2 * u ^ 4 + (3 + r ^ 2) * u ^ 3 - t * (9 - r ^ 2) * u - t * (6 - r ^ 2) = 0) : 6 - r ^ 2 + (9 - r ^ 2) * u ≠ 0 := by intro hD have hQN : u ^ 3 * (3 + r ^ 2 + r ^ 2 * u) = 0 := by linear_combination hQ + t * hD rcases mul_eq_zero.mp hQN with hu | hN · have hu0 : u = 0 := pow_eq_zero_iff (n := 3) (by norm_num) |>.mp hu subst hu0 have h6 : t * (6 - r ^ 2) = 0 := by linear_combination -hQ rcases mul_eq_zero.mp h6 with h | h · exact ht0 h · have : (3 : K) = 0 := by linear_combination -hR - r ^ 2 * h norm_num at this · have : (27 : K) = 0 := by linear_combination (9 - r ^ 2) * hN - r ^ 2 * hD norm_num at this /-- The parameters `(r, u, λ)` of the 64 skew lines. -/ noncomputable def skewTriples (t : K) : Finset (K × K × K) := (polyR : K[X]).roots.toFinset.biUnion fun r => (polyQ t r).roots.toFinset.biUnion fun u => (polyL r u).roots.toFinset.image fun l => (r, u, l) /-- The coefficients `(a11, a12, a21, a22) = (λur, λv, λu, λ)`, `v = (3 - r²)/(2r)`, of the skew line with parameters `(r, u, λ)` (Yu–Zhu: `A = λ [[ru, v], [u, 1]]`). -/ noncomputable def skewMat (x : K × K × K) : K × K × K × K := (x.2.2 * x.2.1 * x.1, x.2.2 * ((3 - x.1 ^ 2) / (2 * x.1)), x.2.2 * x.2.1, x.2.2) /-- The skew line with parameters `(r, u, λ)`. -/ noncomputable def skewLine (x : K × K × K) : Submodule K (Fin 4 → K) := skewSpan (skewMat x).1 (skewMat x).2.1 (skewMat x).2.2.1 (skewMat x).2.2.2 theorem mem_skewTriples {t : K} {x : K × K × K} : x ∈ skewTriples t ↔ x.1 ^ 4 - 6 * x.1 ^ 2 - 3 = 0 ∧ x.1 ^ 2 * x.2.1 ^ 4 + (3 + x.1 ^ 2) * x.2.1 ^ 3 - t * (9 - x.1 ^ 2) * x.2.1 - t * (6 - x.1 ^ 2) = 0 ∧ x.2.2 ^ 4 - lamVal x.1 x.2.1 = 0 := by obtain ⟨r, u, l⟩ := x simp only [skewTriples, Finset.mem_biUnion, Finset.mem_image, Prod.mk.injEq] constructor · rintro ⟨r', hr', u', hu', l', hl', rfl, rfl, rfl⟩ have hR : r' ^ 4 - 6 * r' ^ 2 - 3 = 0 := by rwa [mem_roots_toFinset_iff polyR_ne_zero, eval_polyR] at hr' have hr0 : r' ≠ 0 := by rintro rfl; norm_num at hR refine ⟨hR, ?_, ?_⟩ · rwa [mem_roots_toFinset_iff (polyQ_ne_zero hr0), eval_polyQ] at hu' · rwa [mem_roots_toFinset_iff (polyL_ne_zero _ _), eval_polyL] at hl' · rintro ⟨hR, hQ, hL⟩ have hr0 : r ≠ 0 := by rintro rfl; norm_num at hR refine ⟨r, ?_, u, ?_, l, ?_, rfl, rfl, rfl⟩ · rwa [mem_roots_toFinset_iff polyR_ne_zero, eval_polyR] · rwa [mem_roots_toFinset_iff (polyQ_ne_zero hr0), eval_polyQ] · rwa [mem_roots_toFinset_iff (polyL_ne_zero _ _), eval_polyL] /-- Soundness of the skew family: every `skewLine x`, `x ∈ skewTriples t`, is a line on `X_t`. -/ theorem skewLine_isLine {t : K} (ht0 : t ≠ 0) {x : K × K × K} (hx : x ∈ skewTriples t) : IsLineOn t (skewLine x) := by obtain ⟨r, u, l⟩ := x obtain ⟨hR, hQ, hL⟩ := mem_skewTriples.mp hx simp only at hR hQ hL have hr : r ≠ 0 := by rintro rfl; norm_num at hR have hD := D_ne_zero ht0 hR hQ refine ⟨finrank_skewSpan _ _ _ _, ?_⟩ rw [skewLine, skew_on_iff] simp only [skewMat] set v := (3 - r ^ 2) / (2 * r) with hv have hG : r ^ 2 + 2 * r * v - 3 = 0 := by rw [hv]; field_simp; ring have hRp : polR r = 0 := by simp only [polR]; exact hR obtain ⟨n0, n1, n2, n3, n4, n5⟩ := skew_normalised t l u r v have hN := N1_mod (u := u) hRp hG have hW := W4_mod (u := u) hRp hG have hP4 := P4_mod (u := u) hRp hG have hP5 := P5_mod (u := u) hRp hG have hV := V_mod (u := u) hRp hG have hl4 : l ^ 4 * (12 * (6 - r ^ 2 + (9 - r ^ 2) * u)) = -1 := by have : l ^ 4 = lamVal r u := by linear_combination hL rw [this, lamVal] field_simp refine ⟨?_, ?_, ?_, ?_, ?_, ?_⟩ · rw [n0, hRp]; ring · rw [n1, hN] have : (-t - l ^ 4 * u ^ 3 * (12 * (3 + r ^ 2 + r ^ 2 * u))) * (6 - r ^ 2 + (9 - r ^ 2) * u) = 0 := by linear_combination hQ - u ^ 3 * (3 + r ^ 2 + r ^ 2 * u) * hl4 exact (mul_eq_zero.mp this).resolve_right hD · rw [n2, hP4]; ring · rw [n3, hP5]; ring · rw [n4, hW]; linear_combination hl4 · rw [n5, hV]; ring /-- Completeness of the skew family: every line skew to `L₁` on `X_t` is a `skewLine x`. -/ theorem skew_complete {t : K} (ht0 : t ≠ 0) {a11 a12 a21 a22 : K} (h : ∀ w ∈ skewSpan a11 a12 a21 a22, MvPolynomial.eval w (F t) = 0) : ∃ x ∈ skewTriples t, skewLine x = skewSpan a11 a12 a21 a22 := by obtain ⟨e0, e1, e2, e3, e4, e5⟩ := (skew_on_iff t a11 a12 a21 a22).mp h -- all four entries are nonzero have E0 : a11 ^ 4 - 6 * a11 ^ 2 * a21 ^ 2 - 3 * a21 ^ 4 = 0 := by simp only [skewE0] at e0; linear_combination e0 have E5 : -a12 ^ 4 - 6 * a12 ^ 2 * a22 ^ 2 + 3 * a22 ^ 4 = 0 := by simp only [skewE5] at e5; linear_combination e5 have h21 : a21 ≠ 0 := by intro h21 have h11 : a11 = 0 := by rw [h21] at E0 exact pow_eq_zero_iff (n := 4) (by norm_num) |>.mp (by linear_combination E0) simp only [skewE1] at e1 rw [h11, h21] at e1 exact ht0 (by linear_combination -e1) have h11 : a11 ≠ 0 := by intro h11 rw [h11] at E0 exact h21 (pow_eq_zero_iff (n := 4) (by norm_num) |>.mp (by linear_combination (-1 / 3 : K) * E0)) have h22 : a22 ≠ 0 := by intro h22 have h12 : a12 = 0 := by rw [h22] at E5 exact pow_eq_zero_iff (n := 4) (by norm_num) |>.mp (by linear_combination -E5) simp only [skewE4] at e4 rw [h12, h22] at e4 have : (1 : K) = 0 := by linear_combination e4 exact one_ne_zero this -- normalised coordinates `a11 = λur, a12 = λv, a21 = λu` with `λ = a22` obtain ⟨u, r, v, hu0, hr0, rfl, rfl, rfl⟩ : ∃ u r v : K, u ≠ 0 ∧ r ≠ 0 ∧ a11 = a22 * u * r ∧ a12 = a22 * v ∧ a21 = a22 * u := ⟨a21 / a22, a11 / a21, a12 / a22, div_ne_zero h21 h22, div_ne_zero h11 h21, by field_simp, by field_simp, by field_simp⟩ obtain ⟨n0, n1, n2, n3, n4, n5⟩ := skew_normalised t a22 u r v rw [n0] at e0; rw [n1] at e1; rw [n2] at e2; rw [n3] at e3; rw [n4] at e4; rw [n5] at e5 have hl4 : a22 ^ 4 ≠ 0 := pow_ne_zero 4 h22 have hRp : polR r = 0 := (mul_eq_zero.mp e0).resolve_left (mul_ne_zero hl4 (pow_ne_zero 4 hu0)) have hVp : polV v = 0 := by have : a22 ^ 4 * polV v = 0 := by linear_combination -e5 exact (mul_eq_zero.mp this).resolve_left hl4 have hP4 : polP4 r v u = 0 := by have : (-2 * a22 ^ 4 * u ^ 2) * polP4 r v u = 0 := by linear_combination e2 exact (mul_eq_zero.mp this).resolve_left (mul_ne_zero (mul_ne_zero (by norm_num) hl4) (pow_ne_zero 2 hu0)) have hP5 : polP5 r v u = 0 := by have : (-2 * a22 ^ 4 * u) * polP5 r v u = 0 := by linear_combination e3 exact (mul_eq_zero.mp this).resolve_left (mul_ne_zero (mul_ne_zero (by norm_num) hl4) hu0) have hG := good_pair hP4 hP5 hRp hVp rw [N1_mod hRp hG] at e1 rw [W4_mod hRp hG] at e4 have hR : r ^ 4 - 6 * r ^ 2 - 3 = 0 := by simpa only [polR] using hRp have hQ : r ^ 2 * u ^ 4 + (3 + r ^ 2) * u ^ 3 - t * (9 - r ^ 2) * u - t * (6 - r ^ 2) = 0 := by linear_combination (u ^ 3 * (3 + r ^ 2 + r ^ 2 * u)) * e4 + (6 - r ^ 2 + (9 - r ^ 2) * u) * e1 have hD := D_ne_zero ht0 hR hQ have hL : a22 ^ 4 - lamVal r u = 0 := by rw [lamVal] field_simp linear_combination e4 have hv' : v = (3 - r ^ 2) / (2 * r) := by field_simp linear_combination hG refine ⟨(r, u, a22), mem_skewTriples.mpr ⟨hR, hQ, hL⟩, ?_⟩ simp only [skewLine, skewMat] rw [← hv'] end Quintic85