/-Copyright (c) 2026 Carles Marín. All rights reserved.Released under Apache 2.0 license as described in the file LICENSE.Authors: Carles Marín-/module public import Mathlib.Tactic.Ringpublic import Mathlib.Algebra.Group.Fin.Basicpublic import Mathlib.Data.Fin.VecNotationpublic import Mathlib.Algebra.Ring.Int.Paritypublic import Mathlib.Tactic.FinCasespublic import Mathlib.Data.Fintype.Finpublic import Mathlib.Tactic.Tauto /-!# Polynomial identities for Louboutin's Conjecture 6.1 (biquadratic case) Identities in an arbitrary commutative ring `R`, with `x : Fin 4 → R` standing for the conjugates`x₁, …, x₄` and the Klein four-group acting by the labelling `τ_i x_k = x_{i xor k}`.Specialising `R := ℤ[x₁, …, x₄]` gives them as polynomial identities; specialising `R := 𝓞_K`gives them for the conjugates.* The factorisation `P(X) = ∏ (r_j X + ΔQ_j)` with `U = r₁r₂r₃`, `T = ΔQ₁ΔQ₂ΔQ₃`, `V`, `W`, and Louboutin's formulas for `T, U, V, W` in the elementary symmetric functions `a, b, c, d`.* The twelve certificates `N_jk ∈ ∏_j (r_j, ΔQ_j)` and Cramer's rule on all four conjugate rows; `T, U, V, W` as `4 × 4` determinants.* The resolvent: `Vand = (z₁ − z₂)(z₁ − z₃)(z₂ − z₃)`, `D_j = a² − 4b + 4z_j`, `Δ` even for integers, `r_j ΔQ_j = a z_j − 2c`.Here `dQ j` is `ΔQ_j` (the difference of the two quadratic factors). ## Main results * `Louboutin.Conj61.factorisation`, `Louboutin.Conj61.T_eq`, `U_eq`, `V_eq`, `W_eq`.* `Louboutin.Conj61.cramer1`, `cramer2`, `cramer3`: `∑_k N_jk x_iᵏ = Vand · (x_i + x_{i xor j})`.* `Louboutin.Conj61.Nc_scale`: trilinearity of the certificates.* `Louboutin.Conj61.resolvent`, `Louboutin.Conj61.Vand_even`, `Louboutin.Conj61.cross_prod`.* `Louboutin.Conj61.detT`, `detU`, `detV`, `detW`: the determinant forms. ## References * S. R. Louboutin, *On the order generated by the conjugates of an algebraic integer*, in: Algebra, Logic and Number Theory, Banach Center Publ. 121 (2020), 107–124, doi:10.4064/bc121-10.* S. R. Louboutin, *When is the order generated by a cubic, quartic or quintic algebraic unit Galois invariant: three conjectures*, Czechoslovak Math. J. 70 (2020), 905–919, doi:10.21136/CMJ.2020.0019-19.* C. Marín, *Orders generated by conjugates of Galois quartic integers*, preprint (2026).-/ @[expose] public section namespace Louboutin.Conj61 variable {R : Type*} [CommRing R] (x : Fin 4 → R) /-! ### V4 in the XOR labelling -/ /-- `xt i k = i xor k`: τ_i sends x_k to x_{i xor k}. -/def xt : Fin 4 → Fin 4 → Fin 4 := ![![0, 1, 2, 3], ![1, 0, 3, 2], ![2, 3, 0, 1], ![3, 2, 1, 0]] /-- conjugate family `τ_i x` : k ↦ x_{i xor k}. -/def act (i : Fin 4) : Fin 4 → R := fun k => x (xt i k) /-! ### S1: symmetric functions, Louboutin's T,U,V,W, and the factorisation -/ def ea : R := x 0 + x 1 + x 2 + x 3def eb : R := x 0 * x 1 + x 0 * x 2 + x 0 * x 3 + x 1 * x 2 + x 1 * x 3 + x 2 * x 3def ec : R := x 0 * x 1 * x 2 + x 0 * x 1 * x 3 + x 0 * x 2 * x 3 + x 1 * x 2 * x 3def ed : R := x 0 * x 1 * x 2 * x 3 /-- Louboutin's T, U, V, W as functions of a, b, c, d. -/def T : R := ea x ^ 2 * ed x - ec x ^ 2def U : R := ea x ^ 3 - 4 * ea x * eb x + 8 * ec xdef V : R := ea x ^ 2 * eb x + 2 * ea x * ec x - 4 * eb x ^ 2 + 16 * ed xdef W : R := ea x ^ 2 * ec x + 8 * ea x * ed x - 4 * eb x * ec x /-- r_j = x₁ + x_{j+1} − x_k − x_l. -/def r1 : R := x 0 + x 1 - x 2 - x 3def r2 : R := x 0 + x 2 - x 1 - x 3def r3 : R := x 0 + x 3 - x 1 - x 2/-- ΔQ_j = x₁x_{j+1} − x_k x_l. -/def dQ1 : R := x 0 * x 1 - x 2 * x 3def dQ2 : R := x 0 * x 2 - x 1 * x 3def dQ3 : R := x 0 * x 3 - x 1 * x 2/-- z_j = x₁x_{j+1} + x_k x_l (roots of the resolvent cubic). -/def z1 : R := x 0 * x 1 + x 2 * x 3def z2 : R := x 0 * x 2 + x 1 * x 3def z3 : R := x 0 * x 3 + x 1 * x 2 theorem U_eq : U x = r1 x * r2 x * r3 x := by simp only [U, ea, eb, ec, r1, r2, r3]; ring theorem T_eq : T x = dQ1 x * dQ2 x * dQ3 x := by simp only [T, ea, ec, ed, dQ1, dQ2, dQ3]; ring theorem V_eq : V x = r1 x * r2 x * dQ3 x + r1 x * dQ2 x * r3 x + dQ1 x * r2 x * r3 x := by simp only [V, ea, eb, ec, ed, r1, r2, r3, dQ1, dQ2, dQ3]; ring theorem W_eq : W x = r1 x * dQ2 x * dQ3 x + dQ1 x * r2 x * dQ3 x + dQ1 x * dQ2 x * r3 x := by simp only [W, ea, eb, ec, ed, r1, r2, r3, dQ1, dQ2, dQ3]; ring /-- **Key factorisation** (Prop. 2.1(3)), with `X` any element of `R` (take `R := O[X]` and `x := C ∘ x` for the polynomial statement, see `Conj61Model`). -/theorem factorisation (X : R) : U x * X ^ 3 + V x * X ^ 2 + W x * X + T x = (r1 x * X + dQ1 x) * (r2 x * X + dQ2 x) * (r3 x * X + dQ3 x) := by rw [U_eq, V_eq, W_eq, T_eq]; ring /-- Prop. 2.1(1): P(X) = T(α + X) (Louboutin's a'²d' − c'² of the shifted conjugates). -/theorem T_shift (X : R) : T (fun i => x i + X) = U x * X ^ 3 + V x * X ^ 2 + W x * X + T x := by simp only [T, U, V, W, ea, eb, ec, ed]; ring /-- ΔQ_j(x + X) = r_j X + ΔQ_j (the linear factors). -/theorem dQ_shift (X : R) : dQ1 (fun i => x i + X) = r1 x * X + dQ1 x ∧ dQ2 (fun i => x i + X) = r2 x * X + dQ2 x ∧ dQ3 (fun i => x i + X) = r3 x * X + dQ3 x := by refine ⟨?_, ?_, ?_⟩ <;> simp only [dQ1, dQ2, dQ3, r1, r2, r3] <;> ring /-! ### S3: Vandermonde, resolvent, parity -/ /-- Vand = ∏_{i<j} (x_j − x_i) = D(1, α, α², α³). -/def Vand : R := (x 1 - x 0) * (x 2 - x 0) * (x 3 - x 0) * (x 2 - x 1) * (x 3 - x 1) * (x 3 - x 2) theorem z_diff : z1 x - z2 x = (x 0 - x 3) * (x 1 - x 2) ∧ z1 x - z3 x = (x 0 - x 2) * (x 1 - x 3) ∧ z2 x - z3 x = (x 0 - x 1) * (x 2 - x 3) := by refine ⟨?_, ?_, ?_⟩ <;> simp only [z1, z2, z3] <;> ring /-- Lemma 1.2: Vand = +(z₁ − z₂)(z₁ − z₃)(z₂ − z₃). -/theorem Vand_eq_z : Vand x = (z1 x - z2 x) * (z1 x - z3 x) * (z2 x - z3 x) := by simp only [Vand, z1, z2, z3]; ring /-- Resolvent: e₁(z) = b, e₂(z) = ac − 4d, e₃(z) = a²d + c² − 4bd. -/theorem resolvent : z1 x + z2 x + z3 x = eb x ∧ z1 x * z2 x + z1 x * z3 x + z2 x * z3 x = ea x * ec x - 4 * ed x ∧ z1 x * z2 x * z3 x = ea x ^ 2 * ed x + ec x ^ 2 - 4 * eb x * ed x := by refine ⟨?_, ?_, ?_⟩ <;> simp only [z1, z2, z3, ea, eb, ec, ed] <;> ring /-- D_j := r_j² = a² − 4b + 4z_j. -/theorem rsq : r1 x ^ 2 = ea x ^ 2 - 4 * eb x + 4 * z1 x ∧ r2 x ^ 2 = ea x ^ 2 - 4 * eb x + 4 * z2 x ∧ r3 x ^ 2 = ea x ^ 2 - 4 * eb x + 4 * z3 x := by refine ⟨?_, ?_, ?_⟩ <;> simp only [r1, r2, r3, z1, z2, z3, ea, eb] <;> ring /-- r_j ΔQ_j = a z_j − 2c (note, after `prop:discA`: D_j = r_j², a z_j − 2c = r_j q_j). -/theorem rq_eq : r1 x * dQ1 x = ea x * z1 x - 2 * ec x ∧ r2 x * dQ2 x = ea x * z2 x - 2 * ec x ∧ r3 x * dQ3 x = ea x * z3 x - 2 * ec x := by refine ⟨?_, ?_, ?_⟩ <;> simp only [r1, r2, r3, dQ1, dQ2, dQ3, z1, z2, z3, ea, ec] <;> ring /-- Proof of Cor. `cor:weak` (Program S10): r_i q_j − r_j q_i = −r_k (z_i − z_j), {i, j, k} = {1, 2, 3} in the cyclic order (12), (23), (31). -/theorem cross_eq : r1 x * dQ2 x - r2 x * dQ1 x = -(r3 x * (z1 x - z2 x)) ∧ r2 x * dQ3 x - r3 x * dQ2 x = -(r1 x * (z2 x - z3 x)) ∧ r3 x * dQ1 x - r1 x * dQ3 x = -(r2 x * (z3 x - z1 x)) := by refine ⟨?_, ?_, ?_⟩ <;> simp only [r1, r2, r3, dQ1, dQ2, dQ3, z1, z2, z3] <;> ring /-- Proof of Cor. `cor:weak`: ∏_cyc (r_i q_j − r_j q_i) = +Vand · r₁r₂r₃, the product over the cyclic pairs (12), (23), (31), with Vand = ∏_{i<j} (x_j − x_i) (sign +, exactly). -/theorem cross_prod : (r1 x * dQ2 x - r2 x * dQ1 x) * (r2 x * dQ3 x - r3 x * dQ2 x) * (r3 x * dQ1 x - r1 x * dQ3 x) = Vand x * (r1 x * r2 x * r3 x) := by obtain ⟨h12, h23, h31⟩ := cross_eq x rw [h12, h23, h31, Vand_eq_z]; ring /-- Parity half of Lemma 1.2: for integers z₁, z₂, z₃, (z₁−z₂)(z₁−z₃)(z₂−z₃) is even. -/theorem even_prod_diff (a b c : ℤ) : Even ((a - b) * (a - c) * (b - c)) := by rw [Int.even_mul, Int.even_mul, Int.even_sub, Int.even_sub, Int.even_sub] tauto /-- Lemma 1.2 for integer-valued z_j: if the z_j are (images of) integers, Vand is an even integer. -/theorem Vand_even {k1 k2 k3 : ℤ} (h1 : z1 x = k1) (h2 : z2 x = k2) (h3 : z3 x = k3) : ∃ δ : ℤ, Vand x = δ ∧ Even δ := ⟨(k1 - k2) * (k1 - k3) * (k2 - k3), by rw [Vand_eq_z, h1, h2, h3]; push_cast; ring, even_prod_diff _ _ _⟩ /-! ### S2: the twelve certificates and Cramer `NcJK` (paper j = J ∈ 1..3, power k = K ∈ 0..3) is the Cramer numerator of the coordinateof S_j = α + τ_jα on αᵏ, written as a function of the generators (R_j, Q_j) of the product ideal∏_j (r_j, ΔQ_j): each summand is λ·h₁h₂h₃ with h_j ∈ {R_j, Q_j} (the certificates were foundby computer algebra and are checked here by `ring`); `NJK` is it at R_j = r_j, Q_j = ΔQ_j. `cramerJ` provesΣ_k N_jk x_iᵏ = Vand·(x_i + x_{i xor j}) for all four rows i, i.e. N_jk = Vand·(coordinate)whenever Vand is cancellable. `Nc_scale` is the trilinearity used in S4. -/ section cert-- uniform signature (x, R₁..Q₃) for all twelve; some certificates do not use every argumentset_option linter.unusedVariables false /-! The twelve certificates as functions of the generators: `NcJK x R₁ R₂ R₃ Q₁ Q₂ Q₃` is trilinear in the pairs (R_j, Q_j): every summand is λ·h₁h₂h₃ with h_j ∈ {R_j, Q_j} and λ ∈ ℤ[x] of degree ≤ 2. J = the index j of the paper, K = power k. -/def Nc10 (x : Fin 4 → R) (R₁ R₂ R₃ Q₁ Q₂ Q₃ : R) : R := ((x 0)*(x 2) - (x 0)*(x 3) - (x 1)*(x 2) + (x 1)*(x 3))*R₁*Q₂*Q₃ - (x 0)*(x 2)*Q₁*R₂*Q₃ + (x 0)*(x 3)*Q₁*Q₂*R₃ + ((x 2) - (x 3))*Q₁*Q₂*Q₃def Nc11 (x : Fin 4 → R) (R₁ R₂ R₃ Q₁ Q₂ Q₃ : R) : R := (-(x 0)*(x 1) + (x 0)*(x 3) + (x 1)*(x 2))*R₁*R₂*Q₃ + ((x 0)*(x 1) - (x 0)*(x 2) - (x 1)*(x 3))*R₁*Q₂*R₃ + ((x 0) + (x 1))*Q₁*R₂*Q₃ - ((x 0) + (x 1))*Q₁*Q₂*R₃def Nc12 (x : Fin 4 → R) (R₁ R₂ R₃ Q₁ Q₂ Q₃ : R) : R := -((x 0) + (x 1) + (x 2) + (x 3))*R₁*R₂*Q₃ + ((x 0) + (x 1) + (x 2) + (x 3))*R₁*Q₂*R₃ + Q₁*R₂*Q₃ - Q₁*Q₂*R₃def Nc13 (x : Fin 4 → R) (R₁ R₂ R₃ Q₁ Q₂ Q₃ : R) : R := R₁*R₂*Q₃ - R₁*Q₂*R₃def Nc20 (x : Fin 4 → R) (R₁ R₂ R₃ Q₁ Q₂ Q₃ : R) : R := (x 0)*(x 1)*R₁*Q₂*Q₃ + (-(x 0)*(x 1) + (x 0)*(x 3) + (x 1)*(x 2) - (x 2)*(x 3))*Q₁*R₂*Q₃ - (x 0)*(x 3)*Q₁*Q₂*R₃ + (-(x 1) + (x 3))*Q₁*Q₂*Q₃def Nc21 (x : Fin 4 → R) (R₁ R₂ R₃ Q₁ Q₂ Q₃ : R) : R := (-(x 0)*(x 1) - (x 0)*(x 3) - (x 1)*(x 2))*R₁*R₂*Q₃ + ((x 0)*(x 1) - (x 0)*(x 2) + (x 2)*(x 3))*Q₁*R₂*R₃ + ((x 0) + (x 1))*Q₁*R₂*Q₃ + ((x 0) + (x 2))*Q₁*Q₂*R₃ - 2*Q₁*Q₂*Q₃def Nc22 (x : Fin 4 → R) (R₁ R₂ R₃ Q₁ Q₂ Q₃ : R) : R := ((x 0) + (x 1) + (x 2) + (x 3))*R₁*R₂*Q₃ - R₁*Q₂*Q₃ - ((x 0) + (x 1) + (x 2) + (x 3))*Q₁*R₂*R₃ + Q₁*Q₂*R₃def Nc23 (x : Fin 4 → R) (R₁ R₂ R₃ Q₁ Q₂ Q₃ : R) : R := -R₁*R₂*Q₃ + Q₁*R₂*R₃def Nc30 (x : Fin 4 → R) (R₁ R₂ R₃ Q₁ Q₂ Q₃ : R) : R := -(x 0)*(x 1)*R₁*Q₂*Q₃ + (x 0)*(x 2)*Q₁*R₂*Q₃ + ((x 0)*(x 1) - (x 0)*(x 2) - (x 1)*(x 3) + (x 2)*(x 3))*Q₁*Q₂*R₃ + ((x 1) - (x 2))*Q₁*Q₂*Q₃def Nc31 (x : Fin 4 → R) (R₁ R₂ R₃ Q₁ Q₂ Q₃ : R) : R := ((x 0)*(x 1) + (x 0)*(x 2) + (x 1)*(x 3))*R₁*Q₂*R₃ + (-(x 0)*(x 1) - (x 0)*(x 2) - (x 2)*(x 3))*Q₁*R₂*R₃ + (-(x 1) + (x 2))*Q₁*Q₂*R₃def Nc32 (x : Fin 4 → R) (R₁ R₂ R₃ Q₁ Q₂ Q₃ : R) : R := -((x 0) + (x 1) + (x 2) + (x 3))*R₁*Q₂*R₃ + R₁*Q₂*Q₃ + ((x 0) + (x 1) + (x 2) + (x 3))*Q₁*R₂*R₃ - Q₁*R₂*Q₃def Nc33 (x : Fin 4 → R) (R₁ R₂ R₃ Q₁ Q₂ Q₃ : R) : R := R₁*Q₂*R₃ - Q₁*R₂*R₃end cert /-! The Cramer numerators N_jk: the certificates at the actual generators r_j, ΔQ_j. -/def N10 : R := Nc10 x (r1 x) (r2 x) (r3 x) (dQ1 x) (dQ2 x) (dQ3 x)def N11 : R := Nc11 x (r1 x) (r2 x) (r3 x) (dQ1 x) (dQ2 x) (dQ3 x)def N12 : R := Nc12 x (r1 x) (r2 x) (r3 x) (dQ1 x) (dQ2 x) (dQ3 x)def N13 : R := Nc13 x (r1 x) (r2 x) (r3 x) (dQ1 x) (dQ2 x) (dQ3 x)def N20 : R := Nc20 x (r1 x) (r2 x) (r3 x) (dQ1 x) (dQ2 x) (dQ3 x)def N21 : R := Nc21 x (r1 x) (r2 x) (r3 x) (dQ1 x) (dQ2 x) (dQ3 x)def N22 : R := Nc22 x (r1 x) (r2 x) (r3 x) (dQ1 x) (dQ2 x) (dQ3 x)def N23 : R := Nc23 x (r1 x) (r2 x) (r3 x) (dQ1 x) (dQ2 x) (dQ3 x)def N30 : R := Nc30 x (r1 x) (r2 x) (r3 x) (dQ1 x) (dQ2 x) (dQ3 x)def N31 : R := Nc31 x (r1 x) (r2 x) (r3 x) (dQ1 x) (dQ2 x) (dQ3 x)def N32 : R := Nc32 x (r1 x) (r2 x) (r3 x) (dQ1 x) (dQ2 x) (dQ3 x)def N33 : R := Nc33 x (r1 x) (r2 x) (r3 x) (dQ1 x) (dQ2 x) (dQ3 x) /-- Trilinearity of the certificates (the product-ideal structure ∏_j (r_j, ΔQ_j)): if R_j = n_j θ_j and Q_j = t_j θ_j then each certificate equals θ₁θ₂θ₃ times the certificate at (n_j, t_j). -/theorem Nc_scale (n₁ n₂ n₃ t₁ t₂ t₃ θ₁ θ₂ θ₃ : R) : Nc10 x (n₁ * θ₁) (n₂ * θ₂) (n₃ * θ₃) (t₁ * θ₁) (t₂ * θ₂) (t₃ * θ₃) = θ₁ * θ₂ * θ₃ * Nc10 x n₁ n₂ n₃ t₁ t₂ t₃ ∧ Nc11 x (n₁ * θ₁) (n₂ * θ₂) (n₃ * θ₃) (t₁ * θ₁) (t₂ * θ₂) (t₃ * θ₃) = θ₁ * θ₂ * θ₃ * Nc11 x n₁ n₂ n₃ t₁ t₂ t₃ ∧ Nc12 x (n₁ * θ₁) (n₂ * θ₂) (n₃ * θ₃) (t₁ * θ₁) (t₂ * θ₂) (t₃ * θ₃) = θ₁ * θ₂ * θ₃ * Nc12 x n₁ n₂ n₃ t₁ t₂ t₃ ∧ Nc13 x (n₁ * θ₁) (n₂ * θ₂) (n₃ * θ₃) (t₁ * θ₁) (t₂ * θ₂) (t₃ * θ₃) = θ₁ * θ₂ * θ₃ * Nc13 x n₁ n₂ n₃ t₁ t₂ t₃ ∧ Nc20 x (n₁ * θ₁) (n₂ * θ₂) (n₃ * θ₃) (t₁ * θ₁) (t₂ * θ₂) (t₃ * θ₃) = θ₁ * θ₂ * θ₃ * Nc20 x n₁ n₂ n₃ t₁ t₂ t₃ ∧ Nc21 x (n₁ * θ₁) (n₂ * θ₂) (n₃ * θ₃) (t₁ * θ₁) (t₂ * θ₂) (t₃ * θ₃) = θ₁ * θ₂ * θ₃ * Nc21 x n₁ n₂ n₃ t₁ t₂ t₃ ∧ Nc22 x (n₁ * θ₁) (n₂ * θ₂) (n₃ * θ₃) (t₁ * θ₁) (t₂ * θ₂) (t₃ * θ₃) = θ₁ * θ₂ * θ₃ * Nc22 x n₁ n₂ n₃ t₁ t₂ t₃ ∧ Nc23 x (n₁ * θ₁) (n₂ * θ₂) (n₃ * θ₃) (t₁ * θ₁) (t₂ * θ₂) (t₃ * θ₃) = θ₁ * θ₂ * θ₃ * Nc23 x n₁ n₂ n₃ t₁ t₂ t₃ ∧ Nc30 x (n₁ * θ₁) (n₂ * θ₂) (n₃ * θ₃) (t₁ * θ₁) (t₂ * θ₂) (t₃ * θ₃) = θ₁ * θ₂ * θ₃ * Nc30 x n₁ n₂ n₃ t₁ t₂ t₃ ∧ Nc31 x (n₁ * θ₁) (n₂ * θ₂) (n₃ * θ₃) (t₁ * θ₁) (t₂ * θ₂) (t₃ * θ₃) = θ₁ * θ₂ * θ₃ * Nc31 x n₁ n₂ n₃ t₁ t₂ t₃ ∧ Nc32 x (n₁ * θ₁) (n₂ * θ₂) (n₃ * θ₃) (t₁ * θ₁) (t₂ * θ₂) (t₃ * θ₃) = θ₁ * θ₂ * θ₃ * Nc32 x n₁ n₂ n₃ t₁ t₂ t₃ ∧ Nc33 x (n₁ * θ₁) (n₂ * θ₂) (n₃ * θ₃) (t₁ * θ₁) (t₂ * θ₂) (t₃ * θ₃) = θ₁ * θ₂ * θ₃ * Nc33 x n₁ n₂ n₃ t₁ t₂ t₃ := by refine ⟨?_, ?_, ?_, ?_, ?_, ?_, ?_, ?_, ?_, ?_, ?_, ?_⟩ <;> simp only [Nc10, Nc11, Nc12, Nc13, Nc20, Nc21, Nc22, Nc23, Nc30, Nc31, Nc32, Nc33] <;> ring /-! **Cramer**, all 12 pairs × 4 conjugate rows: Σ_k N_jk x_iᵏ = Vand · (x_i + x_{i xor j}). Row i = 0 is `Σ_k N_jk αᵏ = Vand·S_j` of `c1` §5 (S_j = α + τ_jα); rows 1..3 are its conjugates, so N_jk / Vand are the coordinates of S_j in the basis 1, α, α², α³. -/theorem cramer1 : N10 x + N11 x * x 0 + N12 x * x 0 ^ 2 + N13 x * x 0 ^ 3 = Vand x * (x 0 + x 1) ∧ N10 x + N11 x * x 1 + N12 x * x 1 ^ 2 + N13 x * x 1 ^ 3 = Vand x * (x 1 + x 0) ∧ N10 x + N11 x * x 2 + N12 x * x 2 ^ 2 + N13 x * x 2 ^ 3 = Vand x * (x 2 + x 3) ∧ N10 x + N11 x * x 3 + N12 x * x 3 ^ 2 + N13 x * x 3 ^ 3 = Vand x * (x 3 + x 2) := by refine ⟨?_, ?_, ?_, ?_⟩ <;> simp only [N10, N11, N12, N13, Nc10, Nc11, Nc12, Nc13, Vand, r1, r2, r3, dQ1, dQ2, dQ3] <;> ring theorem cramer2 : N20 x + N21 x * x 0 + N22 x * x 0 ^ 2 + N23 x * x 0 ^ 3 = Vand x * (x 0 + x 2) ∧ N20 x + N21 x * x 1 + N22 x * x 1 ^ 2 + N23 x * x 1 ^ 3 = Vand x * (x 1 + x 3) ∧ N20 x + N21 x * x 2 + N22 x * x 2 ^ 2 + N23 x * x 2 ^ 3 = Vand x * (x 2 + x 0) ∧ N20 x + N21 x * x 3 + N22 x * x 3 ^ 2 + N23 x * x 3 ^ 3 = Vand x * (x 3 + x 1) := by refine ⟨?_, ?_, ?_, ?_⟩ <;> simp only [N20, N21, N22, N23, Nc20, Nc21, Nc22, Nc23, Vand, r1, r2, r3, dQ1, dQ2, dQ3] <;> ring theorem cramer3 : N30 x + N31 x * x 0 + N32 x * x 0 ^ 2 + N33 x * x 0 ^ 3 = Vand x * (x 0 + x 3) ∧ N30 x + N31 x * x 1 + N32 x * x 1 ^ 2 + N33 x * x 1 ^ 3 = Vand x * (x 1 + x 2) ∧ N30 x + N31 x * x 2 + N32 x * x 2 ^ 2 + N33 x * x 2 ^ 3 = Vand x * (x 2 + x 1) ∧ N30 x + N31 x * x 3 + N32 x * x 3 ^ 2 + N33 x * x 3 ^ 3 = Vand x * (x 3 + x 0) := by refine ⟨?_, ?_, ?_, ?_⟩ <;> simp only [N30, N31, N32, N33, Nc30, Nc31, Nc32, Nc33, Vand, r1, r2, r3, dQ1, dQ2, dQ3] <;> ring /-! ### S1 (cont.): T, U, V, W as determinants D(ω) = det[σ_i(ω_l)] (Prop. 2.1 (2),(4),(5), (6.3)) `det4e` is the cofactor expansion of a 4×4 determinant along row 0 (entries row-major);`Conj61Model.det4` identifies it with `Matrix.det`. Row i is ω with x_k ↦ x_{i xor k}. -/ /-- Explicit 4×4 determinant, entries `aIL` (row I, column L). -/def det4e (a00 a01 a02 a03 a10 a11 a12 a13 a20 a21 a22 a23 a30 a31 a32 a33 : R) : R := a00 * (a11 * (a22 * a33 - a23 * a32) - a12 * (a21 * a33 - a23 * a31) + a13 * (a21 * a32 - a22 * a31)) - a01 * (a10 * (a22 * a33 - a23 * a32) - a12 * (a20 * a33 - a23 * a30) + a13 * (a20 * a32 - a22 * a30)) + a02 * (a10 * (a21 * a33 - a23 * a31) - a11 * (a20 * a33 - a23 * a30) + a13 * (a20 * a31 - a21 * a30)) - a03 * (a10 * (a21 * a32 - a22 * a31) - a11 * (a20 * a32 - a22 * a30) + a12 * (a20 * a31 - a21 * a30)) /-- (6.2): D(1, α, α·τ₁α, α·τ₁α·τ₂α) = −T. -/theorem detT : det4e (1) (x 0) (x 0 * x 1) (x 0 * x 1 * x 2) (1) (x 1) (x 1 * x 0) (x 1 * x 0 * x 3) (1) (x 2) (x 2 * x 3) (x 2 * x 3 * x 0) (1) (x 3) (x 3 * x 2) (x 3 * x 2 * x 1) = -T x := by simp only [det4e, T, ea, ec, ed]; ring /-- (6.3): D(1, α, τ₁α, τ₂α) = −U. -/theorem detU : det4e (1) (x 0) (x 1) (x 2) (1) (x 1) (x 0) (x 3) (1) (x 2) (x 3) (x 0) (1) (x 3) (x 2) (x 1) = -U x := by simp only [det4e, U, ea, eb, ec]; ring /-- Prop. 2.1(4): V = −[D(1, α, τ₁α, α·τ₁α + α·τ₂α + τ₁α·τ₂α) + D(1, α, α·τ₁α, τ₁α + τ₂α)]. -/theorem detV : det4e (1) (x 0) (x 1) (x 0 * x 1 + x 0 * x 2 + x 1 * x 2) (1) (x 1) (x 0) (x 1 * x 0 + x 1 * x 3 + x 0 * x 3) (1) (x 2) (x 3) (x 2 * x 3 + x 2 * x 0 + x 3 * x 0) (1) (x 3) (x 2) (x 3 * x 2 + x 3 * x 1 + x 2 * x 1) + det4e (1) (x 0) (x 0 * x 1) (x 1 + x 2) (1) (x 1) (x 1 * x 0) (x 0 + x 3) (1) (x 2) (x 2 * x 3) (x 3 + x 0) (1) (x 3) (x 3 * x 2) (x 2 + x 1) = -V x := by simp only [det4e, V, ea, eb, ec, ed]; ring /-- Prop. 2.1(5): W = −[D(1, α, τ₁α, α·τ₁α·τ₂α) + D(1, α, α·τ₁α, α·τ₂α + τ₁α·τ₂α)]. -/theorem detW : det4e (1) (x 0) (x 1) (x 0 * x 1 * x 2) (1) (x 1) (x 0) (x 1 * x 0 * x 3) (1) (x 2) (x 3) (x 2 * x 3 * x 0) (1) (x 3) (x 2) (x 3 * x 2 * x 1) + det4e (1) (x 0) (x 0 * x 1) (x 0 * x 2 + x 1 * x 2) (1) (x 1) (x 1 * x 0) (x 1 * x 3 + x 0 * x 3) (1) (x 2) (x 2 * x 3) (x 2 * x 0 + x 3 * x 0) (1) (x 3) (x 3 * x 2) (x 3 * x 1 + x 2 * x 1) = -W x := by simp only [det4e, W, ea, eb, ec, ed]; ring end Louboutin.Conj61