/- StateIndependentContextuality.lean Exact Four-Tier Hierarchy, Indefinite Pseudo-State Duality, Orthogonal-Join Algebra, Equiangular-Complement Independence (with Computer-Search-Free E₈ Amplification), and Strict All-Dimension Separation Theorems for Quantum State-Independent Contextuality. Kernel-checked Lean 4 proofs using standard Mathlib foundations only. -/ import Mathlib.Data.Real.Basic import Mathlib.Analysis.Real.Sqrt import Mathlib.Data.Fin.VecNotation import Mathlib.Algebra.BigOperators.Fin import Mathlib.LinearAlgebra.FiniteDimensional.Defs import Mathlib.LinearAlgebra.Dimension.Finrank import Mathlib.LinearAlgebra.Dimension.StrongRankCondition import Mathlib.Tactic set_option maxHeartbeats 1600000 namespace SICContextuality open scoped BigOperators /-! ## Section 1: Core Definitions and the Four-Tier SI-C Hierarchy -/ /-- Standard Euclidean inner product on `ℝ^d`. -/ def dot {d : ℕ} (u v : Fin d → ℝ) : ℝ := ∑ k : Fin d, u k * v k /-- Squared Euclidean norm on `ℝ^d`. -/ def normSq {d : ℕ} (v : Fin d → ℝ) : ℝ := ∑ k : Fin d, (v k) ^ 2 lemma dot_comm {d : ℕ} (u v : Fin d → ℝ) : dot u v = dot v u := by unfold dot refine Finset.sum_congr rfl fun k _ => mul_comm _ _ lemma dot_self {d : ℕ} (v : Fin d → ℝ) : dot v v = normSq v := by unfold dot normSq refine Finset.sum_congr rfl fun k _ => (sq (v k)).symm lemma normSq_nonneg {d : ℕ} (v : Fin d → ℝ) : 0 ≤ normSq v := Finset.sum_nonneg fun k _ => sq_nonneg (v k) lemma normSq_eq_zero_iff {d : ℕ} (v : Fin d → ℝ) : normSq v = 0 ↔ v = 0 := by constructor · intro h unfold normSq at h ext k have hle := Finset.single_le_sum (f := fun j : Fin d => (v j) ^ 2) (fun j _ => sq_nonneg (v j)) (Finset.mem_univ k) have hk : (v k) ^ 2 = 0 := le_antisymm (by linarith) (sq_nonneg (v k)) exact sq_eq_zero_iff.mp hk · rintro rfl simp [normSq] lemma dot_add_left {d : ℕ} (u v w : Fin d → ℝ) : dot (u + v) w = dot u w + dot v w := by simp only [dot, Pi.add_apply, add_mul, Finset.sum_add_distrib] lemma dot_add_right {d : ℕ} (u v w : Fin d → ℝ) : dot u (v + w) = dot u v + dot u w := by simp only [dot, Pi.add_apply, mul_add, Finset.sum_add_distrib] lemma dot_smul_left {d : ℕ} (c : ℝ) (u v : Fin d → ℝ) : dot (c • u) v = c * dot u v := by simp only [dot, Pi.smul_apply, smul_eq_mul, mul_assoc, Finset.mul_sum] lemma dot_smul_right {d : ℕ} (c : ℝ) (u v : Fin d → ℝ) : dot u (c • v) = c * dot u v := by rw [dot_comm, dot_smul_left, dot_comm] lemma dot_sum_left {d : ℕ} {ι : Type*} (s : Finset ι) (f : ι → Fin d → ℝ) (w : Fin d → ℝ) : dot (∑ i ∈ s, f i) w = ∑ i ∈ s, dot (f i) w := by unfold dot simp only [Finset.sum_apply, Finset.sum_mul] exact Finset.sum_comm lemma dot_sum_right {d : ℕ} {ι : Type*} (s : Finset ι) (u : Fin d → ℝ) (f : ι → Fin d → ℝ) : dot u (∑ i ∈ s, f i) = ∑ i ∈ s, dot u (f i) := by rw [dot_comm, dot_sum_left] refine Finset.sum_congr rfl fun i _ => dot_comm _ _ /-- A finite configuration of `n` nonzero rays in `ℝ^d`. -/ structure RayConfig (d n : ℕ) where vec : Fin n → Fin d → ℝ normSq_pos : ∀ i : Fin n, 0 < normSq (vec i) namespace RayConfig /-- Two rays are adjacent in the orthogonality graph iff they are distinct and orthogonal. -/ def orth {d n : ℕ} (R : RayConfig d n) (i j : Fin n) : Prop := i ≠ j ∧ dot (R.vec i) (R.vec j) = 0 lemma orth_symm {d n : ℕ} (R : RayConfig d n) {i j : Fin n} (h : R.orth i j) : R.orth j i := ⟨h.1.symm, by rw [dot_comm]; exact h.2⟩ /-- An independent set in the orthogonality graph `G(R)` (no two rays orthogonal). -/ def IsIndep {d n : ℕ} (R : RayConfig d n) (I : Finset (Fin n)) : Prop := ∀ i ∈ I, ∀ j ∈ I, ¬ R.orth i j /-- A complete orthogonal basis (`d`-clique) in `G(R)`. -/ def IsBasis {d n : ℕ} (R : RayConfig d n) (C : Finset (Fin n)) : Prop := C.card = d ∧ ∀ i ∈ C, ∀ j ∈ C, i ≠ j → R.orth i j /-- A Kochen-Specker `{0,1}`-assignment: an independent set meeting every orthogonal `d`-basis. -/ def IsKSColoring {d n : ℕ} (R : RayConfig d n) (I : Finset (Fin n)) : Prop := R.IsIndep I ∧ ∀ C : Finset (Fin n), R.IsBasis C → (I ∩ C).Nonempty /-- Irreducibility: `R` cannot be partitioned into two nonempty mutually orthogonal subsets (equivalently, the complement graph `Ḡ(R)` is connected). -/ def IsIrreducible {d n : ℕ} (R : RayConfig d n) : Prop := 1 ≤ n ∧ ∀ S : Finset (Fin n), S.Nonempty → S ≠ Finset.univ → ∃ i ∈ S, ∃ j ∉ S, ¬ R.orth i j /-- Rank-1 projector expectation `⟨ψ | P_i | ψ⟩ = ⟨v_i, ψ⟩² / ‖v_i‖²`. -/ noncomputable def projVal {d n : ℕ} (R : RayConfig d n) (i : Fin n) (ψ : Fin d → ℝ) : ℝ := (dot (R.vec i) ψ) ^ 2 / normSq (R.vec i) lemma projVal_nonneg {d n : ℕ} (R : RayConfig d n) (i : Fin n) (ψ : Fin d → ℝ) : 0 ≤ R.projVal i ψ := div_nonneg (sq_nonneg _) (le_of_lt (R.normSq_pos i)) /-- Weighted independence bound `α(G(R), w) ≤ B`. -/ def IsWeightBound {d n : ℕ} (R : RayConfig d n) (w : Fin n → ℝ) (B : ℝ) : Prop := ∀ I : Finset (Fin n), R.IsIndep I → ∑ i ∈ I, w i ≤ B /-- **Tier 1 (Fractional-Chromatic / Maximally-Mixed SI-C, Ramanathan-Horodecki 2014)**: `χ_f(G(R)) > d`, i.e., `∃ w ≥ 0, B > 0` with `α(G(R), w) ≤ B` and `d * B < ∑ w_i`. -/ def IsTier1_FracChromatic {d n : ℕ} (R : RayConfig d n) : Prop := ∃ (w : Fin n → ℝ) (B : ℝ), (∀ i, 0 ≤ w i) ∧ 0 < B ∧ R.IsWeightBound w B ∧ (d : ℝ) * B < ∑ i : Fin n, w i /-- **Tier 2 (All-State Operator SI-C, Cabello-Kleinmann-Budroni 2015)**: `∃ w ≥ 0, B, ε > 0` with `α(G(R), w) ≤ B` and `∑ w_i P_i ≽ (B + ε) I_d`. -/ def IsTier2_AllStateOperator {d n : ℕ} (R : RayConfig d n) : Prop := ∃ (w : Fin n → ℝ) (B ε : ℝ), (∀ i, 0 ≤ w i) ∧ 0 < ε ∧ R.IsWeightBound w B ∧ ∀ ψ : Fin d → ℝ, (B + ε) * normSq ψ ≤ ∑ i : Fin n, w i * R.projVal i ψ /-- **Tier 3 (Constant-Value / Tight-Frame SI-C)**: `∃ w ≥ 0, B < c` with `α(G(R), w) ≤ B` and `∑ w_i P_i = c I_d`. -/ def IsTier3_TightFrame {d n : ℕ} (R : RayConfig d n) : Prop := ∃ (w : Fin n → ℝ) (B c : ℝ), (∀ i, 0 ≤ w i) ∧ R.IsWeightBound w B ∧ B < c ∧ ∀ ψ : Fin d → ℝ, ∑ i : Fin n, w i * R.projVal i ψ = c * normSq ψ /-- **Tier 4 (Kochen-Specker Uncolorability, Kochen-Specker 1967)**: No independent set meets every complete orthogonal `d`-basis of `R`. -/ def IsTier4_KSUncolorable {d n : ℕ} (R : RayConfig d n) : Prop := ¬ ∃ I : Finset (Fin n), R.IsKSColoring I /-! ## Section 2: Universal Hierarchy Implications and Pseudo-State Duality Obstructions -/ /-- Parseval's identity for any orthogonal `d`-clique in `ℝ^d` (no square roots required). -/ theorem parseval_of_isBasis {d n : ℕ} (R : RayConfig d n) {C : Finset (Fin n)} (hC : R.IsBasis C) (ψ : Fin d → ℝ) : ∑ i ∈ C, R.projVal i ψ = normSq ψ := by let T : (C → ℝ) →ₗ[ℝ] (Fin d → ℝ) := { toFun := fun c => ∑ i : C, c i • R.vec i.1 map_add' := fun c₁ c₂ => by simp only [Pi.add_apply, add_smul, Finset.sum_add_distrib] map_smul' := fun r c => by simp only [Pi.smul_apply, smul_eq_mul, RingHom.id_apply, mul_smul, Finset.smul_sum] } have hT_inj : Function.Injective T := by rw [injective_iff_map_eq_zero] intro c hc ext ⟨j, hj⟩ have hdot0 : dot (R.vec j) (T c) = 0 := by rw [hc]; simp [dot] have hdot_eval : dot (R.vec j) (T c) = c ⟨j, hj⟩ * normSq (R.vec j) := by change dot (R.vec j) (∑ i : C, c i • R.vec i.1) = _ rw [dot_sum_right] rw [Finset.sum_eq_single ⟨j, hj⟩] · rw [dot_smul_right, dot_self] · intro i _ hij rw [dot_smul_right] have hne : j ≠ i.1 := fun h => hij (Subtype.ext h.symm) rw [(hC.2 j hj i.1 i.2 hne).2, mul_zero] · intro h; exact absurd (Finset.mem_univ _) h have hmul0 : c ⟨j, hj⟩ * normSq (R.vec j) = 0 := hdot_eval.symm.trans hdot0 exact (mul_eq_zero.mp hmul0).resolve_right (ne_of_gt (R.normSq_pos j)) have hfin : Module.finrank ℝ (C → ℝ) = Module.finrank ℝ (Fin d → ℝ) := by simp [Fintype.card_coe, hC.1] have hT_surj : Function.Surjective T := (LinearMap.injective_iff_surjective_of_finrank_eq_finrank hfin).mp hT_inj obtain ⟨c, hc⟩ := hT_surj ψ have hc_val : ∀ i : C, c i = dot (R.vec i.1) ψ / normSq (R.vec i.1) := by intro i have h1 : dot (R.vec i.1) ψ = c i * normSq (R.vec i.1) := by rw [← hc] change dot (R.vec i.1) (∑ j : C, c j • R.vec j.1) = _ rw [dot_sum_right] rw [Finset.sum_eq_single i] · rw [dot_smul_right, dot_self] · intro j _ hji rw [dot_smul_right] have hne : i.1 ≠ j.1 := fun h => hji (Subtype.ext h.symm) rw [(hC.2 i.1 i.2 j.1 j.2 hne).2, mul_zero] · intro h; exact absurd (Finset.mem_univ _) h have hne : normSq (R.vec i.1) ≠ 0 := ne_of_gt (R.normSq_pos i.1) field_simp [hne] linarith have hnorm : normSq ψ = ∑ i : C, (c i) ^ 2 * normSq (R.vec i.1) := by rw [← dot_self, ← hc] change dot (∑ i : C, c i • R.vec i.1) (∑ j : C, c j • R.vec j.1) = _ rw [dot_sum_left] refine Finset.sum_congr rfl fun i _ => ?_ rw [dot_smul_left, dot_sum_right] rw [Finset.sum_eq_single i] · rw [dot_smul_right, dot_self]; ring · intro j _ hji rw [dot_smul_right] have hne : i.1 ≠ j.1 := fun h => hji (Subtype.ext h.symm) rw [(hC.2 i.1 i.2 j.1 j.2 hne).2, mul_zero] · intro h; exact absurd (Finset.mem_univ _) h rw [hnorm] rw [← Finset.sum_attach (s := C)] refine Finset.sum_congr rfl fun i _ => ?_ rw [hc_val i, projVal] have hne : normSq (R.vec i.1) ≠ 0 := ne_of_gt (R.normSq_pos i.1) field_simp [hne] /-- **Theorem (Tier 4 → Tier 3)**: Every Kochen-Specker uncolorable ray configuration in `ℝ^d` admits an explicit integer-weighted tight-frame (constant-value) SI-C witness with `∑ w_i P_i = |ℬ| I_d` and `α(G(R), w) ≤ |ℬ| - 1`. -/ theorem tier4_implies_tier3 {d n : ℕ} (R : RayConfig d n) (hKS : R.IsTier4_KSUncolorable) : R.IsTier3_TightFrame := by classical let bases : Finset (Finset (Fin n)) := Finset.univ.filter (fun C => R.IsBasis C) have hbases_nonempty : bases.Nonempty := by by_contra hne rw [Finset.not_nonempty_iff_eq_empty] at hne apply hKS refine ⟨∅, ?_, ?_⟩ · intro i hi; simp at hi · intro C hC have hmem : C ∈ bases := Finset.mem_filter.mpr ⟨Finset.mem_univ C, hC⟩ rw [hne] at hmem simp at hmem let w : Fin n → ℝ := fun i => ((bases.filter (fun C => i ∈ C)).card : ℝ) refine ⟨w, (bases.card : ℝ) - 1, (bases.card : ℝ), ?_, ?_, ?_, ?_⟩ · intro i; positivity · intro I hI have hsum_eq : ∑ i ∈ I, w i = ∑ C ∈ bases, ((I ∩ C).card : ℝ) := by simp only [w] have h1 : ∀ i : Fin n, ((bases.filter (fun C => i ∈ C)).card : ℝ) = ∑ C ∈ bases, (if i ∈ C then (1 : ℝ) else 0) := by intro i; rw [Finset.sum_boole] simp_rw [h1] rw [Finset.sum_comm] refine Finset.sum_congr rfl fun C _ => ?_ rw [← Finset.sum_filter] have hflt : I.filter (fun i => i ∈ C) = I ∩ C := by ext x; simp rw [hflt, Finset.sum_const, nsmul_eq_mul, mul_one] rw [hsum_eq] have hmiss : ∃ C₀ ∈ bases, I ∩ C₀ = ∅ := by by_contra hall push Not at hall apply hKS exact ⟨I, hI, fun C hC => hall C (Finset.mem_filter.mpr ⟨Finset.mem_univ C, hC⟩)⟩ obtain ⟨C₀, hC₀_mem, hC₀_empty⟩ := hmiss have hle1 : ∀ C ∈ bases, ((I ∩ C).card : ℝ) ≤ 1 := by intro C hC have hCb : R.IsBasis C := (Finset.mem_filter.mp hC).2 have hcard : (I ∩ C).card ≤ 1 := by rw [Finset.card_le_one] intro a ha b hb by_contra hab exact hI a (Finset.mem_inter.mp ha).1 b (Finset.mem_inter.mp hb).1 (hCb.2 a (Finset.mem_inter.mp ha).2 b (Finset.mem_inter.mp hb).2 hab) exact_mod_cast hcard have hsplit : ∑ C ∈ bases, ((I ∩ C).card : ℝ) = ((I ∩ C₀).card : ℝ) + ∑ C ∈ bases.erase C₀, ((I ∩ C).card : ℝ) := by rw [← Finset.add_sum_erase _ _ hC₀_mem] rw [hsplit, hC₀_empty, Finset.card_empty, Nat.cast_zero, zero_add] have hsum_le : ∑ C ∈ bases.erase C₀, ((I ∩ C).card : ℝ) ≤ ∑ _C ∈ bases.erase C₀, (1 : ℝ) := Finset.sum_le_sum fun C hC => hle1 C (Finset.mem_of_mem_erase hC) have hcard_erase : ((bases.erase C₀).card : ℝ) = (bases.card : ℝ) - 1 := by rw [Finset.card_erase_of_mem hC₀_mem] have hpos : 1 ≤ bases.card := Finset.one_le_card.mpr hbases_nonempty rw [Nat.cast_sub hpos, Nat.cast_one] calc ∑ C ∈ bases.erase C₀, ((I ∩ C).card : ℝ) ≤ ∑ _C ∈ bases.erase C₀, (1 : ℝ) := hsum_le _ = ((bases.erase C₀).card : ℝ) := by simp _ = (bases.card : ℝ) - 1 := hcard_erase · linarith · intro ψ have h1 : ∀ i : Fin n, w i * R.projVal i ψ = ∑ C ∈ bases, (if i ∈ C then R.projVal i ψ else 0) := by intro i simp only [w] rw [← Finset.sum_filter, Finset.sum_const, nsmul_eq_mul] simp_rw [h1] rw [Finset.sum_comm] have hinner : ∀ C ∈ bases, ∑ i : Fin n, (if i ∈ C then R.projVal i ψ else 0) = normSq ψ := by intro C hC rw [← Finset.sum_filter] have hflt : Finset.univ.filter (fun i : Fin n => i ∈ C) = C := by ext x; simp rw [hflt] exact parseval_of_isBasis R (Finset.mem_filter.mp hC).2 ψ rw [Finset.sum_congr rfl hinner, Finset.sum_const, nsmul_eq_mul] /-- **Theorem (Tier 3 → Tier 2)**: Every tight-frame SI-C configuration is all-state operator SI-C. -/ theorem tier3_implies_tier2 {d n : ℕ} (R : RayConfig d n) (h3 : R.IsTier3_TightFrame) : R.IsTier2_AllStateOperator := by obtain ⟨w, B, c, hw, hB, hBc, htf⟩ := h3 refine ⟨w, B, c - B, hw, sub_pos.mpr hBc, hB, fun ψ => ?_⟩ rw [htf ψ] have : B + (c - B) = c := by ring rw [this] /-- **Theorem (Tier 2 → Tier 1)**: Every all-state operator SI-C configuration in `ℝ^d` (`d ≥ 1`) satisfies `χ_f(G(R)) > d`. -/ theorem tier2_implies_tier1 {d n : ℕ} (hd : 1 ≤ d) (R : RayConfig d n) (h2 : R.IsTier2_AllStateOperator) : R.IsTier1_FracChromatic := by obtain ⟨w, B, ε, hw, hε, hB, hop⟩ := h2 let e : Fin d → Fin d → ℝ := fun k j => if j = k then 1 else 0 have he_norm : ∀ k : Fin d, normSq (e k) = 1 := by intro k; unfold normSq; rw [Finset.sum_eq_single k] · simp [e] · intro j _ hjk; simp [e, hjk] · intro h; exact absurd (Finset.mem_univ _) h have he_dot : ∀ (i : Fin n) (k : Fin d), dot (R.vec i) (e k) = R.vec i k := by intro i k; unfold dot; rw [Finset.sum_eq_single k] · simp [e] · intro j _ hjk; simp [e, hjk] · intro h; exact absurd (Finset.mem_univ _) h have hsum_proj : ∀ i : Fin n, ∑ k : Fin d, R.projVal i (e k) = 1 := by intro i simp only [projVal, he_dot, ← Finset.sum_div] exact div_self (ne_of_gt (R.normSq_pos i)) have hsum_op : (d : ℝ) * (B + ε) ≤ ∑ i : Fin n, w i := by have hstep := Finset.sum_le_sum (s := Finset.univ) fun (k : Fin d) _ => hop (e k) simp only [he_norm, mul_one, Finset.sum_const, Finset.card_univ, Fintype.card_fin, nsmul_eq_mul] at hstep rw [Finset.sum_comm] at hstep have hrhs : ∑ i : Fin n, ∑ k : Fin d, w i * R.projVal i (e k) = ∑ i : Fin n, w i := by refine Finset.sum_congr rfl fun i _ => ?_ rw [← Finset.mul_sum, hsum_proj i, mul_one] linarith have hB_nonneg : 0 ≤ B := by have h0 := hB ∅ (fun i hi => by simp at hi) simpa using h0 by_cases hB0 : B = 0 · exfalso have hw0 : ∀ i : Fin n, w i = 0 := by intro i have hi : R.IsIndep ({i} : Finset (Fin n)) := by intro a ha b hb hab simp only [Finset.mem_singleton] at ha hb exact hab.1 (ha.trans hb.symm) have hle := hB {i} hi simp only [Finset.sum_singleton, hB0] at hle exact le_antisymm hle (hw i) have hsum0 : ∑ i : Fin n, w i = 0 := by simp [hw0] have hd_pos : (0 : ℝ) < (d : ℝ) := by exact_mod_cast hd nlinarith · have hB_pos : 0 < B := lt_of_le_of_ne hB_nonneg (Ne.symm hB0) have hd_pos : (0 : ℝ) < (d : ℝ) := by exact_mod_cast hd refine ⟨w, B, hw, hB_pos, hB, ?_⟩ nlinarith /-- **Physical-State Obstruction to Tier 2**: If there exist a nonzero vector `ψ ∈ ℝ^d` and a convex combination of independent sets covering the probability vector `p_i(ψ)`, then `R` fails Tier 2 (All-State Operator SI-C). -/ theorem no_tier2_of_nchv_state {d n m : ℕ} (R : RayConfig d n) (ψ : Fin d → ℝ) (hψ : 0 < normSq ψ) (Is : Fin m → Finset (Fin n)) (lam : Fin m → ℝ) (hIndep : ∀ k, R.IsIndep (Is k)) (hlam_nonneg : ∀ k, 0 ≤ lam k) (hlam_sum : ∑ k : Fin m, lam k = 1) (hcov : ∀ i : Fin n, R.projVal i ψ / normSq ψ ≤ ∑ k : Fin m, if i ∈ Is k then lam k else 0) : ¬ R.IsTier2_AllStateOperator := by rintro ⟨w, B, ε, hw, hε, hB, hop⟩ have h1 : (B + ε) * normSq ψ ≤ ∑ i : Fin n, w i * R.projVal i ψ := hop ψ have h2 : ∑ i : Fin n, w i * (R.projVal i ψ / normSq ψ) ≤ ∑ i : Fin n, w i * ∑ k : Fin m, (if i ∈ Is k then lam k else 0) := Finset.sum_le_sum fun i _ => mul_le_mul_of_nonneg_left (hcov i) (hw i) have h3 : ∑ i : Fin n, w i * ∑ k : Fin m, (if i ∈ Is k then lam k else 0) = ∑ k : Fin m, lam k * ∑ i ∈ Is k, w i := by simp_rw [Finset.mul_sum] rw [Finset.sum_comm] refine Finset.sum_congr rfl fun k _ => ?_ have hrew : ∀ i : Fin n, w i * (if i ∈ Is k then lam k else 0) = if i ∈ Is k then lam k * w i else 0 := by intro i; split_ifs <;> ring simp_rw [hrew, ← Finset.sum_filter] have hflt : Finset.univ.filter (fun i : Fin n => i ∈ Is k) = Is k := by ext x; simp rw [hflt, ← Finset.mul_sum] have h4 : ∑ k : Fin m, lam k * ∑ i ∈ Is k, w i ≤ B := by calc ∑ k : Fin m, lam k * ∑ i ∈ Is k, w i ≤ ∑ k : Fin m, lam k * B := Finset.sum_le_sum fun k _ => mul_le_mul_of_nonneg_left (hB (Is k) (hIndep k)) (hlam_nonneg k) _ = (∑ k : Fin m, lam k) * B := by rw [← Finset.sum_mul] _ = B := by rw [hlam_sum, one_mul] have h5 : (∑ i : Fin n, w i * R.projVal i ψ) / normSq ψ = ∑ i : Fin n, w i * (R.projVal i ψ / normSq ψ) := by rw [Finset.sum_div] refine Finset.sum_congr rfl fun i _ => by ring have h6 : B + ε ≤ (∑ i : Fin n, w i * R.projVal i ψ) / normSq ψ := (le_div_iff₀ hψ).mpr h1 linarith /-- Quadratic form of a `d × d` matrix `Y` evaluated on normalized ray `i`: `⟨v_i | Y | v_i⟩ / ‖v_i‖²`. -/ noncomputable def quadVal {d n : ℕ} (R : RayConfig d n) (Y : Fin d → Fin d → ℝ) (i : Fin n) : ℝ := (∑ a : Fin d, ∑ b : Fin d, Y a b * R.vec i a * R.vec i b) / normSq (R.vec i) /-- Polarization identity: if `∑_i w_i P_i = c I_d` as quadratic forms on `ℝ^d`, then its matrix entries equal `c δ_{ab}`. -/ lemma tightFrame_matrix_entries {d n : ℕ} (R : RayConfig d n) (w : Fin n → ℝ) (c : ℝ) (htf : ∀ ψ : Fin d → ℝ, ∑ i : Fin n, w i * R.projVal i ψ = c * normSq ψ) (a b : Fin d) : ∑ i : Fin n, w i * (R.vec i a * R.vec i b / normSq (R.vec i)) = if a = b then c else 0 := by let e : Fin d → Fin d → ℝ := fun k j => if j = k then 1 else 0 have he_dot : ∀ (i : Fin n) (k : Fin d), dot (R.vec i) (e k) = R.vec i k := by intro i k; unfold dot; rw [Finset.sum_eq_single k] · simp [e] · intro j _ hjk; simp [e, hjk] · intro h; exact absurd (Finset.mem_univ _) h have he_norm : ∀ k : Fin d, normSq (e k) = 1 := by intro k; unfold normSq; rw [Finset.sum_eq_single k] · simp [e] · intro j _ hjk; simp [e, hjk] · intro h; exact absurd (Finset.mem_univ _) h by_cases hab : a = b · subst hab simp only [↓reduceIte] have h := htf (e a) simp only [projVal, he_dot, he_norm, mul_one, sq] at h exact h · simp only [hab, ↓reduceIte] have h1 := htf (e a + e b) have h2 := htf (e a) have h3 := htf (e b) have hnorm_ab : normSq (e a + e b) = 2 := by rw [← dot_self, dot_add_left, dot_add_right, dot_add_right, dot_self, dot_self, he_norm a, he_norm b] have horth : dot (e a) (e b) = 0 := by unfold dot refine Finset.sum_eq_zero fun j _ => ?_ by_cases hja : j = a · subst hja; simp [e, hab] · simp [e, hja] rw [horth, dot_comm (e b) (e a), horth]; ring have hdot_ab : ∀ i : Fin n, dot (R.vec i) (e a + e b) = R.vec i a + R.vec i b := by intro i; rw [dot_add_right, he_dot, he_dot] have hsub : ∑ i : Fin n, w i * (R.projVal i (e a + e b) - R.projVal i (e a) - R.projVal i (e b)) = 0 := by have hlhs : ∑ i : Fin n, w i * (R.projVal i (e a + e b) - R.projVal i (e a) - R.projVal i (e b)) = (∑ i : Fin n, w i * R.projVal i (e a + e b)) - (∑ i : Fin n, w i * R.projVal i (e a)) - (∑ i : Fin n, w i * R.projVal i (e b)) := by simp only [mul_sub, Finset.sum_sub_distrib] rw [hlhs, h1, h2, h3, hnorm_ab, he_norm a, he_norm b] ring have hterm : ∀ i : Fin n, w i * (R.projVal i (e a + e b) - R.projVal i (e a) - R.projVal i (e b)) = 2 * (w i * (R.vec i a * R.vec i b / normSq (R.vec i))) := by intro i simp only [projVal, hdot_ab, he_dot] ring simp_rw [hterm, ← Finset.mul_sum] at hsub linarith /-- **Indefinite Pseudo-State Obstruction Theorem (Key Duality Theorem for Tier 3)**: If there exist an arbitrary (possibly indefinite!) real `d × d` matrix `Y` with `Tr(Y) = 1` and a finite convex combination of independent sets `{(I_k, λ_k)}` such that `⟨v_i | Y | v_i⟩ / ‖v_i‖² ≤ ∑_{k : i ∈ I_k} λ_k` for every ray `i`, then `R` admits NO tight-frame / constant-value SI-C witness (`¬ R.IsTier3_TightFrame`). -/ theorem no_tier3_of_pseudostate {d n m : ℕ} (R : RayConfig d n) (Y : Fin d → Fin d → ℝ) (hTr : ∑ a : Fin d, Y a a = 1) (Is : Fin m → Finset (Fin n)) (lam : Fin m → ℝ) (hIndep : ∀ k, R.IsIndep (Is k)) (hlam_nonneg : ∀ k, 0 ≤ lam k) (hlam_sum : ∑ k : Fin m, lam k = 1) (hcov : ∀ i : Fin n, R.quadVal Y i ≤ ∑ k : Fin m, if i ∈ Is k then lam k else 0) : ¬ R.IsTier3_TightFrame := by rintro ⟨w, B, c, hw, hB, hBc, htf⟩ have htrace : ∑ i : Fin n, w i * R.quadVal Y i = c := by have h1 : ∀ i : Fin n, w i * R.quadVal Y i = ∑ a : Fin d, ∑ b : Fin d, Y a b * (w i * (R.vec i a * R.vec i b / normSq (R.vec i))) := by intro i unfold quadVal rw [Finset.sum_div, Finset.mul_sum] refine Finset.sum_congr rfl fun a _ => ?_ rw [Finset.sum_div, Finset.mul_sum] refine Finset.sum_congr rfl fun b _ => by ring simp_rw [h1] rw [Finset.sum_comm] have h2 : ∀ a : Fin d, ∑ i : Fin n, ∑ b : Fin d, Y a b * (w i * (R.vec i a * R.vec i b / normSq (R.vec i))) = Y a a * c := by intro a rw [Finset.sum_comm] have hinner : ∀ b : Fin d, ∑ i : Fin n, Y a b * (w i * (R.vec i a * R.vec i b / normSq (R.vec i))) = Y a b * (if a = b then c else 0) := by intro b rw [← Finset.mul_sum, tightFrame_matrix_entries R w c htf a b] simp_rw [hinner] rw [Finset.sum_eq_single a] · simp · intro b _ hba; simp [Ne.symm hba] · intro h; exact absurd (Finset.mem_univ _) h simp_rw [h2, ← Finset.sum_mul, hTr, one_mul] have hle : ∑ i : Fin n, w i * R.quadVal Y i ≤ ∑ i : Fin n, w i * ∑ k : Fin m, (if i ∈ Is k then lam k else 0) := Finset.sum_le_sum fun i _ => mul_le_mul_of_nonneg_left (hcov i) (hw i) have hswap : ∑ i : Fin n, w i * ∑ k : Fin m, (if i ∈ Is k then lam k else 0) = ∑ k : Fin m, lam k * ∑ i ∈ Is k, w i := by simp_rw [Finset.mul_sum] rw [Finset.sum_comm] refine Finset.sum_congr rfl fun k _ => ?_ have hrew : ∀ i : Fin n, w i * (if i ∈ Is k then lam k else 0) = if i ∈ Is k then lam k * w i else 0 := by intro i; split_ifs <;> ring simp_rw [hrew, ← Finset.sum_filter] have hflt : Finset.univ.filter (fun i : Fin n => i ∈ Is k) = Is k := by ext x; simp rw [hflt, ← Finset.mul_sum] have hbound : ∑ k : Fin m, lam k * ∑ i ∈ Is k, w i ≤ B := by calc ∑ k : Fin m, lam k * ∑ i ∈ Is k, w i ≤ ∑ k : Fin m, lam k * B := Finset.sum_le_sum fun k _ => mul_le_mul_of_nonneg_left (hB (Is k) (hIndep k)) (hlam_nonneg k) _ = (∑ k : Fin m, lam k) * B := by rw [← Finset.sum_mul] _ = B := by rw [hlam_sum, one_mul] linarith /-! ## Section 3: Exact Orthogonal-Join (`osum`) and Tensor-Product (`tensor`) Algebra -/ def vecLeft {d₁ d₂ : ℕ} (ψ : Fin (d₁ + d₂) → ℝ) : Fin d₁ → ℝ := fun k => ψ (Fin.castAdd d₂ k) def vecRight {d₁ d₂ : ℕ} (ψ : Fin (d₁ + d₂) → ℝ) : Fin d₂ → ℝ := fun k => ψ (Fin.natAdd d₁ k) def padLeft {d₁ d₂ : ℕ} (u : Fin d₁ → ℝ) : Fin (d₁ + d₂) → ℝ := Fin.addCases u (fun _ => 0) def padRight {d₁ d₂ : ℕ} (v : Fin d₂ → ℝ) : Fin (d₁ + d₂) → ℝ := Fin.addCases (fun _ => 0) v lemma normSq_split {d₁ d₂ : ℕ} (ψ : Fin (d₁ + d₂) → ℝ) : normSq ψ = normSq (vecLeft ψ) + normSq (vecRight ψ) := by unfold normSq vecLeft vecRight exact Fin.sum_univ_add (fun k : Fin (d₁ + d₂) => (ψ k) ^ 2) lemma dot_padLeft {d₁ d₂ : ℕ} (u : Fin d₁ → ℝ) (ψ : Fin (d₁ + d₂) → ℝ) : dot (padLeft u) ψ = dot u (vecLeft ψ) := by unfold dot padLeft vecLeft rw [Fin.sum_univ_add] simp [Fin.addCases_left, Fin.addCases_right] lemma dot_padRight {d₁ d₂ : ℕ} (v : Fin d₂ → ℝ) (ψ : Fin (d₁ + d₂) → ℝ) : dot (padRight v) ψ = dot v (vecRight ψ) := by unfold dot padRight vecRight rw [Fin.sum_univ_add] simp [Fin.addCases_left, Fin.addCases_right] lemma normSq_padLeft {d₁ d₂ : ℕ} (u : Fin d₁ → ℝ) : normSq (padLeft (d₂ := d₂) u) = normSq u := by rw [← dot_self, dot_padLeft] have : vecLeft (padLeft (d₂ := d₂) u) = u := by ext k; simp [vecLeft, padLeft, Fin.addCases_left] rw [this, dot_self] lemma normSq_padRight {d₁ d₂ : ℕ} (v : Fin d₂ → ℝ) : normSq (padRight (d₁ := d₁) v) = normSq v := by rw [← dot_self, dot_padRight] have : vecRight (padRight (d₁ := d₁) v) = v := by ext k; simp [vecRight, padRight, Fin.addCases_right] rw [this, dot_self] lemma dot_padLeft_padRight {d₁ d₂ : ℕ} (u : Fin d₁ → ℝ) (v : Fin d₂ → ℝ) : dot (padLeft (d₂ := d₂) u) (padRight (d₁ := d₁) v) = 0 := by rw [dot_padLeft] have : vecLeft (padRight (d₁ := d₁) v) = 0 := by ext k; simp [vecLeft, padRight, Fin.addCases_left] rw [this]; simp [dot] /-- Orthogonal direct sum (graph join) `R₁ ⊕ R₂` of ray configurations in `ℝ^(d₁ + d₂)`. -/ def osum {d₁ d₂ n₁ n₂ : ℕ} (R₁ : RayConfig d₁ n₁) (R₂ : RayConfig d₂ n₂) : RayConfig (d₁ + d₂) (n₁ + n₂) where vec := Fin.addCases (fun i => padLeft (R₁.vec i)) (fun j => padRight (R₂.vec j)) normSq_pos := by intro i refine Fin.addCases (fun i₁ => ?_) (fun i₂ => ?_) i · simp only [Fin.addCases_left, normSq_padLeft]; exact R₁.normSq_pos i₁ · simp only [Fin.addCases_right, normSq_padRight]; exact R₂.normSq_pos i₂ lemma osum_orth_left_right {d₁ d₂ n₁ n₂ : ℕ} (R₁ : RayConfig d₁ n₁) (R₂ : RayConfig d₂ n₂) (i : Fin n₁) (j : Fin n₂) : (R₁.osum R₂).orth (Fin.castAdd n₂ i) (Fin.natAdd n₁ j) := by refine ⟨?_, ?_⟩ · intro h have hv := congrArg Fin.val h simp only [Fin.val_castAdd, Fin.val_natAdd] at hv omega · simp only [osum, Fin.addCases_left, Fin.addCases_right] exact dot_padLeft_padRight (R₁.vec i) (R₂.vec j) lemma osum_orth_left_iff {d₁ d₂ n₁ n₂ : ℕ} (R₁ : RayConfig d₁ n₁) (R₂ : RayConfig d₂ n₂) (i j : Fin n₁) : (R₁.osum R₂).orth (Fin.castAdd n₂ i) (Fin.castAdd n₂ j) ↔ R₁.orth i j := by constructor · rintro ⟨hne, hdot⟩ refine ⟨fun h => hne (congrArg (Fin.castAdd n₂) h), ?_⟩ simp only [osum, Fin.addCases_left] at hdot rw [dot_padLeft] at hdot have hv : vecLeft (padLeft (d₂ := d₂) (R₁.vec j)) = R₁.vec j := by ext k; simp [vecLeft, padLeft, Fin.addCases_left] rwa [hv] at hdot · rintro ⟨hne, hdot⟩ refine ⟨fun h => hne (Fin.castAdd_injective n₁ n₂ h), ?_⟩ simp only [osum, Fin.addCases_left] rw [dot_padLeft] have hv : vecLeft (padLeft (d₂ := d₂) (R₁.vec j)) = R₁.vec j := by ext k; simp [vecLeft, padLeft, Fin.addCases_left] rwa [hv] lemma osum_orth_right_iff {d₁ d₂ n₁ n₂ : ℕ} (R₁ : RayConfig d₁ n₁) (R₂ : RayConfig d₂ n₂) (i j : Fin n₂) : (R₁.osum R₂).orth (Fin.natAdd n₁ i) (Fin.natAdd n₁ j) ↔ R₂.orth i j := by constructor · rintro ⟨hne, hdot⟩ refine ⟨fun h => hne (congrArg (Fin.natAdd n₁) h), ?_⟩ simp only [osum, Fin.addCases_right] at hdot rw [dot_padRight] at hdot have hv : vecRight (padRight (d₁ := d₁) (R₂.vec j)) = R₂.vec j := by ext k; simp [vecRight, padRight, Fin.addCases_right] rwa [hv] at hdot · rintro ⟨hne, hdot⟩ refine ⟨fun h => hne (Fin.natAdd_injective n₂ n₁ h), ?_⟩ simp only [osum, Fin.addCases_right] rw [dot_padRight] have hv : vecRight (padRight (d₁ := d₁) (R₂.vec j)) = R₂.vec j := by ext k; simp [vecRight, padRight, Fin.addCases_right] rwa [hv] /-- Every independent set of `R₁ ⊕ R₂` lies entirely in `R₁` or entirely in `R₂`. -/ lemma osum_isIndep_dichotomy {d₁ d₂ n₁ n₂ : ℕ} (R₁ : RayConfig d₁ n₁) (R₂ : RayConfig d₂ n₂) {I : Finset (Fin (n₁ + n₂))} (hI : (R₁.osum R₂).IsIndep I) : (∃ I₁ : Finset (Fin n₁), R₁.IsIndep I₁ ∧ I = I₁.map (Fin.castAddEmb n₂)) ∨ (∃ I₂ : Finset (Fin n₂), R₂.IsIndep I₂ ∧ I = I₂.map (Fin.natAddEmb n₁)) := by classical by_cases hL : ∃ i : Fin n₁, Fin.castAdd n₂ i ∈ I · left obtain ⟨i₀, hi₀⟩ := hL have hnoR : ∀ j : Fin n₂, Fin.natAdd n₁ j ∉ I := by intro j hj exact hI _ hi₀ _ hj (osum_orth_left_right R₁ R₂ i₀ j) let I₁ : Finset (Fin n₁) := Finset.univ.filter (fun i => Fin.castAdd n₂ i ∈ I) refine ⟨I₁, ?_, ?_⟩ · intro a ha b hb horth have ha' := (Finset.mem_filter.mp ha).2 have hb' := (Finset.mem_filter.mp hb).2 exact hI _ ha' _ hb' ((osum_orth_left_iff R₁ R₂ a b).mpr horth) · ext x refine Fin.addCases (fun i => ?_) (fun j => ?_) x · simp [I₁] · simp only [Finset.mem_map, Fin.castAddEmb_apply, I₁] constructor · intro hx; exact absurd hx (hnoR j) · rintro ⟨i, _, hi⟩ have hv := congrArg Fin.val hi simp only [Fin.val_castAdd, Fin.val_natAdd] at hv omega · right push Not at hL let I₂ : Finset (Fin n₂) := Finset.univ.filter (fun j => Fin.natAdd n₁ j ∈ I) refine ⟨I₂, ?_, ?_⟩ · intro a ha b hb horth have ha' := (Finset.mem_filter.mp ha).2 have hb' := (Finset.mem_filter.mp hb).2 exact hI _ ha' _ hb' ((osum_orth_right_iff R₁ R₂ a b).mpr horth) · ext x refine Fin.addCases (fun i => ?_) (fun j => ?_) x · simp only [Finset.mem_map, Fin.natAddEmb_apply, I₂] constructor · intro hx; exact absurd hx (hL i) · rintro ⟨j, _, hj⟩ have hv := congrArg Fin.val hj simp only [Fin.val_castAdd, Fin.val_natAdd] at hv omega · simp [I₂] lemma osum_projVal_left {d₁ d₂ n₁ n₂ : ℕ} (R₁ : RayConfig d₁ n₁) (R₂ : RayConfig d₂ n₂) (i : Fin n₁) (ψ : Fin (d₁ + d₂) → ℝ) : (R₁.osum R₂).projVal (Fin.castAdd n₂ i) ψ = R₁.projVal i (vecLeft ψ) := by simp only [projVal, osum, Fin.addCases_left, dot_padLeft, normSq_padLeft] lemma osum_projVal_right {d₁ d₂ n₁ n₂ : ℕ} (R₁ : RayConfig d₁ n₁) (R₂ : RayConfig d₂ n₂) (j : Fin n₂) (ψ : Fin (d₁ + d₂) → ℝ) : (R₁.osum R₂).projVal (Fin.natAdd n₁ j) ψ = R₂.projVal j (vecRight ψ) := by simp only [projVal, osum, Fin.addCases_right, dot_padRight, normSq_padRight] /-- **Exact Orthogonal-Join Theorem for Tier 2**: `R₁ ⊕ R₂` is All-State Operator SI-C if and only if BOTH `R₁` and `R₂` are. -/ theorem osum_tier2_iff {d₁ d₂ n₁ n₂ : ℕ} (R₁ : RayConfig d₁ n₁) (R₂ : RayConfig d₂ n₂) : (R₁.osum R₂).IsTier2_AllStateOperator ↔ R₁.IsTier2_AllStateOperator ∧ R₂.IsTier2_AllStateOperator := by constructor · rintro ⟨w, B, ε, hw, hε, hB, hop⟩ constructor · refine ⟨fun i => w (Fin.castAdd n₂ i), B, ε, fun i => hw _, hε, ?_, ?_⟩ · intro I₁ hI₁ have hI : (R₁.osum R₂).IsIndep (I₁.map (Fin.castAddEmb n₂)) := by intro a ha b hb rcases Finset.mem_map.mp ha with ⟨i, hi, rfl⟩ rcases Finset.mem_map.mp hb with ⟨j, hj, rfl⟩ rw [Fin.castAddEmb_apply, Fin.castAddEmb_apply, osum_orth_left_iff] exact hI₁ i hi j hj have h := hB _ hI rwa [Finset.sum_map] at h · intro ψ₁ have h := hop (padLeft (d₂ := d₂) ψ₁) rw [normSq_padLeft, Fin.sum_univ_add] at h have hR0 : ∑ j : Fin n₂, w (Fin.natAdd n₁ j) * (R₁.osum R₂).projVal (Fin.natAdd n₁ j) (padLeft (d₂ := d₂) ψ₁) = 0 := by refine Finset.sum_eq_zero fun j _ => ?_ rw [osum_projVal_right] have hv : vecRight (padLeft (d₂ := d₂) ψ₁) = 0 := by ext k; simp [vecRight, padLeft, Fin.addCases_right] simp [projVal, hv, dot] have hL : ∑ i : Fin n₁, w (Fin.castAdd n₂ i) * (R₁.osum R₂).projVal (Fin.castAdd n₂ i) (padLeft (d₂ := d₂) ψ₁) = ∑ i : Fin n₁, w (Fin.castAdd n₂ i) * R₁.projVal i ψ₁ := by refine Finset.sum_congr rfl fun i _ => ?_ rw [osum_projVal_left] have hv : vecLeft (padLeft (d₂ := d₂) ψ₁) = ψ₁ := by ext k; simp [vecLeft, padLeft, Fin.addCases_left] rw [hv] linarith · refine ⟨fun j => w (Fin.natAdd n₁ j), B, ε, fun j => hw _, hε, ?_, ?_⟩ · intro I₂ hI₂ have hI : (R₁.osum R₂).IsIndep (I₂.map (Fin.natAddEmb n₁)) := by intro a ha b hb rcases Finset.mem_map.mp ha with ⟨i, hi, rfl⟩ rcases Finset.mem_map.mp hb with ⟨j, hj, rfl⟩ rw [Fin.natAddEmb_apply, Fin.natAddEmb_apply, osum_orth_right_iff] exact hI₂ i hi j hj have h := hB _ hI rwa [Finset.sum_map] at h · intro ψ₂ have h := hop (padRight (d₁ := d₁) ψ₂) rw [normSq_padRight, Fin.sum_univ_add] at h have hL0 : ∑ i : Fin n₁, w (Fin.castAdd n₂ i) * (R₁.osum R₂).projVal (Fin.castAdd n₂ i) (padRight (d₁ := d₁) ψ₂) = 0 := by refine Finset.sum_eq_zero fun i _ => ?_ rw [osum_projVal_left] have hv : vecLeft (padRight (d₁ := d₁) ψ₂) = 0 := by ext k; simp [vecLeft, padRight, Fin.addCases_left] simp [projVal, hv, dot] have hR : ∑ j : Fin n₂, w (Fin.natAdd n₁ j) * (R₁.osum R₂).projVal (Fin.natAdd n₁ j) (padRight (d₁ := d₁) ψ₂) = ∑ j : Fin n₂, w (Fin.natAdd n₁ j) * R₂.projVal j ψ₂ := by refine Finset.sum_congr rfl fun j _ => ?_ rw [osum_projVal_right] have hv : vecRight (padRight (d₁ := d₁) ψ₂) = ψ₂ := by ext k; simp [vecRight, padRight, Fin.addCases_right] rw [hv] linarith · rintro ⟨⟨w₁, B₁, ε₁, hw₁, hε₁, hB₁, hop₁⟩, ⟨w₂, B₂, ε₂, hw₂, hε₂, hB₂, hop₂⟩⟩ have hB1_nonneg : 0 ≤ B₁ := by simpa using hB₁ ∅ (fun i hi => by simp at hi) have hB2_nonneg : 0 ≤ B₂ := by simpa using hB₂ ∅ (fun i hi => by simp at hi) by_cases h10 : B₁ = 0 · have hns1 : ∀ ψ₁ : Fin d₁ → ℝ, normSq ψ₁ = 0 := by intro ψ₁ have hw10 : ∀ i, w₁ i = 0 := fun i => le_antisymm (by simpa [h10] using hB₁ {i} (fun a ha b hb h => by simp only [Finset.mem_singleton] at ha hb; exact h.1 (ha.trans hb.symm))) (hw₁ i) have h := hop₁ ψ₁ simp only [hw10, zero_mul, Finset.sum_const_zero, h10, zero_add] at h nlinarith [normSq_nonneg ψ₁] refine ⟨Fin.addCases (fun _ => 0) w₂, B₂, ε₂, ?_, hε₂, ?_, ?_⟩ · intro i; refine Fin.addCases (fun _ => by simp) (fun j => by simp [hw₂ j]) i · intro I hI rcases osum_isIndep_dichotomy R₁ R₂ hI with ⟨I₁, _, rfl⟩ | ⟨I₂, hI₂, rfl⟩ · simp [hB2_nonneg] · simpa [Finset.sum_map] using hB₂ I₂ hI₂ · intro ψ rw [normSq_split, hns1 (vecLeft ψ), zero_add, Fin.sum_univ_add] simp only [Fin.addCases_left, Fin.addCases_right, zero_mul, Finset.sum_const_zero, zero_add] simp_rw [osum_projVal_right] exact hop₂ (vecRight ψ) · by_cases h20 : B₂ = 0 · have hns2 : ∀ ψ₂ : Fin d₂ → ℝ, normSq ψ₂ = 0 := by intro ψ₂ have hw20 : ∀ i, w₂ i = 0 := fun i => le_antisymm (by simpa [h20] using hB₂ {i} (fun a ha b hb h => by simp only [Finset.mem_singleton] at ha hb; exact h.1 (ha.trans hb.symm))) (hw₂ i) have h := hop₂ ψ₂ simp only [hw20, zero_mul, Finset.sum_const_zero, h20, zero_add] at h nlinarith [normSq_nonneg ψ₂] refine ⟨Fin.addCases w₁ (fun _ => 0), B₁, ε₁, ?_, hε₁, ?_, ?_⟩ · intro i; refine Fin.addCases (fun j => by simp [hw₁ j]) (fun _ => by simp) i · intro I hI rcases osum_isIndep_dichotomy R₁ R₂ hI with ⟨I₁, hI₁, rfl⟩ | ⟨I₂, _, rfl⟩ · simpa [Finset.sum_map] using hB₁ I₁ hI₁ · simp [hB1_nonneg] · intro ψ rw [normSq_split, hns2 (vecRight ψ), add_zero, Fin.sum_univ_add] simp only [Fin.addCases_left, Fin.addCases_right, zero_mul, Finset.sum_const_zero, add_zero] simp_rw [osum_projVal_left] exact hop₁ (vecLeft ψ) · have hB1_pos : 0 < B₁ := lt_of_le_of_ne hB1_nonneg (Ne.symm h10) have hB2_pos : 0 < B₂ := lt_of_le_of_ne hB2_nonneg (Ne.symm h20) let w : Fin (n₁ + n₂) → ℝ := Fin.addCases (fun i => B₂ * w₁ i) (fun j => B₁ * w₂ j) let ε : ℝ := min (B₂ * ε₁) (B₁ * ε₂) refine ⟨w, B₁ * B₂, ε, ?_, lt_min (mul_pos hB2_pos hε₁) (mul_pos hB1_pos hε₂), ?_, ?_⟩ · intro x refine Fin.addCases (fun i => by simp only [w, Fin.addCases_left]; exact mul_nonneg hB2_nonneg (hw₁ i)) (fun j => by simp only [w, Fin.addCases_right]; exact mul_nonneg hB1_nonneg (hw₂ j)) x · intro I hI rcases osum_isIndep_dichotomy R₁ R₂ hI with ⟨I₁, hI₁, rfl⟩ | ⟨I₂, hI₂, rfl⟩ · rw [Finset.sum_map] simp only [w, Fin.castAddEmb_apply, Fin.addCases_left, ← Finset.mul_sum] nlinarith [hB₁ I₁ hI₁] · rw [Finset.sum_map] simp only [w, Fin.natAddEmb_apply, Fin.addCases_right, ← Finset.mul_sum] nlinarith [hB₂ I₂ hI₂] · intro ψ rw [normSq_split, Fin.sum_univ_add] simp only [w, Fin.addCases_left, Fin.addCases_right, osum_projVal_left, osum_projVal_right] have hL : (B₁ * B₂ + ε) * normSq (vecLeft ψ) ≤ ∑ i : Fin n₁, B₂ * w₁ i * R₁.projVal i (vecLeft ψ) := by have h := mul_le_mul_of_nonneg_left (hop₁ (vecLeft ψ)) hB2_nonneg have hε1 : ε ≤ B₂ * ε₁ := min_le_left _ _ have hrew : B₂ * ∑ i : Fin n₁, w₁ i * R₁.projVal i (vecLeft ψ) = ∑ i : Fin n₁, B₂ * w₁ i * R₁.projVal i (vecLeft ψ) := by rw [Finset.mul_sum]; refine Finset.sum_congr rfl fun i _ => by ring rw [hrew] at h nlinarith [normSq_nonneg (vecLeft ψ)] have hR : (B₁ * B₂ + ε) * normSq (vecRight ψ) ≤ ∑ j : Fin n₂, B₁ * w₂ j * R₂.projVal j (vecRight ψ) := by have h := mul_le_mul_of_nonneg_left (hop₂ (vecRight ψ)) hB1_nonneg have hε2 : ε ≤ B₁ * ε₂ := min_le_right _ _ have hrew : B₁ * ∑ j : Fin n₂, w₂ j * R₂.projVal j (vecRight ψ) = ∑ j : Fin n₂, B₁ * w₂ j * R₂.projVal j (vecRight ψ) := by rw [Finset.mul_sum]; refine Finset.sum_congr rfl fun j _ => by ring rw [hrew] at h nlinarith [normSq_nonneg (vecRight ψ)] linarith /-- **Exact Orthogonal-Join Theorem for Tier 3**: `R₁ ⊕ R₂` is Tight-Frame SI-C if and only if BOTH `R₁` and `R₂` are. -/ theorem osum_tier3_iff {d₁ d₂ n₁ n₂ : ℕ} (R₁ : RayConfig d₁ n₁) (R₂ : RayConfig d₂ n₂) : (R₁.osum R₂).IsTier3_TightFrame ↔ R₁.IsTier3_TightFrame ∧ R₂.IsTier3_TightFrame := by constructor · rintro ⟨w, B, c, hw, hB, hBc, htf⟩ constructor · refine ⟨fun i => w (Fin.castAdd n₂ i), B, c, fun i => hw _, ?_, hBc, ?_⟩ · intro I₁ hI₁ have hI : (R₁.osum R₂).IsIndep (I₁.map (Fin.castAddEmb n₂)) := by intro a ha b hb rcases Finset.mem_map.mp ha with ⟨i, hi, rfl⟩ rcases Finset.mem_map.mp hb with ⟨j, hj, rfl⟩ rw [Fin.castAddEmb_apply, Fin.castAddEmb_apply, osum_orth_left_iff] exact hI₁ i hi j hj have h := hB _ hI rwa [Finset.sum_map] at h · intro ψ₁ have h := htf (padLeft (d₂ := d₂) ψ₁) rw [normSq_padLeft, Fin.sum_univ_add] at h have hR0 : ∑ j : Fin n₂, w (Fin.natAdd n₁ j) * (R₁.osum R₂).projVal (Fin.natAdd n₁ j) (padLeft (d₂ := d₂) ψ₁) = 0 := by refine Finset.sum_eq_zero fun j _ => ?_ rw [osum_projVal_right] have hv : vecRight (padLeft (d₂ := d₂) ψ₁) = 0 := by ext k; simp [vecRight, padLeft, Fin.addCases_right] simp [projVal, hv, dot] have hL : ∑ i : Fin n₁, w (Fin.castAdd n₂ i) * (R₁.osum R₂).projVal (Fin.castAdd n₂ i) (padLeft (d₂ := d₂) ψ₁) = ∑ i : Fin n₁, w (Fin.castAdd n₂ i) * R₁.projVal i ψ₁ := by refine Finset.sum_congr rfl fun i _ => ?_ rw [osum_projVal_left] have hv : vecLeft (padLeft (d₂ := d₂) ψ₁) = ψ₁ := by ext k; simp [vecLeft, padLeft, Fin.addCases_left] rw [hv] linarith · refine ⟨fun j => w (Fin.natAdd n₁ j), B, c, fun j => hw _, ?_, hBc, ?_⟩ · intro I₂ hI₂ have hI : (R₁.osum R₂).IsIndep (I₂.map (Fin.natAddEmb n₁)) := by intro a ha b hb rcases Finset.mem_map.mp ha with ⟨i, hi, rfl⟩ rcases Finset.mem_map.mp hb with ⟨j, hj, rfl⟩ rw [Fin.natAddEmb_apply, Fin.natAddEmb_apply, osum_orth_right_iff] exact hI₂ i hi j hj have h := hB _ hI rwa [Finset.sum_map] at h · intro ψ₂ have h := htf (padRight (d₁ := d₁) ψ₂) rw [normSq_padRight, Fin.sum_univ_add] at h have hL0 : ∑ i : Fin n₁, w (Fin.castAdd n₂ i) * (R₁.osum R₂).projVal (Fin.castAdd n₂ i) (padRight (d₁ := d₁) ψ₂) = 0 := by refine Finset.sum_eq_zero fun i _ => ?_ rw [osum_projVal_left] have hv : vecLeft (padRight (d₁ := d₁) ψ₂) = 0 := by ext k; simp [vecLeft, padRight, Fin.addCases_left] simp [projVal, hv, dot] have hR : ∑ j : Fin n₂, w (Fin.natAdd n₁ j) * (R₁.osum R₂).projVal (Fin.natAdd n₁ j) (padRight (d₁ := d₁) ψ₂) = ∑ j : Fin n₂, w (Fin.natAdd n₁ j) * R₂.projVal j ψ₂ := by refine Finset.sum_congr rfl fun j _ => ?_ rw [osum_projVal_right] have hv : vecRight (padRight (d₁ := d₁) ψ₂) = ψ₂ := by ext k; simp [vecRight, padRight, Fin.addCases_right] rw [hv] linarith · rintro ⟨⟨w₁, B₁, c₁, hw₁, hB₁, hBc₁, htf₁⟩, ⟨w₂, B₂, c₂, hw₂, hB₂, hBc₂, htf₂⟩⟩ have hB1_nn : 0 ≤ B₁ := by simpa using hB₁ ∅ (fun i hi => by simp at hi) have hB2_nn : 0 ≤ B₂ := by simpa using hB₂ ∅ (fun i hi => by simp at hi) have hc1_pos : 0 < c₁ := lt_of_le_of_lt hB1_nn hBc₁ have hc2_pos : 0 < c₂ := lt_of_le_of_lt hB2_nn hBc₂ let w : Fin (n₁ + n₂) → ℝ := Fin.addCases (fun i => c₂ * w₁ i) (fun j => c₁ * w₂ j) let B : ℝ := max (c₂ * B₁) (c₁ * B₂) refine ⟨w, B, c₁ * c₂, ?_, ?_, max_lt (by nlinarith) (by nlinarith), ?_⟩ · intro x refine Fin.addCases (fun i => by simp only [w, Fin.addCases_left]; exact mul_nonneg (le_of_lt hc2_pos) (hw₁ i)) (fun j => by simp only [w, Fin.addCases_right]; exact mul_nonneg (le_of_lt hc1_pos) (hw₂ j)) x · intro I hI rcases osum_isIndep_dichotomy R₁ R₂ hI with ⟨I₁, hI₁, rfl⟩ | ⟨I₂, hI₂, rfl⟩ · rw [Finset.sum_map] simp only [w, Fin.castAddEmb_apply, Fin.addCases_left, ← Finset.mul_sum] exact le_trans (mul_le_mul_of_nonneg_left (hB₁ I₁ hI₁) (le_of_lt hc2_pos)) (le_max_left _ _) · rw [Finset.sum_map] simp only [w, Fin.natAddEmb_apply, Fin.addCases_right, ← Finset.mul_sum] exact le_trans (mul_le_mul_of_nonneg_left (hB₂ I₂ hI₂) (le_of_lt hc1_pos)) (le_max_right _ _) · intro ψ rw [normSq_split, Fin.sum_univ_add] simp only [w, Fin.addCases_left, Fin.addCases_right, osum_projVal_left, osum_projVal_right] have hL : ∑ i : Fin n₁, c₂ * w₁ i * R₁.projVal i (vecLeft ψ) = c₁ * c₂ * normSq (vecLeft ψ) := by have h : ∑ i : Fin n₁, c₂ * w₁ i * R₁.projVal i (vecLeft ψ) = c₂ * ∑ i : Fin n₁, w₁ i * R₁.projVal i (vecLeft ψ) := by rw [Finset.mul_sum]; refine Finset.sum_congr rfl fun i _ => by ring rw [h, htf₁ (vecLeft ψ)]; ring have hR : ∑ j : Fin n₂, c₁ * w₂ j * R₂.projVal j (vecRight ψ) = c₁ * c₂ * normSq (vecRight ψ) := by have h : ∑ j : Fin n₂, c₁ * w₂ j * R₂.projVal j (vecRight ψ) = c₁ * ∑ j : Fin n₂, w₂ j * R₂.projVal j (vecRight ψ) := by rw [Finset.mul_sum]; refine Finset.sum_congr rfl fun j _ => by ring rw [h, htf₂ (vecRight ψ)]; ring linarith /-- Any orthogonal clique of `R` in `ℝ^d` has cardinality at most `d`. -/ lemma clique_card_le_dim {d n : ℕ} (R : RayConfig d n) {C : Finset (Fin n)} (hC : ∀ i ∈ C, ∀ j ∈ C, i ≠ j → R.orth i j) : C.card ≤ d := by let T : (C → ℝ) →ₗ[ℝ] (Fin d → ℝ) := { toFun := fun c => ∑ i : C, c i • R.vec i.1 map_add' := fun c₁ c₂ => by simp only [Pi.add_apply, add_smul, Finset.sum_add_distrib] map_smul' := fun r c => by simp only [Pi.smul_apply, smul_eq_mul, RingHom.id_apply, mul_smul, Finset.smul_sum] } have hT_inj : Function.Injective T := by rw [injective_iff_map_eq_zero] intro c hc ext ⟨j, hj⟩ have hdot0 : dot (R.vec j) (T c) = 0 := by rw [hc]; simp [dot] have hdot_eval : dot (R.vec j) (T c) = c ⟨j, hj⟩ * normSq (R.vec j) := by change dot (R.vec j) (∑ i : C, c i • R.vec i.1) = _ rw [dot_sum_right] rw [Finset.sum_eq_single ⟨j, hj⟩] · rw [dot_smul_right, dot_self] · intro i _ hij rw [dot_smul_right] have hne : j ≠ i.1 := fun h => hij (Subtype.ext h.symm) rw [(hC j hj i.1 i.2 hne).2, mul_zero] · intro h; exact absurd (Finset.mem_univ _) h have hmul0 : c ⟨j, hj⟩ * normSq (R.vec j) = 0 := hdot_eval.symm.trans hdot0 exact (mul_eq_zero.mp hmul0).resolve_right (ne_of_gt (R.normSq_pos j)) have hle := LinearMap.finrank_le_finrank_of_injective hT_inj simp only [Fintype.card_coe, Fintype.card_fin, Module.finrank_pi] at hle exact hle /-- If `R₁` is KS-colorable, then `R₁ ⊕ R₂` is KS-colorable (not Tier 4). -/ theorem osum_not_tier4_of_left {d₁ d₂ n₁ n₂ : ℕ} (R₁ : RayConfig d₁ n₁) (R₂ : RayConfig d₂ n₂) (h1 : ¬ R₁.IsTier4_KSUncolorable) : ¬ (R₁.osum R₂).IsTier4_KSUncolorable := by classical unfold IsTier4_KSUncolorable at h1 ⊢ push Not at h1 ⊢ obtain ⟨I₁, hI₁_ind, hI₁_hit⟩ := h1 refine ⟨I₁.map (Fin.castAddEmb n₂), ?_, ?_⟩ · intro a ha b hb rcases Finset.mem_map.mp ha with ⟨i, hi, rfl⟩ rcases Finset.mem_map.mp hb with ⟨j, hj, rfl⟩ rw [Fin.castAddEmb_apply, Fin.castAddEmb_apply, osum_orth_left_iff] exact hI₁_ind i hi j hj · intro C hC let C₁ : Finset (Fin n₁) := Finset.univ.filter (fun i => Fin.castAdd n₂ i ∈ C) let C₂ : Finset (Fin n₂) := Finset.univ.filter (fun j => Fin.natAdd n₁ j ∈ C) have hC₁_clique : ∀ i ∈ C₁, ∀ j ∈ C₁, i ≠ j → R₁.orth i j := by intro i hi j hj hij rw [← osum_orth_left_iff R₁ R₂] exact hC.2 _ (Finset.mem_filter.mp hi).2 _ (Finset.mem_filter.mp hj).2 (fun h => hij (Fin.castAdd_injective n₁ n₂ h)) have hC₂_clique : ∀ i ∈ C₂, ∀ j ∈ C₂, i ≠ j → R₂.orth i j := by intro i hi j hj hij rw [← osum_orth_right_iff R₁ R₂] exact hC.2 _ (Finset.mem_filter.mp hi).2 _ (Finset.mem_filter.mp hj).2 (fun h => hij (Fin.natAdd_injective n₂ n₁ h)) have hcard_split : C.card = C₁.card + C₂.card := by have hdisj : Disjoint (C₁.map (Fin.castAddEmb n₂)) (C₂.map (Fin.natAddEmb n₁)) := by rw [Finset.disjoint_left] intro x hx₁ hx₂ rcases Finset.mem_map.mp hx₁ with ⟨i, _, rfl⟩ rcases Finset.mem_map.mp hx₂ with ⟨j, _, hj⟩ have hv := congrArg Fin.val hj simp only [Fin.castAddEmb_apply, Fin.natAddEmb_apply, Fin.val_castAdd, Fin.val_natAdd] at hv omega have hunion : C = C₁.map (Fin.castAddEmb n₂) ∪ C₂.map (Fin.natAddEmb n₁) := by ext x refine Fin.addCases (fun i => ?_) (fun j => ?_) x · simp only [Finset.mem_union, Finset.mem_map, Fin.castAddEmb_apply, Fin.natAddEmb_apply, C₁, C₂, Finset.mem_filter, Finset.mem_univ, true_and] constructor · intro h; left; exact ⟨i, h, rfl⟩ · rintro (⟨i', hi', hEq⟩ | ⟨j', _, hEq⟩) · rwa [Fin.castAdd_injective n₁ n₂ hEq] at hi' · have hv := congrArg Fin.val hEq simp only [Fin.val_castAdd, Fin.val_natAdd] at hv; omega · simp only [Finset.mem_union, Finset.mem_map, Fin.castAddEmb_apply, Fin.natAddEmb_apply, C₁, C₂, Finset.mem_filter, Finset.mem_univ, true_and] constructor · intro h; right; exact ⟨j, h, rfl⟩ · rintro (⟨i', _, hEq⟩ | ⟨j', hj', hEq⟩) · have hv := congrArg Fin.val hEq simp only [Fin.val_castAdd, Fin.val_natAdd] at hv; omega · rwa [Fin.natAdd_injective n₂ n₁ hEq] at hj' rw [hunion, Finset.card_union_of_disjoint hdisj, Finset.card_map, Finset.card_map] have hle1 : C₁.card ≤ d₁ := clique_card_le_dim R₁ hC₁_clique have hle2 : C₂.card ≤ d₂ := clique_card_le_dim R₂ hC₂_clique have hCcard : C.card = d₁ + d₂ := hC.1 have hC₁_card : C₁.card = d₁ := by omega obtain ⟨v, hv⟩ := hI₁_hit C₁ ⟨hC₁_card, hC₁_clique⟩ exact ⟨Fin.castAdd n₂ v, Finset.mem_inter.mpr ⟨Finset.mem_map.mpr ⟨v, (Finset.mem_inter.mp hv).1, rfl⟩, (Finset.mem_filter.mp (Finset.mem_inter.mp hv).2).2⟩⟩ /-- Standard orthonormal basis of `ℝ^d` as a `RayConfig d d`. -/ def stdBasis (d : ℕ) : RayConfig d d where vec := fun i j => if j = i then 1 else 0 normSq_pos := by intro i; unfold normSq; rw [Finset.sum_eq_single i] · simp · intro j _ hji; simp [hji] · intro h; exact absurd (Finset.mem_univ _) h /-- The standard basis of `ℝ^d` (`d ≥ 1`) is NEVER Tier 2 (every basis vector is noncontextual). -/ theorem stdBasis_not_tier2 {d : ℕ} (hd : 1 ≤ d) : ¬ (stdBasis d).IsTier2_AllStateOperator := by let i₀ : Fin d := ⟨0, hd⟩ apply no_tier2_of_nchv_state (stdBasis d) ((stdBasis d).vec i₀) ((stdBasis d).normSq_pos i₀) (fun _ : Fin 1 => {i₀}) (fun _ : Fin 1 => 1) · intro _ a ha b hb horth simp only [Finset.mem_singleton] at ha hb exact horth.1 (ha.trans hb.symm) · intro _; norm_num · simp · intro i simp only [projVal, Finset.univ_unique, Fin.default_eq_zero, Finset.sum_singleton, Finset.mem_singleton] have hns : ∀ k : Fin d, normSq ((stdBasis d).vec k) = 1 := by intro k; unfold normSq; rw [Finset.sum_eq_single k] · simp [stdBasis] · intro j _ hjk; simp [stdBasis, hjk] · intro h; exact absurd (Finset.mem_univ _) h rw [hns i, hns i₀, div_one, div_one] by_cases hi : i = i₀ · subst hi; rw [dot_self, hns i₀]; simp · have hdot0 : dot ((stdBasis d).vec i) ((stdBasis d).vec i₀) = 0 := by unfold dot refine Finset.sum_eq_zero fun j _ => ?_ by_cases hji : j = i · subst hji; simp [stdBasis, hi] · simp [stdBasis, hji] rw [hdot0]; simp [hi] /-- **Cone Obstruction Theorem**: No cone `R ⊕ stdBasis d₂` (`d₂ ≥ 1`) is EVER Tier 2, even when `R` is Tier 4 (KS-uncolorable). -/ theorem cone_not_tier2 {d₁ d₂ n₁ : ℕ} (hd₂ : 1 ≤ d₂) (R : RayConfig d₁ n₁) : ¬ (R.osum (stdBasis d₂)).IsTier2_AllStateOperator := by rw [osum_tier2_iff] intro ⟨_, h2⟩ exact stdBasis_not_tier2 hd₂ h2 /-- Any Tier-1 configuration joined with `stdBasis d₂` (`d₂ ≥ 1`) stays Tier 1 and fails Tier 2. -/ theorem osum_tier1_not_tier2_of_tier1_basis {d₁ d₂ n₁ : ℕ} (hd₂ : 1 ≤ d₂) (R : RayConfig d₁ n₁) (h1 : R.IsTier1_FracChromatic) : (R.osum (stdBasis d₂)).IsTier1_FracChromatic ∧ ¬ (R.osum (stdBasis d₂)).IsTier2_AllStateOperator := by refine ⟨?_, cone_not_tier2 hd₂ R⟩ obtain ⟨w₁, B, hw₁, hBpos, hB, hsum⟩ := h1 let w : Fin (n₁ + d₂) → ℝ := Fin.addCases w₁ (fun _ => B) refine ⟨w, B, ?_, hBpos, ?_, ?_⟩ · intro x refine Fin.addCases (fun i => by simp only [w, Fin.addCases_left]; exact hw₁ i) (fun _ => by simp only [w, Fin.addCases_right]; exact le_of_lt hBpos) x · intro I hI rcases osum_isIndep_dichotomy R (stdBasis d₂) hI with ⟨I₁, hI₁, rfl⟩ | ⟨I₂, hI₂, rfl⟩ · simpa [w, Finset.sum_map] using hB I₁ hI₁ · have hcard : I₂.card ≤ 1 := by rw [Finset.card_le_one] intro a ha b hb by_contra hab apply hI₂ a ha b hb refine ⟨hab, ?_⟩ unfold dot refine Finset.sum_eq_zero fun j _ => ?_ by_cases hja : j = a · subst hja; simp [stdBasis, hab] · simp [stdBasis, hja] rw [Finset.sum_map] simp only [w, Fin.natAddEmb_apply, Fin.addCases_right, Finset.sum_const, nsmul_eq_mul] have hle : (I₂.card : ℝ) ≤ 1 := by exact_mod_cast hcard nlinarith · rw [Fin.sum_univ_add] simp only [w, Fin.addCases_left, Fin.addCases_right, Finset.sum_const, Finset.card_univ, Fintype.card_fin, nsmul_eq_mul, Nat.cast_add] linarith /-- Kronecker / tensor product `R₁ ⊗ R₂` of ray configurations in `ℝ^(d₁ * d₂)`. -/ def tensor {d₁ d₂ n₁ n₂ : ℕ} (R₁ : RayConfig d₁ n₁) (R₂ : RayConfig d₂ n₂) : RayConfig (d₁ * d₂) (n₁ * n₂) where vec := fun p k => R₁.vec (finProdFinEquiv.symm p).1 (finProdFinEquiv.symm k).1 * R₂.vec (finProdFinEquiv.symm p).2 (finProdFinEquiv.symm k).2 normSq_pos := by intro p unfold normSq have hmul : ∑ k : Fin (d₁ * d₂), (R₁.vec (finProdFinEquiv.symm p).1 (finProdFinEquiv.symm k).1 * R₂.vec (finProdFinEquiv.symm p).2 (finProdFinEquiv.symm k).2) ^ 2 = normSq (R₁.vec (finProdFinEquiv.symm p).1) * normSq (R₂.vec (finProdFinEquiv.symm p).2) := by rw [finProdFinEquiv.symm.sum_comp (g := fun ab : Fin d₁ × Fin d₂ => (R₁.vec (finProdFinEquiv.symm p).1 ab.1 * R₂.vec (finProdFinEquiv.symm p).2 ab.2) ^ 2)] simp only [mul_pow, Fintype.sum_prod_type, normSq] rw [Finset.sum_mul] refine Finset.sum_congr rfl fun a _ => ?_ rw [← Finset.mul_sum] rw [hmul] exact mul_pos (R₁.normSq_pos _) (R₂.normSq_pos _) lemma tensor_dot {d₁ d₂ n₁ n₂ : ℕ} (R₁ : RayConfig d₁ n₁) (R₂ : RayConfig d₂ n₂) (p q : Fin (n₁ * n₂)) : dot ((R₁.tensor R₂).vec p) ((R₁.tensor R₂).vec q) = dot (R₁.vec (finProdFinEquiv.symm p).1) (R₁.vec (finProdFinEquiv.symm q).1) * dot (R₂.vec (finProdFinEquiv.symm p).2) (R₂.vec (finProdFinEquiv.symm q).2) := by unfold dot tensor dsimp only rw [finProdFinEquiv.symm.sum_comp (g := fun ab : Fin d₁ × Fin d₂ => (R₁.vec (finProdFinEquiv.symm p).1 ab.1 * R₂.vec (finProdFinEquiv.symm p).2 ab.2) * (R₁.vec (finProdFinEquiv.symm q).1 ab.1 * R₂.vec (finProdFinEquiv.symm q).2 ab.2))] rw [Fintype.sum_prod_type, Finset.sum_mul] refine Finset.sum_congr rfl fun a _ => ?_ rw [Finset.mul_sum] refine Finset.sum_congr rfl fun b _ => by ring /-- **Multiplicativity of Weighted Independence Bounds under Tensor Product**: If `α(G₁, w₁) ≤ B₁` and `α(G₂, w₂) ≤ B₂`, then `α(G₁ * G₂, w₁ ⊗ w₂) ≤ B₁ * B₂`. -/ theorem tensor_weight_bound {d₁ d₂ n₁ n₂ : ℕ} (R₁ : RayConfig d₁ n₁) (R₂ : RayConfig d₂ n₂) (w₁ : Fin n₁ → ℝ) (w₂ : Fin n₂ → ℝ) (B₁ B₂ : ℝ) (hw₁ : ∀ i, 0 ≤ w₁ i) (hw₂ : ∀ j, 0 ≤ w₂ j) (hB₁ : R₁.IsWeightBound w₁ B₁) (hB₂ : R₂.IsWeightBound w₂ B₂) : (R₁.tensor R₂).IsWeightBound (fun p => w₁ (finProdFinEquiv.symm p).1 * w₂ (finProdFinEquiv.symm p).2) (B₁ * B₂) := by classical intro I hI let I₁ : Finset (Fin n₁) := I.image (fun p => (finProdFinEquiv.symm p).1) let I₂ : Finset (Fin n₂) := I.image (fun p => (finProdFinEquiv.symm p).2) have hI₁ : R₁.IsIndep I₁ := by intro a ha b hb horth rcases Finset.mem_image.mp ha with ⟨p, hp, rfl⟩ rcases Finset.mem_image.mp hb with ⟨q, hq, rfl⟩ apply hI p hp q hq refine ⟨fun h => horth.1 (congrArg (fun x => (finProdFinEquiv.symm x).1) h), ?_⟩ rw [tensor_dot, horth.2, zero_mul] have hI₂ : R₂.IsIndep I₂ := by intro a ha b hb horth rcases Finset.mem_image.mp ha with ⟨p, hp, rfl⟩ rcases Finset.mem_image.mp hb with ⟨q, hq, rfl⟩ apply hI p hp q hq refine ⟨fun h => horth.1 (congrArg (fun x => (finProdFinEquiv.symm x).2) h), ?_⟩ rw [tensor_dot, horth.2, mul_zero] have hsub : I ⊆ (I₁ ×ˢ I₂).map finProdFinEquiv.toEmbedding := by intro p hp rw [Finset.mem_map] refine ⟨finProdFinEquiv.symm p, Finset.mem_product.mpr ⟨Finset.mem_image_of_mem _ hp, Finset.mem_image_of_mem _ hp⟩, ?_⟩ exact finProdFinEquiv.apply_symm_apply p have hB1_nn : 0 ≤ B₁ := by simpa using hB₁ ∅ (fun i hi => by simp at hi) calc ∑ p ∈ I, w₁ (finProdFinEquiv.symm p).1 * w₂ (finProdFinEquiv.symm p).2 ≤ ∑ p ∈ (I₁ ×ˢ I₂).map finProdFinEquiv.toEmbedding, w₁ (finProdFinEquiv.symm p).1 * w₂ (finProdFinEquiv.symm p).2 := Finset.sum_le_sum_of_subset_of_nonneg hsub fun p _ _ => mul_nonneg (hw₁ _) (hw₂ _) _ = ∑ ab ∈ I₁ ×ˢ I₂, w₁ ab.1 * w₂ ab.2 := by rw [Finset.sum_map] refine Finset.sum_congr rfl fun ab _ => by simp _ = (∑ a ∈ I₁, w₁ a) * (∑ b ∈ I₂, w₂ b) := by rw [Finset.sum_product, Finset.sum_mul] refine Finset.sum_congr rfl fun a _ => by dsimp only; rw [← Finset.mul_sum] _ ≤ B₁ * B₂ := mul_le_mul (hB₁ I₁ hI₁) (hB₂ I₂ hI₂) (Finset.sum_nonneg fun b _ => hw₂ b) hB1_nn /-- **Multiplicative Amplification of Tight-Frame SI-C under Tensor Product**: If `R₁` has tight-frame constant `c₁` (bound `B₁`) and `R₂` has constant `c₂` (bound `B₂`), then `R₁ ⊗ R₂` has tight-frame constant `c₁ * c₂` (bound `B₁ * B₂`). -/ theorem tensor_tight_frame {d₁ d₂ n₁ n₂ : ℕ} (R₁ : RayConfig d₁ n₁) (R₂ : RayConfig d₂ n₂) (w₁ : Fin n₁ → ℝ) (w₂ : Fin n₂ → ℝ) (B₁ c₁ B₂ c₂ : ℝ) (hw₁ : ∀ i, 0 ≤ w₁ i) (hw₂ : ∀ j, 0 ≤ w₂ j) (hB₁ : R₁.IsWeightBound w₁ B₁) (hB₂ : R₂.IsWeightBound w₂ B₂) (htf₁ : ∀ ψ₁, ∑ i : Fin n₁, w₁ i * R₁.projVal i ψ₁ = c₁ * normSq ψ₁) (htf₂ : ∀ ψ₂, ∑ j : Fin n₂, w₂ j * R₂.projVal j ψ₂ = c₂ * normSq ψ₂) : (R₁.tensor R₂).IsWeightBound (fun p => w₁ (finProdFinEquiv.symm p).1 * w₂ (finProdFinEquiv.symm p).2) (B₁ * B₂) ∧ ∀ ψ : Fin (d₁ * d₂) → ℝ, ∑ p : Fin (n₁ * n₂), (w₁ (finProdFinEquiv.symm p).1 * w₂ (finProdFinEquiv.symm p).2) * (R₁.tensor R₂).projVal p ψ = (c₁ * c₂) * normSq ψ := by refine ⟨tensor_weight_bound R₁ R₂ w₁ w₂ B₁ B₂ hw₁ hw₂ hB₁ hB₂, ?_⟩ intro ψ have hnorm_p : ∀ p : Fin (n₁ * n₂), normSq ((R₁.tensor R₂).vec p) = normSq (R₁.vec (finProdFinEquiv.symm p).1) * normSq (R₂.vec (finProdFinEquiv.symm p).2) := by intro p; rw [← dot_self, tensor_dot, dot_self, dot_self] have hdot_p : ∀ p : Fin (n₁ * n₂), dot ((R₁.tensor R₂).vec p) ψ = ∑ a : Fin d₁, R₁.vec (finProdFinEquiv.symm p).1 a * dot (R₂.vec (finProdFinEquiv.symm p).2) (fun b => ψ (finProdFinEquiv (a, b))) := by intro p unfold dot tensor dsimp only rw [← finProdFinEquiv.sum_comp (g := fun k => (R₁.vec (finProdFinEquiv.symm p).1 (finProdFinEquiv.symm k).1 * R₂.vec (finProdFinEquiv.symm p).2 (finProdFinEquiv.symm k).2) * ψ k)] rw [Fintype.sum_prod_type] refine Finset.sum_congr rfl fun a _ => ?_ rw [Finset.mul_sum] refine Finset.sum_congr rfl fun b _ => by simp only [Equiv.symm_apply_apply]; ring rw [← finProdFinEquiv.sum_comp (g := fun p => (w₁ (finProdFinEquiv.symm p).1 * w₂ (finProdFinEquiv.symm p).2) * (R₁.tensor R₂).projVal p ψ)] simp only [Equiv.symm_apply_apply] rw [Fintype.sum_prod_type, Finset.sum_comm] have hinner : ∀ j : Fin n₂, ∑ i : Fin n₁, (w₁ i * w₂ j) * (R₁.tensor R₂).projVal (finProdFinEquiv (i, j)) ψ = c₁ * (w₂ j * ∑ a : Fin d₁, R₂.projVal j (fun b => ψ (finProdFinEquiv (a, b)))) := by intro j let ϕ : Fin d₁ → ℝ := fun a => dot (R₂.vec j) (fun b => ψ (finProdFinEquiv (a, b))) have hterm : ∀ i : Fin n₁, (w₁ i * w₂ j) * (R₁.tensor R₂).projVal (finProdFinEquiv (i, j)) ψ = (w₂ j / normSq (R₂.vec j)) * (w₁ i * R₁.projVal i ϕ) := by intro i unfold projVal rw [hnorm_p, hdot_p] simp only [Equiv.symm_apply_apply] change (w₁ i * w₂ j) * ((dot (R₁.vec i) ϕ) ^ 2 / (normSq (R₁.vec i) * normSq (R₂.vec j))) = _ ring simp_rw [hterm, ← Finset.mul_sum, htf₁ ϕ] change (w₂ j / normSq (R₂.vec j)) * (c₁ * ∑ a : Fin d₁, (ϕ a) ^ 2) = c₁ * (w₂ j * ∑ a : Fin d₁, (ϕ a) ^ 2 / normSq (R₂.vec j)) rw [← Finset.sum_div]; ring simp_rw [hinner, ← Finset.mul_sum] have houter : ∑ j : Fin n₂, w₂ j * ∑ a : Fin d₁, R₂.projVal j (fun b => ψ (finProdFinEquiv (a, b))) = c₂ * normSq ψ := by simp_rw [Finset.mul_sum] rw [Finset.sum_comm] have ha : ∀ a : Fin d₁, ∑ j : Fin n₂, w₂ j * R₂.projVal j (fun b => ψ (finProdFinEquiv (a, b))) = c₂ * normSq (fun b => ψ (finProdFinEquiv (a, b))) := fun a => htf₂ _ simp_rw [ha, ← Finset.mul_sum] congr 1 unfold normSq rw [← finProdFinEquiv.sum_comp (g := fun k => (ψ k) ^ 2)] exact (Fintype.sum_prod_type (fun ab : Fin d₁ × Fin d₂ => (ψ (finProdFinEquiv ab)) ^ 2)).symm rw [houter]; ring /-! ## Section 4: Equiangular-Complement Independence Theorem and E₈ Amplification -/ /-- **Universal Equiangular-Complement Independence Bound**: For any `d ≥ 3`, any `γ ∈ [1/2, 1)`, and any finite ray configuration `R : RayConfig d n` whose non-orthogonal distinct pairs satisfy `⟨v_i, v_j⟩² / (‖v_i‖² ‖v_j‖²) = γ²`, EVERY independent set `I` of `G(R)` has cardinality `I.card ≤ d`. -/ theorem equiangular_complement_indep_bound {d n : ℕ} (hd : 3 ≤ d) (R : RayConfig d n) (γ : ℝ) (hγ_lo : (1 : ℝ) / 2 ≤ γ) (hγ_hi : γ < 1) (hequi : ∀ i j : Fin n, i ≠ j → ¬ R.orth i j → (dot (R.vec i) (R.vec j)) ^ 2 / (normSq (R.vec i) * normSq (R.vec j)) = γ ^ 2) {I : Finset (Fin n)} (hI : R.IsIndep I) : I.card ≤ d := by classical by_cases hcard4 : I.card ≤ 3 · omega · push Not at hcard4 let u : Fin n → Fin d → ℝ := fun i => (1 / Real.sqrt (normSq (R.vec i))) • R.vec i have hu_norm : ∀ i : Fin n, normSq (u i) = 1 := by intro i rw [← dot_self] change dot ((1 / Real.sqrt (normSq (R.vec i))) • R.vec i) ((1 / Real.sqrt (normSq (R.vec i))) • R.vec i) = 1 rw [dot_smul_left, dot_smul_right, dot_self] have hpos : 0 < normSq (R.vec i) := R.normSq_pos i have hsq : Real.sqrt (normSq (R.vec i)) * Real.sqrt (normSq (R.vec i)) = normSq (R.vec i) := Real.mul_self_sqrt (le_of_lt hpos) have hne : Real.sqrt (normSq (R.vec i)) ≠ 0 := ne_of_gt (Real.sqrt_pos.mpr hpos) field_simp [hne] linarith have hu_dot_sq : ∀ i ∈ I, ∀ j ∈ I, i ≠ j → (dot (u i) (u j)) ^ 2 = γ ^ 2 := by intro i hi j hj hij change (dot ((1 / Real.sqrt (normSq (R.vec i))) • R.vec i) ((1 / Real.sqrt (normSq (R.vec j))) • R.vec j)) ^ 2 = γ ^ 2 rw [dot_smul_left, dot_smul_right] have hpos_i : 0 < normSq (R.vec i) := R.normSq_pos i have hpos_j : 0 < normSq (R.vec j) := R.normSq_pos j have heq := hequi i j hij (hI i hi j hj) have hmul : (1 / Real.sqrt (normSq (R.vec i)) * (1 / Real.sqrt (normSq (R.vec j)) * dot (R.vec i) (R.vec j))) ^ 2 = (dot (R.vec i) (R.vec j)) ^ 2 / (normSq (R.vec i) * normSq (R.vec j)) := by rw [mul_pow, mul_pow, div_pow, div_pow, one_pow, Real.sq_sqrt (le_of_lt hpos_i), Real.sq_sqrt (le_of_lt hpos_j)] ring rw [hmul, heq] have hI_nonempty : I.Nonempty := Finset.card_pos.mp (by omega) obtain ⟨i₀, hi₀⟩ := hI_nonempty let I' : Finset (Fin n) := I.erase i₀ let sgn : Fin n → ℝ := fun i => if dot (u i₀) (u i) = γ then 1 else -1 have hsgn_sq : ∀ i, (sgn i) ^ 2 = 1 := by intro i; dsimp only [sgn]; split_ifs <;> norm_num let uT : Fin n → Fin d → ℝ := fun i => (sgn i) • u i have huT_norm : ∀ i : Fin n, normSq (uT i) = 1 := by intro i rw [← dot_self] change dot (sgn i • u i) (sgn i • u i) = 1 rw [dot_smul_left, dot_smul_right, dot_self, hu_norm i] have := hsgn_sq i; nlinarith have huT_dot0 : ∀ i ∈ I', dot (u i₀) (uT i) = γ := by intro i hi have hne : i₀ ≠ i := (Finset.mem_erase.mp hi).1.symm have hsq := hu_dot_sq i₀ hi₀ i (Finset.mem_of_mem_erase hi) hne have hor : dot (u i₀) (u i) = γ ∨ dot (u i₀) (u i) = -γ := sq_eq_sq_iff_eq_or_eq_neg.mp hsq change dot (u i₀) (sgn i • u i) = γ rw [dot_smul_right] dsimp only [sgn] rcases hor with h | h · rw [if_pos h, h, one_mul] · by_cases hEq : dot (u i₀) (u i) = γ · rw [if_pos hEq, hEq, one_mul] · rw [if_neg hEq, h]; ring let w : Fin n → Fin d → ℝ := fun i => uT i + (-γ) • u i₀ have hw_orth0 : ∀ i ∈ I', dot (u i₀) (w i) = 0 := by intro i hi change dot (u i₀) (uT i + (-γ) • u i₀) = 0 rw [dot_add_right, huT_dot0 i hi, dot_smul_right, dot_self, hu_norm i₀] ring have hw_norm : ∀ i ∈ I', normSq (w i) = 1 - γ ^ 2 := by intro i hi have hc1 : dot (uT i) ((-γ) • u i₀) = -γ * γ := by rw [dot_smul_right, dot_comm, huT_dot0 i hi] have hc2 : dot ((-γ) • u i₀) (uT i) = -γ * γ := by rw [dot_smul_left, huT_dot0 i hi] have hc3 : dot ((-γ) • u i₀) ((-γ) • u i₀) = γ ^ 2 := by rw [dot_smul_left, dot_smul_right, dot_self, hu_norm i₀]; ring rw [← dot_self] change dot (uT i + (-γ) • u i₀) (uT i + (-γ) • u i₀) = 1 - γ ^ 2 rw [dot_add_left (uT i) ((-γ) • u i₀), dot_add_right (uT i), dot_add_right ((-γ) • u i₀), dot_self (uT i), huT_norm i, hc1, hc2, hc3] ring have hw_dot_cases : ∀ i ∈ I', ∀ j ∈ I', i ≠ j → dot (w i) (w j) = γ - γ ^ 2 ∨ dot (w i) (w j) = -γ - γ ^ 2 := by intro i hi j hj hij have huT_dot : dot (uT i) (uT j) = γ ∨ dot (uT i) (uT j) = -γ := by have hsq : (dot (uT i) (uT j)) ^ 2 = γ ^ 2 := by change (dot (sgn i • u i) (sgn j • u j)) ^ 2 = γ ^ 2 rw [dot_smul_left, dot_smul_right, mul_pow, mul_pow, hsgn_sq i, hsgn_sq j, one_mul, one_mul] exact hu_dot_sq i (Finset.mem_of_mem_erase hi) j (Finset.mem_of_mem_erase hj) hij exact sq_eq_sq_iff_eq_or_eq_neg.mp hsq have hexp : dot (w i) (w j) = dot (uT i) (uT j) - γ ^ 2 := by have hc1 : dot (uT i) ((-γ) • u i₀) = -γ * γ := by rw [dot_smul_right, dot_comm, huT_dot0 i hi] have hc2 : dot ((-γ) • u i₀) (uT j) = -γ * γ := by rw [dot_smul_left, huT_dot0 j hj] have hc3 : dot ((-γ) • u i₀) ((-γ) • u i₀) = γ ^ 2 := by rw [dot_smul_left, dot_smul_right, dot_self, hu_norm i₀]; ring change dot (uT i + (-γ) • u i₀) (uT j + (-γ) • u i₀) = dot (uT i) (uT j) - γ ^ 2 rw [dot_add_left (uT i) ((-γ) • u i₀), dot_add_right (uT i), dot_add_right ((-γ) • u i₀), hc1, hc2, hc3] ring rw [hexp] rcases huT_dot with h | h <;> [left; right] <;> linarith have hw_dot_pos : ∀ i ∈ I', ∀ j ∈ I', i ≠ j → dot (w i) (w j) = γ - γ ^ 2 := by intro i hi j hj hij rcases hw_dot_cases i hi j hj hij with h | hneg · exact h · exfalso have hsum_norm : normSq (w i + w j) = 2 * (1 + γ) * (1 - 2 * γ) := by rw [← dot_self, dot_add_left (w i) (w j), dot_add_right (w i), dot_add_right (w j), dot_self (w i), dot_self (w j), dot_comm (w j) (w i), hw_norm i hi, hw_norm j hj, hneg] ring have hsum_nn : 0 ≤ normSq (w i + w j) := normSq_nonneg _ have hsum_le : 2 * (1 + γ) * (1 - 2 * γ) ≤ 0 := by nlinarith have hsum_zero : normSq (w i + w j) = 0 := le_antisymm (by linarith) hsum_nn have hγ_half : γ = 1 / 2 := by nlinarith have hwij0 : w i + w j = 0 := (normSq_eq_zero_iff _).mp hsum_zero have hI'_card : 3 ≤ I'.card := by rw [Finset.card_erase_of_mem hi₀]; omega have hthird : ((I'.erase i).erase j).Nonempty := by apply Finset.card_pos.mp have h1 : (I'.erase i).card = I'.card - 1 := Finset.card_erase_of_mem hi have hj' : j ∈ I'.erase i := Finset.mem_erase.mpr ⟨hij.symm, hj⟩ have h2 : ((I'.erase i).erase j).card = (I'.erase i).card - 1 := Finset.card_erase_of_mem hj' omega obtain ⟨k, hk⟩ := hthird have hkj : k ≠ j := (Finset.mem_erase.mp hk).1 have hk1 : k ∈ I'.erase i := (Finset.mem_erase.mp hk).2 have hki : k ≠ i := (Finset.mem_erase.mp hk1).1 have hkI' : k ∈ I' := (Finset.mem_erase.mp hk1).2 have hzero : dot (w k) (w i) + dot (w k) (w j) = 0 := by rw [← dot_add_right, hwij0]; simp [dot] rcases hw_dot_cases k hkI' i hi hki with h1 | h1 <;> rcases hw_dot_cases k hkI' j hj hkj with h2 | h2 <;> linarith let f : I → Fin d → ℝ := fun x => if x.1 = i₀ then u i₀ else w x.1 let L : (I → ℝ) →ₗ[ℝ] (Fin d → ℝ) := { toFun := fun c => ∑ x : I, c x • f x map_add' := fun c₁ c₂ => by simp only [Pi.add_apply, add_smul, Finset.sum_add_distrib] map_smul' := fun r c => by simp only [Pi.smul_apply, smul_eq_mul, RingHom.id_apply, mul_smul, Finset.smul_sum] } have hL_inj : Function.Injective L := by rw [injective_iff_map_eq_zero] intro c hc have h0 : normSq (L c) = 0 := by rw [hc]; simp [normSq] let x₀ : I := ⟨i₀, hi₀⟩ have hsplit : L c = c x₀ • u i₀ + ∑ x ∈ Finset.univ.erase x₀, c x • w x.1 := by change ∑ x : I, c x • f x = _ rw [← Finset.add_sum_erase _ _ (Finset.mem_univ x₀)] congr 1 · simp [f, x₀] · refine Finset.sum_congr rfl fun x hx => ?_ have hne : x.1 ≠ i₀ := fun h => (Finset.mem_erase.mp hx).1 (Subtype.ext h) simp [f, hne] let S := Finset.univ.erase x₀ have hmemI' : ∀ x ∈ S, x.1 ∈ I' := fun x hx => Finset.mem_erase.mpr ⟨fun h => (Finset.mem_erase.mp hx).1 (Subtype.ext h), x.2⟩ have hnorm_expand : normSq (L c) = (c x₀) ^ 2 + (1 - γ) * (∑ x ∈ S, (c x) ^ 2) + (γ - γ ^ 2) * (∑ x ∈ S, c x) ^ 2 := by rw [hsplit, ← dot_self, dot_add_left (c x₀ • u i₀), dot_add_right (c x₀ • u i₀), dot_add_right (∑ x ∈ S, c x • w x.1)] have hcross1 : dot (c x₀ • u i₀) (∑ x ∈ S, c x • w x.1) = 0 := by rw [dot_smul_left, dot_sum_right] refine mul_eq_zero_of_right _ (Finset.sum_eq_zero fun x hx => ?_) rw [dot_smul_right, hw_orth0 x.1 (hmemI' x hx), mul_zero] have hcross2 : dot (∑ x ∈ S, c x • w x.1) (c x₀ • u i₀) = 0 := by rw [dot_comm, hcross1] have hfirst : dot (c x₀ • u i₀) (c x₀ • u i₀) = (c x₀) ^ 2 := by rw [dot_smul_left, dot_smul_right, dot_self, hu_norm i₀]; ring have hsecond : dot (∑ x ∈ S, c x • w x.1) (∑ y ∈ S, c y • w y.1) = (1 - γ) * (∑ x ∈ S, (c x) ^ 2) + (γ - γ ^ 2) * (∑ x ∈ S, c x) ^ 2 := by rw [dot_sum_left] have hinner : ∀ x ∈ S, dot (c x • w x.1) (∑ y ∈ S, c y • w y.1) = (1 - γ) * (c x) ^ 2 + (γ - γ ^ 2) * (c x * ∑ y ∈ S, c y) := by intro x hx rw [dot_smul_left, dot_sum_right] have hterm : ∀ y ∈ S, dot (w x.1) (c y • w y.1) = (if y = x then (1 - γ) * c y else 0) + (γ - γ ^ 2) * c y := by intro y hy rw [dot_smul_right] by_cases hyx : y = x · subst hyx; rw [dot_self, hw_norm y.1 (hmemI' y hy)]; simp; ring · have hne : x.1 ≠ y.1 := fun h => hyx (Subtype.ext h.symm) rw [hw_dot_pos x.1 (hmemI' x hx) y.1 (hmemI' y hy) hne]; simp [hyx]; ring rw [Finset.sum_congr rfl hterm, Finset.sum_add_distrib] have hdiag : ∑ y ∈ S, (if y = x then (1 - γ) * c y else 0) = (1 - γ) * c x := by rw [Finset.sum_eq_single x] · simp · intro y _ hyx; simp [hyx] · intro h; exact absurd hx h rw [hdiag, ← Finset.mul_sum]; ring rw [Finset.sum_congr rfl hinner, Finset.sum_add_distrib] have ha : ∑ x ∈ S, (1 - γ) * (c x) ^ 2 = (1 - γ) * ∑ x ∈ S, (c x) ^ 2 := by rw [Finset.mul_sum] have hb : ∑ x ∈ S, (γ - γ ^ 2) * (c x * ∑ y ∈ S, c y) = (γ - γ ^ 2) * (∑ x ∈ S, c x) ^ 2 := by rw [← Finset.mul_sum, ← Finset.sum_mul] ring rw [ha, hb] rw [hfirst, hcross1, hcross2, hsecond]; ring rw [hnorm_expand] at h0 have h1 : (c x₀) ^ 2 ≥ 0 := sq_nonneg _ have h2 : (1 - γ) * (∑ x ∈ S, (c x) ^ 2) ≥ 0 := mul_nonneg (by linarith) (Finset.sum_nonneg fun x _ => sq_nonneg _) have h3 : (γ - γ ^ 2) * (∑ x ∈ S, c x) ^ 2 ≥ 0 := mul_nonneg (by nlinarith) (sq_nonneg _) have hcx0 : c x₀ = 0 := sq_eq_zero_iff.mp (by linarith) have hsumS : ∑ x ∈ S, (c x) ^ 2 = 0 := by nlinarith ext x by_cases hx : x = x₀ · rw [hx, hcx0]; rfl · have hxS : x ∈ S := Finset.mem_erase.mpr ⟨hx, Finset.mem_univ x⟩ have hle := Finset.single_le_sum (f := fun y : I => (c y) ^ 2) (fun y _ => sq_nonneg (c y)) hxS exact sq_eq_zero_iff.mp (le_antisymm (by linarith) (sq_nonneg (c x))) have hfin := LinearMap.finrank_le_finrank_of_injective hL_inj simp only [Fintype.card_coe, Fintype.card_fin, Module.finrank_pi] at hfin exact hfin /-! ### Explicit Algebraic E₈ Root Configuration (120 Rays in ℝ⁸) & Computer-Search-Free SI-C Proof -/ /-- Even-parity sign vectors on 7 coordinates (card = 64). -/ abbrev EvenSign7 := {s : Fin 7 → Bool // (Finset.univ.filter (fun k => s k)).card % 2 = 0} /-- Constructive bijection `(Fin 6 → Bool) ≃ EvenSign7` via parity bit on coordinate 6. -/ def evenSign7Equiv : (Fin 6 → Bool) ≃ EvenSign7 where toFun := fun t => let p := (Finset.univ.filter (fun k : Fin 6 => t k)).card % 2 == 1 let s : Fin 7 → Bool := Fin.snoc t p ⟨s, by have hflt : Finset.univ.filter (fun k : Fin 7 => s k) = (Finset.univ.filter (fun k : Fin 6 => t k)).map Fin.castSuccEmb ∪ (if p then {Fin.last 6} else ∅) := by ext k refine Fin.lastCases ?_ (fun j => ?_) k · simp only [s, Fin.snoc_last, Finset.mem_filter, Finset.mem_univ, true_and, Finset.mem_union, Finset.mem_map, Fin.castSuccEmb_apply] have hne : ∀ j : Fin 6, j.castSucc ≠ (Fin.last 6) := fun j => Fin.castSucc_ne_last j cases hp : p · simp only [Bool.false_eq_true, ↓reduceIte, Finset.notMem_empty, or_false, false_iff, not_exists, not_and] intro j _; exact hne j · simp · simp only [s, Fin.snoc_castSucc, Finset.mem_filter, Finset.mem_univ, true_and, Finset.mem_union, Finset.mem_map, Fin.castSuccEmb_apply] have hne : j.castSucc ≠ Fin.last 6 := Fin.castSucc_ne_last j cases hp : p · simp [Fin.castSucc_inj] · simp only [↓reduceIte, Finset.mem_singleton, hne, or_false, Fin.castSucc_inj, exists_eq_right] have hdisj : Disjoint ((Finset.univ.filter (fun k : Fin 6 => t k)).map Fin.castSuccEmb) (if p then {Fin.last 6} else ∅) := by rw [Finset.disjoint_left] intro x hx1 hx2 rcases Finset.mem_map.mp hx1 with ⟨j, _, rfl⟩ cases hp : p · simp [hp] at hx2 · simp only [hp, ↓reduceIte, Finset.mem_singleton] at hx2 exact Fin.castSucc_ne_last j hx2 rw [hflt, Finset.card_union_of_disjoint hdisj, Finset.card_map] dsimp only [p] split_ifs with hp · simp only [beq_iff_eq] at hp; rw [Finset.card_singleton]; omega · simp only [beq_iff_eq] at hp; rw [Finset.card_empty]; omega⟩ invFun := fun ⟨s, _⟩ => Fin.init s left_inv := fun t => by ext j; simp [Fin.init, Fin.snoc_castSucc] right_inv := fun ⟨s, hs⟩ => by apply Subtype.ext ext k refine Fin.lastCases ?_ (fun j => ?_) k · simp only [Fin.snoc_last] -- The last bit of s is uniquely determined by the parity of the first 6 bits! have hflt : Finset.univ.filter (fun k : Fin 7 => s k) = (Finset.univ.filter (fun j : Fin 6 => Fin.init s j)).map Fin.castSuccEmb ∪ (if s (Fin.last 6) then {Fin.last 6} else ∅) := by ext x refine Fin.lastCases ?_ (fun j => ?_) x · simp only [Finset.mem_filter, Finset.mem_univ, true_and, Finset.mem_union, Finset.mem_map, Fin.castSuccEmb_apply] have hne : ∀ j : Fin 6, j.castSucc ≠ Fin.last 6 := fun j => Fin.castSucc_ne_last j cases hlast : s (Fin.last 6) · simp only [Bool.false_eq_true, ↓reduceIte, Finset.notMem_empty, or_false, false_iff, not_exists, not_and] intro j _; exact hne j · simp · simp only [Finset.mem_filter, Finset.mem_univ, true_and, Finset.mem_union, Finset.mem_map, Fin.castSuccEmb_apply] have hne : j.castSucc ≠ Fin.last 6 := Fin.castSucc_ne_last j cases hlast : s (Fin.last 6) · simp [Fin.init, Fin.castSucc_inj] · simp only [↓reduceIte, Finset.mem_singleton, hne, or_false, Fin.castSucc_inj, exists_eq_right, Fin.init] have hdisj : Disjoint ((Finset.univ.filter (fun j : Fin 6 => Fin.init s j)).map Fin.castSuccEmb) (if s (Fin.last 6) then {Fin.last 6} else ∅) := by rw [Finset.disjoint_left] intro x hx1 hx2 rcases Finset.mem_map.mp hx1 with ⟨j, _, rfl⟩ change j.castSucc ∈ (if s (Fin.last 6) = true then {Fin.last 6} else ∅) at hx2 cases hlast : s (Fin.last 6) · rw [hlast] at hx2; simp at hx2 · rw [hlast] at hx2; simp only [↓reduceIte, Finset.mem_singleton] at hx2 exact Fin.castSucc_ne_last j hx2 rw [hflt, Finset.card_union_of_disjoint hdisj, Finset.card_map] at hs cases hlast : s (Fin.last 6) · simp_all [Finset.card_empty] · simp_all [Finset.card_singleton]; omega · simp [Fin.init, Fin.snoc_castSucc] lemma card_evenSign7 : Fintype.card EvenSign7 = 64 := by rw [← Fintype.card_congr evenSign7Equiv] simp lemma card_ltPairs8 : Fintype.card {p : Fin 8 × Fin 8 // p.1 < p.2} = 28 := by decide noncomputable def e8IndexEquiv : Fin 120 ≃ ({p : Fin 8 × Fin 8 // p.1 < p.2} × Bool) ⊕ EvenSign7 := Fintype.equivOfCardEq (by rw [Fintype.card_fin, Fintype.card_sum, Fintype.card_prod, Fintype.card_bool, card_ltPairs8, card_evenSign7]) def e8VecAux : (({p : Fin 8 × Fin 8 // p.1 < p.2} × Bool) ⊕ EvenSign7) → Fin 8 → ℤ | Sum.inl (⟨(i, j), _⟩, b), k => if k = i then 2 else if k = j then (if b then 2 else -2) else 0 | Sum.inr ⟨s, _⟩, k => if h : k.val = 0 then 1 else if s ⟨k.val - 1, by omega⟩ then -1 else 1 lemma e8VecAux_normSq (x : ({p : Fin 8 × Fin 8 // p.1 < p.2} × Bool) ⊕ EvenSign7) : normSq (fun k : Fin 8 => (e8VecAux x k : ℝ)) = 8 := by cases x with | inl pb => rcases pb with ⟨⟨⟨i, j⟩, hij⟩, b⟩ have hne : i ≠ j := ne_of_lt hij unfold normSq e8VecAux have hterm : ∀ k : Fin 8, ((if k = i then (2 : ℤ) else if k = j then (if b then 2 else -2) else 0 : ℤ) : ℝ) ^ 2 = (if k = i then (4 : ℝ) else 0) + (if k = j then (4 : ℝ) else 0) := by intro k by_cases hki : k = i · subst hki; simp [hne]; norm_num · by_cases hkj : k = j · subst hkj; cases b <;> simp [hki] <;> norm_num · simp [hki, hkj] simp_rw [hterm] simp only [Finset.sum_add_distrib, Finset.sum_ite_eq', Finset.mem_univ, ↓reduceIte] norm_num | inr s => rcases s with ⟨s, _⟩ unfold normSq e8VecAux have hterm : ∀ k : Fin 8, ((if h : k.val = 0 then (1 : ℤ) else if s ⟨k.val - 1, by omega⟩ then -1 else 1 : ℤ) : ℝ) ^ 2 = 1 := by intro k; split_ifs <;> norm_num simp_rw [hterm]; norm_num noncomputable def e8Config : RayConfig 8 120 where vec := fun idx k => (e8VecAux (e8IndexEquiv idx) k : ℝ) normSq_pos := fun idx => by rw [e8VecAux_normSq]; norm_num lemma e8_normSq_eq_eight (idx : Fin 120) : normSq (e8Config.vec idx) = 8 := e8VecAux_normSq (e8IndexEquiv idx) /-- Pure algebraic proof that any two distinct `E₈` rays have integer inner product in `{0, 4, -4}`. -/ lemma e8_intDot_cases (x y : ({p : Fin 8 × Fin 8 // p.1 < p.2} × Bool) ⊕ EvenSign7) (hxy : x ≠ y) : let d := ∑ k : Fin 8, e8VecAux x k * e8VecAux y k d = 0 ∨ d = 4 ∨ d = -4 := by intro d cases x with | inl pb1 => rcases pb1 with ⟨⟨⟨i₁, j₁⟩, hij₁⟩, b₁⟩ have hne1 : i₁ ≠ j₁ := ne_of_lt hij₁ have hd_eval : d = 2 * e8VecAux y i₁ + (if b₁ then 2 else -2) * e8VecAux y j₁ := by dsimp only [d, e8VecAux] have hterm : ∀ k : Fin 8, (if k = i₁ then (2 : ℤ) else if k = j₁ then (if b₁ then 2 else -2) else 0) * e8VecAux y k = (if k = i₁ then 2 * e8VecAux y k else 0) + (if k = j₁ then (if b₁ then 2 else -2) * e8VecAux y k else 0) := by intro k by_cases hki : k = i₁ · subst hki; simp [hne1] · by_cases hkj : k = j₁ · subst hkj; simp [hki] · simp [hki, hkj] refine (Finset.sum_congr rfl fun k _ => hterm k).trans ?_ simp only [Finset.sum_add_distrib, Finset.sum_ite_eq', Finset.mem_univ, ↓reduceIte] rfl rw [hd_eval] cases y with | inl pb2 => rcases pb2 with ⟨⟨⟨i₂, j₂⟩, hij₂⟩, b₂⟩ dsimp only [e8VecAux] by_cases h1 : i₁ = i₂ <;> by_cases h2 : j₁ = j₂ · subst h1; subst h2 have hbb : b₁ ≠ b₂ := fun h => hxy (by subst h; rfl) have hne1' : j₁ ≠ i₁ := hne1.symm cases b₁ <;> cases b₂ · exact absurd rfl hbb · simp [hne1'] · simp [hne1'] · exact absurd rfl hbb · subst h1 have hj1i2 : j₁ ≠ i₁ := hne1.symm cases b₁ <;> cases b₂ <;> simp [hj1i2, h2] · subst h2 have hj1i2 : j₁ ≠ i₂ := ne_of_gt hij₂ cases b₁ <;> cases b₂ <;> simp [h1, hne1, hj1i2] · by_cases h3 : i₁ = j₂ <;> by_cases h4 : j₁ = i₂ · exfalso have hlt1 : i₁.val < j₁.val := hij₁ have hlt2 : i₂.val < j₂.val := hij₂ have hv3 : i₁.val = j₂.val := congrArg Fin.val h3 have hv4 : j₁.val = i₂.val := congrArg Fin.val h4 omega · subst h3; cases b₁ <;> cases b₂ <;> simp [h1, h2, h4] · subst h4; cases b₁ <;> cases b₂ <;> simp [h1, h3] · cases b₁ <;> cases b₂ <;> simp [h1, h2, h3, h4] | inr s2 => rcases s2 with ⟨s2, _⟩ dsimp only [e8VecAux] split_ifs <;> omega | inr s1 => cases y with | inl pb2 => have hsym : d = ∑ k : Fin 8, e8VecAux (Sum.inl pb2) k * e8VecAux (Sum.inr s1) k := by dsimp only [d]; refine Finset.sum_congr rfl fun k _ => mul_comm _ _ rw [hsym] rcases pb2 with ⟨⟨⟨i₂, j₂⟩, hij₂⟩, b₂⟩ have hne2 : i₂ ≠ j₂ := ne_of_lt hij₂ have hd_eval : ∑ k : Fin 8, e8VecAux (Sum.inl (⟨(i₂, j₂), hij₂⟩, b₂)) k * e8VecAux (Sum.inr s1) k = 2 * e8VecAux (Sum.inr s1) i₂ + (if b₂ then 2 else -2) * e8VecAux (Sum.inr s1) j₂ := by dsimp only [e8VecAux] have hterm : ∀ k : Fin 8, (if k = i₂ then (2 : ℤ) else if k = j₂ then (if b₂ then 2 else -2) else 0) * e8VecAux (Sum.inr s1) k = (if k = i₂ then 2 * e8VecAux (Sum.inr s1) k else 0) + (if k = j₂ then (if b₂ then 2 else -2) * e8VecAux (Sum.inr s1) k else 0) := by intro k by_cases hki : k = i₂ · subst hki; simp [hne2] · by_cases hkj : k = j₂ · subst hkj; simp [hki] · simp [hki, hkj] refine (Finset.sum_congr rfl fun k _ => hterm k).trans ?_ simp only [Finset.sum_add_distrib, Finset.sum_ite_eq', Finset.mem_univ, ↓reduceIte] rfl rw [hd_eval] rcases s1 with ⟨s1, _⟩ dsimp only [e8VecAux] split_ifs <;> omega | inr s2 => rcases s1 with ⟨s1, hs1⟩ rcases s2 with ⟨s2, hs2⟩ have hne_s : s1 ≠ s2 := fun h => hxy (by subst h; rfl) let diff : Finset (Fin 7) := Finset.univ.filter (fun k => s1 k ≠ s2 k) have hdiff_pos : 1 ≤ diff.card := by apply Finset.card_pos.mpr by_contra hempty rw [Finset.not_nonempty_iff_eq_empty] at hempty apply hne_s ext k by_contra hk have hmem : k ∈ diff := Finset.mem_filter.mpr ⟨Finset.mem_univ k, hk⟩ rw [hempty] at hmem; simp at hmem have hdiff_le : diff.card ≤ 7 := by calc diff.card ≤ (Finset.univ : Finset (Fin 7)).card := Finset.card_le_card (Finset.subset_univ _) _ = 7 := by simp have hdiff_even : diff.card % 2 = 0 := by let A := Finset.univ.filter (fun k : Fin 7 => s1 k) let B := Finset.univ.filter (fun k : Fin 7 => s2 k) have hdiff_eq : diff = (A \ B) ∪ (B \ A) := by ext k; simp only [diff, A, B, Finset.mem_union, Finset.mem_sdiff, Finset.mem_filter, Finset.mem_univ, true_and] cases s1 k <;> cases s2 k <;> decide have hdisj : Disjoint (A \ B) (B \ A) := by rw [Finset.disjoint_left] intro k h1 h2 exact (Finset.mem_sdiff.mp h1).2 (Finset.mem_sdiff.mp h2).1 have hcard1 : (A \ B).card + (A ∩ B).card = A.card := Finset.card_sdiff_add_card_inter A B have hcard2 : (B \ A).card + (A ∩ B).card = B.card := by rw [Finset.inter_comm]; exact Finset.card_sdiff_add_card_inter B A have hAeven : A.card % 2 = 0 := hs1 have hBeven : B.card % 2 = 0 := hs2 rw [hdiff_eq, Finset.card_union_of_disjoint hdisj] omega have hd_eq : d = 8 - 2 * (diff.card : ℤ) := by dsimp only [d, e8VecAux] rw [Fin.sum_univ_succ] simp only [Fin.val_zero, ↓reduceDIte, mul_one, Fin.val_succ, Nat.add_eq_zero_iff, one_ne_zero, and_false, Nat.add_sub_cancel, Fin.eta] have hterm : ∀ k : Fin 7, (if s1 k then (-1 : ℤ) else 1) * (if s2 k then (-1 : ℤ) else 1) = 1 - if s1 k ≠ s2 k then (2 : ℤ) else 0 := by intro k; cases s1 k <;> cases s2 k <;> decide simp_rw [hterm, Finset.sum_sub_distrib, Finset.sum_const, Finset.card_univ, Fintype.card_fin] have hsum_diff : ∑ k : Fin 7, (if s1 k ≠ s2 k then (2 : ℤ) else 0) = 2 * (diff.card : ℤ) := by rw [← Finset.sum_filter]; simp [diff, mul_comm] rw [hsum_diff]; norm_num; ring rw [hd_eq] have hcases : diff.card = 2 ∨ diff.card = 4 ∨ diff.card = 6 := by omega rcases hcases with h | h | h <;> simp [h] /-- **Computer-Search-Free Independence Bound for `E₈`**: Every independent set in the 120-ray `E₈` orthogonality graph has size `≤ 8`. -/ theorem e8_indep_le_eight {I : Finset (Fin 120)} (hI : e8Config.IsIndep I) : I.card ≤ 8 := by apply equiangular_complement_indep_bound (by omega) e8Config (1 / 2) (le_refl _) (by norm_num) · intro i j hij hnotorth have hdot_ne : dot (e8Config.vec i) (e8Config.vec j) ≠ 0 := fun h => hnotorth ⟨hij, h⟩ have hxy : e8IndexEquiv i ≠ e8IndexEquiv j := fun h => hij (e8IndexEquiv.injective h) have hcases := e8_intDot_cases (e8IndexEquiv i) (e8IndexEquiv j) hxy have hdot_cast : dot (e8Config.vec i) (e8Config.vec j) = ((∑ k : Fin 8, e8VecAux (e8IndexEquiv i) k * e8VecAux (e8IndexEquiv j) k : ℤ) : ℝ) := by unfold dot e8Config; dsimp only; push_cast; rfl rw [e8_normSq_eq_eight i, e8_normSq_eq_eight j, hdot_cast] rcases hcases with h0 | h4 | hm4 · exfalso; apply hdot_ne; rw [hdot_cast, h0]; simp · rw [h4]; norm_num · rw [hm4]; norm_num · exact hI /-- Sum of `e8VecAux (inr s) a * e8VecAux (inr s) b` over all 64 even-parity sign vectors equals `64 δ_{ab}`. -/ lemma evenSign7_sum_prod (a b : Fin 8) : ∑ s : EvenSign7, e8VecAux (Sum.inr s) a * e8VecAux (Sum.inr s) b = if a = b then 64 else 0 := by rw [← evenSign7Equiv.sum_comp (g := fun s => e8VecAux (Sum.inr s) a * e8VecAux (Sum.inr s) b)] -- Pure algebraic proof over Fin 6 → Bool! by_cases hab : a = b · subst hab simp only [↓reduceIte] have h1 : ∀ t : Fin 6 → Bool, e8VecAux (Sum.inr (evenSign7Equiv t)) a * e8VecAux (Sum.inr (evenSign7Equiv t)) a = 1 := by intro t; rcases evenSign7Equiv t with ⟨s, _⟩; dsimp only [e8VecAux]; split_ifs <;> norm_num simp_rw [h1, Finset.sum_const, Finset.card_univ, Fintype.card_fun, Fintype.card_bool, Fintype.card_fin] norm_num · simp only [hab, ↓reduceIte] -- Find a coordinate c : Fin 6 that affects ONLY ONE of a, b (or changes sign of product): -- For any distinct a, b : Fin 8, there is an involution on (Fin 6 → Bool) flipping the sign of the product! -- Even faster: since (Fin 6 → Bool) has 64 elements, let's construct the exact involution directly! -- Wait: map t ↦ flip a single coordinate j₀ ∈ Fin 6! -- Under flipping t j₀ (for j₀ ∈ Fin 6): -- coord 0 stays +1 (sign +1) -- coord (j₀+1) flips (sign -1) -- coord 7 (parity bit!) ALWAYS flips (sign -1) -- all other coords stay unchanged (sign +1)! -- So the sign of (coord a * coord b) flips iff EXACTLY ONE of {a, b} is in {j₀+1, 7}! -- Can we pick j₀ ∈ Fin 6 so that |{a, b} ∩ {j₀+1, 7}| = 1? -- YES!! -- Case 1: a ≠ 7 and b ≠ 7: since a ≠ b, at least one of a, b is in {1..6}; pick j₀ = that - 1! -- Case 2: one of a, b is 7 (say a = 7, b ∈ {0..6}): pick ANY j₀ ∈ Fin 6 with j₀ + 1 ≠ b (exists since 6 ≥ 2)! have hex : ∃ j₀ : Fin 6, ∀ t : Fin 6 → Bool, let t' := Function.update t j₀ (!t j₀) e8VecAux (Sum.inr (evenSign7Equiv t')) a * e8VecAux (Sum.inr (evenSign7Equiv t')) b = -(e8VecAux (Sum.inr (evenSign7Equiv t)) a * e8VecAux (Sum.inr (evenSign7Equiv t)) b) := by have hflip_parity : ∀ (j₀ : Fin 6) (t : Fin 6 → Bool), let t' := Function.update t j₀ (!t j₀) ((Finset.univ.filter (fun k : Fin 6 => t' k)).card % 2 == 1) = !((Finset.univ.filter (fun k : Fin 6 => t k)).card % 2 == 1) := by intro j₀ t dsimp only let S := Finset.univ.filter (fun k : Fin 6 => t k) let S' := Finset.univ.filter (fun k : Fin 6 => Function.update t j₀ (!t j₀) k) change (S'.card % 2 == 1) = !(S.card % 2 == 1) cases ht : t j₀ · have hS' : S' = insert j₀ S := by ext k; simp only [S, S', Finset.mem_filter, Finset.mem_univ, true_and, Finset.mem_insert] by_cases hk : k = j₀ · subst hk; simp [ht] · simp [hk] have hnot : j₀ ∉ S := by simp [S, ht] rw [hS', Finset.card_insert_of_notMem hnot] rcases Nat.mod_two_eq_zero_or_one S.card with h | h <;> simp [Nat.add_mod, h] · have hS : S = insert j₀ S' := by ext k; simp only [S, S', Finset.mem_filter, Finset.mem_univ, true_and, Finset.mem_insert] by_cases hk : k = j₀ · subst hk; simp [ht] · simp [hk] have hnot : j₀ ∉ S' := by simp [S', ht] rw [hS, Finset.card_insert_of_notMem hnot] rcases Nat.mod_two_eq_zero_or_one S'.card with h | h <;> simp [Nat.add_mod, h] have hflip_coord : ∀ (j₀ : Fin 6) (t : Fin 6 → Bool) (c : Fin 8), e8VecAux (Sum.inr (evenSign7Equiv (Function.update t j₀ (!t j₀)))) c = (if c.val = j₀.val + 1 ∨ c.val = 7 then -1 else 1) * e8VecAux (Sum.inr (evenSign7Equiv t)) c := by intro j₀ t c simp only [e8VecAux, evenSign7Equiv, Equiv.coe_fn_mk] by_cases hc0 : c.val = 0 · simp [hc0] · simp only [hc0, ↓reduceDIte] by_cases hc7 : c.val = 7 · have hlast : (⟨c.val - 1, by omega⟩ : Fin 7) = Fin.last 6 := by apply Fin.ext; simp [hc7] simp only [hlast, Fin.snoc_last, hflip_parity j₀ t] simp only [hc7, or_true, ↓reduceIte] cases ((Finset.univ.filter (fun k : Fin 6 => t k)).card % 2 == 1) <;> decide · have hlt : c.val - 1 < 6 := by omega have hcs : (⟨c.val - 1, by omega⟩ : Fin 7) = Fin.castSucc ⟨c.val - 1, hlt⟩ := by apply Fin.ext; rfl simp only [hcs, Fin.snoc_castSucc] by_cases hcj : c.val = j₀.val + 1 · have heq : (⟨c.val - 1, hlt⟩ : Fin 6) = j₀ := by apply Fin.ext; dsimp; omega simp only [heq, Function.update_self] simp only [hcj, true_or, ↓reduceIte] cases t j₀ <;> decide · have hne : (⟨c.val - 1, hlt⟩ : Fin 6) ≠ j₀ := by intro h; apply hcj; have := congrArg Fin.val h; dsimp at this; omega simp only [Function.update_of_ne hne, hcj, hc7, or_self, ↓reduceIte, one_mul] -- Pick j₀ : Fin 6 such that exactly one of a, b is in {j₀+1, 7}! have hpick : ∃ j₀ : Fin 6, ((a.val = j₀.val + 1 ∨ a.val = 7) ∧ ¬(b.val = j₀.val + 1 ∨ b.val = 7)) ∨ (¬(a.val = j₀.val + 1 ∨ a.val = 7) ∧ (b.val = j₀.val + 1 ∨ b.val = 7)) := by revert a b hab; decide obtain ⟨j₀, hj₀⟩ := hpick refine ⟨j₀, fun t => ?_⟩ dsimp only rw [hflip_coord j₀ t a, hflip_coord j₀ t b] rcases hj₀ with ⟨ha, hb⟩ | ⟨ha, hb⟩ · simp [ha, hb] · simp [ha, hb] obtain ⟨j₀, hneg⟩ := hex let inv : (Fin 6 → Bool) ≃ (Fin 6 → Bool) := { toFun := fun t => Function.update t j₀ (!t j₀) invFun := fun t => Function.update t j₀ (!t j₀) left_inv := fun t => by ext k; by_cases hk : k = j₀ <;> simp [hk] right_inv := fun t => by ext k; by_cases hk : k = j₀ <;> simp [hk] } have hsum_neg : ∑ t : Fin 6 → Bool, e8VecAux (Sum.inr (evenSign7Equiv t)) a * e8VecAux (Sum.inr (evenSign7Equiv t)) b = -(∑ t : Fin 6 → Bool, e8VecAux (Sum.inr (evenSign7Equiv t)) a * e8VecAux (Sum.inr (evenSign7Equiv t)) b) := by calc ∑ t : Fin 6 → Bool, e8VecAux (Sum.inr (evenSign7Equiv t)) a * e8VecAux (Sum.inr (evenSign7Equiv t)) b = ∑ t : Fin 6 → Bool, e8VecAux (Sum.inr (evenSign7Equiv (inv t))) a * e8VecAux (Sum.inr (evenSign7Equiv (inv t))) b := (inv.sum_comp (g := fun t => e8VecAux (Sum.inr (evenSign7Equiv t)) a * e8VecAux (Sum.inr (evenSign7Equiv t)) b)).symm _ = ∑ t : Fin 6 → Bool, -(e8VecAux (Sum.inr (evenSign7Equiv t)) a * e8VecAux (Sum.inr (evenSign7Equiv t)) b) := Finset.sum_congr rfl fun t _ => hneg t _ = -(∑ t : Fin 6 → Bool, e8VecAux (Sum.inr (evenSign7Equiv t)) a * e8VecAux (Sum.inr (evenSign7Equiv t)) b) := by rw [Finset.sum_neg_distrib] omega /-- Exact algebraic proof that the 120 rays of `E₈` form a tight frame `∑_i P_i = 15 I_8`. -/ theorem e8_tight_frame_sum (ψ : Fin 8 → ℝ) : ∑ i : Fin 120, e8Config.projVal i ψ = 15 * normSq ψ := by have h1 : ∑ i : Fin 120, e8Config.projVal i ψ = (∑ i : Fin 120, (dot (e8Config.vec i) ψ) ^ 2) / 8 := by rw [Finset.sum_div] refine Finset.sum_congr rfl fun i _ => ?_ rw [projVal, e8_normSq_eq_eight i] rw [h1] have he8sum : ∑ i : Fin 120, (dot (e8Config.vec i) ψ) ^ 2 = ∑ x : ({p : Fin 8 × Fin 8 // p.1 < p.2} × Bool) ⊕ EvenSign7, (dot (fun k => (e8VecAux x k : ℝ)) ψ) ^ 2 := e8IndexEquiv.sum_comp (g := fun x => (dot (fun k => (e8VecAux x k : ℝ)) ψ) ^ 2) rw [he8sum] rw [Fintype.sum_sum_type] have hA : ∑ pb : {p : Fin 8 × Fin 8 // p.1 < p.2} × Bool, (dot (fun k => (e8VecAux (Sum.inl pb) k : ℝ)) ψ) ^ 2 = 56 * normSq ψ := by rw [Fintype.sum_prod_type] have hpair : ∀ p : {p : Fin 8 × Fin 8 // p.1 < p.2}, ∑ b : Bool, (dot (fun k => (e8VecAux (Sum.inl (p, b)) k : ℝ)) ψ) ^ 2 = 8 * ((ψ p.1.1) ^ 2 + (ψ p.1.2) ^ 2) := by rintro ⟨⟨i, j⟩, hij⟩ have hne : i ≠ j := ne_of_lt hij have hd_b : ∀ b : Bool, dot (fun k => (e8VecAux (Sum.inl (⟨(i, j), hij⟩, b)) k : ℝ)) ψ = 2 * ψ i + (if b then 2 else -2) * ψ j := by intro b unfold dot e8VecAux have hterm : ∀ k : Fin 8, ((if k = i then (2 : ℤ) else if k = j then (if b then 2 else -2) else 0 : ℤ) : ℝ) * ψ k = (if k = i then 2 * ψ k else 0) + (if k = j then (if b then (2 : ℝ) else -2) * ψ k else 0) := by intro k by_cases hki : k = i · subst hki; simp [hne] · by_cases hkj : k = j · subst hkj; cases b <;> simp [hki] · simp [hki, hkj] simp_rw [hterm] simp only [Finset.sum_add_distrib, Finset.sum_ite_eq', Finset.mem_univ, ↓reduceIte] rw [Fintype.sum_bool, hd_b true, hd_b false] simp only [↓reduceIte, Bool.false_eq_true] ring simp_rw [hpair, ← Finset.mul_sum] have hsum_pairs : ∑ p : {p : Fin 8 × Fin 8 // p.1 < p.2}, ((ψ p.1.1) ^ 2 + (ψ p.1.2) ^ 2) = 7 * normSq ψ := by have hsym : ∀ a : Fin 8 → ℝ, ∑ p : {p : Fin 8 × Fin 8 // p.1 < p.2}, (a p.1.1 + a p.1.2) = 7 * ∑ k : Fin 8, a k := by intro a have h2 : 2 * ∑ p : {p : Fin 8 × Fin 8 // p.1 < p.2}, (a p.1.1 + a p.1.2) = ∑ i : Fin 8, ∑ j : Fin 8, if i ≠ j then a i + a j else 0 := by have hsub : ∑ i : Fin 8, ∑ j : Fin 8, (if i ≠ j then a i + a j else 0) = (∑ i : Fin 8, ∑ j : Fin 8, if i < j then a i + a j else 0) + (∑ i : Fin 8, ∑ j : Fin 8, if j < i then a i + a j else 0) := by rw [← Finset.sum_add_distrib] refine Finset.sum_congr rfl fun i _ => ?_ rw [← Finset.sum_add_distrib] refine Finset.sum_congr rfl fun j _ => ?_ rcases lt_trichotomy i j with h | rfl | h · simp [ne_of_lt h, h, not_lt.mpr (le_of_lt h)] · simp · simp [ne_of_gt h, h, not_lt.mpr (le_of_lt h)] rw [hsub] have hswap : ∑ i : Fin 8, ∑ j : Fin 8, (if j < i then a i + a j else 0) = ∑ i : Fin 8, ∑ j : Fin 8, (if i < j then a i + a j else 0) := by rw [Finset.sum_comm] refine Finset.sum_congr rfl fun i _ => Finset.sum_congr rfl fun j _ => ?_ split_ifs <;> ring rw [hswap, ← two_mul] congr 1 rw [← Fintype.sum_prod_type', ← Finset.sum_filter] exact (Finset.sum_subtype (Finset.univ.filter (fun p : Fin 8 × Fin 8 => p.1 < p.2)) (fun x => by simp) (fun p => a p.1 + a p.2)).symm have hfull : ∑ i : Fin 8, ∑ j : Fin 8, (if i ≠ j then a i + a j else 0) = 14 * ∑ k : Fin 8, a k := by have h1 : ∀ i : Fin 8, ∑ j : Fin 8, (if i ≠ j then a i + a j else 0) = 7 * a i + (∑ j : Fin 8, a j) - a i := by intro i have hadd : (∑ j : Fin 8, if i ≠ j then a i + a j else 0) + (a i + a i) = ∑ j : Fin 8, (a i + a j) := by rw [← Finset.add_sum_erase _ _ (Finset.mem_univ i)] rw [← Finset.add_sum_erase Finset.univ (fun j => a i + a j) (Finset.mem_univ i)] simp only [ne_eq, not_true_eq_false, ↓reduceIte, zero_add] have hcongr : ∑ j ∈ Finset.univ.erase i, (if i ≠ j then a i + a j else 0) = ∑ j ∈ Finset.univ.erase i, (a i + a j) := by refine Finset.sum_congr rfl fun j hj => ?_ simp [Ne.symm (Finset.mem_erase.mp hj).1] rw [hcongr]; ring have hrhs : ∑ j : Fin 8, (a i + a j) = 8 * a i + ∑ j : Fin 8, a j := by rw [Finset.sum_add_distrib, Finset.sum_const, Finset.card_univ, Fintype.card_fin] norm_num linarith simp_rw [h1] have hsimp : ∑ i : Fin 8, (7 * a i + (∑ j : Fin 8, a j) - a i) = 6 * (∑ i : Fin 8, a i) + 8 * (∑ j : Fin 8, a j) := by simp only [Finset.sum_sub_distrib, Finset.sum_add_distrib, ← Finset.mul_sum, Finset.sum_const, Finset.card_univ, Fintype.card_fin] ring linarith linarith exact hsym (fun k => (ψ k) ^ 2) rw [hsum_pairs]; ring have hB : ∑ s : EvenSign7, (dot (fun k => (e8VecAux (Sum.inr s) k : ℝ)) ψ) ^ 2 = 64 * normSq ψ := by have hexp : ∀ s : EvenSign7, (dot (fun k => (e8VecAux (Sum.inr s) k : ℝ)) ψ) ^ 2 = ∑ a : Fin 8, ∑ b : Fin 8, ((e8VecAux (Sum.inr s) a * e8VecAux (Sum.inr s) b : ℤ) : ℝ) * (ψ a * ψ b) := by intro s; unfold dot; rw [sq, Finset.sum_mul] refine Finset.sum_congr rfl fun a _ => ?_ rw [Finset.mul_sum] refine Finset.sum_congr rfl fun b _ => by push_cast; ring simp_rw [hexp] rw [Finset.sum_comm] have hdiag_off : ∀ a : Fin 8, ∑ s : EvenSign7, ∑ b : Fin 8, ((e8VecAux (Sum.inr s) a * e8VecAux (Sum.inr s) b : ℤ) : ℝ) * (ψ a * ψ b) = 64 * (ψ a) ^ 2 := by intro a rw [Finset.sum_comm] have hterm : ∀ b : Fin 8, ∑ s : EvenSign7, ((e8VecAux (Sum.inr s) a * e8VecAux (Sum.inr s) b : ℤ) : ℝ) * (ψ a * ψ b) = if a = b then 64 * (ψ a) ^ 2 else 0 := by intro b rw [← Finset.sum_mul] have hcast : ∑ s : EvenSign7, ((e8VecAux (Sum.inr s) a * e8VecAux (Sum.inr s) b : ℤ) : ℝ) = ((∑ s : EvenSign7, e8VecAux (Sum.inr s) a * e8VecAux (Sum.inr s) b : ℤ) : ℝ) := by push_cast; rfl rw [hcast, evenSign7_sum_prod a b] split_ifs with hab · subst hab; norm_num; ring · simp simp_rw [hterm] rw [Finset.sum_eq_single a] · simp · intro b _ hba; simp [Ne.symm hba] · intro h; exact absurd (Finset.mem_univ _) h simp_rw [hdiag_off, ← Finset.mul_sum, normSq] rw [hA, hB]; ring /-- **Theorem (`E₈` Tight-Frame SI-C Record `15/8`)**: The 120-ray `E₈` configuration in `ℝ^8` is Tier-3 tight-frame SI-C with exact constant-value quantum-to-classical ratio `15 / 8 = 1.875`. -/ theorem e8_tier3_tight_frame : e8Config.IsTier3_TightFrame ∧ (e8Config.IsWeightBound (fun _ => 1) 8 ∧ ∀ ψ : Fin 8 → ℝ, ∑ i : Fin 120, (1 : ℝ) * e8Config.projVal i ψ = 15 * normSq ψ) := by have hB : e8Config.IsWeightBound (fun _ => 1) 8 := by intro I hI simpa using (Nat.cast_le (α := ℝ)).mpr (e8_indep_le_eight hI) have htf : ∀ ψ : Fin 8 → ℝ, ∑ i : Fin 120, (1 : ℝ) * e8Config.projVal i ψ = 15 * normSq ψ := by intro ψ; simp [e8_tight_frame_sum ψ] exact ⟨⟨fun _ => 1, 8, 15, fun _ => by norm_num, hB, by norm_num, htf⟩, hB, htf⟩ /-- `k`-fold tensor power of `E₈` in dimension `8^k` with `120^k` rays. -/ noncomputable def e8Power : (k : ℕ) → RayConfig (8 ^ k) (120 ^ k) | 0 => stdBasis 1 | k + 1 => let prev := e8Power k { vec := fun p j => (e8Config.tensor prev).vec (Fin.cast (by ring) p) (finCongr (by ring : 8 ^ (k + 1) = 8 * 8 ^ k) j) normSq_pos := fun p => by let e8eq : 8 ^ (k + 1) = 8 * 8 ^ k := by ring have hp := (e8Config.tensor prev).normSq_pos (Fin.cast (by ring : 120 ^ (k + 1) = 120 * 120 ^ k) p) unfold normSq at hp ⊢ rw [Equiv.sum_comp (finCongr e8eq) (g := fun j => ((e8Config.tensor prev).vec (Fin.cast (by ring) p) j) ^ 2)] exact hp } /-- **Theorem (Exponential Tensor-Power SI-C Amplification)**: For every `k ≥ 1`, the `k`-fold tensor power `E₈^{⊗ k}` in `ℝ^(8^k)` is Tier-3 tight-frame SI-C with exact classical bound `8^k` and constant quantum value `15^k` (ratio `(15/8)^k`). -/ theorem e8_tensor_power_sic (k : ℕ) : (e8Power k).IsWeightBound (fun _ => 1) ((8 : ℝ) ^ k) ∧ ∀ ψ : Fin (8 ^ k) → ℝ, ∑ i : Fin (120 ^ k), (1 : ℝ) * (e8Power k).projVal i ψ = ((15 : ℝ) ^ k) * normSq ψ := by induction k with | zero => constructor · intro I _ have hle : I.card ≤ 1 := by calc I.card ≤ (Finset.univ : Finset (Fin 1)).card := Finset.card_le_card (Finset.subset_univ _) _ = 1 := by simp simpa using (Nat.cast_le (α := ℝ)).mpr hle · intro ψ simp [e8Power, stdBasis, projVal, dot, normSq] | succ k ih => obtain ⟨hB_prev, htf_prev⟩ := ih have h8 : e8Config.IsWeightBound (fun _ => 1) 8 := e8_tier3_tight_frame.2.1 have h15 : ∀ ψ, ∑ i : Fin 120, (1 : ℝ) * e8Config.projVal i ψ = 15 * normSq ψ := e8_tier3_tight_frame.2.2 obtain ⟨hB_ten, htf_ten⟩ := tensor_tight_frame e8Config (e8Power k) (fun _ => 1) (fun _ => 1) 8 15 ((8 : ℝ) ^ k) ((15 : ℝ) ^ k) (fun _ => by norm_num) (fun _ => by norm_num) h8 hB_prev h15 htf_prev have hpow8 : 8 ^ (k + 1) = 8 * 8 ^ k := by ring have hpow120 : 120 ^ (k + 1) = 120 * 120 ^ k := by ring constructor · intro I hI let eI : Finset (Fin (120 * 120 ^ k)) := I.map (finCongr hpow120).toEmbedding have heI : (e8Config.tensor (e8Power k)).IsIndep eI := by intro a ha b hb horth rcases Finset.mem_map.mp ha with ⟨i, hi, rfl⟩ rcases Finset.mem_map.mp hb with ⟨j, hj, rfl⟩ apply hI i hi j hj refine ⟨fun h => horth.1 (congrArg _ h), ?_⟩ unfold dot e8Power dsimp only rw [Equiv.sum_comp (finCongr hpow8) (g := fun x => (e8Config.tensor (e8Power k)).vec (Fin.cast hpow120 i) x * (e8Config.tensor (e8Power k)).vec (Fin.cast hpow120 j) x)] exact horth.2 have hb := hB_ten eI heI have hcard : eI.card = I.card := Finset.card_map _ simp only [mul_one, Finset.sum_const, nsmul_eq_mul, hcard] at hb simp only [Finset.sum_const, nsmul_eq_mul, mul_one] have h8pow : (8 : ℝ) ^ (k + 1) = 8 * (8 : ℝ) ^ k := by ring linarith · intro ψ let ψ' : Fin (8 * 8 ^ k) → ℝ := fun j => ψ ((finCongr hpow8).symm j) have hnorm : normSq ψ' = normSq ψ := by unfold normSq ψ' exact Equiv.sum_comp (finCongr hpow8).symm (g := fun j => (ψ j) ^ 2) have htf' := htf_ten ψ' rw [hnorm] at htf' have hlhs : ∑ i : Fin (120 ^ (k + 1)), (1 : ℝ) * (e8Power (k + 1)).projVal i ψ = ∑ p : Fin (120 * 120 ^ k), ((1 : ℝ) * 1) * (e8Config.tensor (e8Power k)).projVal p ψ' := by rw [← Equiv.sum_comp (finCongr hpow120) (g := fun p => ((1 : ℝ) * 1) * (e8Config.tensor (e8Power k)).projVal p ψ')] refine Finset.sum_congr rfl fun i _ => ?_ simp only [one_mul, projVal, e8Power] congr 1 · congr 1 unfold dot ψ' dsimp only have hsc := Equiv.sum_comp (finCongr hpow8) (g := fun x => (e8Config.tensor (e8Power k)).vec (finCongr hpow120 i) x * ψ ((finCongr hpow8).symm x)) rw [← hsc] refine Finset.sum_congr rfl fun j _ => by simp [finCongr] · unfold normSq exact Equiv.sum_comp (finCongr hpow8) (g := fun x => ((e8Config.tensor (e8Power k)).vec (Fin.cast hpow120 i) x) ^ 2) rw [hlhs, htf'] ring /-! ## Section 5: Integer Ray Configurations, Verified Branch-and-Bound, & Irreducibility -/ def intDot {d : ℕ} (u v : Fin d → ℤ) : ℤ := ∑ k : Fin d, u k * v k def intNormSq {d : ℕ} (v : Fin d → ℤ) : ℤ := ∑ k : Fin d, v k * v k structure IntRayConfig (d n : ℕ) where ivec : Fin n → Fin d → ℤ pos : ∀ i : Fin n, 0 < intNormSq (ivec i) def IntRayConfig.toRayConfig {d n : ℕ} (R : IntRayConfig d n) : RayConfig d n where vec := fun i k => (R.ivec i k : ℝ) normSq_pos := by intro i have h := R.pos i have hcast : normSq (fun k => (R.ivec i k : ℝ)) = (intNormSq (R.ivec i) : ℝ) := by unfold normSq intNormSq; push_cast refine Finset.sum_congr rfl fun k _ => sq _ rw [hcast]; exact_mod_cast h def IntRayConfig.orthBool {d n : ℕ} (R : IntRayConfig d n) (i j : Fin n) : Bool := (i != j) && (intDot (R.ivec i) (R.ivec j) == 0) def IntRayConfig.nonOrthBool {d n : ℕ} (R : IntRayConfig d n) (i j : Fin n) : Bool := (i != j) && (intDot (R.ivec i) (R.ivec j) != 0) lemma IntRayConfig.orthBool_sound {d n : ℕ} (R : IntRayConfig d n) {i j : Fin n} (h : R.orthBool i j = true) : R.toRayConfig.orth i j := by simp only [orthBool, Bool.and_eq_true, bne_iff_ne, beq_iff_eq] at h refine ⟨h.1, ?_⟩ unfold dot IntRayConfig.toRayConfig; dsimp only have hcast : ∑ k : Fin d, (R.ivec i k : ℝ) * (R.ivec j k : ℝ) = ((intDot (R.ivec i) (R.ivec j) : ℤ) : ℝ) := by unfold intDot; push_cast; rfl rw [hcast, h.2, Int.cast_zero] lemma IntRayConfig.nonOrthBool_sound {d n : ℕ} (R : IntRayConfig d n) {i j : Fin n} (h : R.nonOrthBool i j = true) : i ≠ j ∧ ¬ R.toRayConfig.orth i j := by simp only [nonOrthBool, Bool.and_eq_true, bne_iff_ne] at h refine ⟨h.1, fun horth => h.2 ?_⟩ have hcast : ((intDot (R.ivec i) (R.ivec j) : ℤ) : ℝ) = 0 := by have := horth.2 unfold dot IntRayConfig.toRayConfig at this; dsimp only at this unfold intDot; push_cast; exact this exact Int.cast_eq_zero.mp hcast /-- Pure integer scaled (`×12`) operator entry, kernel-decidable in 1 ms whenever `‖v_i‖² ∣ 12`. -/ def IntRayConfig.opEntryZ12 {d n : ℕ} (R : IntRayConfig d n) (w : Fin n → ℕ) (a b : Fin d) : ℤ := ∑ i : Fin n, (w i : ℤ) * R.ivec i a * R.ivec i b * (12 / intNormSq (R.ivec i)) lemma IntRayConfig.sum_projVal_eq_quadZ12 {d n : ℕ} (R : IntRayConfig d n) (w : Fin n → ℕ) (M12 : Fin d → Fin d → ℤ) (hdiv : ∀ i : Fin n, (12 / intNormSq (R.ivec i)) * intNormSq (R.ivec i) = 12) (hM : ∀ a b : Fin d, R.opEntryZ12 w a b = M12 a b) (ψ : Fin d → ℝ) : ∑ i : Fin n, (w i : ℝ) * R.toRayConfig.projVal i ψ = (∑ a : Fin d, ∑ b : Fin d, (M12 a b : ℝ) * ψ a * ψ b) / 12 := by have hexp : ∀ i : Fin n, (w i : ℝ) * R.toRayConfig.projVal i ψ = (∑ a : Fin d, ∑ b : Fin d, (((w i : ℤ) * R.ivec i a * R.ivec i b * (12 / intNormSq (R.ivec i)) : ℤ) : ℝ) * ψ a * ψ b) / 12 := by intro i unfold projVal dot IntRayConfig.toRayConfig; dsimp only have hnorm : normSq (fun k => (R.ivec i k : ℝ)) = (intNormSq (R.ivec i) : ℝ) := by unfold normSq intNormSq; push_cast refine Finset.sum_congr rfl fun k _ => sq _ have hne : (intNormSq (R.ivec i) : ℝ) ≠ 0 := by exact_mod_cast ne_of_gt (R.pos i) have hdivR : ((12 / intNormSq (R.ivec i) : ℤ) : ℝ) * (intNormSq (R.ivec i) : ℝ) = 12 := by exact_mod_cast hdiv i have hinv : ((12 / intNormSq (R.ivec i) : ℤ) : ℝ) / 12 = 1 / (intNormSq (R.ivec i) : ℝ) := by field_simp [hne]; linarith rw [hnorm, sq, Finset.sum_mul, Finset.sum_div, Finset.mul_sum, Finset.sum_div] refine Finset.sum_congr rfl fun a _ => ?_ rw [Finset.mul_sum, Finset.sum_div, Finset.mul_sum, Finset.sum_div] refine Finset.sum_congr rfl fun b _ => ?_ push_cast have hstep : (w i : ℝ) * (R.ivec i a : ℝ) * (R.ivec i b : ℝ) * ((12 / intNormSq (R.ivec i) : ℤ) : ℝ) * ψ a * ψ b / 12 = ((w i : ℝ) * (R.ivec i a : ℝ) * (R.ivec i b : ℝ) * ψ a * ψ b) * (((12 / intNormSq (R.ivec i) : ℤ) : ℝ) / 12) := by ring rw [hstep, hinv]; ring simp_rw [hexp, ← Finset.sum_div] congr 1 rw [Finset.sum_comm] refine Finset.sum_congr rfl fun a _ => ?_ rw [Finset.sum_comm] refine Finset.sum_congr rfl fun b _ => ?_ have hfac : ∑ i : Fin n, (((w i : ℤ) * R.ivec i a * R.ivec i b * (12 / intNormSq (R.ivec i)) : ℤ) : ℝ) * ψ a * ψ b = ((R.opEntryZ12 w a b : ℤ) : ℝ) * ψ a * ψ b := by unfold IntRayConfig.opEntryZ12 push_cast rw [Finset.sum_mul, Finset.sum_mul] rw [hfac, hM a b] lemma IntRayConfig.tightFrame_of_decideZ12 {d n : ℕ} (R : IntRayConfig d n) (w : Fin n → ℕ) (c12 : ℤ) (hdiv : ∀ i : Fin n, (12 / intNormSq (R.ivec i)) * intNormSq (R.ivec i) = 12) (hM : ∀ a b : Fin d, R.opEntryZ12 w a b = if a = b then c12 else 0) (ψ : Fin d → ℝ) : ∑ i : Fin n, (w i : ℝ) * R.toRayConfig.projVal i ψ = ((c12 : ℝ) / 12) * normSq ψ := by rw [R.sum_projVal_eq_quadZ12 w (fun a b => if a = b then c12 else 0) hdiv hM ψ] unfold normSq rw [Finset.mul_sum, Finset.sum_div] refine Finset.sum_congr rfl fun a _ => ?_ rw [Finset.sum_eq_single a] · simp only [↓reduceIte, sq]; ring · intro b _ hba; simp [Ne.symm hba] · intro h; exact absurd (Finset.mem_univ _) h /-- Branch-and-bound certificate tree for weighted independence bounds (kernel-checked via `decide`). -/ inductive BBTree (n : ℕ) where | sumLeaf : BBTree n | cliqueLeaf (cliques : List (List (Fin n))) : BBTree n | branch (v : Fin n) (yes no : BBTree n) : BBTree n def listMaxWeight {n : ℕ} (w : Fin n → ℕ) (c : List (Fin n)) : ℕ := c.foldl (fun m u => max m (w u)) 0 lemma le_foldl_max {n : ℕ} (w : Fin n → ℕ) (c : List (Fin n)) (init : ℕ) : init ≤ c.foldl (fun m u => max m (w u)) init ∧ ∀ u ∈ c, w u ≤ c.foldl (fun m u => max m (w u)) init := by induction c generalizing init with | nil => simp | cons a t ih => simp only [List.foldl_cons, List.mem_cons] obtain ⟨h1, h2⟩ := ih (max init (w a)) refine ⟨le_trans (le_max_left _ _) h1, fun u hu => ?_⟩ rcases hu with rfl | ht · exact le_trans (le_max_right _ _) h1 · exact h2 u ht lemma le_listMaxWeight {n : ℕ} (w : Fin n → ℕ) {c : List (Fin n)} {u : Fin n} (hu : u ∈ c) : w u ≤ listMaxWeight w c := (le_foldl_max w c 0).2 u hu def isCliqueBool {n : ℕ} (adj : Fin n → Fin n → Bool) : List (Fin n) → Bool | [] => true | a :: t => t.all (fun b => adj a b) && isCliqueBool adj t lemma isCliqueBool_sound {n : ℕ} {adj : Fin n → Fin n → Bool} (hsymm : ∀ a b, adj a b = true → adj b a = true) {c : List (Fin n)} (h : isCliqueBool adj c = true) : ∀ a ∈ c, ∀ b ∈ c, a ≠ b → adj a b = true := by induction c with | nil => intro a ha; simp at ha | cons x t ih => simp only [isCliqueBool, Bool.and_eq_true, List.all_eq_true] at h intro a ha b hb hab rcases List.mem_cons.mp ha with rfl | hat <;> rcases List.mem_cons.mp hb with rfl | hbt · exact absurd rfl hab · exact h.1 b hbt · exact hsymm _ _ (h.1 a hat) · exact ih h.2 a hat b hbt hab /-- Kernel-decidable branch-and-bound verifier. -/ def checkBB {n : ℕ} (adj : Fin n → Fin n → Bool) (w : Fin n → ℕ) (avail : List (Fin n)) (rem : ℕ) : BBTree n → Bool | .sumLeaf => (avail.map w).sum ≤ rem | .cliqueLeaf cs => avail.all (fun u => cs.any (fun c => u ∈ c)) && cs.all (isCliqueBool adj) && (cs.map (listMaxWeight w)).sum ≤ rem | .branch v yes no => (w v ≤ rem) && checkBB adj w (avail.filter (fun u => u != v && !adj v u)) (rem - w v) yes && checkBB adj w (avail.filter (fun u => u != v)) rem no /-- **Soundness of Branch-and-Bound Verification**: If `checkBB adj w avail rem t = true`, then for EVERY `I : Finset (Fin n)` contained in `avail` with no two elements adjacent under `adj`, we have `∑ u ∈ I, w u ≤ rem`. -/ theorem checkBB_sound {n : ℕ} (adj : Fin n → Fin n → Bool) (w : Fin n → ℕ) (hadj_symm : ∀ a b, adj a b = true → adj b a = true) : ∀ (t : BBTree n) (avail : List (Fin n)) (rem : ℕ), avail.Nodup → checkBB adj w avail rem t = true → ∀ I : Finset (Fin n), (∀ u ∈ I, u ∈ avail) → (∀ u ∈ I, ∀ v ∈ I, adj u v = false) → ∑ u ∈ I, w u ≤ rem := by intro t induction t with | sumLeaf => intro avail rem hnd hchk I hsub _ simp only [checkBB, decide_eq_true_eq] at hchk have hle : ∑ u ∈ I, w u ≤ ∑ u ∈ avail.toFinset, w u := Finset.sum_le_sum_of_subset (fun u hu => List.mem_toFinset.mpr (hsub u hu)) have heq : ∑ u ∈ avail.toFinset, w u = (avail.map w).sum := by rw [List.sum_toFinset _ hnd] omega | cliqueLeaf cs => intro avail rem _ hchk I hsub hind simp only [checkBB, Bool.and_eq_true, List.all_eq_true, List.any_eq_true, decide_eq_true_eq] at hchk obtain ⟨⟨hcov, hcliq⟩, hsum⟩ := hchk have hcl_bound : ∀ c ∈ cs, ∑ u ∈ I ∩ c.toFinset, w u ≤ listMaxWeight w c := by intro c hc have hpw := isCliqueBool_sound hadj_symm (hcliq c hc) by_cases h0 : I ∩ c.toFinset = ∅ · rw [h0]; simp · obtain ⟨u, hu⟩ := Finset.nonempty_iff_ne_empty.mpr h0 have hsing : I ∩ c.toFinset = {u} := by ext a simp only [Finset.mem_singleton] constructor · intro ha by_contra hau have haI := (Finset.mem_inter.mp ha).1 have huI := (Finset.mem_inter.mp hu).1 have haC := List.mem_toFinset.mp (Finset.mem_inter.mp ha).2 have huC := List.mem_toFinset.mp (Finset.mem_inter.mp hu).2 have htrue := hpw a haC u huC hau have hfalse := hind a haI u huI rw [htrue] at hfalse; exact Bool.noConfusion hfalse · rintro rfl; exact hu rw [hsing, Finset.sum_singleton] exact le_listMaxWeight w (List.mem_toFinset.mp (Finset.mem_inter.mp hu).2) have htotal : ∑ u ∈ I, w u ≤ (cs.map (fun c => ∑ u ∈ I ∩ c.toFinset, w u)).sum := by have hcovI : ∀ u ∈ I, ∃ c ∈ cs, u ∈ c := fun u hu => hcov u (hsub u hu) clear hcov hcliq hsum hcl_bound hsub hind induction cs generalizing I with | nil => have hI0 : I = ∅ := by ext u; simp only [Finset.notMem_empty, iff_false] intro hu; obtain ⟨c, hc, _⟩ := hcovI u hu; simp at hc rw [hI0]; simp | cons c rest ih => simp only [List.map_cons, List.sum_cons] let I2 := I \ c.toFinset have hsplit : ∑ u ∈ I, w u = (∑ u ∈ I ∩ c.toFinset, w u) + (∑ u ∈ I2, w u) := by have hunion : (I ∩ c.toFinset) ∪ I2 = I := by ext x; simp only [I2, Finset.mem_union, Finset.mem_inter, Finset.mem_sdiff]; tauto have hdisj : Disjoint (I ∩ c.toFinset) I2 := by rw [Finset.disjoint_left] intro x h1 h2 exact (Finset.mem_sdiff.mp h2).2 (Finset.mem_inter.mp h1).2 conv_lhs => rw [← hunion] rw [Finset.sum_union hdisj] rw [hsplit] have hcov2 : ∀ u ∈ I2, ∃ c' ∈ rest, u ∈ c' := by intro u hu have huI := (Finset.mem_sdiff.mp hu).1 have huc : u ∉ c := fun h => (Finset.mem_sdiff.mp hu).2 (List.mem_toFinset.mpr h) obtain ⟨c', hc', huc'⟩ := hcovI u huI rcases List.mem_cons.mp hc' with rfl | hrest · exact absurd huc' huc · exact ⟨c', hrest, huc'⟩ have hih := ih I2 hcov2 have hmono : (rest.map (fun c' => ∑ u ∈ I2 ∩ c'.toFinset, w u)).sum ≤ (rest.map (fun c' => ∑ u ∈ I ∩ c'.toFinset, w u)).sum := by clear ih hih hcov2 hsplit hcovI induction rest with | nil => simp | cons d ds ihd => simp only [List.map_cons, List.sum_cons] have hle1 : ∑ u ∈ I2 ∩ d.toFinset, w u ≤ ∑ u ∈ I ∩ d.toFinset, w u := Finset.sum_le_sum_of_subset (Finset.inter_subset_inter_right Finset.sdiff_subset) omega omega have hmap_le : (cs.map (fun c => ∑ u ∈ I ∩ c.toFinset, w u)).sum ≤ (cs.map (listMaxWeight w)).sum := by clear htotal hcov hcliq hsum induction cs with | nil => simp | cons c rest ih => simp only [List.map_cons, List.sum_cons] have h1 := hcl_bound c List.mem_cons_self have h2 := ih (fun c' hc' => hcl_bound c' (List.mem_cons_of_mem _ hc')) omega omega | branch v yes no ih_yes ih_no => intro avail rem hnd hchk I hsub hind simp only [checkBB, Bool.and_eq_true, decide_eq_true_eq] at hchk obtain ⟨⟨hwv, hchk_yes⟩, hchk_no⟩ := hchk by_cases hv : v ∈ I · have hnd' : (avail.filter (fun u => u != v && !adj v u)).Nodup := hnd.filter _ have hsub' : ∀ u ∈ I.erase v, u ∈ avail.filter (fun u => u != v && !adj v u) := by intro u hu have hne : u ≠ v := (Finset.mem_erase.mp hu).1 have huI : u ∈ I := (Finset.mem_erase.mp hu).2 refine List.mem_filter.mpr ⟨hsub u huI, ?_⟩ simp [bne_iff_ne, hne, hind v hv u huI] have hind' : ∀ a ∈ I.erase v, ∀ b ∈ I.erase v, adj a b = false := fun a ha b hb => hind a (Finset.mem_of_mem_erase ha) b (Finset.mem_of_mem_erase hb) have hbound := ih_yes _ (rem - w v) hnd' hchk_yes (I.erase v) hsub' hind' rw [← Finset.add_sum_erase _ _ hv] omega · have hnd' : (avail.filter (fun u => u != v)).Nodup := hnd.filter _ have hsub' : ∀ u ∈ I, u ∈ avail.filter (fun u => u != v) := by intro u hu refine List.mem_filter.mpr ⟨hsub u hu, ?_⟩ simp [bne_iff_ne, show u ≠ v from fun h => hv (h ▸ hu)] exact ih_no _ rem hnd' hchk_no I hsub' hind theorem int_weight_bound_of_checkBB {d n : ℕ} (R : IntRayConfig d n) (w : Fin n → ℕ) (B : ℕ) (t : BBTree n) (hchk : checkBB R.orthBool w (List.finRange n) B t = true) : R.toRayConfig.IsWeightBound (fun i => (w i : ℝ)) (B : ℝ) := by have hsymm : ∀ a b, R.orthBool a b = true → R.orthBool b a = true := by intro a b h simp only [IntRayConfig.orthBool, Bool.and_eq_true, bne_iff_ne, beq_iff_eq] at h ⊢ refine ⟨h.1.symm, ?_⟩ have : intDot (R.ivec b) (R.ivec a) = intDot (R.ivec a) (R.ivec b) := by unfold intDot; refine Finset.sum_congr rfl fun k _ => mul_comm _ _ rw [this, h.2] intro I hI have hnat := checkBB_sound R.orthBool w hsymm t (List.finRange n) B (List.nodup_finRange n) hchk I (fun u _ => List.mem_finRange u) (fun u hu v hv => by cases h : R.orthBool u v with | false => rfl | true => exact absurd (R.orthBool_sound h) (hI u hu v hv)) rw [← Nat.cast_sum] exact Nat.cast_le.mpr hnat theorem int_not_tier4_of_checkBB {d n : ℕ} (hd : 1 ≤ d) (R : IntRayConfig d n) (ksCol : List (Fin n)) (t : BBTree n) (hIndep : ksCol.all (fun a => ksCol.all (fun b => !R.orthBool a b)) = true) (hchk : checkBB R.nonOrthBool (fun _ => 1) ((List.finRange n).filter (fun u => !(u ∈ ksCol))) (d - 1) t = true) : ¬ R.toRayConfig.IsTier4_KSUncolorable := by intro hKS apply hKS refine ⟨ksCol.toFinset, ?_, ?_⟩ · intro a ha b hb horth simp only [List.all_eq_true, Bool.not_eq_true'] at hIndep have hfalse := hIndep a (List.mem_toFinset.mp ha) b (List.mem_toFinset.mp hb) have htrue : R.orthBool a b = true := by simp only [IntRayConfig.orthBool, Bool.and_eq_true, bne_iff_ne, beq_iff_eq] refine ⟨horth.1, ?_⟩ have h0 := horth.2 unfold dot IntRayConfig.toRayConfig at h0; dsimp only at h0 have hcast : ((intDot (R.ivec a) (R.ivec b) : ℤ) : ℝ) = 0 := by unfold intDot; push_cast; exact h0 exact Int.cast_eq_zero.mp hcast rw [htrue] at hfalse; exact Bool.noConfusion hfalse · intro C hC by_contra hdisj rw [Finset.not_nonempty_iff_eq_empty] at hdisj have hsymm : ∀ a b, R.nonOrthBool a b = true → R.nonOrthBool b a = true := by intro a b h simp only [IntRayConfig.nonOrthBool, Bool.and_eq_true, bne_iff_ne] at h ⊢ refine ⟨h.1.symm, ?_⟩ have : intDot (R.ivec b) (R.ivec a) = intDot (R.ivec a) (R.ivec b) := by unfold intDot; refine Finset.sum_congr rfl fun k _ => mul_comm _ _ rw [this]; exact h.2 have hsub : ∀ u ∈ C, u ∈ (List.finRange n).filter (fun u => !(u ∈ ksCol)) := by intro u hu refine List.mem_filter.mpr ⟨List.mem_finRange u, ?_⟩ simp only [Bool.not_eq_true', decide_eq_false_iff_not] intro hmem have hinter : u ∈ ksCol.toFinset ∩ C := Finset.mem_inter.mpr ⟨List.mem_toFinset.mpr hmem, hu⟩ rw [hdisj] at hinter; simp at hinter have hno_nonorth : ∀ a ∈ C, ∀ b ∈ C, R.nonOrthBool a b = false := by intro a ha b hb cases h : R.nonOrthBool a b with | false => rfl | true => obtain ⟨hne, hnot⟩ := R.nonOrthBool_sound h exact absurd (hC.2 a ha b hb hne) hnot have hbound := checkBB_sound R.nonOrthBool (fun _ => 1) hsymm t _ (d - 1) ((List.nodup_finRange n).filter _) hchk C hsub hno_nonorth simp only [Finset.sum_const, smul_eq_mul, mul_one, hC.1] at hbound omega /-- Single-pass BFS spanning-tree reachability check (`O(n)` kernel steps). -/ def bfsReach {n : ℕ} (edges : List (Fin n × Fin n)) (init : List (Fin n)) : List (Fin n) := edges.foldl (fun acc e => if e.1 ∈ acc then e.2 :: acc else acc) init def checkReachable {n : ℕ} (edges : List (Fin n × Fin n)) : Bool := if h : 0 < n then let reached := bfsReach edges [⟨0, h⟩] (List.finRange n).all (fun v => v ∈ reached) else false theorem int_irreducible_of_edges {d n : ℕ} (hn : 1 ≤ n) (R : IntRayConfig d n) (edges : List (Fin n × Fin n)) (hedges : edges.all (fun e => R.nonOrthBool e.1 e.2) = true) (hreach : checkReachable edges = true) : R.toRayConfig.IsIrreducible := by refine ⟨hn, fun S hSne hSuniv => ?_⟩ by_contra hcut push Not at hcut have hedges_in : ∀ e ∈ edges, (e.1 ∈ S ↔ e.2 ∈ S) := by intro e he have hno := (R.nonOrthBool_sound (List.all_eq_true.mp hedges e he)).2 constructor · intro h1; by_contra h2; exact hno (hcut e.1 h1 e.2 h2) · intro h2; by_contra h1; exact hno (R.toRayConfig.orth_symm (hcut e.2 h2 e.1 h1)) have hfold : ∀ (P : Fin n → Prop) (es : List (Fin n × Fin n)) (_ : ∀ e ∈ es, P e.1 ↔ P e.2) (acc : List (Fin n)), (∀ u ∈ acc, P u) → ∀ u ∈ bfsReach es acc, P u := by intro P es hes induction es with | nil => intro acc hacc u hu; exact hacc u hu | cons e rest ih => intro acc hacc apply ih (fun e' he' => hes e' (List.mem_cons_of_mem _ he')) intro u hu have heP := hes e List.mem_cons_self dsimp only at hu split_ifs at hu with h1 · rcases List.mem_cons.mp hu with rfl | hmem · exact heP.mp (hacc e.1 h1) · exact hacc u hmem · exact hacc u hu have hpos : 0 < n := hn simp only [checkReachable, hpos, ↓reduceDIte, List.all_eq_true, decide_eq_true_eq] at hreach by_cases h0 : (⟨0, hpos⟩ : Fin n) ∈ S · have hall : ∀ u : Fin n, u ∈ S := fun u => hfold (fun x => x ∈ S) edges hedges_in [⟨0, hpos⟩] (fun x hx => by simp only [List.mem_singleton] at hx; rwa [hx]) u (hreach u (List.mem_finRange u)) exact hSuniv (Finset.eq_univ_iff_forall.mpr hall) · have hnone : ∀ u : Fin n, u ∉ S := fun u => hfold (fun x => x ∉ S) edges (fun e he => not_congr (hedges_in e he)) [⟨0, hpos⟩] (fun x hx => by simp only [List.mem_singleton] at hx; rwa [hx]) u (hreach u (List.mem_finRange u)) obtain ⟨u, hu⟩ := hSne exact hnone u hu /-- Universal helper: certify `¬ R.toRayConfig.IsTier3_TightFrame` from the canonical 2-MIS indefinite pseudo-state `Y = E_{00} + (1/2)(E_{02} + E_{20})` (requiring `d ≥ 3` and independent sets `I₁, I₂` with weights `1/2, 1/2`). -/ theorem int_no_tier3_of_canonical_Y {d n : ℕ} (hd : 3 ≤ d) (R : IntRayConfig d n) (I₁ I₂ : Finset (Fin n)) (hI₁ : ∀ a ∈ I₁, ∀ b ∈ I₁, R.orthBool a b = false) (hI₂ : ∀ a ∈ I₂, ∀ b ∈ I₂, R.orthBool a b = false) (hcovZ : ∀ i : Fin n, 2 * (R.ivec i ⟨0, by omega⟩ * R.ivec i ⟨0, by omega⟩ + R.ivec i ⟨0, by omega⟩ * R.ivec i ⟨2, by omega⟩) ≤ ((if i ∈ I₁ then (1 : ℤ) else 0) + (if i ∈ I₂ then (1 : ℤ) else 0)) * intNormSq (R.ivec i)) : ¬ R.toRayConfig.IsTier3_TightFrame := by let c0 : Fin d := ⟨0, by omega⟩ let c2 : Fin d := ⟨2, by omega⟩ have hc02 : c0 ≠ c2 := by intro h; have := congrArg Fin.val h; simp [c0, c2] at this let Y : Fin d → Fin d → ℝ := fun a b => if a = c0 ∧ b = c0 then 1 else if (a = c0 ∧ b = c2) ∨ (a = c2 ∧ b = c0) then (1 / 2 : ℝ) else 0 have hTr : ∑ a : Fin d, Y a a = 1 := by rw [Finset.sum_eq_single c0] · simp [Y] · intro a _ ha simp only [Y, ha, false_and, ↓reduceIte] split_ifs with h · simp at h · rfl · intro h; exact absurd (Finset.mem_univ _) h let Is : Fin 2 → Finset (Fin n) := ![I₁, I₂] let lam : Fin 2 → ℝ := fun _ => 1 / 2 apply no_tier3_of_pseudostate R.toRayConfig Y hTr Is lam · intro k a ha b hb horth have htrue : R.orthBool a b = true := by simp only [IntRayConfig.orthBool, Bool.and_eq_true, bne_iff_ne, beq_iff_eq] refine ⟨horth.1, ?_⟩ have h0 := horth.2 unfold dot IntRayConfig.toRayConfig at h0; dsimp only at h0 have hcast : ((intDot (R.ivec a) (R.ivec b) : ℤ) : ℝ) = 0 := by unfold intDot; push_cast; exact h0 exact Int.cast_eq_zero.mp hcast fin_cases k · have hf := hI₁ a ha b hb; rw [htrue] at hf; exact Bool.noConfusion hf · have hf := hI₂ a ha b hb; rw [htrue] at hf; exact Bool.noConfusion hf · intro _; norm_num · simp [lam] · intro i have hquad : R.toRayConfig.quadVal Y i = ((R.ivec i c0 * R.ivec i c0 + R.ivec i c0 * R.ivec i c2 : ℤ) : ℝ) / (intNormSq (R.ivec i) : ℝ) := by unfold quadVal IntRayConfig.toRayConfig; dsimp only have hnorm : normSq (fun k => (R.ivec i k : ℝ)) = (intNormSq (R.ivec i) : ℝ) := by unfold normSq intNormSq; push_cast refine Finset.sum_congr rfl fun k _ => sq _ rw [hnorm] have hsumY : ∑ a : Fin d, ∑ b : Fin d, Y a b * (R.ivec i a : ℝ) * (R.ivec i b : ℝ) = (R.ivec i c0 : ℝ) * (R.ivec i c0 : ℝ) + (R.ivec i c0 : ℝ) * (R.ivec i c2 : ℝ) := by have hrow0 : ∑ b : Fin d, Y c0 b * (R.ivec i c0 : ℝ) * (R.ivec i b : ℝ) = (R.ivec i c0 : ℝ) * (R.ivec i c0 : ℝ) + (1 / 2 : ℝ) * (R.ivec i c0 : ℝ) * (R.ivec i c2 : ℝ) := by rw [← Finset.add_sum_erase _ _ (Finset.mem_univ c0)] have hc2_mem : c2 ∈ Finset.univ.erase c0 := Finset.mem_erase.mpr ⟨hc02.symm, Finset.mem_univ _⟩ rw [← Finset.add_sum_erase _ _ hc2_mem] have hrest : ∑ b ∈ (Finset.univ.erase c0).erase c2, Y c0 b * (R.ivec i c0 : ℝ) * (R.ivec i b : ℝ) = 0 := by refine Finset.sum_eq_zero fun b hb => ?_ have hb2 := (Finset.mem_erase.mp hb).1 have hb0 := (Finset.mem_erase.mp (Finset.mem_erase.mp hb).2).1 simp [Y, hb0, hb2, hc02] rw [hrest, add_zero] simp [Y, hc02.symm] have hrow2 : ∑ b : Fin d, Y c2 b * (R.ivec i c2 : ℝ) * (R.ivec i b : ℝ) = (1 / 2 : ℝ) * (R.ivec i c2 : ℝ) * (R.ivec i c0 : ℝ) := by rw [Finset.sum_eq_single c0] · simp [Y, hc02.symm] · intro b _ hb0; simp [Y, hc02.symm, hb0] · intro h; exact absurd (Finset.mem_univ _) h rw [← Finset.add_sum_erase _ _ (Finset.mem_univ c0)] have hc2_mem : c2 ∈ Finset.univ.erase c0 := Finset.mem_erase.mpr ⟨hc02.symm, Finset.mem_univ _⟩ rw [← Finset.add_sum_erase _ _ hc2_mem] have hrest : ∑ a ∈ (Finset.univ.erase c0).erase c2, ∑ b : Fin d, Y a b * (R.ivec i a : ℝ) * (R.ivec i b : ℝ) = 0 := by refine Finset.sum_eq_zero fun a ha => Finset.sum_eq_zero fun b _ => ?_ have ha2 := (Finset.mem_erase.mp ha).1 have ha0 := (Finset.mem_erase.mp (Finset.mem_erase.mp ha).2).1 simp [Y, ha0, ha2] rw [hrest, add_zero, hrow0, hrow2]; ring rw [hsumY]; push_cast; rfl rw [hquad, Fin.sum_univ_two] simp only [Is, lam, Matrix.cons_val_zero, Matrix.cons_val_one] have hnpos : (0 : ℝ) < (intNormSq (R.ivec i) : ℝ) := by exact_mod_cast R.pos i rw [div_le_iff₀ hnpos] have hZ : ((2 * (R.ivec i c0 * R.ivec i c0 + R.ivec i c0 * R.ivec i c2) : ℤ) : ℝ) ≤ ((((if i ∈ I₁ then (1 : ℤ) else 0) + (if i ∈ I₂ then (1 : ℤ) else 0)) * intNormSq (R.ivec i) : ℤ) : ℝ) := by exact_mod_cast hcovZ i push_cast at hZ ⊢ by_cases h1 : i ∈ I₁ <;> by_cases h2 : i ∈ I₂ <;> simp only [h1, h2, ↓reduceIte] at hZ ⊢ <;> linarith /-! ## Section 6: Explicit Irreducible Separating Witnesses in Dimensions 3, 4, 5, 6 -/ def ks18Vecs : Fin 18 → Fin 4 → ℤ := ![![1, 0, 0, 0], ![0, 1, 0, 0], ![0, 0, 1, 0], ![1, 1, 0, 0], ![1, 0, -1, 0], ![1, 0, 0, 1], ![1, 0, 0, -1], ![0, 1, -1, 0], ![0, 1, 0, 1], ![0, 1, 0, -1], ![0, 0, 1, 1], ![0, 0, 1, -1], ![1, 1, 1, 1], ![1, 1, 1, -1], ![1, -1, 1, 1], ![1, -1, 1, -1], ![1, -1, -1, 1], ![1, -1, -1, -1]] def ks18SpanEdges : List (Fin 18 × Fin 18) := [(0, 3), (0, 4), (0, 5), (0, 6), (0, 12), (0, 13), (0, 14), (0, 15), (0, 16), (0, 17), (3, 1), (3, 7), (3, 8), (3, 9), (4, 2), (4, 10), (4, 11)] def yuoh13Vecs : Fin 13 → Fin 3 → ℤ := ![![1, 0, 0], ![0, 1, 0], ![0, 0, 1], ![1, 1, 0], ![1, -1, 0], ![1, 0, 1], ![1, 0, -1], ![0, 1, 1], ![0, 1, -1], ![1, 1, 1], ![1, 1, -1], ![1, -1, 1], ![1, -1, -1]] def yuoh13Weights : Fin 13 → ℕ := ![3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2] def yuoh13IndTree : BBTree 13 := (.branch 0 (.branch 3 (.branch 5 .sumLeaf (.cliqueLeaf [[6, 9], [10]])) (.branch 5 (.cliqueLeaf [[4, 9], [11]]) (.branch 4 (.cliqueLeaf [[6, 11], [12]]) (.branch 6 .sumLeaf .sumLeaf)))) (.branch 3 (.branch 5 (.cliqueLeaf [[7, 8], [9]]) (.branch 6 (.cliqueLeaf [[7, 8], [10]]) (.branch 7 .sumLeaf (.cliqueLeaf [[1], [8, 9], [10]])))) (.branch 5 (.branch 4 (.cliqueLeaf [[7, 8], [11]]) (.branch 7 .sumLeaf (.cliqueLeaf [[2], [8, 9], [11]]))) (.branch 4 (.branch 6 (.cliqueLeaf [[7, 8], [12]]) (.branch 7 .sumLeaf (.cliqueLeaf [[1], [8, 12], [11]]))) (.branch 6 (.branch 7 .sumLeaf (.cliqueLeaf [[2], [8, 12], [10]])) (.branch 7 (.cliqueLeaf [[1, 2], [9], [12]]) (.branch 8 (.cliqueLeaf [[1, 2], [10], [11]]) (.cliqueLeaf [[1, 2], [9], [10], [11], [12]])))))))) def yuoh13SpanEdges : List (Fin 13 × Fin 13) := [(0, 3), (0, 4), (0, 5), (0, 6), (0, 9), (0, 10), (0, 11), (0, 12), (3, 1), (3, 7), (3, 8), (5, 2)] def yuoh13KSCol : List (Fin 13) := [2, 5, 8] def yuoh13KSTree : BBTree 13 := (.branch 12 .sumLeaf (.branch 0 (.cliqueLeaf [[1, 7]]) (.branch 1 .sumLeaf (.branch 3 (.cliqueLeaf [[4, 11]]) (.cliqueLeaf [[4, 6, 7], [9, 10, 11]]))))) def sub17Vecs : Fin 17 → Fin 4 → ℤ := ![![1, 0, 0, 0], ![0, 0, 1, 0], ![0, 0, 0, 1], ![1, -1, 0, 0], ![1, 0, -1, 0], ![1, 0, 0, 1], ![0, 1, 1, 0], ![0, 1, -1, 0], ![0, 1, 0, 1], ![0, 1, 0, -1], ![1, 1, 1, 1], ![1, 1, 1, -1], ![1, 1, -1, 1], ![1, 1, -1, -1], ![1, -1, 1, 1], ![1, -1, 1, -1], ![1, -1, -1, -1]] def sub17Weights : Fin 17 → ℕ := ![2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 3, 1, 1, 2, 2, 2] def sub17IndTree : BBTree 17 := (.branch 11 (.branch 0 (.cliqueLeaf [[15, 10, 13]]) (.branch 15 .sumLeaf (.branch 6 (.branch 9 .sumLeaf .sumLeaf) (.cliqueLeaf [[9, 1], [2], [10, 13]])))) (.branch 6 (.branch 9 .sumLeaf (.branch 4 (.cliqueLeaf [[16], [1, 3]]) (.cliqueLeaf [[8, 1], [16], [3, 10]]))) (.branch 9 (.branch 5 (.cliqueLeaf [[14], [2, 3]]) (.cliqueLeaf [[7, 2], [14], [3, 13]])) (.branch 4 (.branch 5 (.cliqueLeaf [[0], [3, 12]]) (.branch 3 (.cliqueLeaf [[0, 7], [16]]) (.branch 0 (.cliqueLeaf [[16, 12], [13]]) (.cliqueLeaf [[7, 16], [1], [12], [13]])))) (.branch 5 (.branch 3 (.cliqueLeaf [[0, 8], [14]]) (.branch 0 (.cliqueLeaf [[14, 12], [10]]) (.cliqueLeaf [[8, 14], [2], [10], [12]]))) (.branch 3 (.branch 0 (.cliqueLeaf [[14, 16], [15]]) (.cliqueLeaf [[7, 16], [8, 14], [15]])) (.branch 0 (.cliqueLeaf [[14, 16, 12], [15, 10, 13]]) (.branch 7 (.branch 8 .sumLeaf (.cliqueLeaf [[14, 12], [15, 13], [1]])) (.cliqueLeaf [[8, 14], [15, 10, 13], [16, 12], [1, 2]]))))))))) def sub17SpanEdges : List (Fin 17 × Fin 17) := [(0, 3), (0, 4), (0, 5), (0, 10), (0, 11), (0, 12), (0, 13), (0, 14), (0, 15), (0, 16), (3, 6), (3, 7), (3, 8), (3, 9), (4, 1), (5, 2)] def r18Vecs : Fin 18 → Fin 4 → ℤ := ![![1, 1, 0, 0], ![1, 1, -1, 0], ![1, 0, 1, 0], ![1, 0, 0, 0], ![1, -1, 0, 0], ![1, -1, -1, 0], ![0, 1, 1, 1], ![0, 1, 1, 0], ![0, 1, 1, -1], ![0, 1, 0, 1], ![0, 1, 0, -1], ![0, 1, -1, 1], ![0, 1, -1, 0], ![0, 1, -1, -1], ![0, 0, 1, 1], ![0, 0, 1, 0], ![0, 0, 1, -1], ![0, 0, 0, 1]] def r18Weights : Fin 18 → ℕ := ![5, 2, 2, 12, 5, 2, 3, 4, 3, 5, 5, 3, 4, 3, 5, 5, 5, 6] def r18IndTree : BBTree 18 := (.branch 3 (.branch 0 (.cliqueLeaf [[1, 2]]) (.cliqueLeaf [[4, 1], [2, 5]])) (.branch 17 (.branch 9 (.branch 14 .sumLeaf (.cliqueLeaf [[16, 6], [11]])) (.branch 14 (.cliqueLeaf [[10, 6], [13]]) (.branch 10 (.cliqueLeaf [[16, 13], [8]]) (.branch 16 .sumLeaf .sumLeaf)))) (.branch 0 (.branch 9 (.branch 7 .sumLeaf (.cliqueLeaf [[12, 6], [11], [1]])) (.branch 7 (.cliqueLeaf [[10, 6], [8], [2]]) (.branch 10 (.cliqueLeaf [[12, 8], [13], [1]]) (.branch 1 .sumLeaf (.branch 12 .sumLeaf .sumLeaf))))) (.branch 9 (.branch 4 (.branch 12 .sumLeaf (.cliqueLeaf [[7, 11], [6], [5]])) (.branch 7 (.cliqueLeaf [[14, 16], [6], [5]]) (.cliqueLeaf [[14, 16], [12, 6], [11, 5], [1]]))) (.branch 1 (.branch 11 (.cliqueLeaf [[15], [16, 13], [12]]) (.cliqueLeaf [[10, 15], [14, 16], [12, 5], [13]])) (.branch 10 (.branch 14 (.cliqueLeaf [[7, 12], [13, 5]]) (.branch 12 (.cliqueLeaf [[4, 16], [13]]) (.cliqueLeaf [[4, 16], [7, 13], [8], [5]]))) (.branch 14 (.branch 12 .sumLeaf (.cliqueLeaf [[15], [7, 13], [6], [2, 5]])) (.branch 12 (.cliqueLeaf [[4, 15], [16, 13], [11], [2]]) (.branch 16 (.cliqueLeaf [[15], [7, 11], [8], [2, 5]]) (.branch 5 (.cliqueLeaf [[4, 15], [7], [6], [8]]) (.branch 7 (.cliqueLeaf [[4, 15], [6], [8], [2]]) (.cliqueLeaf [[4, 15], [6], [8], [11], [13], [2]])))))))))))) def r18SpanEdges : List (Fin 18 × Fin 18) := [(0, 1), (0, 2), (0, 3), (0, 6), (0, 7), (0, 8), (0, 9), (0, 10), (0, 11), (0, 12), (0, 13), (1, 5), (1, 14), (1, 15), (1, 16), (2, 4), (6, 17)] def r18KSCol : List (Fin 18) := [9, 14, 17] def r18KSTree : BBTree 18 := (.branch 2 (.cliqueLeaf [[1, 5, 10]]) (.branch 8 (.cliqueLeaf [[1, 3], [12]]) (.branch 1 (.cliqueLeaf [[4, 6, 7]]) (.branch 4 (.cliqueLeaf [[0], [15, 16]]) (.branch 0 (.cliqueLeaf [[5, 15, 16]]) (.branch 15 .sumLeaf (.branch 5 (.cliqueLeaf [[11, 12, 13]]) (.branch 10 (.cliqueLeaf [[3], [6, 11]]) (.branch 11 .sumLeaf (.branch 6 (.cliqueLeaf [[3], [12, 16]]) (.cliqueLeaf [[3], [7, 16], [12, 13]]))))))))))) def union22Vecs : Fin 22 → Fin 4 → ℤ := ![![1, 1, 1, 0], ![1, 1, 0, 0], ![1, 1, -1, 0], ![1, 0, 1, 0], ![1, 0, 0, 0], ![1, 0, -1, 0], ![1, -1, 1, 0], ![1, -1, 0, 0], ![1, -1, -1, 0], ![0, 1, 1, 1], ![0, 1, 1, 0], ![0, 1, 1, -1], ![0, 1, 0, 1], ![0, 1, 0, 0], ![0, 1, 0, -1], ![0, 1, -1, 1], ![0, 1, -1, 0], ![0, 1, -1, -1], ![0, 0, 1, 1], ![0, 0, 1, 0], ![0, 0, 1, -1], ![0, 0, 0, 1]] def union22Weights : Fin 22 → ℕ := ![3, 6, 3, 3, 9, 3, 3, 6, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 6, 2, 6, 9] def union22IndTree : BBTree 22 := (.branch 4 (.branch 1 (.cliqueLeaf [[0, 5], [2, 3]]) (.branch 3 (.cliqueLeaf [[7, 0], [6]]) (.branch 7 (.cliqueLeaf [[5, 6], [8]]) (.cliqueLeaf [[0, 5], [2], [6], [8]])))) (.branch 21 (.branch 18 (.cliqueLeaf [[9, 14], [12, 17]]) (.branch 12 (.cliqueLeaf [[20, 9], [15]]) (.branch 20 (.cliqueLeaf [[11], [14, 15]]) (.cliqueLeaf [[9, 14], [11], [15], [17]])))) (.branch 1 (.branch 3 (.cliqueLeaf [[0, 15], [9, 16], [10, 17], [11]]) (.branch 0 (.branch 2 .sumLeaf (.cliqueLeaf [[9, 14], [10], [11, 12], [13]])) (.branch 10 (.cliqueLeaf [[5, 12, 14], [9], [11], [13]]) (.branch 12 (.cliqueLeaf [[2, 9], [15], [16], [13]]) (.branch 9 (.cliqueLeaf [[5, 13], [11], [15], [17]]) (.branch 5 (.cliqueLeaf [[2, 11], [15], [16], [17]]) (.cliqueLeaf [[2, 11], [14, 15], [16], [17], [13]]))))))) (.branch 3 (.branch 7 (.cliqueLeaf [[6, 9], [10, 15], [11, 16], [17]]) (.branch 10 (.branch 18 .sumLeaf (.cliqueLeaf [[20, 9], [0], [11], [19]])) (.branch 18 (.cliqueLeaf [[0, 16], [6, 9], [17], [19]]) (.branch 0 (.cliqueLeaf [[20, 9], [6, 11], [19]]) (.branch 9 .sumLeaf (.cliqueLeaf [[20, 17], [6, 11], [15], [16], [19]])))))) (.branch 7 (.branch 5 (.cliqueLeaf [[8, 15], [9, 16], [10, 17], [11]]) (.branch 10 (.cliqueLeaf [[8], [9, 14], [11, 12], [13]]) (.branch 8 (.cliqueLeaf [[6, 9], [11, 12], [14], [13]]) (.branch 9 (.cliqueLeaf [[11, 12], [15], [17], [13]]) (.branch 11 .sumLeaf (.branch 12 .sumLeaf (.cliqueLeaf [[6], [14, 15], [16], [17], [13]]))))))) (.branch 5 (.branch 10 (.branch 18 .sumLeaf (.cliqueLeaf [[20, 9], [8], [11], [19]])) (.branch 18 (.cliqueLeaf [[2, 9], [8, 16], [17], [19]]) (.branch 8 (.cliqueLeaf [[20, 9], [2, 11], [19]]) (.branch 9 .sumLeaf (.cliqueLeaf [[20, 17], [2, 11], [15], [16], [19]]))))) (.branch 9 (.branch 15 .sumLeaf (.branch 17 .sumLeaf (.branch 18 (.cliqueLeaf [[0], [8], [10], [12, 19]]) (.cliqueLeaf [[0], [8], [10], [11, 12], [13, 19]])))) (.branch 10 (.cliqueLeaf [[18, 20, 13], [0], [8], [11, 12], [14, 19]]) (.branch 11 (.cliqueLeaf [[20, 17], [0, 15], [8], [14, 19], [13]]) (.branch 15 (.branch 20 (.cliqueLeaf [[2], [6], [12, 19], [16]]) (.cliqueLeaf [[2], [6], [12, 17], [16], [13, 19]])) (.cliqueLeaf [[18, 20, 13], [0, 16], [2], [6], [8, 17], [12, 14, 19]]))))))))))) def union22SpanEdges : List (Fin 22 × Fin 22) := [(0, 1), (0, 2), (0, 3), (0, 4), (0, 6), (0, 8), (0, 9), (0, 10), (0, 11), (0, 12), (0, 13), (0, 14), (0, 18), (0, 19), (0, 20), (1, 5), (1, 15), (1, 16), (1, 17), (3, 7), (9, 21)] def union22KSCol : List (Fin 22) := [5, 16, 18, 19] def union22KSTree : BBTree 22 := (.branch 0 (.cliqueLeaf [[7, 15, 17], [21]]) (.branch 7 (.cliqueLeaf [[1, 2], [20, 21]]) (.branch 1 (.cliqueLeaf [[6, 8, 20], [21]]) (.branch 6 (.cliqueLeaf [[9, 10, 11], [21]]) (.branch 11 (.cliqueLeaf [[2, 4], [12]]) (.branch 2 (.cliqueLeaf [[3, 9, 10], [21]]) (.branch 9 (.cliqueLeaf [[4], [14, 20]]) (.branch 20 (.cliqueLeaf [[4], [13, 17]]) (.branch 13 (.cliqueLeaf [[3, 4], [21]]) (.branch 3 (.cliqueLeaf [[8, 12], [14, 21]]) (.branch 8 (.cliqueLeaf [[15, 17, 21]]) (.branch 21 .sumLeaf (.branch 10 (.cliqueLeaf [[4], [15, 17]]) (.cliqueLeaf [[4], [12, 15], [14, 17]])))))))))))))) def u24Vecs : Fin 24 → Fin 5 → ℤ := ![![1, 1, 1, 0, 0], ![1, 1, 0, 0, 0], ![1, 1, -1, 0, 0], ![1, 0, 1, 0, 0], ![1, 0, 0, 0, 0], ![1, 0, -1, 0, 0], ![1, -1, 1, 0, 0], ![1, -1, 0, 0, 0], ![1, -1, -1, 0, 0], ![0, 1, 1, 0, 0], ![0, 1, 0, 0, 0], ![0, 1, -1, 0, 0], ![0, 0, 1, 1, 0], ![0, 0, 1, -1, 0], ![0, 0, 0, 1, 0], ![0, 0, 0, 0, 1], ![0, 0, 1, 0, 1], ![0, 0, 1, 0, -1], ![0, 0, 0, 1, 1], ![0, 0, 0, 1, -1], ![0, 0, 1, 1, 1], ![0, 0, 1, 1, -1], ![0, 0, 1, -1, 1], ![0, 0, 1, -1, -1]] def u24Weights : Fin 24 → ℕ := ![3, 13, 3, 3, 5, 3, 3, 13, 3, 5, 3, 5, 3, 3, 12, 9, 6, 6, 6, 6, 3, 3, 3, 3] def u24IndTree : BBTree 24 := (.branch 1 (.branch 4 (.cliqueLeaf [[0, 5], [2, 3]]) (.branch 3 (.cliqueLeaf [[9, 11], [0]]) (.branch 9 (.cliqueLeaf [[0, 5], [10]]) (.cliqueLeaf [[11, 0], [2], [5, 10]])))) (.branch 4 (.branch 3 (.cliqueLeaf [[7, 0], [6]]) (.branch 7 (.cliqueLeaf [[5, 6], [8]]) .sumLeaf)) (.branch 7 (.branch 3 (.cliqueLeaf [[9, 11], [6]]) (.branch 9 (.cliqueLeaf [[5, 10], [8]]) (.cliqueLeaf [[11, 8], [5, 6], [10]]))) (.branch 10 (.cliqueLeaf [[9, 11], [0], [2], [6], [8]]) (.branch 14 (.branch 18 (.branch 12 .sumLeaf (.cliqueLeaf [[13, 20], [23]])) (.branch 12 (.cliqueLeaf [[19, 20], [21]]) (.branch 19 (.cliqueLeaf [[13, 21], [22]]) (.cliqueLeaf [[13, 20], [21], [22], [23]])))) (.branch 18 (.branch 12 .sumLeaf (.branch 16 (.cliqueLeaf [[15, 13], [20]]) (.cliqueLeaf [[15, 13], [17, 20], [23]]))) (.branch 15 (.branch 16 (.cliqueLeaf [[19, 20], [22]]) (.branch 17 (.cliqueLeaf [[19, 23], [21]]) (.cliqueLeaf [[19, 20], [21], [22], [23]]))) (.branch 19 (.cliqueLeaf [[16, 17], [12, 13], [21], [22]]) (.branch 16 (.branch 9 (.branch 3 (.branch 12 .sumLeaf (.cliqueLeaf [[0], [13, 20], [22]])) (.branch 12 (.cliqueLeaf [[0, 5], [8], [20]]) (.cliqueLeaf [[0, 5], [8], [13, 20], [22]]))) (.branch 3 (.branch 12 (.cliqueLeaf [[11, 0], [6], [20]]) (.cliqueLeaf [[11, 0], [6], [13, 20], [22]])) (.branch 11 (.branch 12 (.cliqueLeaf [[2], [5, 6], [20]]) (.cliqueLeaf [[2], [5, 6], [13, 20], [22]])) (.branch 5 (.cliqueLeaf [[2], [8], [12, 13], [20], [22]]) (.branch 12 .sumLeaf (.cliqueLeaf [[0], [2], [6], [8], [13, 20], [22]])))))) (.branch 9 (.branch 12 (.cliqueLeaf [[17, 20], [0, 5], [3, 8], [21]]) (.branch 17 (.cliqueLeaf [[0, 5], [3, 8], [13, 21], [23]]) (.cliqueLeaf [[0, 5], [3, 8], [13, 20], [21], [22], [23]]))) (.branch 3 (.branch 12 (.cliqueLeaf [[17, 20], [11, 0], [6], [21]]) (.branch 17 (.cliqueLeaf [[11, 0], [6], [13, 21], [23]]) (.cliqueLeaf [[11, 0], [6], [13, 20], [21], [22], [23]]))) (.branch 12 (.branch 11 (.cliqueLeaf [[17, 20], [2], [5, 6], [21]]) (.cliqueLeaf [[17, 20], [0, 5], [2], [6], [8], [21]])) (.branch 17 (.branch 11 (.cliqueLeaf [[2], [5, 6], [13, 21], [23]]) (.cliqueLeaf [[0, 5], [2], [6], [8], [13, 21], [23]])) (.branch 11 (.cliqueLeaf [[2], [5, 6], [13, 20], [21], [22], [23]]) (.cliqueLeaf [[0, 5], [2], [6], [8], [13, 20], [21], [22], [23]]))))))))))))))) def u24SpanEdges : List (Fin 24 × Fin 24) := [(0, 1), (0, 2), (0, 3), (0, 4), (0, 6), (0, 8), (0, 9), (0, 10), (0, 12), (0, 13), (0, 16), (0, 17), (0, 20), (0, 21), (0, 22), (0, 23), (1, 5), (1, 11), (3, 7), (12, 14), (12, 18), (12, 19), (16, 15)] def u24KSCol : List (Fin 24) := [13, 14, 18] def u24KSTree : BBTree 24 := (.branch 0 (.cliqueLeaf [[5, 7, 11], [15, 19]]) (.branch 2 (.cliqueLeaf [[3, 7, 9], [15, 19]]) (.branch 3 (.cliqueLeaf [[5, 8], [10], [15, 19]]) (.branch 5 (.cliqueLeaf [[6, 10], [15, 19]]) (.branch 6 (.cliqueLeaf [[1, 9], [15, 19]]) (.branch 8 (.cliqueLeaf [[1, 11], [15, 19]]) (.branch 9 (.cliqueLeaf [[4], [11], [15, 19]]) (.branch 11 .sumLeaf (.branch 15 (.cliqueLeaf [[1, 4], [7, 10], [12]]) (.branch 21 (.cliqueLeaf [[1, 4], [7, 10], [16]]) (.branch 12 (.cliqueLeaf [[1, 4], [7, 10], [22, 23]]) (.branch 22 (.cliqueLeaf [[1, 4], [7, 10], [17]]) (.branch 1 (.branch 16 (.cliqueLeaf [[7], [17, 23]]) (.cliqueLeaf [[7], [17, 19], [20, 23]])) (.branch 7 (.cliqueLeaf [[16, 19], [17, 23], [20]]) (.branch 16 (.cliqueLeaf [[4], [10], [17, 23]]) (.cliqueLeaf [[4], [10], [17, 19], [20, 23]])))))))))))))))) def r27Vecs : Fin 27 → Fin 5 → ℤ := ![![1, 1, 0, 0, 0], ![1, 1, -1, 0, 0], ![1, 0, 1, 0, 0], ![1, 0, 0, 0, 0], ![1, -1, 0, 0, 0], ![1, -1, -1, 0, 0], ![0, 1, 1, 1, 0], ![0, 1, 1, 0, 0], ![0, 1, 1, -1, 0], ![0, 1, 0, 1, 0], ![0, 1, 0, -1, 0], ![0, 1, -1, 1, 0], ![0, 1, -1, 0, 0], ![0, 1, -1, -1, 0], ![0, 0, 1, 1, 0], ![0, 0, 1, 0, 0], ![0, 0, 1, -1, 0], ![0, 0, 0, 1, 0], ![0, 0, 0, 0, 1], ![0, 0, 1, 0, 1], ![0, 0, 1, 0, -1], ![0, 0, 0, 1, 1], ![0, 0, 0, 1, -1], ![0, 0, 1, 1, 1], ![0, 0, 1, 1, -1], ![0, 0, 1, -1, 1], ![0, 0, 1, -1, -1]] def r27Weights : Fin 27 → ℕ := ![21, 5, 5, 32, 21, 5, 8, 13, 8, 11, 11, 8, 13, 8, 6, 6, 6, 9, 23, 12, 12, 14, 14, 7, 7, 7, 7] def r27IndTree : BBTree 27 := (.branch 3 (.branch 0 (.cliqueLeaf [[1, 2]]) (.cliqueLeaf [[4, 1], [2, 5]])) (.branch 18 (.branch 21 (.branch 19 .sumLeaf (.cliqueLeaf [[20, 23], [26]])) (.branch 19 (.cliqueLeaf [[22, 23], [25]]) (.branch 22 (.cliqueLeaf [[20, 25], [24]]) (.cliqueLeaf [[20, 23], [24], [25], [26]])))) (.branch 0 (.branch 7 (.branch 9 .sumLeaf (.cliqueLeaf [[10, 6], [8], [2]])) (.branch 9 (.cliqueLeaf [[12, 6], [11], [1]]) (.branch 10 (.cliqueLeaf [[12, 8], [13], [1]]) (.branch 1 .sumLeaf (.branch 12 .sumLeaf .sumLeaf))))) (.branch 4 (.branch 12 (.branch 9 .sumLeaf (.cliqueLeaf [[10, 11], [13], [2]])) (.branch 9 (.cliqueLeaf [[7, 11], [6], [5]]) (.branch 10 (.cliqueLeaf [[7, 13], [8], [5]]) (.branch 5 .sumLeaf (.branch 7 .sumLeaf .sumLeaf))))) (.branch 21 (.branch 19 (.cliqueLeaf [[6, 16], [8, 23], [11, 14], [13]]) (.branch 20 (.cliqueLeaf [[6, 26], [8, 14], [11], [13, 16]]) (.branch 14 (.branch 9 .sumLeaf (.cliqueLeaf [[10, 6], [17], [13], [23]])) (.branch 9 (.cliqueLeaf [[17], [6, 26], [11, 23], [16]]) (.branch 6 (.cliqueLeaf [[17], [8, 23], [11], [13]]) (.cliqueLeaf [[10, 11], [17], [8, 23], [13, 26], [16]])))))) (.branch 22 (.branch 19 (.cliqueLeaf [[6, 25], [8, 14], [11], [13, 16]]) (.branch 20 (.cliqueLeaf [[6, 16], [8, 24], [11, 14], [13]]) (.branch 14 (.branch 9 .sumLeaf (.cliqueLeaf [[10, 6], [17], [13], [24]])) (.branch 9 (.cliqueLeaf [[17], [6, 25], [11, 24], [16]]) (.branch 6 (.cliqueLeaf [[17], [8, 24], [11], [13]]) (.cliqueLeaf [[10, 11], [17], [8, 24], [13, 25], [16]])))))) (.branch 17 (.cliqueLeaf [[9, 10], [6, 25], [8, 23], [11, 24], [13, 26], [14, 16]]) (.branch 9 (.branch 6 (.cliqueLeaf [[7, 11], [23], [24], [14], [5]]) (.branch 11 .sumLeaf (.branch 14 (.cliqueLeaf [[7, 12], [23], [24], [1], [5]]) (.branch 7 (.cliqueLeaf [[23, 16], [24], [25], [26], [5]]) (.cliqueLeaf [[12, 5], [23, 16], [24], [25], [26], [1]]))))) (.branch 10 (.branch 8 (.cliqueLeaf [[7, 13], [25], [26], [16], [5]]) (.branch 13 .sumLeaf (.branch 14 (.cliqueLeaf [[7, 12], [23], [24], [1], [5]]) (.branch 7 (.cliqueLeaf [[23, 16], [24], [25], [26], [5]]) (.cliqueLeaf [[12, 5], [23, 16], [24], [25], [26], [1]]))))) (.branch 6 (.branch 11 (.cliqueLeaf [[19, 20], [8], [13], [15], [2]]) (.branch 8 (.cliqueLeaf [[7, 13], [19, 20], [15], [2, 5]]) (.branch 19 (.cliqueLeaf [[7, 13], [23], [14], [15], [2, 5]]) (.cliqueLeaf [[7, 13], [20, 23], [24], [14], [15], [2, 5]])))) (.branch 8 (.branch 13 (.cliqueLeaf [[19, 20], [11], [15], [2]]) (.branch 19 (.cliqueLeaf [[7, 11], [25], [15], [16], [2, 5]]) (.cliqueLeaf [[7, 11], [20, 25], [26], [15], [16], [2, 5]]))) (.branch 11 (.branch 13 (.cliqueLeaf [[12], [19, 20], [15], [1, 2]]) (.branch 19 (.cliqueLeaf [[12], [25], [15], [16], [1, 2]]) (.cliqueLeaf [[12], [20, 25], [26], [15], [16], [1, 2]]))) (.branch 13 (.branch 19 (.cliqueLeaf [[12], [23], [14], [15], [1, 2]]) (.cliqueLeaf [[12], [20, 23], [24], [14], [15], [1, 2]])) (.branch 19 (.cliqueLeaf [[7, 12], [23, 16], [25, 14], [15], [1, 2], [5]]) (.branch 14 (.cliqueLeaf [[7, 12], [20, 23], [24], [15], [1, 2], [5]]) (.branch 7 (.cliqueLeaf [[20, 23], [24, 16], [25], [26], [15], [2, 5]]) (.cliqueLeaf [[12, 5], [20, 23], [24, 16], [25], [26], [15], [1, 2]]))))))))))))))))) def r27SpanEdges : List (Fin 27 × Fin 27) := [(0, 1), (0, 2), (0, 3), (0, 6), (0, 7), (0, 8), (0, 9), (0, 10), (0, 11), (0, 12), (0, 13), (1, 5), (1, 14), (1, 15), (1, 16), (1, 19), (1, 20), (1, 23), (1, 24), (1, 25), (1, 26), (2, 4), (6, 17), (6, 21), (6, 22), (19, 18)] def r27KSCol : List (Fin 27) := [18, 19, 21] def r27KSTree : BBTree 27 := (.branch 2 (.cliqueLeaf [[1, 5, 9], [10, 17, 22]]) (.branch 1 (.cliqueLeaf [[4, 6, 7, 8], [17, 22]]) (.branch 5 (.cliqueLeaf [[0, 11, 12, 13], [17, 22]]) (.branch 6 (.cliqueLeaf [[3], [10, 12, 16, 25, 26]]) (.branch 10 (.cliqueLeaf [[3], [9, 11], [15, 20]]) (.branch 9 (.cliqueLeaf [[3], [8, 13, 15, 20]]) (.branch 8 (.cliqueLeaf [[3], [12, 14, 23, 24]]) (.branch 12 (.cliqueLeaf [[3], [7], [17, 22]]) (.branch 7 (.cliqueLeaf [[3], [11, 13, 17, 22]]) (.branch 11 (.cliqueLeaf [[3], [14, 23, 24]]) (.branch 13 (.cliqueLeaf [[3], [16, 25, 26]]) (.branch 24 (.cliqueLeaf [[0, 3], [4], [16]]) (.branch 15 (.cliqueLeaf [[0, 3], [4], [17, 22]]) (.branch 17 (.cliqueLeaf [[0, 3], [4], [20]]) (.branch 16 (.cliqueLeaf [[0, 3], [4], [14, 23]]) (.cliqueLeaf [[0, 3], [4], [14, 20, 22], [23, 25, 26]])))))))))))))))) def r29Vecs : Fin 29 → Fin 6 → ℤ := ![![1, 1, 0, 0, 0, 0], ![1, 1, -1, 0, 0, 0], ![1, 0, 1, 0, 0, 0], ![1, 0, 0, 0, 0, 0], ![1, -1, 0, 0, 0, 0], ![1, -1, -1, 0, 0, 0], ![0, 1, 1, 1, 0, 0], ![0, 1, 1, 0, 0, 0], ![0, 1, 1, -1, 0, 0], ![0, 1, 0, 1, 0, 0], ![0, 1, 0, -1, 0, 0], ![0, 1, -1, 1, 0, 0], ![0, 1, -1, 0, 0, 0], ![0, 1, -1, -1, 0, 0], ![0, 0, 1, 1, 0, 0], ![0, 0, 1, 0, 0, 0], ![0, 0, 1, -1, 0, 0], ![0, 0, 0, 0, 1, 0], ![0, 0, 0, 0, 0, 1], ![0, 0, 0, 1, 1, 0], ![0, 0, 0, 1, -1, 0], ![0, 0, 0, 1, 0, 1], ![0, 0, 0, 1, 0, -1], ![0, 0, 0, 0, 1, 1], ![0, 0, 0, 0, 1, -1], ![0, 0, 0, 1, 1, 1], ![0, 0, 0, 1, 1, -1], ![0, 0, 0, 1, -1, 1], ![0, 0, 0, 1, -1, -1]] def r29Weights : Fin 29 → ℕ := ![9, 3, 3, 17, 9, 3, 4, 7, 4, 6, 6, 4, 7, 4, 6, 9, 6, 11, 11, 4, 4, 4, 4, 11, 11, 3, 3, 3, 3] def r29IndTree : BBTree 29 := (.branch 3 (.branch 0 (.cliqueLeaf [[1, 2]]) (.cliqueLeaf [[4, 1], [2, 5]])) (.branch 17 (.branch 23 (.branch 19 .sumLeaf (.cliqueLeaf [[20, 25], [28]])) (.branch 19 (.cliqueLeaf [[24, 25], [26]]) (.branch 24 (.cliqueLeaf [[20, 26], [27]]) .sumLeaf))) (.branch 23 (.branch 19 .sumLeaf (.branch 20 .sumLeaf (.branch 21 .sumLeaf (.cliqueLeaf [[18], [22, 25], [28]])))) (.branch 18 (.branch 21 (.cliqueLeaf [[24, 25], [27]]) (.branch 24 (.cliqueLeaf [[22, 27], [26]]) .sumLeaf)) (.branch 24 (.cliqueLeaf [[19, 20], [21, 22], [26], [27]]) (.branch 0 (.branch 7 (.branch 9 .sumLeaf (.cliqueLeaf [[10, 6], [8], [2]])) (.branch 9 (.cliqueLeaf [[12, 6], [11], [1]]) (.branch 10 (.cliqueLeaf [[12, 8], [13], [1]]) (.branch 1 .sumLeaf (.branch 12 .sumLeaf .sumLeaf))))) (.branch 1 (.branch 9 (.cliqueLeaf [[12, 5], [14, 16], [11]]) (.branch 11 (.cliqueLeaf [[15], [12], [16, 13]]) (.cliqueLeaf [[15, 10], [12, 5], [14, 16], [13]]))) (.branch 12 (.branch 9 (.cliqueLeaf [[4, 14, 16], [11]]) (.branch 4 (.cliqueLeaf [[10, 11], [13], [2]]) (.branch 10 .sumLeaf (.branch 14 .sumLeaf (.cliqueLeaf [[15], [16, 13], [11], [2]]))))) (.branch 4 (.branch 9 (.cliqueLeaf [[7, 11], [6], [5]]) (.branch 10 (.cliqueLeaf [[7, 13], [8], [5]]) (.branch 5 .sumLeaf (.branch 7 .sumLeaf .sumLeaf)))) (.branch 2 (.branch 14 (.cliqueLeaf [[15], [7, 13], [6]]) (.branch 7 (.cliqueLeaf [[15], [16, 6], [8]]) (.branch 16 .sumLeaf .sumLeaf))) (.branch 15 (.branch 14 (.cliqueLeaf [[7, 13], [6], [5]]) (.branch 13 .sumLeaf (.cliqueLeaf [[7, 11], [16, 6], [8], [5]]))) (.branch 7 (.branch 9 (.cliqueLeaf [[14, 16], [6], [5]]) (.cliqueLeaf [[10, 6], [14, 16], [8], [5]])) (.branch 5 (.cliqueLeaf [[9, 10], [14, 16], [6], [8]]) (.branch 9 (.branch 19 (.branch 14 (.branch 21 .sumLeaf (.cliqueLeaf [[6], [22, 25], [26]])) (.branch 21 (.cliqueLeaf [[16, 6], [11], [25]]) (.cliqueLeaf [[16, 6], [11], [22, 25], [26]]))) (.branch 21 (.branch 14 (.cliqueLeaf [[6], [20, 25], [27]]) (.cliqueLeaf [[16, 6], [11], [20, 25], [27]])) (.branch 14 (.branch 20 (.cliqueLeaf [[6], [22, 27], [28]]) (.cliqueLeaf [[6], [22, 25], [26], [27], [28]])) (.branch 20 (.cliqueLeaf [[16, 6], [11], [22, 27], [28]]) (.cliqueLeaf [[16, 6], [11], [22, 25], [26], [27], [28]]))))) (.branch 14 (.branch 19 (.branch 21 (.cliqueLeaf [[10, 6], [13], [25]]) (.cliqueLeaf [[10, 6], [13], [22, 25], [26]])) (.branch 21 (.cliqueLeaf [[10, 6], [13], [20, 25], [27]]) (.branch 20 (.cliqueLeaf [[10, 6], [13], [22, 27], [28]]) (.cliqueLeaf [[10, 6], [13], [22, 25], [26], [27], [28]])))) (.branch 19 (.branch 10 (.branch 21 (.cliqueLeaf [[16, 13], [8], [25]]) (.cliqueLeaf [[16, 13], [8], [22, 25], [26]])) (.branch 16 (.cliqueLeaf [[8], [11], [21, 22], [25], [26]]) (.branch 21 .sumLeaf (.cliqueLeaf [[6], [8], [11], [13], [22, 25], [26]])))) (.branch 21 (.branch 10 (.cliqueLeaf [[16, 13], [8], [20, 25], [27]]) (.cliqueLeaf [[16, 6], [8], [11], [13], [20, 25], [27]])) (.branch 10 (.branch 20 (.cliqueLeaf [[16, 13], [8], [22, 27], [28]]) (.cliqueLeaf [[16, 13], [8], [22, 25], [26], [27], [28]])) (.branch 16 (.cliqueLeaf [[8], [11], [20, 25], [22, 27], [26], [28]]) (.branch 20 (.cliqueLeaf [[6], [8], [11], [13], [22, 27], [28]]) (.cliqueLeaf [[6], [8], [11], [13], [22, 25], [26], [27], [28]]))))))))))))))))))))) def r29SpanEdges : List (Fin 29 × Fin 29) := [(0, 1), (0, 2), (0, 3), (0, 6), (0, 7), (0, 8), (0, 9), (0, 10), (0, 11), (0, 12), (0, 13), (1, 5), (1, 14), (1, 15), (1, 16), (2, 4), (6, 19), (6, 20), (6, 21), (6, 22), (6, 25), (6, 26), (6, 27), (6, 28), (19, 17), (19, 23), (19, 24), (21, 18)] def r29KSCol : List (Fin 29) := [18, 22, 24] def r29KSTree : BBTree 29 := (.branch 6 (.cliqueLeaf [[1, 3], [10, 12, 16], [17, 23]]) (.branch 8 (.cliqueLeaf [[1, 3], [9, 12, 14], [17, 23]]) (.branch 9 (.cliqueLeaf [[2, 3], [10, 13], [15], [17, 23]]) (.branch 10 (.cliqueLeaf [[2, 3], [11, 15], [17, 23]]) (.branch 11 (.cliqueLeaf [[3, 5], [7, 14], [17, 23]]) (.branch 13 (.cliqueLeaf [[3, 5], [7, 16], [17, 23]]) (.branch 14 (.cliqueLeaf [[0, 3], [4], [16], [17, 23]]) (.branch 16 (.cliqueLeaf [[0, 3], [4], [17, 23]]) (.branch 17 (.branch 2 .sumLeaf (.cliqueLeaf [[0, 1, 3], [4, 5, 7], [12, 15], [21]])) (.branch 2 (.cliqueLeaf [[1, 5], [19, 21, 23, 25], [20, 27, 28], [26]]) (.branch 25 (.cliqueLeaf [[0, 1, 3], [4, 5, 7], [12, 15], [20]]) (.branch 1 (.cliqueLeaf [[4, 7], [19, 21, 23], [20, 27, 28], [26]]) (.branch 4 (.branch 20 (.cliqueLeaf [[0], [15], [19, 26]]) (.cliqueLeaf [[0], [15], [19, 21, 23], [26, 27, 28]])) (.branch 20 (.cliqueLeaf [[0, 3], [5, 7, 15], [12], [19, 26]]) (.cliqueLeaf [[0, 3], [5, 7, 15], [12], [19, 21, 23], [26, 27, 28]]))))))))))))))) def ks18Cfg : IntRayConfig 4 18 := ⟨ks18Vecs, by decide⟩ def yuoh13Cfg : IntRayConfig 3 13 := ⟨yuoh13Vecs, by decide⟩ def sub17Cfg : IntRayConfig 4 17 := ⟨sub17Vecs, by decide⟩ def r18Cfg : IntRayConfig 4 18 := ⟨r18Vecs, by decide⟩ def union22Cfg : IntRayConfig 4 22 := ⟨union22Vecs, by decide⟩ def u24Cfg : IntRayConfig 5 24 := ⟨u24Vecs, by decide⟩ def r27Cfg : IntRayConfig 5 27 := ⟨r27Vecs, by decide⟩ def r29Cfg : IntRayConfig 6 29 := ⟨r29Vecs, by decide⟩ /-! ### 6.1 KS-18 (`d = 4`, Tier 4 — Kochen-Specker Uncolorable via 9-Basis Parity Proof) -/ def ks18Bases : Fin 9 → Finset (Fin 18) := ![{0, 1, 10, 11}, {0, 2, 8, 9}, {1, 2, 5, 6}, {3, 10, 15, 16}, {3, 11, 14, 17}, {4, 8, 13, 14}, {4, 9, 12, 15}, {5, 7, 13, 17}, {6, 7, 12, 16}] theorem ks18_tier4 : ks18Cfg.toRayConfig.IsTier4_KSUncolorable ∧ ks18Cfg.toRayConfig.IsIrreducible := by refine ⟨?_, int_irreducible_of_edges (by omega) ks18Cfg ks18SpanEdges (by decide) (by decide)⟩ rintro ⟨I, hIndep, hHit⟩ -- Every basis B_k is a valid orthogonal 4-clique have hBasis : ∀ k : Fin 9, ks18Cfg.toRayConfig.IsBasis (ks18Bases k) := by intro k refine ⟨by fin_cases k <;> decide, fun a ha b hb hab => ks18Cfg.orthBool_sound ?_⟩ have hall : ∀ (k : Fin 9) (a b : Fin 18), a ∈ ks18Bases k → b ∈ ks18Bases k → a ≠ b → ks18Cfg.orthBool a b = true := by decide exact hall k a b ha hb hab -- For each basis k, |I ∩ B_k| = 1 (≥ 1 by KS coloring, ≤ 1 by independence) have hcard1 : ∀ k : Fin 9, (I ∩ ks18Bases k).card = 1 := by intro k have hge : 1 ≤ (I ∩ ks18Bases k).card := Finset.one_le_card.mpr (hHit (ks18Bases k) (hBasis k)) have hle : (I ∩ ks18Bases k).card ≤ 1 := by rw [Finset.card_le_one] intro a ha b hb by_contra hab exact hIndep a (Finset.mem_inter.mp ha).1 b (Finset.mem_inter.mp hb).1 ((hBasis k).2 a (Finset.mem_inter.mp ha).2 b (Finset.mem_inter.mp hb).2 hab) omega -- Double-count pairs (i ∈ I, k : Fin 9 with i ∈ B_k): -- Summing over k gives 9; summing over i ∈ I gives 2 * |I| (every ray lies in exactly 2 bases)! have hdeg2 : ∀ i : Fin 18, (Finset.univ.filter (fun k : Fin 9 => i ∈ ks18Bases k)).card = 2 := by decide have hdouble : ∑ k : Fin 9, (I ∩ ks18Bases k).card = ∑ i ∈ I, (Finset.univ.filter (fun k : Fin 9 => i ∈ ks18Bases k)).card := by have hL : ∀ k : Fin 9, (I ∩ ks18Bases k).card = ∑ i ∈ I, if i ∈ ks18Bases k then 1 else 0 := by intro k rw [← Finset.sum_filter] have hflt : I.filter (fun i => i ∈ ks18Bases k) = I ∩ ks18Bases k := by ext x; simp rw [hflt, Finset.sum_const, smul_eq_mul, mul_one] have hR : ∀ i : Fin 18, (Finset.univ.filter (fun k : Fin 9 => i ∈ ks18Bases k)).card = ∑ k : Fin 9, if i ∈ ks18Bases k then 1 else 0 := by intro i; rw [← Finset.sum_filter, Finset.sum_const, smul_eq_mul, mul_one] simp_rw [hL, hR] exact Finset.sum_comm simp_rw [hcard1, hdeg2] at hdouble simp only [Finset.sum_const, Finset.card_univ, Fintype.card_fin, smul_eq_mul, mul_one] at hdouble omega /-! ### 6.2 Tier 3 \ Tier 4 Witnesses (`d = 3, 4, 5`: Yu-Oh-13, `union22`, `u24`) -/ theorem yuoh13_tier3_not_tier4 : yuoh13Cfg.toRayConfig.IsTier3_TightFrame ∧ ¬ yuoh13Cfg.toRayConfig.IsTier4_KSUncolorable ∧ yuoh13Cfg.toRayConfig.IsIrreducible := by refine ⟨?_, ?_, int_irreducible_of_edges (by omega) yuoh13Cfg yuoh13SpanEdges (by decide) (by decide)⟩ · refine ⟨fun i => (yuoh13Weights i : ℝ), (11 : ℝ), ((140 : ℤ) : ℝ) / 12, fun i => Nat.cast_nonneg _, int_weight_bound_of_checkBB yuoh13Cfg yuoh13Weights 11 yuoh13IndTree (by decide), by norm_num, yuoh13Cfg.tightFrame_of_decideZ12 yuoh13Weights 140 (by decide) (by decide)⟩ · exact int_not_tier4_of_checkBB (by omega) yuoh13Cfg yuoh13KSCol yuoh13KSTree (by decide) (by decide) theorem union22_tier3_not_tier4 : union22Cfg.toRayConfig.IsTier3_TightFrame ∧ ¬ union22Cfg.toRayConfig.IsTier4_KSUncolorable ∧ union22Cfg.toRayConfig.IsIrreducible := by refine ⟨?_, ?_, int_irreducible_of_edges (by omega) union22Cfg union22SpanEdges (by decide) (by decide)⟩ · refine ⟨fun i => (union22Weights i : ℝ), (21 : ℝ), ((264 : ℤ) : ℝ) / 12, fun i => Nat.cast_nonneg _, int_weight_bound_of_checkBB union22Cfg union22Weights 21 union22IndTree (by decide), by norm_num, union22Cfg.tightFrame_of_decideZ12 union22Weights 264 (by decide) (by decide)⟩ · exact int_not_tier4_of_checkBB (by omega) union22Cfg union22KSCol union22KSTree (by decide) (by decide) theorem u24_tier3_not_tier4 : u24Cfg.toRayConfig.IsTier3_TightFrame ∧ ¬ u24Cfg.toRayConfig.IsTier4_KSUncolorable ∧ u24Cfg.toRayConfig.IsIrreducible := by refine ⟨?_, ?_, int_irreducible_of_edges (by omega) u24Cfg u24SpanEdges (by decide) (by decide)⟩ · refine ⟨fun i => (u24Weights i : ℝ), (24 : ℝ), ((300 : ℤ) : ℝ) / 12, fun i => Nat.cast_nonneg _, int_weight_bound_of_checkBB u24Cfg u24Weights 24 u24IndTree (by decide), by norm_num, u24Cfg.tightFrame_of_decideZ12 u24Weights 300 (by decide) (by decide)⟩ · exact int_not_tier4_of_checkBB (by omega) u24Cfg u24KSCol u24KSTree (by decide) (by decide) /-! ### 6.3 Flagship Novel Tier 2 \ Tier 3 Witnesses (`d = 4, 5, 6`: `R18`, `R27`, `R29`) -/ def r18OpZ12 : Fin 4 → Fin 4 → ℤ | 0, 0 => 232 | 0, 2 => -4 | 2, 0 => -4 | 1, 1 => 232 | 2, 2 => 244 | 3, 3 => 240 | _, _ => 0 /-- **Flagship Discovery (`R18` in `ℝ^4`)**: An explicit 18-ray irreducible `{0, ±1}^4` ray configuration that is strictly All-State Operator SI-C (Tier 2, `∑ w_i P_i ≽ (19 + 1/6) I_4` with `α(G, w) ≤ 19`) yet admits NO tight-frame / constant-value SI-C witness (`¬ Tier 3`), obstructed by the 2-MIS indefinite pseudo-state `Y = E_{00} + (1/2)(E_{02} + E_{20})`. -/ theorem r18_tier2_not_tier3 : r18Cfg.toRayConfig.IsTier2_AllStateOperator ∧ ¬ r18Cfg.toRayConfig.IsTier3_TightFrame ∧ r18Cfg.toRayConfig.IsIrreducible := by refine ⟨?_, ?_, int_irreducible_of_edges (by omega) r18Cfg r18SpanEdges (by decide) (by decide)⟩ · refine ⟨fun i => (r18Weights i : ℝ), (19 : ℝ), (1 / 6 : ℝ), fun i => Nat.cast_nonneg _, by norm_num, int_weight_bound_of_checkBB r18Cfg r18Weights 19 r18IndTree (by decide), ?_⟩ intro ψ rw [r18Cfg.sum_projVal_eq_quadZ12 r18Weights r18OpZ12 (by decide) (by decide) ψ] simp only [Fin.sum_univ_four, normSq, r18OpZ12] have hdiff : (((232 : ℤ) : ℝ) * ψ 0 * ψ 0 + ((0 : ℤ) : ℝ) * ψ 0 * ψ 1 + ((-4 : ℤ) : ℝ) * ψ 0 * ψ 2 + ((0 : ℤ) : ℝ) * ψ 0 * ψ 3 + (((0 : ℤ) : ℝ) * ψ 1 * ψ 0 + ((232 : ℤ) : ℝ) * ψ 1 * ψ 1 + ((0 : ℤ) : ℝ) * ψ 1 * ψ 2 + ((0 : ℤ) : ℝ) * ψ 1 * ψ 3) + (((-4 : ℤ) : ℝ) * ψ 2 * ψ 0 + ((0 : ℤ) : ℝ) * ψ 2 * ψ 1 + ((244 : ℤ) : ℝ) * ψ 2 * ψ 2 + ((0 : ℤ) : ℝ) * ψ 2 * ψ 3) + (((0 : ℤ) : ℝ) * ψ 3 * ψ 0 + ((0 : ℤ) : ℝ) * ψ 3 * ψ 1 + ((0 : ℤ) : ℝ) * ψ 3 * ψ 2 + ((240 : ℤ) : ℝ) * ψ 3 * ψ 3)) / 12 - (19 + 1 / 6) * (ψ 0 ^ 2 + ψ 1 ^ 2 + ψ 2 ^ 2 + ψ 3 ^ 2) = (1 / 6) * (ψ 0 - 2 * ψ 2) ^ 2 + (1 / 6) * ψ 1 ^ 2 + (1 / 2) * ψ 2 ^ 2 + (5 / 6) * ψ 3 ^ 2 := by push_cast; ring have hnn : (0 : ℝ) ≤ (1 / 6) * (ψ 0 - 2 * ψ 2) ^ 2 + (1 / 6) * ψ 1 ^ 2 + (1 / 2) * ψ 2 ^ 2 + (5 / 6) * ψ 3 ^ 2 := by positivity linarith · exact int_no_tier3_of_canonical_Y (by omega) r18Cfg {0, 2, 3} {2, 3, 4} (by decide) (by decide) (by decide) def r27OpZ12 : Fin 5 → Fin 5 → ℤ | 0, 0 => 706 | 0, 2 => -10 | 2, 0 => -10 | 1, 1 => 708 | 2, 2 => 754 | 3, 3 => 720 | 4, 4 => 700 | _, _ => 0 /-- **5D Irreducible Tier 2 \ Tier 3 Witness (`R27` in `ℝ^5`)**: 27 rays in `{0, ±1}^5` with `∑ w_i P_i ≽ (58 + 1/4) I_5`, `α(G, w) ≤ 58`, and no tight frame. -/ theorem r27_tier2_not_tier3 : r27Cfg.toRayConfig.IsTier2_AllStateOperator ∧ ¬ r27Cfg.toRayConfig.IsTier3_TightFrame ∧ r27Cfg.toRayConfig.IsIrreducible := by refine ⟨?_, ?_, int_irreducible_of_edges (by omega) r27Cfg r27SpanEdges (by decide) (by decide)⟩ · refine ⟨fun i => (r27Weights i : ℝ), (58 : ℝ), (1 / 4 : ℝ), fun i => Nat.cast_nonneg _, by norm_num, int_weight_bound_of_checkBB r27Cfg r27Weights 58 r27IndTree (by decide), ?_⟩ intro ψ rw [r27Cfg.sum_projVal_eq_quadZ12 r27Weights r27OpZ12 (by decide) (by decide) ψ] simp only [Fin.sum_univ_five, normSq, r27OpZ12] have hdiff : (((706 : ℤ) : ℝ) * ψ 0 * ψ 0 + ((0 : ℤ) : ℝ) * ψ 0 * ψ 1 + ((-10 : ℤ) : ℝ) * ψ 0 * ψ 2 + ((0 : ℤ) : ℝ) * ψ 0 * ψ 3 + ((0 : ℤ) : ℝ) * ψ 0 * ψ 4 + (((0 : ℤ) : ℝ) * ψ 1 * ψ 0 + ((708 : ℤ) : ℝ) * ψ 1 * ψ 1 + ((0 : ℤ) : ℝ) * ψ 1 * ψ 2 + ((0 : ℤ) : ℝ) * ψ 1 * ψ 3 + ((0 : ℤ) : ℝ) * ψ 1 * ψ 4) + (((-10 : ℤ) : ℝ) * ψ 2 * ψ 0 + ((0 : ℤ) : ℝ) * ψ 2 * ψ 1 + ((754 : ℤ) : ℝ) * ψ 2 * ψ 2 + ((0 : ℤ) : ℝ) * ψ 2 * ψ 3 + ((0 : ℤ) : ℝ) * ψ 2 * ψ 4) + (((0 : ℤ) : ℝ) * ψ 3 * ψ 0 + ((0 : ℤ) : ℝ) * ψ 3 * ψ 1 + ((0 : ℤ) : ℝ) * ψ 3 * ψ 2 + ((720 : ℤ) : ℝ) * ψ 3 * ψ 3 + ((0 : ℤ) : ℝ) * ψ 3 * ψ 4) + (((0 : ℤ) : ℝ) * ψ 4 * ψ 0 + ((0 : ℤ) : ℝ) * ψ 4 * ψ 1 + ((0 : ℤ) : ℝ) * ψ 4 * ψ 2 + ((0 : ℤ) : ℝ) * ψ 4 * ψ 3 + ((700 : ℤ) : ℝ) * ψ 4 * ψ 4)) / 12 - (58 + 1 / 4) * (ψ 0 ^ 2 + ψ 1 ^ 2 + ψ 2 ^ 2 + ψ 3 ^ 2 + ψ 4 ^ 2) = (7 / 12) * (ψ 0 - (10 / 7) * ψ 2) ^ 2 + (3 / 4) * ψ 1 ^ 2 + (95 / 28) * ψ 2 ^ 2 + (7 / 4) * ψ 3 ^ 2 + (1 / 12) * ψ 4 ^ 2 := by push_cast; ring have hnn : (0 : ℝ) ≤ (7 / 12) * (ψ 0 - (10 / 7) * ψ 2) ^ 2 + (3 / 4) * ψ 1 ^ 2 + (95 / 28) * ψ 2 ^ 2 + (7 / 4) * ψ 3 ^ 2 + (1 / 12) * ψ 4 ^ 2 := by positivity linarith · exact int_no_tier3_of_canonical_Y (by omega) r27Cfg {0, 2, 3} {2, 3, 4} (by decide) (by decide) (by decide) def r29OpZ12 : Fin 6 → Fin 6 → ℤ | 0, 0 => 354 | 0, 2 => -6 | 2, 0 => -6 | 1, 1 => 352 | 2, 2 => 370 | 3, 3 => 352 | 4, 4 => 360 | 5, 5 => 360 | _, _ => 0 /-- **6D Irreducible Tier 2 \ Tier 3 Witness (`R29` in `ℝ^6`)**: 29 rays in `{0, ±1}^6` with `∑ w_i P_i ≽ (29 + 1/4) I_6`, `α(G, w) ≤ 29`, and no tight frame. -/ theorem r29_tier2_not_tier3 : r29Cfg.toRayConfig.IsTier2_AllStateOperator ∧ ¬ r29Cfg.toRayConfig.IsTier3_TightFrame ∧ r29Cfg.toRayConfig.IsIrreducible := by refine ⟨?_, ?_, int_irreducible_of_edges (by omega) r29Cfg r29SpanEdges (by decide) (by decide)⟩ · refine ⟨fun i => (r29Weights i : ℝ), (29 : ℝ), (1 / 4 : ℝ), fun i => Nat.cast_nonneg _, by norm_num, int_weight_bound_of_checkBB r29Cfg r29Weights 29 r29IndTree (by decide), ?_⟩ intro ψ rw [r29Cfg.sum_projVal_eq_quadZ12 r29Weights r29OpZ12 (by decide) (by decide) ψ] simp only [Fin.sum_univ_six, normSq, r29OpZ12] have hdiff : (((354 : ℤ) : ℝ) * ψ 0 * ψ 0 + ((0 : ℤ) : ℝ) * ψ 0 * ψ 1 + ((-6 : ℤ) : ℝ) * ψ 0 * ψ 2 + ((0 : ℤ) : ℝ) * ψ 0 * ψ 3 + ((0 : ℤ) : ℝ) * ψ 0 * ψ 4 + ((0 : ℤ) : ℝ) * ψ 0 * ψ 5 + (((0 : ℤ) : ℝ) * ψ 1 * ψ 0 + ((352 : ℤ) : ℝ) * ψ 1 * ψ 1 + ((0 : ℤ) : ℝ) * ψ 1 * ψ 2 + ((0 : ℤ) : ℝ) * ψ 1 * ψ 3 + ((0 : ℤ) : ℝ) * ψ 1 * ψ 4 + ((0 : ℤ) : ℝ) * ψ 1 * ψ 5) + (((-6 : ℤ) : ℝ) * ψ 2 * ψ 0 + ((0 : ℤ) : ℝ) * ψ 2 * ψ 1 + ((370 : ℤ) : ℝ) * ψ 2 * ψ 2 + ((0 : ℤ) : ℝ) * ψ 2 * ψ 3 + ((0 : ℤ) : ℝ) * ψ 2 * ψ 4 + ((0 : ℤ) : ℝ) * ψ 2 * ψ 5) + (((0 : ℤ) : ℝ) * ψ 3 * ψ 0 + ((0 : ℤ) : ℝ) * ψ 3 * ψ 1 + ((0 : ℤ) : ℝ) * ψ 3 * ψ 2 + ((352 : ℤ) : ℝ) * ψ 3 * ψ 3 + ((0 : ℤ) : ℝ) * ψ 3 * ψ 4 + ((0 : ℤ) : ℝ) * ψ 3 * ψ 5) + (((0 : ℤ) : ℝ) * ψ 4 * ψ 0 + ((0 : ℤ) : ℝ) * ψ 4 * ψ 1 + ((0 : ℤ) : ℝ) * ψ 4 * ψ 2 + ((0 : ℤ) : ℝ) * ψ 4 * ψ 3 + ((360 : ℤ) : ℝ) * ψ 4 * ψ 4 + ((0 : ℤ) : ℝ) * ψ 4 * ψ 5) + (((0 : ℤ) : ℝ) * ψ 5 * ψ 0 + ((0 : ℤ) : ℝ) * ψ 5 * ψ 1 + ((0 : ℤ) : ℝ) * ψ 5 * ψ 2 + ((0 : ℤ) : ℝ) * ψ 5 * ψ 3 + ((0 : ℤ) : ℝ) * ψ 5 * ψ 4 + ((360 : ℤ) : ℝ) * ψ 5 * ψ 5)) / 12 - (29 + 1 / 4) * (ψ 0 ^ 2 + ψ 1 ^ 2 + ψ 2 ^ 2 + ψ 3 ^ 2 + ψ 4 ^ 2 + ψ 5 ^ 2) = (1 / 4) * (ψ 0 - 2 * ψ 2) ^ 2 + (1 / 12) * ψ 1 ^ 2 + (7 / 12) * ψ 2 ^ 2 + (1 / 12) * ψ 3 ^ 2 + (3 / 4) * ψ 4 ^ 2 + (3 / 4) * ψ 5 ^ 2 := by push_cast; ring have hnn : (0 : ℝ) ≤ (1 / 4) * (ψ 0 - 2 * ψ 2) ^ 2 + (1 / 12) * ψ 1 ^ 2 + (7 / 12) * ψ 2 ^ 2 + (1 / 12) * ψ 3 ^ 2 + (3 / 4) * ψ 4 ^ 2 + (3 / 4) * ψ 5 ^ 2 := by positivity linarith · exact int_no_tier3_of_canonical_Y (by omega) r29Cfg {0, 2, 3} {2, 3, 4} (by decide) (by decide) (by decide) /-! ### 6.4 Irreducible Tier 1 \ Tier 2 Witness (`sub17` in `ℝ^4`, strengthening CKB 2015) -/ def sub17NCHV : Fin 4 → Finset (Fin 17) := ![{1, 6, 10, 11}, {1, 4, 7, 12, 13}, {1, 4, 6, 16}, {1, 7, 14, 15}] /-- **Irreducible Tier 1 \ Tier 2 Theorem (`sub17` in `ℝ^4`)**: An explicit 17-ray IRREDUCIBLE `{0, ±1}^4` configuration with `χ_f(G) ≥ 29/7 > 4` (Tier 1) that fails All-State Operator SI-C (`¬ Tier 2`), because the pure state `ψ = e₂ = (0,0,1,0)` admits an exact equal-weight 4-MIS classical NCHV model. -/ theorem sub17_irred_tier1_not_tier2 : sub17Cfg.toRayConfig.IsTier1_FracChromatic ∧ ¬ sub17Cfg.toRayConfig.IsTier2_AllStateOperator ∧ sub17Cfg.toRayConfig.IsIrreducible := by refine ⟨?_, ?_, int_irreducible_of_edges (by omega) sub17Cfg sub17SpanEdges (by decide) (by decide)⟩ · refine ⟨fun i => (sub17Weights i : ℝ), (7 : ℝ), fun i => Nat.cast_nonneg _, by norm_num, int_weight_bound_of_checkBB sub17Cfg sub17Weights 7 sub17IndTree (by decide), ?_⟩ have hsum : (∑ i : Fin 17, sub17Weights i) = 29 := by decide have hcast : ∑ i : Fin 17, (sub17Weights i : ℝ) = (29 : ℝ) := by rw [← Nat.cast_sum, hsum]; norm_num rw [hcast]; norm_num · let ψ : Fin 4 → ℝ := ![0, 0, 1, 0] have hψ : 0 < normSq ψ := by unfold normSq; simp [Fin.sum_univ_four, ψ] have hψ1 : normSq ψ = 1 := by unfold normSq; simp [Fin.sum_univ_four, ψ] apply no_tier2_of_nchv_state sub17Cfg.toRayConfig ψ hψ sub17NCHV (fun _ => 1 / 4) · intro k a ha b hb horth have htrue : sub17Cfg.orthBool a b = true := by simp only [IntRayConfig.orthBool, Bool.and_eq_true, bne_iff_ne, beq_iff_eq] refine ⟨horth.1, ?_⟩ have h0 := horth.2 unfold dot IntRayConfig.toRayConfig at h0; dsimp only at h0 have hcast : ((intDot (sub17Cfg.ivec a) (sub17Cfg.ivec b) : ℤ) : ℝ) = 0 := by unfold intDot; push_cast; exact h0 exact Int.cast_eq_zero.mp hcast have hchk : ∀ (k : Fin 4) (a b : Fin 17), a ∈ sub17NCHV k → b ∈ sub17NCHV k → sub17Cfg.orthBool a b = false := by decide have hf := hchk k a b ha hb rw [htrue] at hf; exact Bool.noConfusion hf · intro _; norm_num · simp · intro i rw [hψ1, div_one] have hval : sub17Cfg.toRayConfig.projVal i ψ = ((sub17Cfg.ivec i 2 * sub17Cfg.ivec i 2 : ℤ) : ℝ) / (intNormSq (sub17Cfg.ivec i) : ℝ) := by unfold projVal dot IntRayConfig.toRayConfig; dsimp only have hnorm : normSq (fun k => (sub17Cfg.ivec i k : ℝ)) = (intNormSq (sub17Cfg.ivec i) : ℝ) := by unfold normSq intNormSq; push_cast refine Finset.sum_congr rfl fun k _ => sq _ rw [hnorm, Fin.sum_univ_four] simp only [ψ, Matrix.cons_val_zero, Matrix.cons_val_one, Matrix.cons_val_two, Matrix.cons_val_three, Matrix.head_cons, Matrix.tail_cons, mul_zero, mul_one, zero_add, add_zero, sq, Int.cast_mul] rw [hval] have hnpos : (0 : ℝ) < (intNormSq (sub17Cfg.ivec i) : ℝ) := by exact_mod_cast sub17Cfg.pos i rw [div_le_iff₀ hnpos] have hcovZ : ∀ i : Fin 17, 4 * (sub17Cfg.ivec i 2 * sub17Cfg.ivec i 2) ≤ (∑ k : Fin 4, if i ∈ sub17NCHV k then (1 : ℤ) else 0) * intNormSq (sub17Cfg.ivec i) := by decide have hZ : ((4 * (sub17Cfg.ivec i 2 * sub17Cfg.ivec i 2) : ℤ) : ℝ) ≤ (((∑ k : Fin 4, if i ∈ sub17NCHV k then (1 : ℤ) else 0) * intNormSq (sub17Cfg.ivec i) : ℤ) : ℝ) := by exact_mod_cast hcovZ i push_cast at hZ have hsum4 : (∑ k : Fin 4, if i ∈ sub17NCHV k then (1 / 4 : ℝ) else 0) * 4 = ∑ k : Fin 4, if i ∈ sub17NCHV k then (1 : ℝ) else 0 := by rw [Finset.sum_mul] refine Finset.sum_congr rfl fun k _ => by split_ifs <;> norm_num rw [← hsum4] at hZ push_cast linarith /-! ## Section 7: All-Dimension Master Strict-Separation Theorems -/ /-- Helper to transport a `RayConfig d₁ n` across a dimension equality `d₁ = d₂`. -/ def castDim {d₁ d₂ n : ℕ} (h : d₁ = d₂) (R : RayConfig d₁ n) : RayConfig d₂ n := h ▸ R lemma castDim_tier1 {d₁ d₂ n : ℕ} (h : d₁ = d₂) (R : RayConfig d₁ n) : (castDim h R).IsTier1_FracChromatic ↔ R.IsTier1_FracChromatic := by subst h; rfl lemma castDim_tier2 {d₁ d₂ n : ℕ} (h : d₁ = d₂) (R : RayConfig d₁ n) : (castDim h R).IsTier2_AllStateOperator ↔ R.IsTier2_AllStateOperator := by subst h; rfl lemma castDim_tier3 {d₁ d₂ n : ℕ} (h : d₁ = d₂) (R : RayConfig d₁ n) : (castDim h R).IsTier3_TightFrame ↔ R.IsTier3_TightFrame := by subst h; rfl lemma castDim_tier4 {d₁ d₂ n : ℕ} (h : d₁ = d₂) (R : RayConfig d₁ n) : (castDim h R).IsTier4_KSUncolorable ↔ R.IsTier4_KSUncolorable := by subst h; rfl /-- **Master Theorem A (Strict Separation Tier 3 \ Tier 4 in EVERY Dimension `d ≥ 3`)**: For every dimension `d ≥ 3`, there exists a finite ray configuration in `ℝ^d` that is Tight-Frame / Constant-Value SI-C (Tier 3) yet Kochen-Specker colorable (`¬ Tier 4`). -/ theorem strict_tier3_not_tier4_all_dim : ∀ d : ℕ, 3 ≤ d → ∃ (n : ℕ) (R : RayConfig d n), R.IsTier3_TightFrame ∧ ¬ R.IsTier4_KSUncolorable := by intro d induction d using Nat.strongRecOn with | ind d ih => intro hd by_cases h3 : d = 3 · subst h3 exact ⟨13, yuoh13Cfg.toRayConfig, yuoh13_tier3_not_tier4.1, yuoh13_tier3_not_tier4.2.1⟩ · by_cases h4 : d = 4 · subst h4 exact ⟨22, union22Cfg.toRayConfig, union22_tier3_not_tier4.1, union22_tier3_not_tier4.2.1⟩ · by_cases h5 : d = 5 · subst h5 exact ⟨24, u24Cfg.toRayConfig, u24_tier3_not_tier4.1, u24_tier3_not_tier4.2.1⟩ · have hd6 : 6 ≤ d := by omega obtain ⟨n₀, R₀, h3₀, hnot4₀⟩ := ih (d - 3) (by omega) (by omega) have hdim : (d - 3) + 3 = d := by omega refine ⟨n₀ + 13, castDim hdim (R₀.osum yuoh13Cfg.toRayConfig), ?_, ?_⟩ · rw [castDim_tier3, osum_tier3_iff] exact ⟨h3₀, yuoh13_tier3_not_tier4.1⟩ · rw [castDim_tier4] exact osum_not_tier4_of_left R₀ yuoh13Cfg.toRayConfig hnot4₀ /-- **Master Theorem B (Strict Separation Tier 2 \ Tier 3 in EVERY Dimension `d ≥ 4`)**: For every dimension `d ≥ 4`, there exists a finite ray configuration in `ℝ^d` that is All-State Operator SI-C (Tier 2) yet admits NO tight-frame / constant-value SI-C witness (`¬ Tier 3`). -/ theorem strict_tier2_not_tier3_all_dim : ∀ d : ℕ, 4 ≤ d → ∃ (n : ℕ) (R : RayConfig d n), R.IsTier2_AllStateOperator ∧ ¬ R.IsTier3_TightFrame := by intro d induction d using Nat.strongRecOn with | ind d ih => intro hd by_cases h4 : d = 4 · subst h4 exact ⟨18, r18Cfg.toRayConfig, r18_tier2_not_tier3.1, r18_tier2_not_tier3.2.1⟩ · by_cases h5 : d = 5 · subst h5 exact ⟨27, r27Cfg.toRayConfig, r27_tier2_not_tier3.1, r27_tier2_not_tier3.2.1⟩ · by_cases h6 : d = 6 · subst h6 exact ⟨29, r29Cfg.toRayConfig, r29_tier2_not_tier3.1, r29_tier2_not_tier3.2.1⟩ · have hd7 : 7 ≤ d := by omega obtain ⟨n₀, R₀, h2₀, hnot3₀⟩ := ih (d - 3) (by omega) (by omega) have hdim : (d - 3) + 3 = d := by omega refine ⟨n₀ + 13, castDim hdim (R₀.osum yuoh13Cfg.toRayConfig), ?_, ?_⟩ · rw [castDim_tier2, osum_tier2_iff] exact ⟨h2₀, tier3_implies_tier2 _ yuoh13_tier3_not_tier4.1⟩ · rw [castDim_tier3, osum_tier3_iff] intro ⟨h3₀, _⟩ exact hnot3₀ h3₀ /-- **Master Theorem C (Strict Separation Tier 1 \ Tier 2 in EVERY Dimension `d ≥ 4`)**: For every dimension `d ≥ 4`, there exists a finite ray configuration in `ℝ^d` with `χ_f(G) > d` (Tier 1) that fails All-State Operator SI-C (`¬ Tier 2`). (At `d = 4`, witnessed by the irreducible 17-ray `sub17`; for `d ≥ 5`, via `YuOh₁₃ ⊕ stdBasis (d-3)`.) -/ theorem strict_tier1_not_tier2_all_dim : ∀ d : ℕ, 4 ≤ d → ∃ (n : ℕ) (R : RayConfig d n), R.IsTier1_FracChromatic ∧ ¬ R.IsTier2_AllStateOperator := by intro d hd by_cases h4 : d = 4 · subst h4 exact ⟨17, sub17Cfg.toRayConfig, sub17_irred_tier1_not_tier2.1, sub17_irred_tier1_not_tier2.2.1⟩ · have hd_sub : 1 ≤ d - 3 := by omega have hdim : 3 + (d - 3) = d := by omega have hyu1 : yuoh13Cfg.toRayConfig.IsTier1_FracChromatic := tier2_implies_tier1 (by omega) _ (tier3_implies_tier2 _ yuoh13_tier3_not_tier4.1) obtain ⟨h1, hnot2⟩ := osum_tier1_not_tier2_of_tier1_basis hd_sub yuoh13Cfg.toRayConfig hyu1 refine ⟨13 + (d - 3), castDim hdim (yuoh13Cfg.toRayConfig.osum (stdBasis (d - 3))), ?_, ?_⟩ · rwa [castDim_tier1] · rwa [castDim_tier2] /-- **Grand Summary Theorem (Strict 4-Tier Contextuality Hierarchy for All `d ≥ 4`)**: In every dimension `d ≥ 4`, the four tiers of quantum state-independent contextuality satisfy `Tier 4 ⇒ Tier 3 ⇒ Tier 2 ⇒ Tier 1` and ALL THREE inclusions are STRICT. -/ theorem four_tier_strict_hierarchy_all_dim {d : ℕ} (hd : 4 ≤ d) : (∀ n (R : RayConfig d n), R.IsTier4_KSUncolorable → R.IsTier3_TightFrame) ∧ (∀ n (R : RayConfig d n), R.IsTier3_TightFrame → R.IsTier2_AllStateOperator) ∧ (∀ n (R : RayConfig d n), R.IsTier2_AllStateOperator → R.IsTier1_FracChromatic) ∧ (∃ n, ∃ R : RayConfig d n, R.IsTier3_TightFrame ∧ ¬ R.IsTier4_KSUncolorable) ∧ (∃ n, ∃ R : RayConfig d n, R.IsTier2_AllStateOperator ∧ ¬ R.IsTier3_TightFrame) ∧ (∃ n, ∃ R : RayConfig d n, R.IsTier1_FracChromatic ∧ ¬ R.IsTier2_AllStateOperator) := ⟨fun _ R => tier4_implies_tier3 R, fun _ R => tier3_implies_tier2 R, fun _ R => tier2_implies_tier1 (by omega) R, strict_tier3_not_tier4_all_dim d (by omega), strict_tier2_not_tier3_all_dim d hd, strict_tier1_not_tier2_all_dim d hd⟩ end RayConfig end SICContextuality /-! ## Axiom Verification (`#print axioms` on every headline theorem) -/ #print axioms SICContextuality.RayConfig.parseval_of_isBasis #print axioms SICContextuality.RayConfig.tier4_implies_tier3 #print axioms SICContextuality.RayConfig.tier3_implies_tier2 #print axioms SICContextuality.RayConfig.tier2_implies_tier1 #print axioms SICContextuality.RayConfig.no_tier2_of_nchv_state #print axioms SICContextuality.RayConfig.no_tier3_of_pseudostate #print axioms SICContextuality.RayConfig.osum_tier2_iff #print axioms SICContextuality.RayConfig.osum_tier3_iff #print axioms SICContextuality.RayConfig.osum_not_tier4_of_left #print axioms SICContextuality.RayConfig.cone_not_tier2 #print axioms SICContextuality.RayConfig.tensor_tight_frame #print axioms SICContextuality.RayConfig.equiangular_complement_indep_bound #print axioms SICContextuality.RayConfig.e8_indep_le_eight #print axioms SICContextuality.RayConfig.e8_tier3_tight_frame #print axioms SICContextuality.RayConfig.e8_tensor_power_sic #print axioms SICContextuality.RayConfig.checkBB_sound #print axioms SICContextuality.RayConfig.ks18_tier4 #print axioms SICContextuality.RayConfig.yuoh13_tier3_not_tier4 #print axioms SICContextuality.RayConfig.union22_tier3_not_tier4 #print axioms SICContextuality.RayConfig.u24_tier3_not_tier4 #print axioms SICContextuality.RayConfig.r18_tier2_not_tier3 #print axioms SICContextuality.RayConfig.r27_tier2_not_tier3 #print axioms SICContextuality.RayConfig.r29_tier2_not_tier3 #print axioms SICContextuality.RayConfig.sub17_irred_tier1_not_tier2 #print axioms SICContextuality.RayConfig.strict_tier3_not_tier4_all_dim #print axioms SICContextuality.RayConfig.strict_tier2_not_tier3_all_dim #print axioms SICContextuality.RayConfig.strict_tier1_not_tier2_all_dim #print axioms SICContextuality.RayConfig.four_tier_strict_hierarchy_all_dim