module public import Quintic85.Lines import Mathlib.Data.Rat.Lemmas import Mathlib.Tactic.IntervalCases import Mathlib.Tactic.Linarith import Mathlib.Tactic.Positivity @[expose] public section /-! # The lines of `X_{-1/8}` defined over `ℚ` (a by-product of the formalization) `Quintic85.lines_eq` describes the set of lines of `X_t` over **any** field of characteristic zero (finding F7 of the digest: algebraic closure is needed only to count roots). Over `K = ℚ` and the paper's surface `t = -1/8`, none of the relevant polynomials has a rational root: * `R(r) = r⁴ - 6r² - 3` and `c⁴ + 6c² - 3` (skew lines, lines in `x₃ = 0`): `(r² - 3)² = 12` and `(c² + 3)² = 12`, and `12 = 4 · 3` is not a rational square; * `B(μ) = μ⁴ + μ/8` has the rational roots `μ = 0, -1/2` only, and `q₀(c) = c⁴ - 6c² - 3`, `q_{-1/2}(c) = (3/2)(c² - 3)(c² + 1)` have no rational roots. Hence `L₁` is the only line of `X_{-1/8}` defined over `ℚ` (`lines_rat`, `ncard_lines_rat`). This statement is not in the paper. -/ namespace Quintic85.Rational open Polynomial /-- `3` is not the square of a rational number. -/ theorem sq_ne_three (q : ℚ) : q ^ 2 ≠ 3 := by intro h have h3 : IsSquare (3 : ℚ) := ⟨q, by rw [← h, sq]⟩ rw [Rat.isSquare_ofNat_iff] at h3 obtain ⟨k, hk⟩ := h3 have : k ≤ 2 := by nlinarith interval_cases k <;> omega /-- `R(r) = r⁴ - 6r² - 3` has no rational root: `((r² - 3)/2)² = 3`. -/ theorem polyR_ne_zero_rat (r : ℚ) : r ^ 4 - 6 * r ^ 2 - 3 ≠ 0 := fun h => sq_ne_three ((r ^ 2 - 3) / 2) (by linear_combination h / 4) /-- `c⁴ + 6c² - 3` has no rational root: `((c² + 3)/2)² = 3`. -/ theorem polyInf_ne_zero_rat (c : ℚ) : c ^ 4 + 6 * c ^ 2 - 3 ≠ 0 := fun h => sq_ne_three ((c ^ 2 + 3) / 2) (by linear_combination h / 4) /-- For `t = -1/8` the rational roots of `B(μ) = μ⁴ - tμ` are `0` and `-1/2`. -/ theorem rootB_rat {mu : ℚ} (h : mu ^ 4 - (-1/8) * mu = 0) : mu = 0 ∨ mu = -1/2 := by have h' : mu * (mu + 1/2) * ((mu - 1/4) ^ 2 + 3/16) = 0 := by linear_combination h rcases mul_eq_zero.mp h' with h1 | h1 · rcases mul_eq_zero.mp h1 with h2 | h2 · exact Or.inl h2 · exact Or.inr (by linear_combination h2) · exact absurd h1 (by positivity) /-- No line through a vertex `(0 : 0 : 1 : μ)` of `X_{-1/8}` is defined over `ℚ`. -/ theorem no_plane_pair_rat {mu c : ℚ} (hB : mu ^ 4 - (-1/8) * mu = 0) (hq : (1 - mu) * c ^ 4 - 6 * (1 + mu) * c ^ 2 - 3 * (1 - mu) = 0) : False := by rcases rootB_rat hB with rfl | rfl · exact polyR_ne_zero_rat c (by linear_combination hq) · have h : (c ^ 2 - 3) * (c ^ 2 + 1) = 0 := by linear_combination (2/3) * hq rcases mul_eq_zero.mp h with h1 | h1 · exact sq_ne_three c (by linear_combination h1) · exact absurd h1 (by positivity) theorem skewTriples_rat (t : ℚ) : skewTriples t = ∅ := Finset.eq_empty_of_forall_notMem fun x hx => polyR_ne_zero_rat x.1 (mem_skewTriples.mp hx).1 theorem planePairs_rat : planePairs (-1/8 : ℚ) = ∅ := Finset.eq_empty_of_forall_notMem fun _ hp => no_plane_pair_rat ((mem_planePairs (by norm_num)).mp hp).1 ((mem_planePairs (by norm_num)).mp hp).2 theorem roots_polyInf_rat : (polyInf : ℚ[X]).roots = 0 := Multiset.eq_zero_of_forall_notMem fun c hc => polyInf_ne_zero_rat c (by rwa [mem_roots polyInf_ne_zero, IsRoot.def, eval_polyInf] at hc) /-- **`L₁` is the only line of `X_{-1/8}` defined over `ℚ`.** -/ theorem lines_rat : {W : Submodule ℚ (Fin 4 → ℚ) | IsLineOn (-1/8 : ℚ) W} = {L1} := by rw [lines_eq (t := (-1/8 : ℚ)) (by norm_num) (by norm_num), lineFinset, skewTriples_rat, planePairs_rat, roots_polyInf_rat] simp /-- `X_{-1/8}` has exactly one line defined over `ℚ`. -/ theorem ncard_lines_rat : {W : Submodule ℚ (Fin 4 → ℚ) | IsLineOn (-1/8 : ℚ) W}.ncard = 1 := by rw [lines_rat, Set.ncard_singleton] end Quintic85.Rational