import LinkedTower.NativeS13 import LinkedTower.Hopf import LinkedTower.Spinor import LinkedTower.Links import F02NavierStokes.PhysicalCarrierS13 import F02NavierStokes.QuaternionicS4And4DPDE import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic import Mathlib.Tactic.FinCases import Mathlib.Tactic.Linarith import Mathlib.Tactic.Positivity import Mathlib.Tactic.Ring import Mathlib.Tactic.FieldSimp import Mathlib.Tactic.NoncommRing /-! # S¹³ \ S⁸ Proper-Domain Pullback, Octonionic S¹⁵ → S⁸ Hopf Tower, and F02 Boundary Coupling Machine-checked formalization of Paul Cooper's `S¹³ \ S⁸ ≅ S⁴ × B⁹` proper-domain Hopf pullback, octonionic `S¹⁵ → S⁸` non-associative `SO(8)` chart transitions, three-level Hopf inclusion ladder (`S³ → S² ↪ S⁷ → S⁴ ↪ S¹⁵ → S⁸`), three-chart `N/S/W` signed `SU(2)` overlap cocycle, and direct boundary-conditioning coupling to the F02 Navier–Stokes `S¹³` vorticity-transport carrier. Directly reuses `LinkedTower.NativeS13`, `LinkedTower.Hopf`, `LinkedTower.Spinor`, `LinkedTower.Links`, `F02NavierStokes.PhysicalCarrierS13`, and `F02NavierStokes.QuaternionicS4And4DPDE` with **zero global sections**: 1. **Proper-Domain `M = S¹³ \ S⁸ ≅ S⁴ × B⁹` & Excluded `S⁸` Boundary (`s13_minus_s8_proper_domain_and_boundary_obstruction`)** 2. **Octonionic Cayley–Dickson `S¹⁵ → S⁸` Two-Chart Atlas & Associative `SO(8)` Frame Invariance (`octonionic_s15_s8_two_chart_and_SO8_frame_invariance`)** 3. **Three-Level Hopf Ladder (`h₁, h₂, h₃`), Plücker Identity, Prepared Bloch Isometry, and Global-Phase Non-Descent on `S⁸` (`hopf_ladder_inclusions_plucker_and_phase_obstruction`)** 4. **Three-Chart `N/S/W` Signed `SU(2)` Cocycle, Central-Sign `S²` Blindness, and Gauge Covariance (`three_chart_NSW_SU2_cocycle_and_central_sign_blindness`)** 5. **Dual `S¹³ \ S⁸` Boundary Conditioning for the F02 Navier–Stokes Physical Carrier (`s13_s8_navier_stokes_boundary_coupling`)** -/ namespace F02NavierStokes.S13S8HopfTower open scoped Matrix BigOperators Quaternion open Matrix LinkedTower.Hopf LinkedTower.S13 LinkedTower.NativeS13 LinkedTower.Spinor LinkedTower.Links open F02NavierStokes.LinearAlgebra3D F02NavierStokes.PhysicalCarrierS13 noncomputable section private theorem sum_fin4 {α : Type*} [AddCommMonoid α] (f : Fin 4 → α) : (∑ i : Fin 4, f i) = f 0 + f 1 + f 2 + f 3 := by simp [Fin.sum_univ_four, add_assoc] private theorem sum_fin5 {α : Type*} [AddCommMonoid α] (f : Fin 5 → α) : (∑ i : Fin 5, f i) = f 0 + f 1 + f 2 + f 3 + f 4 := by simp [Fin.sum_univ_five, add_assoc] private theorem sum_fin8 {α : Type*} [AddCommMonoid α] (f : Fin 8 → α) : (∑ i : Fin 8, f i) = f 0 + f 1 + f 2 + f 3 + f 4 + f 5 + f 6 + f 7 := by simp [Fin.sum_univ_eight, add_assoc] private theorem sum_fin9 {α : Type*} [AddCommMonoid α] (f : Fin 9 → α) : (∑ i : Fin 9, f i) = f 0 + f 1 + f 2 + f 3 + f 4 + f 5 + f 6 + f 7 + f 8 := by simp [Fin.sum_univ_succ, add_assoc] /-! ## 1. Proper-Domain `M = S¹³ \ S⁸ ≅ S⁴ × B⁹`, Rank-4 Base Surjectivity & Excluded `S⁸` -/ section ProperDomainS13MinusS8 /-- Horizontal tangent lift of a base tangent vector `v ∈ T_b S⁴` into `T_{(r b, z)} S¹³`. -/ def horizLift (z : Fin 9 → ℝ) (v : Fin 5 → ℝ) : (Fin 5 → ℝ) × (Fin 9 → ℝ) := (fun i => radius z * v i, 0) /-- The excluded `S⁸` boundary locus `{ (0, z) : |z|² = 1 } ⊂ S¹³`. -/ def OnExcludedS8 (y : Fin 5 → ℝ) (z : Fin 9 → ℝ) : Prop := y = 0 ∧ sqNorm z = 1 /-- Any `S¹³` point with `sqNorm y = 0` lies on the excluded `S⁸` boundary (`r = 0`). -/ theorem excluded_s8_iff (y : Fin 5 → ℝ) (z : Fin 9 → ℝ) (hsphere : sqNorm y + sqNorm z = 1) : OnExcludedS8 y z ↔ sqNorm y = 0 := by constructor · rintro ⟨rfl, _⟩ simp [sqNorm] · intro hy0 have hz1 : sqNorm z = 1 := by linarith have hy_zero : y = 0 := by funext i have hle : (y i) ^ 2 ≤ sqNorm y := by unfold sqNorm exact Finset.single_le_sum (fun j _ => sq_nonneg (y j)) (Finset.mem_univ i) have hsq : (y i) ^ 2 = 0 := le_antisymm (hy0 ▸ hle) (sq_nonneg _) exact sq_eq_zero_iff.mp hsq exact ⟨hy_zero, hz1⟩ /-- Theorem 1 (`s13_local_fixture.py` + `LinkedTower.NativeS13`): On `M = S¹³ \ S⁸ ≅ S⁴ × B⁹`: 1. Every `(b, z) ∈ S⁴ × B⁹` lifts to `S¹³`, recovers `b`, kills all 9 leaf directions (`dB · leaf = 0`), and `leafDirection` is injective (9D leaf kernel). 2. `horizLift z v` is tangent to `S¹³` and mapped onto `v` by `baseDifferential b (radius z)`, certifying full 4D surjectivity onto `T_b S⁴`. 3. Every unit base-tangent perturbation `(u, 0)` has `|dB(u, 0)|² = 1 / (1 - |z|²)` (`1/r` blowup at the excluded `S⁸` boundary `|z| → 1⁻`), and no unit `b ∈ S⁴` with `|z|² < 1` hits `y = 0`. 4. Zero-leaf slice restriction: any section of `B*(S⁷ → S⁴)` over `M = S¹³ \ S⁸` restricts at `z = 0` to a global section of `S⁷ → S⁴` over all of `S⁴`. -/ theorem s13_minus_s8_proper_domain_and_boundary_obstruction (b : Fin 5 → ℝ) (z : Fin 9 → ℝ) (hb : sqNorm b = 1) (hz : sqNorm z < 1) : (sqNorm (nativePoint b z).1 + sqNorm (nativePoint b z).2 = 1 ∧ (fun i => (nativePoint b z).1 i / Real.sqrt (sqNorm (nativePoint b z).1)) = b ∧ (∀ ξ, baseDifferential b (radius z) (leafDirection b z ξ) = 0) ∧ Function.Injective (leafDirection b z)) ∧ (∀ v : Fin 5 → ℝ, dot b v = 0 → (dot (nativePoint b z).1 (horizLift z v).1 + dot (nativePoint b z).2 (horizLift z v).2 = 0) ∧ baseDifferential b (radius z) (horizLift z v) = v) ∧ ((∀ u : Fin 5 → ℝ, dot b u = 0 → sqNorm u = 1 → sqNorm (baseDifferential b (radius z) (u, 0)) = 1 / (1 - sqNorm z)) ∧ (nativePoint b z).1 ≠ 0) ∧ (∀ s : (Fin 5 → ℝ) × (Fin 9 → ℝ) → Q × Q, (∀ (b' : Fin 5 → ℝ) (z' : Fin 9 → ℝ), sqNorm b' = 1 → sqNorm z' < 1 → Quaternion.normSq (s (nativePoint b' z')).1 + Quaternion.normSq (s (nativePoint b' z')).2 = 1 ∧ ![(LinkedTower.Hopf.x (s (nativePoint b' z')).1 (s (nativePoint b' z')).2).re, (LinkedTower.Hopf.x (s (nativePoint b' z')).1 (s (nativePoint b' z')).2).imI, (LinkedTower.Hopf.x (s (nativePoint b' z')).1 (s (nativePoint b' z')).2).imJ, (LinkedTower.Hopf.x (s (nativePoint b' z')).1 (s (nativePoint b' z')).2).imK, LinkedTower.Hopf.z (s (nativePoint b' z')).1 (s (nativePoint b' z')).2] = b') → ∃ σ : (Fin 5 → ℝ) → Q × Q, ∀ b' : Fin 5 → ℝ, sqNorm b' = 1 → Quaternion.normSq (σ b').1 + Quaternion.normSq (σ b').2 = 1 ∧ ![(LinkedTower.Hopf.x (σ b').1 (σ b').2).re, (LinkedTower.Hopf.x (σ b').1 (σ b').2).imI, (LinkedTower.Hopf.x (σ b').1 (σ b').2).imJ, (LinkedTower.Hopf.x (σ b').1 (σ b').2).imK, LinkedTower.Hopf.z (σ b').1 (σ b').2] = b') := by have hrpos : 0 < radius z := radius_positive z hz have hrne : radius z ≠ 0 := ne_of_gt hrpos have hrsq : radius z ^ 2 = 1 - sqNorm z := radius_squared z hz refine ⟨⟨native_on_sphere b z hb hz, native_base_recovered b z hb hz, fun ξ => base_kills_leaf b z ξ hb, leaf_injective b z⟩, ?_, ?_, ?_⟩ · intro v hv constructor · dsimp only [nativePoint, horizLift] rw [dot_scale_left, dot_scale_right, hv, mul_zero, mul_zero, zero_add] simp [dot] · funext i simp only [baseDifferential, horizLift, dot_scale_right, hv, mul_zero, sub_zero] field_simp [hrne] · constructor · intro u hu husq have hdb : baseDifferential b (radius z) (u, 0) = fun i => (1 / radius z) * u i := by funext i simp only [baseDifferential, hu, mul_zero, sub_zero] ring rw [hdb, sqNorm_scale, husq, mul_one, one_div, inv_pow, hrsq, ← one_div] · intro h0 have hsq : sqNorm (nativePoint b z).1 = 0 := by rw [h0]; simp [sqNorm] have hsq' : sqNorm (nativePoint b z).1 = radius z ^ 2 := by simp [nativePoint, sqNorm_scale, hb] nlinarith [sq_pos_of_pos hrpos] · intro s hs refine ⟨fun b' => s (b', 0), fun b' hb' => ?_⟩ have hz0 : sqNorm (0 : Fin 9 → ℝ) < 1 := by simp [sqNorm] have hrad0 : radius (0 : Fin 9 → ℝ) = 1 := by simp [radius, sqNorm] have hpt : nativePoint b' (0 : Fin 9 → ℝ) = (b', 0) := by apply Prod.ext · funext i; simp [nativePoint, hrad0] · rfl simpa only [hpt] using hs b' 0 hb' hz0 end ProperDomainS13MinusS8 /-! ## 2. Octonionic Cayley–Dickson `S¹⁵ → S⁸` Atlas & Associative `SO(8)` Overlap Invariance -/ section OctonionicS15ToS8 /-- Cayley–Dickson octonions `𝕆 = ℍ × ℍ` matching `relational_geometry.py` (`_omul`, `_obar`). -/ abbrev Oct := Q × Q /-- Octonion conjugation `obar (a, b) = (star a, -b)`. -/ def obar (u : Oct) : Oct := (star u.1, -u.2) /-- Cayley–Dickson octonion multiplication `(a, b)(c, d) = (a c - d̄ b, d a + b c̄)`. -/ def omul (u v : Oct) : Oct := (u.1 * v.1 - star v.2 * u.2, v.2 * u.1 + u.2 * star v.1) /-- Real scalar multiplication on `𝕆`. -/ def oSmul (c : ℝ) (u : Oct) : Oct := (c • u.1, c • u.2) /-- Squared Euclidean norm on `𝕆 ≅ ℝ⁸`. -/ def oNormSq (u : Oct) : ℝ := Quaternion.normSq u.1 + Quaternion.normSq u.2 /-- Euclidean inner product on `𝕆 ≅ ℝ⁸`. -/ def oDot (u v : Oct) : ℝ := u.1.re * v.1.re + u.1.imI * v.1.imI + u.1.imJ * v.1.imJ + u.1.imK * v.1.imK + u.2.re * v.2.re + u.2.imI * v.2.imI + u.2.imJ * v.2.imJ + u.2.imK * v.2.imK /-- Real 8-coordinate embedding `𝕆 → ℝ⁸`. -/ def octToR8 (u : Oct) : Fin 8 → ℝ | 0 => u.1.re | 1 => u.1.imI | 2 => u.1.imJ | 3 => u.1.imK | 4 => u.2.re | 5 => u.2.imI | 6 => u.2.imJ | 7 => u.2.imK /-- Inverse coordinate map `ℝ⁸ → 𝕆`. -/ def r8ToOct (x : Fin 8 → ℝ) : Oct := (⟨x 0, x 1, x 2, x 3⟩, ⟨x 4, x 5, x 6, x 7⟩) /-- `8×8` real left-multiplication matrix `L_l` (`_left(v)` in `relational_geometry.py`). -/ def oLeftMat (l : Oct) : Matrix (Fin 8) (Fin 8) ℝ := Matrix.of fun i j => octToR8 (omul l (r8ToOct (Pi.single j 1))) i theorem r8ToOct_octToR8 (u : Oct) : r8ToOct (octToR8 u) = u := by apply Prod.ext <;> ext <;> simp [r8ToOct, octToR8] theorem octToR8_r8ToOct (x : Fin 8 → ℝ) : octToR8 (r8ToOct x) = x := by funext i; fin_cases i <;> simp [r8ToOct, octToR8] theorem obar_obar (u : Oct) : obar (obar u) = u := by apply Prod.ext <;> simp [obar] theorem oNormSq_obar (u : Oct) : oNormSq (obar u) = oNormSq u := by simp [oNormSq, obar] theorem oNormSq_oSmul (c : ℝ) (u : Oct) : oNormSq (oSmul c u) = c ^ 2 * oNormSq u := by simp [oNormSq, oSmul, Quaternion.normSq_smul] ring theorem omul_oSmul_left (c : ℝ) (u v : Oct) : omul (oSmul c u) v = oSmul c (omul u v) := by apply Prod.ext <;> simp [omul, oSmul, smul_sub, smul_add] theorem omul_oSmul_right (c : ℝ) (u v : Oct) : omul u (oSmul c v) = oSmul c (omul u v) := by apply Prod.ext <;> simp [omul, oSmul, smul_sub, smul_add] theorem obar_oSmul (c : ℝ) (u : Oct) : obar (oSmul c u) = oSmul c (obar u) := by apply Prod.ext <;> simp [obar, oSmul] theorem oSmul_oSmul (c d : ℝ) (u : Oct) : oSmul c (oSmul d u) = oSmul (c * d) u := by apply Prod.ext <;> simp [oSmul, smul_smul] theorem oSmul_one (u : Oct) : oSmul 1 u = u := by apply Prod.ext <;> simp [oSmul] theorem obar_omul (u v : Oct) : obar (omul u v) = omul (obar v) (obar u) := by apply Prod.ext <;> ext <;> simp [obar, omul] /-- Exact 8-square composition law (norm multiplicativity of Cayley–Dickson octonions): `oNormSq (omul u v) = oNormSq u * oNormSq v`. -/ theorem oNormSq_omul (u v : Oct) : oNormSq (omul u v) = oNormSq u * oNormSq v := by simp [oNormSq, omul, Quaternion.normSq_def'] ring /-- Left-alternative conjugate cancellation `u (ū v) = |u|² v`. -/ theorem omul_obar_left (u v : Oct) : omul u (omul (obar u) v) = oSmul (oNormSq u) v := by apply Prod.ext <;> (ext <;> simp [omul, obar, oSmul, oNormSq, Quaternion.normSq_def'] <;> ring) /-- Conjugate-first left cancellation `ū (u v) = |u|² v`. -/ theorem obar_omul_left (u v : Oct) : omul (obar u) (omul u v) = oSmul (oNormSq u) v := by have h := omul_obar_left (obar u) v rwa [obar_obar, oNormSq_obar] at h /-- Right-alternative conjugate cancellation `(v u) ū = |u|² v`. -/ theorem omul_obar_right (v u : Oct) : omul (omul v u) (obar u) = oSmul (oNormSq u) v := by apply Prod.ext <;> (ext <;> simp [omul, obar, oSmul, oNormSq, Quaternion.normSq_def'] <;> ring) /-- Exact adjoint symmetry of octonion left multiplication for the `ℝ⁸` inner product: `⟨u, l * v⟩ = ⟨l̄ * u, v⟩`. -/ theorem oDot_omul_left (l u v : Oct) : oDot u (omul l v) = oDot (omul (obar l) u) v := by simp [oDot, omul, obar] ring theorem oDot_comm (u v : Oct) : oDot u v = oDot v u := by simp only [oDot]; ring theorem oDot_basis_left (i : Fin 8) (w : Oct) : oDot (r8ToOct (Pi.single i 1)) w = octToR8 w i := by fin_cases i <;> simp [oDot, r8ToOct, octToR8] /-- `oLeftMat l` acts on `ℝ⁸` by exact octonion left multiplication `u ↦ l * u`. -/ theorem oLeftMat_mulVec (l u : Oct) : oLeftMat l *ᵥ octToR8 u = octToR8 (omul l u) := by funext i fin_cases i <;> (simp [oLeftMat, octToR8, r8ToOct, omul, mulVec, dotProduct, sum_fin8, Pi.single_apply]; ring) /-- Exact transpose symmetry of octonionic left multiplication: `(oLeftMat l)ᵀ = oLeftMat (obar l)`. -/ theorem oLeftMat_transpose (l : Oct) : (oLeftMat l)ᵀ = oLeftMat (obar l) := by ext i j simp only [Matrix.transpose_apply, oLeftMat, Matrix.of_apply] rw [← oDot_basis_left j, oDot_omul_left, oDot_comm, oDot_basis_left i] /-- For every unit octonion `l` (`|l|² = 1`), `oLeftMat l ∈ O(8)`: `(oLeftMat l)ᵀ * oLeftMat l = 1` and `oLeftMat l * (oLeftMat l)ᵀ = 1`. -/ theorem oLeftMat_orthogonal (l : Oct) (hl : oNormSq l = 1) : (oLeftMat l)ᵀ * oLeftMat l = 1 ∧ oLeftMat l * (oLeftMat l)ᵀ = 1 := by have hcol : ∀ A : Matrix (Fin 8) (Fin 8) ℝ, (∀ j : Fin 8, A *ᵥ Pi.single j 1 = Pi.single j 1) → A = 1 := by intro A hA ext i j have hij := congrFun (hA j) i simpa [mulVec, dotProduct, Pi.single_apply, Matrix.one_apply, eq_comm] using hij constructor · apply hcol; intro j rw [oLeftMat_transpose, ← Matrix.mulVec_mulVec, ← octToR8_r8ToOct (Pi.single j 1), oLeftMat_mulVec, oLeftMat_mulVec, obar_omul_left, hl, oSmul_one, octToR8_r8ToOct] · apply hcol; intro j rw [oLeftMat_transpose, ← Matrix.mulVec_mulVec, ← octToR8_r8ToOct (Pi.single j 1), oLeftMat_mulVec, oLeftMat_mulVec, omul_obar_left, hl, oSmul_one, octToR8_r8ToOct] /-- Explicit octonionic non-associativity witness `e₁ = (i, 0), e₂ = (j, 0), e₄ = (0, 1)`: `(e₁ * e₂) * e₄ ≠ e₁ * (e₂ * e₄)` and `L_{e₁} L_{e₂} ≠ L_{e₁ * e₂}`. -/ theorem octonion_nonassociative_and_matrix_distinct : let e1 : Oct := (qi, 0) let e2 : Oct := (qj, 0) let e4 : Oct := (0, 1) omul (omul e1 e2) e4 ≠ omul e1 (omul e2 e4) ∧ oLeftMat e1 * oLeftMat e2 ≠ oLeftMat (omul e1 e2) := by dsimp only have hneq : omul (omul (qi, 0) (qj, 0)) (0, 1) ≠ omul (qi, 0) (omul (qj, 0) (0, 1)) := by intro h have hk := congrArg (fun u : Oct => u.2.imK) h norm_num [omul, qi, qj] at hk refine ⟨hneq, ?_⟩ intro hmat have hv := congrArg (fun M : Matrix (Fin 8) (Fin 8) ℝ => M *ᵥ octToR8 (0, 1)) hmat rw [← Matrix.mulVec_mulVec, oLeftMat_mulVec, oLeftMat_mulVec, oLeftMat_mulVec] at hv have hoct := congrArg r8ToOct hv rw [r8ToOct_octToR8, r8ToOct_octToR8] at hoct exact hneq hoct.symm /-- Octonionic Hopf projection `π_𝕆 : S¹⁵ → S⁸`, `(L, R) ↦ (|L|² - |R|², 2 L R̄)` (`relational_geometry.py` line 201). -/ def hopfS15 (L R : Oct) : ℝ × Oct := (oNormSq L - oNormSq R, oSmul 2 (omul L (obar R))) /-- North chart lift for `S¹⁵ → S⁸` (`a = √((1 + t)/2) > 0`, `relational_geometry.py` line 196). -/ def s15North (t : ℝ) (p u : Oct) : Oct × Oct := let a := Real.sqrt ((1 + t) / 2) (oSmul a u, oSmul (1 / (2 * a)) (omul (obar p) u)) /-- South chart lift for `S¹⁵ → S⁸` (`b = √((1 - t)/2) > 0`, `relational_geometry.py` line 198). -/ def s15South (t : ℝ) (p u : Oct) : Oct × Oct := let b := Real.sqrt ((1 - t) / 2) (oSmul (1 / (2 * b)) (omul p u), oSmul b u) /-- Theorem 2 (`relational_geometry.py` + `paper_02.txt`): 1. `hopfS15` maps `S¹⁵` into `S⁸`. 2. On the overlap `U_N ∩ U_S` (`t² + |p|² = 1`, `|p|² > 0`), both charts `s15North` and `s15South` lift every unit octonion fiber `u ∈ S⁷` onto `S¹⁵` and project exactly back to `(t, p) ∈ S⁸`. 3. With unit octonion overlap label `l = p̄ / |p|` and orthogonal transition `T = oLeftMat l ∈ O(8)`, switching charts `u_S = l * u_N` preserves the exact `S¹⁵` source (`s15South t p u_S = s15North t p u_N`) AND leaves the retained canonical fiber `Rᵀ u` strictly invariant (`(T R)ᵀ (T u) = Rᵀ u`). 4. Explicit octonionic non-associativity confirms `SO(8)` transitions must compose as ordered associative matrices rather than reassociated octonion labels. -/ theorem octonionic_s15_s8_two_chart_and_SO8_frame_invariance (t : ℝ) (p u : Oct) (htp : t ^ 2 + oNormSq p = 1) (hp : 0 < oNormSq p) (hu : oNormSq u = 1) (R : Matrix (Fin 8) (Fin 8) ℝ) : let n := Real.sqrt (oNormSq p) let l := oSmul (1 / n) (obar p) let T := oLeftMat l (∀ L R' : Oct, oNormSq L + oNormSq R' = 1 → (hopfS15 L R').1 ^ 2 + oNormSq (hopfS15 L R').2 = 1) ∧ (oNormSq (s15North t p u).1 + oNormSq (s15North t p u).2 = 1 ∧ hopfS15 (s15North t p u).1 (s15North t p u).2 = (t, p)) ∧ (oNormSq (s15South t p u).1 + oNormSq (s15South t p u).2 = 1 ∧ hopfS15 (s15South t p u).1 (s15South t p u).2 = (t, p)) ∧ (oNormSq l = 1 ∧ Tᵀ * T = 1 ∧ T * Tᵀ = 1 ∧ s15South t p (omul l u) = s15North t p u ∧ (T * R)ᵀ *ᵥ (T *ᵥ octToR8 u) = Rᵀ *ᵥ octToR8 u) ∧ (oLeftMat (qi, 0) * oLeftMat (qj, 0) ≠ oLeftMat (omul (qi, 0) (qj, 0))) := by have ht2 : t ^ 2 < 1 := by linarith have h1pt : 0 < 1 + t := by nlinarith have h1mt : 0 < 1 - t := by nlinarith set a := Real.sqrt ((1 + t) / 2) set b := Real.sqrt ((1 - t) / 2) set n := Real.sqrt (oNormSq p) have hapos : 0 < a := Real.sqrt_pos.mpr (by linarith) have hbpos : 0 < b := Real.sqrt_pos.mpr (by linarith) have hnpos : 0 < n := Real.sqrt_pos.mpr hp have hane : a ≠ 0 := ne_of_gt hapos have hbne : b ≠ 0 := ne_of_gt hbpos have hasq : a ^ 2 = (1 + t) / 2 := Real.sq_sqrt (by linarith) have hbsq : b ^ 2 = (1 - t) / 2 := Real.sq_sqrt (by linarith) have hnsq : n ^ 2 = oNormSq p := Real.sq_sqrt (le_of_lt hp) have h2ab : 2 * a * b = n := by have hsq : (2 * a * b) ^ 2 = n ^ 2 := by calc (2 * a * b) ^ 2 = 4 * a ^ 2 * b ^ 2 := by ring _ = 4 * ((1 + t) / 2) * ((1 - t) / 2) := by rw [hasq, hbsq] _ = 1 - t ^ 2 := by ring _ = oNormSq p := by linarith _ = n ^ 2 := hnsq.symm nlinarith [mul_pos (mul_pos (by norm_num : (0 : ℝ) < 2) hapos) hbpos] set l := oSmul (1 / n) (obar p) set T := oLeftMat l have hl_unit : oNormSq l = 1 := by rw [oNormSq_oSmul, oNormSq_obar, one_div, inv_pow, hnsq] field_simp [ne_of_gt hp] obtain ⟨hTL, hTR⟩ := oLeftMat_orthogonal l hl_unit refine ⟨?_, ?_, ?_, ?_, octonion_nonassociative_and_matrix_distinct.2⟩ · intro L R' hLR simp only [hopfS15, oNormSq_oSmul, oNormSq_omul, oNormSq_obar] have hsq := congrArg (fun x : ℝ => x ^ 2) hLR nlinarith only [hsq] · -- North chart unit norm & projection have hN1 : oNormSq (s15North t p u).1 = (1 + t) / 2 := by simp only [s15North, oNormSq_oSmul, hu, mul_one]; exact hasq have hN2 : oNormSq (s15North t p u).2 = (1 - t) / 2 := by simp only [s15North, oNormSq_oSmul, oNormSq_omul, oNormSq_obar, hu, mul_one] have hpa : oNormSq p = (1 + t) * (1 - t) := by linarith rw [hpa, one_div, inv_pow, mul_pow, hasq] field_simp [ne_of_gt h1pt] refine ⟨by linarith, ?_⟩ apply Prod.ext · simp only [hopfS15, hN1, hN2]; ring · simp only [hopfS15, s15North] rw [obar_oSmul, obar_omul, obar_obar, omul_oSmul_left, omul_oSmul_right, omul_obar_left, hu, oSmul_one, oSmul_oSmul, oSmul_oSmul] have hc : 2 * a * (1 / (2 * a)) = 1 := by field_simp [hane] rw [hc, oSmul_one] · -- South chart unit norm & projection have hS1 : oNormSq (s15South t p u).1 = (1 + t) / 2 := by simp only [s15South, oNormSq_oSmul, oNormSq_omul, hu, mul_one] have hpa : oNormSq p = (1 + t) * (1 - t) := by linarith rw [hpa, one_div, inv_pow, mul_pow, hbsq] field_simp [ne_of_gt h1mt] have hS2 : oNormSq (s15South t p u).2 = (1 - t) / 2 := by simp only [s15South, oNormSq_oSmul, hu, mul_one]; exact hbsq refine ⟨by linarith, ?_⟩ apply Prod.ext · simp only [hopfS15, hS1, hS2]; ring · simp only [hopfS15, s15South] rw [obar_oSmul, omul_oSmul_left, omul_oSmul_right, omul_obar_right, hu, oSmul_one, oSmul_oSmul, oSmul_oSmul] have hc : 2 * (1 / (2 * b)) * b = 1 := by field_simp [hbne] rw [hc, oSmul_one] · -- Overlap matching & retained frame invariance refine ⟨hl_unit, hTL, hTR, ?_, ?_⟩ · apply Prod.ext · simp only [s15South, s15North] rw [omul_oSmul_left, omul_oSmul_right, omul_obar_left, oSmul_oSmul, oSmul_oSmul] have hc : 1 / (2 * b) * (1 / n) * oNormSq p = a := by rw [← hnsq, ← h2ab] field_simp [hane, hbne] rw [hc] · simp only [s15South, s15North] rw [omul_oSmul_left, oSmul_oSmul] have hc : b * (1 / n) = 1 / (2 * a) := by rw [← h2ab] field_simp [hane, hbne] rw [hc] · rw [Matrix.transpose_mul, Matrix.mulVec_mulVec, Matrix.mul_assoc, hTL, Matrix.mul_one] end OctonionicS15ToS8 /-! ## 3. Three-Level Hopf Ladder (`h₁, h₂, h₃`), Plücker Identity & Global-Phase Non-Descent -/ section ThreeLevelHopfLadder /-- Level 1 complex Hopf map `h₁ : S³ → S²` (`04-HOPF_LADDER.md` §1). -/ def hopfH1 (a b : ℂ) : Fin 3 → ℝ | 0 => 2 * (star a * b).re | 1 => 2 * (star a * b).im | 2 => Complex.normSq a - Complex.normSq b /-- Level 2 quaternionic Hopf map `h₂ : S⁷ → S⁴` (`04-HOPF_LADDER.md` §2). -/ def hopfH2 (t : Fin 4 → ℂ) : Fin 5 → ℝ | 0 => 2 * (star (t 0) * t 2 + star (t 1) * t 3).re | 1 => 2 * (star (t 0) * t 2 + star (t 1) * t 3).im | 2 => Complex.normSq (t 0) + Complex.normSq (t 1) - Complex.normSq (t 2) - Complex.normSq (t 3) | 3 => 2 * (t 0 * t 3 - t 1 * t 2).re | 4 => 2 * (t 0 * t 3 - t 1 * t 2).im /-- `2×2` Plücker minor `M_{ij} = ψ_i ψ_{j+4} - ψ_j ψ_{i+4}` of the `2×4` state matrix. -/ def minorM (ψ : Fin 8 → ℂ) (i j : Fin 4) : ℂ := ψ ⟨i.val, by omega⟩ * ψ ⟨j.val + 4, by omega⟩ - ψ ⟨j.val, by omega⟩ * ψ ⟨i.val + 4, by omega⟩ /-- Exact algebraic Plücker identity on `ℂ⁸`: `M₀₁ M₂₃ - M₀₂ M₁₃ + M₁₂ M₀₃ = 0`. -/ theorem plucker_identity (ψ : Fin 8 → ℂ) : minorM ψ 0 1 * minorM ψ 2 3 - minorM ψ 0 2 * minorM ψ 1 3 + minorM ψ 1 2 * minorM ψ 0 3 = 0 := by simp only [minorM] ring /-- Level 3 octonionic Mosseri Hopf map `h₃ : S¹⁵ → S⁸` (`04-HOPF_LADDER.md` §3–4). -/ def hopfH3 (ψ : Fin 8 → ℂ) : Fin 9 → ℝ | 0 => 2 * (star (ψ 0) * ψ 4 + star (ψ 1) * ψ 5 + star (ψ 2) * ψ 6 + star (ψ 3) * ψ 7).re | 1 => 2 * (star (ψ 0) * ψ 4 + star (ψ 1) * ψ 5 + star (ψ 2) * ψ 6 + star (ψ 3) * ψ 7).im | 2 => (Complex.normSq (ψ 0) + Complex.normSq (ψ 1) + Complex.normSq (ψ 2) + Complex.normSq (ψ 3)) - (Complex.normSq (ψ 4) + Complex.normSq (ψ 5) + Complex.normSq (ψ 6) + Complex.normSq (ψ 7)) | 3 => 2 * (minorM ψ 0 1 + star (minorM ψ 2 3)).re | 4 => 2 * (minorM ψ 0 1 + star (minorM ψ 2 3)).im | 5 => 2 * (minorM ψ 0 2 - star (minorM ψ 1 3)).re | 6 => 2 * (minorM ψ 0 2 - star (minorM ψ 1 3)).im | 7 => 2 * (star (minorM ψ 0 3) + minorM ψ 1 2).re | 8 => 2 * (star (minorM ψ 0 3) + minorM ψ 1 2).im /-- Commuting amplitude inclusion `i₁ : ℂ² → ℂ⁴`, `(a, b) ↦ (a, 0, b, 0)`. -/ def incl1 (a b : ℂ) : Fin 4 → ℂ | 0 => a | 1 => 0 | 2 => b | 3 => 0 /-- Commuting amplitude inclusion `i₂ : ℂ⁴ → ℂ⁸`, `(a, b, c, d) ↦ (a, b, 0, 0, c, d, 0, 0)`. -/ def incl2 (t : Fin 4 → ℂ) : Fin 8 → ℂ | 0 => t 0 | 1 => t 1 | 2 => 0 | 3 => 0 | 4 => t 2 | 5 => t 3 | 6 => 0 | 7 => 0 /-- Prepared two-marker Bloch sphere embedding matrix `J_{θ₁,θ₂} : ℝ³ → ℝ⁹` (`04-HOPF_LADDER.md` §4 eq. (101)). -/ def preparedBlochJ2 (θ₁ θ₂ : ℝ) : Matrix (Fin 9) (Fin 3) ℝ := let c1 := Real.cos θ₁; let s1 := Real.sin θ₁ let c2 := Real.cos θ₂; let s2 := Real.sin θ₂ !![c1 * c2, 0, 0; 0, c1 * c2, 0; 0, 0, 1; c1 * s2, 0, 0; 0, c1 * s2, 0; s1 * c2, 0, 0; 0, s1 * c2, 0; s1 * s2, 0, 0; 0, -(s1 * s2), 0] /-- Explicit `GHZ = (|000⟩ + |111⟩)/√2` state on `S¹⁵`. -/ def ghzState : Fin 8 → ℂ | 0 => ((1 / Real.sqrt 2 : ℝ) : ℂ) | 7 => ((1 / Real.sqrt 2 : ℝ) : ℂ) | _ => 0 /-- Explicit `Ψ₂ = (|001⟩ + |110⟩)/√2` state on `S¹⁵`. -/ def psi2State : Fin 8 → ℂ | 1 => ((1 / Real.sqrt 2 : ℝ) : ℂ) | 6 => ((1 / Real.sqrt 2 : ℝ) : ℂ) | _ => 0 /-- Unit global phase `e^{iπ/4} = (1 + i)/√2`. -/ def phasePiOver4 : ℂ := ⟨1 / Real.sqrt 2, 1 / Real.sqrt 2⟩ /-- Complex 2D Lagrange identity: `(|u₀|² + |u₁|²)(|v₀|² + |v₁|²) = |ū₀v₀ + ū₁v₁|² + |u₀v₁ - u₁v₀|²`. -/ private theorem complex_lagrange2 (u0 u1 v0 v1 : ℂ) : Complex.normSq (star u0 * v0 + star u1 * v1) + Complex.normSq (u0 * v1 - u1 * v0) = (Complex.normSq u0 + Complex.normSq u1) * (Complex.normSq v0 + Complex.normSq v1) := by simp only [Complex.normSq_apply, Complex.add_re, Complex.add_im, Complex.sub_re, Complex.sub_im, Complex.mul_re, Complex.mul_im, Complex.star_def, Complex.conj_re, Complex.conj_im] ring /-- Complex 4D Lagrange / Cauchy–Binet identity: `|∑ ū_k v_k|² + ∑_{i phasePiOver4 * ghzState i) 8 = -1 ∧ hopfH3 (fun i => phasePiOver4 * psi2State i) 8 = 1) := by have h2sq : Real.sqrt 2 ^ 2 = 2 := Real.sq_sqrt (by norm_num) have h2inv : (Real.sqrt 2)⁻¹ ^ 2 = 1 / 2 := by rw [inv_pow, h2sq]; ring have h4sq : ∀ w : ℂ, (2 * w.re) ^ 2 + (2 * w.im) ^ 2 = 4 * Complex.normSq w := by intro w; simp [Complex.normSq_apply]; ring refine ⟨⟨?_, ?_, ?_⟩, ⟨?_, ?_⟩, ?_, ?_⟩ · -- sqNorm (hopfH1 a b) = 1 simp only [sqNorm, Fin.sum_univ_three, hopfH1] have hmul : Complex.normSq (star a * b) = Complex.normSq a * Complex.normSq b := by simp [map_mul] have h1 := h4sq (star a * b) nlinarith [hab, hmul, h1] · -- sqNorm (hopfH2 t) = 1 simp only [sqNorm, sum_fin5, hopfH2] have ht' : Complex.normSq (t 0) + Complex.normSq (t 1) + Complex.normSq (t 2) + Complex.normSq (t 3) = 1 := by simpa only [sum_fin4] using ht have hlag := complex_lagrange2 (t 0) (t 1) (t 2) (t 3) have hC := h4sq (star (t 0) * t 2 + star (t 1) * t 3) have hD := h4sq (t 0 * t 3 - t 1 * t 2) nlinarith [ht', hlag, hC, hD] · -- sqNorm (hopfH3 ψ) = 1 (via Plücker + 4D Lagrange identity) have hpl := plucker_identity ψ have hpl_re : (minorM ψ 0 1 * minorM ψ 2 3 - minorM ψ 0 2 * minorM ψ 1 3 + minorM ψ 1 2 * minorM ψ 0 3).re = 0 := by rw [hpl]; simp have hsum_fgh : Complex.normSq (minorM ψ 0 1 + star (minorM ψ 2 3)) + Complex.normSq (minorM ψ 0 2 - star (minorM ψ 1 3)) + Complex.normSq (star (minorM ψ 0 3) + minorM ψ 1 2) = Complex.normSq (minorM ψ 0 1) + Complex.normSq (minorM ψ 2 3) + Complex.normSq (minorM ψ 0 2) + Complex.normSq (minorM ψ 1 3) + Complex.normSq (minorM ψ 0 3) + Complex.normSq (minorM ψ 1 2) := by simp only [Complex.normSq_apply, Complex.add_re, Complex.add_im, Complex.sub_re, Complex.sub_im, Complex.mul_re, Complex.star_def, Complex.conj_re, Complex.conj_im] at hpl_re ⊢ linarith only [hpl_re] have hlag4 : Complex.normSq (star (ψ 0) * ψ 4 + star (ψ 1) * ψ 5 + star (ψ 2) * ψ 6 + star (ψ 3) * ψ 7) + (Complex.normSq (minorM ψ 0 1) + Complex.normSq (minorM ψ 2 3) + Complex.normSq (minorM ψ 0 2) + Complex.normSq (minorM ψ 1 3) + Complex.normSq (minorM ψ 0 3) + Complex.normSq (minorM ψ 1 2)) = (Complex.normSq (ψ 0) + Complex.normSq (ψ 1) + Complex.normSq (ψ 2) + Complex.normSq (ψ 3)) * (Complex.normSq (ψ 4) + Complex.normSq (ψ 5) + Complex.normSq (ψ 6) + Complex.normSq (ψ 7)) := complex_lagrange4 (ψ 0) (ψ 1) (ψ 2) (ψ 3) (ψ 4) (ψ 5) (ψ 6) (ψ 7) set A := Complex.normSq (ψ 0) + Complex.normSq (ψ 1) + Complex.normSq (ψ 2) + Complex.normSq (ψ 3) set B := Complex.normSq (ψ 4) + Complex.normSq (ψ 5) + Complex.normSq (ψ 6) + Complex.normSq (ψ 7) have hψ' : A + B = 1 := by have h8 := sum_fin8 (fun i => Complex.normSq (ψ i)) linarith [hψ, h8] have hAB : (A - B) ^ 2 + 4 * (A * B) = 1 := by nlinarith only [hψ'] simp only [sqNorm, sum_fin9, hopfH3] have hC := h4sq (star (ψ 0) * ψ 4 + star (ψ 1) * ψ 5 + star (ψ 2) * ψ 6 + star (ψ 3) * ψ 7) have hF := h4sq (minorM ψ 0 1 + star (minorM ψ 2 3)) have hG := h4sq (minorM ψ 0 2 - star (minorM ψ 1 3)) have hH := h4sq (star (minorM ψ 0 3) + minorM ψ 1 2) linarith only [hAB, hlag4, hsum_fgh, hC, hF, hG, hH] · -- h₂ (i₁ (a, b)) = (h₁ (a, b), 0, 0) funext i; fin_cases i <;> simp [hopfH2, hopfH1, incl1] · -- h₃ (i₂ t) = (h₂ t, 0, 0, 0, 0) funext i; fin_cases i <;> (simp [hopfH3, hopfH2, incl2, minorM]; try ring) · -- J₂(θ₁, θ₂)ᵀ * J₂(θ₁, θ₂) = I₃ have h1 := Real.sin_sq_add_cos_sq θ₁ have h2 := Real.sin_sq_add_cos_sq θ₂ ext i j fin_cases i <;> fin_cases j <;> simp [preparedBlochJ2, Matrix.mul_apply, sum_fin9] all_goals nlinarith only [h1, h2] · -- GHZ vs Ψ₂ global-phase non-descent on S¹⁵ → S⁸ refine ⟨?_, ?_, ?_, ?_, ?_, ?_⟩ · simp only [sum_fin8, ghzState, Complex.normSq_ofReal, map_zero, add_zero, one_div] nlinarith [h2inv] · simp only [sum_fin8, psi2State, Complex.normSq_ofReal, map_zero, add_zero, zero_add, one_div] nlinarith [h2inv] · simp only [phasePiOver4, Complex.normSq_apply, one_div] nlinarith [h2inv] · funext i fin_cases i <;> simp [hopfH3, ghzState, psi2State, minorM, one_div] · simp [hopfH3, ghzState, phasePiOver4, minorM, one_div] ring_nf rw [h2sq, h2inv]; norm_num · simp [hopfH3, psi2State, phasePiOver4, minorM, one_div] ring_nf rw [h2sq, h2inv]; norm_num end ThreeLevelHopfLadder /-! ## 4. Three-Chart `N/S/W` Signed `SU(2)` Cocycle, Central-Sign Blindness & Gauge Law -/ section ThreeChartNSWCocycle /-- Theorem 4 (`s13_local_fixture.py` + `LinkedTower.NativeS13` + `LinkedTower.Spinor`): On the three-chart overlap `N, S, W` of `M = S¹³ \ S⁸ ≅ S⁴ × B⁹` with isometric `4×2` complex frames `V_N, V_S, V_W` and signed `SU(2)` transitions `g_NS = V_Nᴴ V_S`, `g_SW = V_Sᴴ V_W`, `g_NW = V_Nᴴ V_W` satisfying `V_S = V_N g_NS` and `V_W = V_S g_SW`: 1. Exact triple cocycle `g_NS * g_SW = g_NW`, nested `S⁷` reconstruction `V_S *ᵥ (g_NSᴴ *ᵥ k_N) = V_N *ᵥ k_N`, and Bloch conjugation invariance. 2. Central-sign `S²` blindness vs. signed frame separation: `(-g_NS)ᴴ * n * (-g_NS) = g_NSᴴ * n * g_NS`, yet `V_N * (-g_NS) ≠ V_N * g_NS`. 3. Explicit non-commuting order witness in `SU(2)`: `frame I 0 * frame 0 1 ≠ frame 0 1 * frame I 0`. 4. Exact gauge law & nested covariant derivative (`s13_local_fixture.py` lines 203–207): with `A_b = gᴴ A_a g + gᴴ dg`, `n_b = gᴴ n_a g`, `dgᴴ g + gᴴ dg = 0`, `dn_b + (A_b n_b - n_b A_b) = gᴴ (dn_a + (A_a n_a - n_a A_a)) g`. -/ theorem three_chart_NSW_SU2_cocycle_and_central_sign_blindness (V_N V_S V_W : Matrix (Fin 4) (Fin 2) ℂ) (g_NS g_SW : Matrix (Fin 2) (Fin 2) ℂ) (hVN : V_Nᴴ * V_N = 1) (hS : V_S = V_N * g_NS) (hW : V_W = V_S * g_SW) (hgL : g_NSᴴ * g_NS = 1) (hgR : g_NS * g_NSᴴ = 1) (k_N : Fin 2 → ℂ) (n_a dn_a A_a dg dgH : Matrix (Fin 2) (Fin 2) ℂ) (hunit_deriv : dgH * g_NS + g_NSᴴ * dg = 0) : let g_NW := V_Nᴴ * V_W let n_b := g_NSᴴ * n_a * g_NS let A_b := g_NSᴴ * A_a * g_NS + g_NSᴴ * dg let dn_b := dgH * n_a * g_NS + g_NSᴴ * dn_a * g_NS + g_NSᴴ * n_a * dg (g_NS * g_SW = g_NW ∧ V_S *ᵥ (g_NSᴴ *ᵥ k_N) = V_N *ᵥ k_N ∧ (-g_NS)ᴴ * n_a * (-g_NS) = n_b ∧ V_N * (-g_NS) ≠ V_N * g_NS) ∧ (LinkedTower.Spinor.frame Complex.I 0 * LinkedTower.Spinor.frame 0 1 ≠ LinkedTower.Spinor.frame 0 1 * LinkedTower.Spinor.frame Complex.I 0) ∧ (dn_b + (A_b * n_b - n_b * A_b) = g_NSᴴ * (dn_a + (A_a * n_a - n_a * A_a)) * g_NS) := by dsimp only refine ⟨⟨?_, ?_, ?_, ?_⟩, ?_, ?_⟩ · calc g_NS * g_SW = (V_Nᴴ * V_N) * (g_NS * g_SW) := by rw [hVN, Matrix.one_mul] _ = V_Nᴴ * (V_N * g_NS * g_SW) := by simp only [Matrix.mul_assoc] _ = V_Nᴴ * V_W := by rw [hW, hS] · rw [hS] exact LinkedTower.NativeS13.rectangular_frame_reconstruction V_N g_NS g_NSᴴ k_N hgR · simp [Matrix.conjTranspose_neg] · intro heq have hmul := congrArg (fun M : Matrix (Fin 4) (Fin 2) ℂ => g_NSᴴ * (V_Nᴴ * M)) heq simp only [Matrix.mul_neg, ← Matrix.mul_assoc, hVN, Matrix.one_mul] at hmul rw [hgL] at hmul have h00 := congrArg (fun M : Matrix (Fin 2) (Fin 2) ℂ => M 0 0) hmul norm_num at h00 · intro hcomm have h01 := congrArg (fun M : Matrix (Fin 2) (Fin 2) ℂ => M 0 1) hcomm simp [LinkedTower.Spinor.frame, Matrix.mul_apply, Fin.sum_univ_two] at h01 have him := congrArg Complex.im h01 norm_num at him · have h1 : (g_NSᴴ * A_a * g_NS) * (g_NSᴴ * n_a * g_NS) = g_NSᴴ * (A_a * n_a) * g_NS := by calc g_NSᴴ * A_a * g_NS * (g_NSᴴ * n_a * g_NS) = g_NSᴴ * A_a * (g_NS * g_NSᴴ) * n_a * g_NS := by simp only [Matrix.mul_assoc] _ = g_NSᴴ * (A_a * n_a) * g_NS := by rw [hgR, Matrix.mul_one]; simp only [Matrix.mul_assoc] have h2 : (g_NSᴴ * n_a * g_NS) * (g_NSᴴ * A_a * g_NS) = g_NSᴴ * (n_a * A_a) * g_NS := by calc g_NSᴴ * n_a * g_NS * (g_NSᴴ * A_a * g_NS) = g_NSᴴ * n_a * (g_NS * g_NSᴴ) * A_a * g_NS := by simp only [Matrix.mul_assoc] _ = g_NSᴴ * (n_a * A_a) * g_NS := by rw [hgR, Matrix.mul_one]; simp only [Matrix.mul_assoc] have h3 : (g_NSᴴ * n_a * g_NS) * (g_NSᴴ * dg) = g_NSᴴ * n_a * dg := by calc g_NSᴴ * n_a * g_NS * (g_NSᴴ * dg) = g_NSᴴ * n_a * (g_NS * g_NSᴴ) * dg := by simp only [Matrix.mul_assoc] _ = g_NSᴴ * n_a * dg := by rw [hgR, Matrix.mul_one] have h4 : (g_NSᴴ * dg) * (g_NSᴴ * n_a * g_NS) = -(dgH * n_a * g_NS) := by have hdg_eq : g_NSᴴ * dg = -(dgH * g_NS) := eq_neg_of_add_eq_zero_right hunit_deriv calc (g_NSᴴ * dg) * (g_NSᴴ * n_a * g_NS) = (-(dgH * g_NS)) * (g_NSᴴ * n_a * g_NS) := by rw [hdg_eq] _ = -(dgH * (g_NS * g_NSᴴ) * n_a * g_NS) := by simp only [Matrix.neg_mul, Matrix.mul_assoc] _ = -(dgH * n_a * g_NS) := by rw [hgR, Matrix.mul_one] simp only [Matrix.add_mul, Matrix.mul_add, Matrix.mul_sub, Matrix.sub_mul, h1, h2, h3, h4] abel end ThreeChartNSWCocycle /-! ## 5. Dual `S¹³ \ S⁸` Boundary Conditioning for F02 Navier–Stokes Physical Carrier -/ section F02NavierStokesS13S8Coupling /-- Stretch-base 5D block of `encode7 p ∈ S¹³`: `y_stretch(p) = ℓ / Λ ∈ ℝ⁵`. -/ def f02StretchBlock (p : PhysPayload) : Fin 5 → ℝ := fun i => p.ℓ i / rawNorm p /-- Complementary 9D leaf block of `encode7 p ∈ S¹³`: `(q, v, ψ, 1) / Λ ∈ ℝ⁹`. -/ def f02StretchLeaf (p : PhysPayload) : Fin 9 → ℝ | 0 => p.q.re / rawNorm p | 1 => p.q.imI / rawNorm p | 2 => p.q.imJ / rawNorm p | 3 => p.q.imK / rawNorm p | 4 => p.v 0 / rawNorm p | 5 => p.v 1 / rawNorm p | 6 => p.v 2 / rawNorm p | 7 => p.ψ / rawNorm p | 8 => 1 / rawNorm p /-- Anchor-base 5D block of `encode7 p ∈ S¹³`: `(q, 1) / Λ ∈ ℝ⁵` (strictly nonzero for all finite fluid payloads!). -/ def f02AnchorBlock (p : PhysPayload) : Fin 5 → ℝ | 0 => p.q.re / rawNorm p | 1 => p.q.imI / rawNorm p | 2 => p.q.imJ / rawNorm p | 3 => p.q.imK / rawNorm p | 4 => 1 / rawNorm p /-- Complementary 9D fluid-amplitude leaf of `encode7 p ∈ S¹³`: `(ℓ, v, ψ) / Λ ∈ ℝ⁹`. -/ def f02AnchorLeaf (p : PhysPayload) : Fin 9 → ℝ | 0 => p.ℓ 0 / rawNorm p | 1 => p.ℓ 1 / rawNorm p | 2 => p.ℓ 2 / rawNorm p | 3 => p.ℓ 3 / rawNorm p | 4 => p.ℓ 4 / rawNorm p | 5 => p.v 0 / rawNorm p | 6 => p.v 1 / rawNorm p | 7 => p.v 2 / rawNorm p | 8 => p.ψ / rawNorm p /-- Theorem 5 (`PhysicalCarrierS13` × `LinkedTower.NativeS13` × `QuaternionicS4And4DPDE`): Exact dual `S¹³ \ S⁸ ≅ S⁴ × B⁹` coupling for the F02 Navier–Stokes 14D physical carrier: 1. **Stretch-base split (`y = ℓ / Λ`, `z = (q, v, ψ, 1) / Λ`)**: - Lies on `S¹³` (`|y|² + |z|² = 1`), - Hits the excluded `S⁸` boundary (`OnExcludedS8 y z`) iff `ℓ = 0` (the zero-strain locus), - Whenever `‖L‖_HS² = sqNorm ℓ > 0`, lies strictly in `M = S¹³ \ S⁸` with `S⁴` base equal to the unit traceless strain direction `b = ℓ / ‖L‖_HS` and radius `r = ‖L‖_HS / Λ`. 2. **Anchor-base split (`y = (q, 1) / Λ`, `z = (ℓ, v, ψ) / Λ`)**: - Lies strictly inside the proper domain `M = S¹³ \ S⁸` for EVERY admissible finite fluid state (`sqNorm z < 1`, `radius z = √2 / Λ > 0`), - Base-differential conditioning factor `1 / radius z = Λ / √2`, - Exact **blowup-boundary equivalence**: for any margin `ε > 0`, staying at distance `r² ≥ ε` from the excluded `S⁸` boundary (`ε ≤ 1 - |z|²`) is algebraically equivalent to the exact F02 fluid amplitude cap `sqNorm ℓ + vecSqNorm v + ψ² ≤ 2 / ε - 2`! -/ theorem s13_s8_navier_stokes_boundary_coupling (p : PhysPayload) (hp : PhysAdmissible p) : (sqNorm (f02StretchBlock p) + sqNorm (f02StretchLeaf p) = 1 ∧ (OnExcludedS8 (f02StretchBlock p) (f02StretchLeaf p) ↔ p.ℓ = 0) ∧ (0 < sqNorm p.ℓ → sqNorm (f02StretchLeaf p) < 1 ∧ radius (f02StretchLeaf p) = Real.sqrt (sqNorm p.ℓ) / rawNorm p ∧ nativePoint (fun i => p.ℓ i / Real.sqrt (sqNorm p.ℓ)) (f02StretchLeaf p) = (f02StretchBlock p, f02StretchLeaf p))) ∧ (sqNorm (f02AnchorBlock p) + sqNorm (f02AnchorLeaf p) = 1 ∧ sqNorm (f02AnchorLeaf p) < 1 ∧ radius (f02AnchorLeaf p) = Real.sqrt 2 / rawNorm p ∧ 1 / radius (f02AnchorLeaf p) = rawNorm p / Real.sqrt 2 ∧ ∀ ε : ℝ, 0 < ε → (ε ≤ 1 - sqNorm (f02AnchorLeaf p) ↔ sqNorm p.ℓ + vecSqNorm p.v + p.ψ ^ 2 ≤ 2 / ε - 2)) := by have hΛpos : 0 < rawNorm p := rawNorm_pos p have hΛne : rawNorm p ≠ 0 := ne_of_gt hΛpos have hΛsq : rawNorm p ^ 2 = rawNormSq p := rawNorm_sq p have hΛ2 : 2 ≤ rawNormSq p := rawNormSq_ge_two p have hq : p.q.re ^ 2 + p.q.imI ^ 2 + p.q.imJ ^ 2 + p.q.imK ^ 2 = 1 := by have h := hp dsimp [PhysAdmissible] at h rw [Quaternion.normSq_def'] at h linarith [h] have hS_block : sqNorm (f02StretchBlock p) = sqNorm p.ℓ / rawNormSq p := by rw [← hΛsq] simp only [f02StretchBlock, sqNorm, div_pow, ← Finset.sum_div] have hS_leaf : sqNorm (f02StretchLeaf p) = (2 + vecSqNorm p.v + p.ψ ^ 2) / rawNormSq p := by rw [← hΛsq] simp only [sqNorm, sum_fin9, f02StretchLeaf, vecSqNorm, Fin.sum_univ_three, div_pow] field_simp [hΛne] linarith have hS_sphere : sqNorm (f02StretchBlock p) + sqNorm (f02StretchLeaf p) = 1 := by rw [hS_block, hS_leaf, ← add_div] have hnum : sqNorm p.ℓ + (2 + vecSqNorm p.v + p.ψ ^ 2) = rawNormSq p := by dsimp [rawNormSq]; ring rw [hnum, div_self (by linarith)] have hA_block : sqNorm (f02AnchorBlock p) = 2 / rawNormSq p := by rw [← hΛsq] simp only [sqNorm, sum_fin5, f02AnchorBlock, div_pow] field_simp [hΛne] linarith have hA_leaf : sqNorm (f02AnchorLeaf p) = (sqNorm p.ℓ + vecSqNorm p.v + p.ψ ^ 2) / rawNormSq p := by rw [← hΛsq] simp only [sqNorm, sum_fin9, sum_fin5, f02AnchorLeaf, vecSqNorm, Fin.sum_univ_three, div_pow] field_simp [hΛne] ring have hA_sphere : sqNorm (f02AnchorBlock p) + sqNorm (f02AnchorLeaf p) = 1 := by rw [hA_block, hA_leaf, ← add_div] have hnum : 2 + (sqNorm p.ℓ + vecSqNorm p.v + p.ψ ^ 2) = rawNormSq p := by dsimp [rawNormSq]; ring rw [hnum, div_self (by linarith)] have hA_block_pos : 0 < sqNorm (f02AnchorBlock p) := by rw [hA_block]; positivity have hA_leaf_lt : sqNorm (f02AnchorLeaf p) < 1 := by linarith have hA_rad : radius (f02AnchorLeaf p) = Real.sqrt 2 / rawNorm p := by have h1m : 1 - sqNorm (f02AnchorLeaf p) = 2 / rawNormSq p := by linarith rw [radius, h1m, ← hΛsq, Real.sqrt_div (by norm_num), Real.sqrt_sq (le_of_lt hΛpos)] refine ⟨⟨hS_sphere, ?_, ?_⟩, ⟨hA_sphere, hA_leaf_lt, hA_rad, ?_, ?_⟩⟩ · rw [excluded_s8_iff _ _ hS_sphere, hS_block] constructor · intro h0 have hℓ0 : sqNorm p.ℓ = 0 := by have hpos : (0 : ℝ) < rawNormSq p := by linarith exact (div_eq_zero_iff.mp h0).resolve_right (ne_of_gt hpos) funext i have hle : (p.ℓ i) ^ 2 ≤ sqNorm p.ℓ := Finset.single_le_sum (fun j _ => sq_nonneg (p.ℓ j)) (Finset.mem_univ i) exact sq_eq_zero_iff.mp (le_antisymm (hℓ0 ▸ hle) (sq_nonneg _)) · intro hℓ0 rw [hℓ0]; simp [sqNorm] · intro hℓpos have hsb_pos : 0 < sqNorm (f02StretchBlock p) := by rw [hS_block]; positivity have hrad : radius (f02StretchLeaf p) = Real.sqrt (sqNorm p.ℓ) / rawNorm p := by have h1m : 1 - sqNorm (f02StretchLeaf p) = sqNorm p.ℓ / rawNormSq p := by linarith rw [radius, h1m, ← hΛsq, Real.sqrt_div (le_of_lt hℓpos), Real.sqrt_sq (le_of_lt hΛpos)] refine ⟨by linarith, hrad, ?_⟩ apply Prod.ext · funext i simp only [nativePoint, hrad, f02StretchBlock] have hsr : Real.sqrt (sqNorm p.ℓ) ≠ 0 := ne_of_gt (Real.sqrt_pos.mpr hℓpos) field_simp [hsr, hΛne] · rfl · rw [hA_rad, one_div_div] · intro ε hε have h1m : 1 - sqNorm (f02AnchorLeaf p) = 2 / rawNormSq p := by linarith have hΛsq_pos : 0 < rawNormSq p := by linarith rw [h1m] constructor · intro h have hmul : ε * rawNormSq p ≤ 2 := (le_div_iff₀ hΛsq_pos).mp h have hcap : rawNormSq p ≤ 2 / ε := (le_div_iff₀' hε).mpr hmul dsimp [rawNormSq] at hcap linarith · intro h have hcap : rawNormSq p ≤ 2 / ε := by dsimp [rawNormSq]; linarith have hmul : ε * rawNormSq p ≤ 2 := (le_div_iff₀' hε).mp hcap exact (le_div_iff₀ hΛsq_pos).mpr hmul end F02NavierStokesS13S8Coupling end end F02NavierStokes.S13S8HopfTower