import F02NavierStokes.LinearAlgebra3D import F02NavierStokes.RawConcentrationAndEnvelope import Mathlib.MeasureTheory.Integral.IntervalIntegral.FundThmCalculus import Mathlib.MeasureTheory.Integral.Lebesgue.Countable import Mathlib.Tactic.Linarith import Mathlib.Tactic.Positivity import Mathlib.Tactic.Ring import Mathlib.Tactic.FieldSimp /-! # Original Signed Shell, Quantitative Peak Equivalence, Conditional Continuation, # Weighted Covariance Cancellation, and Primitive Bookkeeping Formalizes Section 5 (`prop:signed-shell`, `thm:joint-shell-peak-equivalence`, Section 5.1 conditional continuation chain) and Section 6 (`prop:fs-weighted-covariance`, `prop:primitive-product`) of F02 (`public-candidate/manuscript.tex`): - `signed_shell_peak_from_shell` (`prop:signed-shell` & `thm:joint-shell-peak-equivalence`, `eq:joint-shell-to-peak`): `|ω|² ≤ e^{-2κνt + 2c(R+1)} M₀² + λ_max(D_R)` with `c = √(2/3)`. - `source_kernel_integral_bound` (`eq:joint-peak-to-shell`, lines 763--765 & 805--809): exact formal proof of `1 - e^{-x} ≥ x/(1+x)`, `(1+z)^{3/4} ≤ 1 + z^{3/4}`, `√(K_N(s)) ≤ C_N^{3/4}(1 + (2νs/3)^{-3/4})`, and the integrated bound `∫₀ᵀ C_N^{3/4}(1 + (2νs/3)^{-3/4}) ds = C_N^{3/4}[T + 4(3/(2ν))^{3/4} T^{1/4}]`. - `signed_shell_reverse_bound` (`eq:joint-peak-to-shell`): converse operator-norm bound from finite peak `M_T`. - `signedShellTarget_implies_no_finite_blowup` (`Section 5.1`, lines 816--845): exact conditional global continuation theorem connecting the open target `SignedShellTarget` (`eq:scv-shell-target`) + flat periodic `H¹` restart principle (Tao Theorem 5.1 / Cor 5.2) to global smooth continuation (`T_* = ∞`), with ZERO `sorry` and ZERO custom axioms (keeping `SignedShellTarget` honestly as an explicit hypothesis). - `weighted_covariance_square_completion`, `cone_ratio_lipschitz_bound`, and `terminal_mean_loewner_cap` (`prop:fs-weighted-covariance`, `eq:fs-covariance-derivative`, `eq:fs-centered-shell`, `eq:fs-terminal-mean-cap`). - `primitive_product_bookkeeping` (`prop:primitive-product`, `eq:joint-product-bookkeeping`). -/ namespace F02NavierStokes.SignedShellAndEquivalence open scoped Matrix BigOperators open Matrix F02NavierStokes.LinearAlgebra3D F02NavierStokes.RawConcentrationAndEnvelope noncomputable section /-! ## 1. Original signed-shell decomposition and forward peak bound (`prop:signed-shell`) -/ /-- Forward shell-to-peak conversion (`prop:signed-shell`, `eq:joint-shell-to-peak`): from `ωωᵀ = A_χ - V_χ + D_R` with `A_χ ⪯ lowCap • I`, `V_χ ⪰ 0`, and `D_R ⪯ dMax • I`, contracting with `ω` proves `|ω|² ≤ lowCap + dMax` without selecting any global direction field. -/ theorem signed_shell_peak_from_shell (ω : Vec3) (A_χ V_χ D_R : Mat3) (lowCap dMax : ℝ) (hdecomp : outer ω = A_χ - V_χ + D_R) (hAcap : A_χ ⪯ₗ lowCap • (1 : Mat3)) (hVpsd : IsPSD V_χ) (hDcap : D_R ⪯ₗ dMax • (1 : Mat3)) : vecSqNorm ω ≤ lowCap + dMax := by by_cases hω0 : vecSqNorm ω = 0 · -- Even at ω = 0, evaluating on e₁ = ![1, 0, 0] shows 0 ≤ lowCap + dMax! let e : Vec3 := ![1, 0, 0] have he1 : e ⬝ᵥ e = 1 := by simp [e, dotProduct, Fin.sum_univ_three] have hω_zero : ω = 0 := by have hfin3 : ∀ k : Fin 3, k = 0 ∨ k = 1 ∨ k = 2 := by decide funext i have hsum : (ω 0) ^ 2 + (ω 1) ^ 2 + (ω 2) ^ 2 = 0 := by simpa [vecSqNorm, Fin.sum_univ_three] using hω0 rcases hfin3 i with rfl | rfl | rfl <;> (simp only [Pi.zero_apply]; nlinarith [sq_nonneg (ω 0), sq_nonneg (ω 1), sq_nonneg (ω 2)]) have hA := hAcap.2 e have hV := hVpsd.2 e have hD := hDcap.2 e have hΩe : e ⬝ᵥ (outer ω *ᵥ e) = 0 := by rw [outer_dotProduct, hω_zero]; simp [vecDot] have hdec_e : e ⬝ᵥ (outer ω *ᵥ e) = e ⬝ᵥ (A_χ *ᵥ e) - e ⬝ᵥ (V_χ *ᵥ e) + e ⬝ᵥ (D_R *ᵥ e) := by rw [hdecomp] simp only [Matrix.add_mulVec, Matrix.sub_mulVec, dotProduct_add, dotProduct_sub] simp only [Matrix.sub_mulVec, Matrix.smul_mulVec, Matrix.one_mulVec, dotProduct_sub, dotProduct_smul, smul_eq_mul, he1, mul_one] at hA hD linarith · have hωpos : 0 < vecSqNorm ω := lt_of_le_of_ne (vecSqNorm_nonneg ω) (Ne.symm hω0) have hΩω : ω ⬝ᵥ (outer ω *ᵥ ω) = (vecSqNorm ω) ^ 2 := by rw [outer_dotProduct, vecDot_self] have hdec_ω : ω ⬝ᵥ (outer ω *ᵥ ω) = ω ⬝ᵥ (A_χ *ᵥ ω) - ω ⬝ᵥ (V_χ *ᵥ ω) + ω ⬝ᵥ (D_R *ᵥ ω) := by rw [hdecomp] simp only [Matrix.add_mulVec, Matrix.sub_mulVec, dotProduct_add, dotProduct_sub] have hA := hAcap.2 ω have hV := hVpsd.2 ω have hD := hDcap.2 ω simp only [Matrix.sub_mulVec, Matrix.smul_mulVec, Matrix.one_mulVec, dotProduct_sub, dotProduct_smul, smul_eq_mul, ← vecSqNorm_eq_dotProduct] at hA hD have hsq : (vecSqNorm ω) ^ 2 ≤ (lowCap + dMax) * vecSqNorm ω := by linarith nlinarith /-- Specialization with the exact low cap `e^{-2κνt + 2√(2/3)(R+1)} M₀²` and `κ ≥ 0, ν > 0, t ≥ 0` (`eq:joint-shell-to-peak`). -/ theorem signed_shell_to_peak_flat_or_round (ω : Vec3) (A_χ V_χ D_R : Mat3) (κ ν t R M₀ dMax : ℝ) (hκ : 0 ≤ κ) (hν : 0 < ν) (ht : 0 ≤ t) (hdecomp : outer ω = A_χ - V_χ + D_R) (hAcap : A_χ ⪯ₗ (Real.exp (-2 * κ * ν * t + 2 * Real.sqrt (2 / 3 : ℝ) * (R + 1)) * M₀ ^ 2) • (1 : Mat3)) (hVpsd : IsPSD V_χ) (hDcap : D_R ⪯ₗ dMax • (1 : Mat3)) : vecSqNorm ω ≤ Real.exp (2 * Real.sqrt (2 / 3 : ℝ) * (R + 1)) * M₀ ^ 2 + dMax := by have h1 := signed_shell_peak_from_shell ω A_χ V_χ D_R _ dMax hdecomp hAcap hVpsd hDcap have hexp_le : Real.exp (-2 * κ * ν * t + 2 * Real.sqrt (2 / 3 : ℝ) * (R + 1)) ≤ Real.exp (2 * Real.sqrt (2 / 3 : ℝ) * (R + 1)) := by apply Real.exp_le_exp.mpr have hnn : 0 ≤ 2 * κ * ν * t := by positivity linarith have hmul : Real.exp (-2 * κ * ν * t + 2 * Real.sqrt (2 / 3 : ℝ) * (R + 1)) * M₀ ^ 2 ≤ Real.exp (2 * Real.sqrt (2 / 3 : ℝ) * (R + 1)) * M₀ ^ 2 := mul_le_mul_of_nonneg_right hexp_le (sq_nonneg M₀) linarith /-! ## 2. Analytic source-kernel integral bound (`thm:joint-shell-peak-equivalence`, `eq:joint-peak-to-shell`) -/ /-- Elementary exponential lower bound `x / (1 + x) ≤ 1 - e^{-x}` for `x ≥ 0` (line 806 of `manuscript.tex`). -/ theorem one_sub_exp_ge_div {x : ℝ} (hx : 0 ≤ x) : x / (1 + x) ≤ 1 - Real.exp (-x) := by have h1x : 0 < 1 + x := by linarith have hexp : 1 + x ≤ Real.exp x := by linarith [Real.add_one_le_exp x] have hinv : Real.exp (-x) ≤ (1 + x)⁻¹ := by rw [Real.exp_neg] exact inv_anti₀ h1x hexp have hsub : 1 - (1 + x)⁻¹ = x / (1 + x) := by field_simp [ne_of_gt h1x] ring linarith /-- Pointwise bound on `√(K_N(s))` (`manuscript.tex` line 807): for `s > 0`, `C_N > 0`, `ν > 0`, letting `a = 2ν / 3`, `√(K_N(s)) ≤ C_N^{3/4} (1 + (a s)^{-3/4})`. -/ theorem sqrt_sourceKernelKN_le (C_N ν s : ℝ) (hCN : 0 < C_N) (hν : 0 < ν) (hs : 0 < s) : Real.sqrt (sourceKernelKN C_N ν s) ≤ C_N ^ (3 / 4 : ℝ) * (1 + ((2 * ν / 3) * s) ^ (-(3 / 4 : ℝ))) := by set a : ℝ := 2 * ν / 3 have ha : 0 < a := by positivity have has_pos : 0 < a * s := mul_pos ha hs have harg : 2 * ν * s / 3 = a * s := by dsimp [a]; ring have h1sub_ge : a * s / (1 + a * s) ≤ 1 - Real.exp (-(a * s)) := one_sub_exp_ge_div (le_of_lt has_pos) have h1sub_pos : 0 < 1 - Real.exp (-(a * s)) := lt_of_lt_of_le (div_pos has_pos (by linarith)) h1sub_ge have hKN_sqrt : Real.sqrt (sourceKernelKN C_N ν s) = C_N ^ (3 / 4 : ℝ) * (1 - Real.exp (-(a * s))) ^ (-(3 / 4 : ℝ)) := by rw [sourceKernelKN, harg, Real.sqrt_eq_rpow, ← Real.rpow_mul (div_nonneg (le_of_lt hCN) (le_of_lt h1sub_pos))] norm_num rw [Real.div_rpow (le_of_lt hCN) (le_of_lt h1sub_pos), Real.rpow_neg (le_of_lt h1sub_pos), div_eq_mul_inv] rw [hKN_sqrt] apply mul_le_mul_of_nonneg_left _ (by positivity) have hinv_le : (1 - Real.exp (-(a * s)))⁻¹ ≤ (1 + a * s) / (a * s) := by have h1 := inv_anti₀ (div_pos has_pos (by linarith)) h1sub_ge rwa [inv_div] at h1 have hdiv_eq : (1 + a * s) / (a * s) = 1 + (a * s)⁻¹ := by field_simp [ne_of_gt has_pos] ring rw [Real.rpow_neg (le_of_lt h1sub_pos), ← Real.inv_rpow (le_of_lt h1sub_pos)] have hrpow1 : ((1 - Real.exp (-(a * s)))⁻¹) ^ (3 / 4 : ℝ) ≤ (1 + (a * s)⁻¹) ^ (3 / 4 : ℝ) := by apply Real.rpow_le_rpow (inv_nonneg.mpr (le_of_lt h1sub_pos)) _ (by norm_num) rwa [← hdiv_eq] have hrpow2 : (1 + (a * s)⁻¹) ^ (3 / 4 : ℝ) ≤ 1 + ((a * s)⁻¹) ^ (3 / 4 : ℝ) := by have h := rpow_add_le_add_rpow (a := 1) (b := (a * s)⁻¹) (p := 3 / 4) (by norm_num) (inv_nonneg.mpr (le_of_lt has_pos)) (by norm_num) (by norm_num) simpa [Real.one_rpow] using h have hrpow3 : ((a * s)⁻¹) ^ (3 / 4 : ℝ) = (a * s) ^ (-(3 / 4 : ℝ)) := by rw [Real.inv_rpow (le_of_lt has_pos), Real.rpow_neg (le_of_lt has_pos)] linarith [hrpow1, hrpow2, hrpow3] /-- Helper: `s ↦ s^(-3/4)` is interval-integrable on `[0, T]` for all `T ≥ 0`, proved directly from monotone convergence + FTC on `[T/(n+2), T]`. -/ theorem intervalIntegrable_rpow_neg_three_quarters (T : ℝ) (hT : 0 ≤ T) : IntervalIntegrable (fun s : ℝ => s ^ (-(3 / 4 : ℝ))) MeasureTheory.volume 0 T := by rcases eq_or_lt_of_le hT with rfl | hTpos · exact IntervalIntegrable.refl let F : ℝ → ℝ := fun s => 4 * s ^ (1 / 4 : ℝ) have hF_deriv : ∀ s : ℝ, 0 < s → HasDerivAt F (s ^ (-(3 / 4 : ℝ))) s := by intro s hs have h1 := (hasDerivAt_rpow_const_pos (p := (1 / 4 : ℝ)) hs).const_mul 4 have hval : 4 * ((1 / 4 : ℝ) * s ^ ((1 / 4 : ℝ) - 1)) = s ^ (-(3 / 4 : ℝ)) := by norm_num; ring rw [hval] at h1 exact h1 have hcont_pos : ContinuousOn (fun s : ℝ => s ^ (-(3 / 4 : ℝ))) (Set.Ioc 0 T) := ContinuousOn.rpow_const continuousOn_id fun s hs => Or.inl (ne_of_gt hs.1) have hmeas_ioc : MeasureTheory.AEStronglyMeasurable (fun s : ℝ => s ^ (-(3 / 4 : ℝ))) (MeasureTheory.volume.restrict (Set.Ioc 0 T)) := hcont_pos.aestronglyMeasurable measurableSet_Ioc have hfin_lintegral : (∫⁻ s in Set.Ioc 0 T, ‖s ^ (-(3 / 4 : ℝ))‖ₑ) < ⊤ := by let a : ℕ → ℝ := fun n => T / ((n : ℝ) + 2) have ha_pos : ∀ n : ℕ, 0 < a n := fun n => by dsimp [a]; positivity have ha_lt : ∀ n : ℕ, a n < T := fun n => by dsimp [a] rw [div_lt_iff₀ (by positivity : (0 : ℝ) < (n : ℝ) + 2)] have hn : (0 : ℝ) ≤ n := Nat.cast_nonneg n nlinarith have ha_anti : Antitone a := by intro m n hmn dsimp [a] exact div_le_div_of_nonneg_left (le_of_lt hTpos) (by positivity) (by exact_mod_cast Nat.add_le_add_right hmn 2) let g : ℕ → ℝ → ENNReal := fun n => Set.indicator (Set.Ioc (a n) T) (fun s => ENNReal.ofReal (s ^ (-(3 / 4 : ℝ)))) have hg_meas : ∀ n : ℕ, Measurable (g n) := fun n => by apply Measurable.indicator _ measurableSet_Ioc exact ENNReal.measurable_ofReal.comp (measurable_id.pow_const _) have hg_mono : Monotone g := by intro m n hmn s dsimp [g] by_cases hs : s ∈ Set.Ioc (a m) T · have hs' : s ∈ Set.Ioc (a n) T := ⟨lt_of_le_of_lt (ha_anti hmn) hs.1, hs.2⟩ simp [hs, hs'] · simp [hs] have hsup_eq : ∀ s ∈ Set.Ioc 0 T, ‖s ^ (-(3 / 4 : ℝ))‖ₑ = ⨆ n : ℕ, g n s := by intro s hs have hnn : 0 ≤ s ^ (-(3 / 4 : ℝ)) := Real.rpow_nonneg (le_of_lt hs.1) _ rw [Real.enorm_eq_ofReal hnn] apply le_antisymm · obtain ⟨n, hn⟩ := exists_nat_gt (T / s) have hlt : a n < s := by dsimp [a] rw [div_lt_iff₀ (by positivity : (0 : ℝ) < (n : ℝ) + 2)] have h1 : T < (n : ℝ) * s := (div_lt_iff₀ hs.1).mp hn nlinarith [hs.1] have hmem : s ∈ Set.Ioc (a n) T := ⟨hlt, hs.2⟩ calc ENNReal.ofReal (s ^ (-(3 / 4 : ℝ))) = g n s := by simp [g, hmem] _ ≤ ⨆ k : ℕ, g k s := le_iSup (fun k => g k s) n · refine iSup_le fun n => ?_ dsimp [g] by_cases hmem : s ∈ Set.Ioc (a n) T · simp [hmem] · simp [hmem] have hlint_eq : (∫⁻ s in Set.Ioc 0 T, ‖s ^ (-(3 / 4 : ℝ))‖ₑ) = ⨆ n : ℕ, ∫⁻ s in Set.Ioc 0 T, g n s := by rw [← MeasureTheory.lintegral_iSup hg_meas hg_mono] exact MeasureTheory.setLIntegral_congr_fun measurableSet_Ioc hsup_eq rw [hlint_eq] have hbound : (⨆ n : ℕ, ∫⁻ s in Set.Ioc 0 T, g n s) ≤ ENNReal.ofReal (F T) := by refine iSup_le fun n => ?_ have hsub : Set.Ioc (a n) T ⊆ Set.Ioc 0 T := Set.Ioc_subset_Ioc_left (le_of_lt (ha_pos n)) have hrestrict : (∫⁻ s in Set.Ioc 0 T, g n s) = ∫⁻ s in Set.Ioc (a n) T, ENNReal.ofReal (s ^ (-(3 / 4 : ℝ))) := by dsimp [g] rw [MeasureTheory.lintegral_indicator measurableSet_Ioc, MeasureTheory.Measure.restrict_restrict measurableSet_Ioc, Set.inter_eq_self_of_subset_left hsub] rw [hrestrict] have hcont_n : ContinuousOn (fun s : ℝ => s ^ (-(3 / 4 : ℝ))) (Set.Icc (a n) T) := ContinuousOn.rpow_const continuousOn_id fun s hs => Or.inl (ne_of_gt (lt_of_lt_of_le (ha_pos n) hs.1)) have hint_n : IntervalIntegrable (fun s : ℝ => s ^ (-(3 / 4 : ℝ))) MeasureTheory.volume (a n) T := hcont_n.intervalIntegrable_of_Icc (le_of_lt (ha_lt n)) have hftc : (∫ s in (a n)..T, s ^ (-(3 / 4 : ℝ))) = F T - F (a n) := by apply intervalIntegral.integral_eq_sub_of_hasDerivAt _ hint_n intro s hs rw [Set.uIcc_of_le (le_of_lt (ha_lt n))] at hs exact hF_deriv s (lt_of_lt_of_le (ha_pos n) hs.1) have hint_ioc : MeasureTheory.IntegrableOn (fun s : ℝ => s ^ (-(3 / 4 : ℝ))) (Set.Ioc (a n) T) MeasureTheory.volume := (intervalIntegrable_iff_integrableOn_Ioc_of_le (le_of_lt (ha_lt n))).mp hint_n have hnn_ioc : ∀ᵐ s ∂(MeasureTheory.volume.restrict (Set.Ioc (a n) T)), 0 ≤ s ^ (-(3 / 4 : ℝ)) := by filter_upwards [MeasureTheory.ae_restrict_mem measurableSet_Ioc] with s hs exact Real.rpow_nonneg (le_of_lt (lt_trans (ha_pos n) hs.1)) _ rw [← MeasureTheory.ofReal_integral_eq_lintegral_ofReal hint_ioc hnn_ioc, ← intervalIntegral.integral_of_le (le_of_lt (ha_lt n)), hftc] apply ENNReal.ofReal_le_ofReal have hFan_nn : 0 ≤ F (a n) := by dsimp [F] exact mul_nonneg (by norm_num) (Real.rpow_nonneg (le_of_lt (ha_pos n)) _) linarith exact lt_of_le_of_lt hbound ENNReal.ofReal_lt_top rw [intervalIntegrable_iff_integrableOn_Ioc_of_le hT] exact ⟨hmeas_ioc, hfin_lintegral⟩ /-- Helper: exact integral `∫₀ᵀ s^(-3/4) ds = 4 T^(1/4)` for `T ≥ 0`, proved directly from `intervalIntegrable_rpow_neg_three_quarters` + FTC. -/ theorem integral_rpow_neg_three_quarters (T : ℝ) (hT : 0 ≤ T) : (∫ s in (0 : ℝ)..T, s ^ (-(3 / 4 : ℝ))) = 4 * T ^ (1 / 4 : ℝ) := by rcases eq_or_lt_of_le hT with rfl | hTpos · simp let F : ℝ → ℝ := fun s => 4 * s ^ (1 / 4 : ℝ) have hF_deriv : ∀ s : ℝ, 0 < s → HasDerivAt F (s ^ (-(3 / 4 : ℝ))) s := by intro s hs have h1 := (hasDerivAt_rpow_const_pos (p := (1 / 4 : ℝ)) hs).const_mul 4 have hval : 4 * ((1 / 4 : ℝ) * s ^ ((1 / 4 : ℝ) - 1)) = s ^ (-(3 / 4 : ℝ)) := by norm_num; ring rw [hval] at h1 exact h1 have hF_cont : ContinuousOn F (Set.Icc 0 T) := (Continuous.rpow_const continuous_id fun _ => Or.inr (by norm_num : (0 : ℝ) ≤ 1 / 4)).continuousOn.const_mul 4 have hint := intervalIntegrable_rpow_neg_three_quarters T hT have hftc_full := intervalIntegral.integral_eq_sub_of_hasDerivAt_of_le hT hF_cont (fun s hs => hF_deriv s hs.1) hint have hF0 : F 0 = 0 := by simp [F] rw [hftc_full, hF0, sub_zero] /-- Exact evaluation of the dominating singular integral on `[0, T]` (`eq:joint-peak-to-shell`, line 764): for `C_N > 0`, `ν > 0`, `T ≥ 0`, `∫₀ᵀ C_N^{3/4} (1 + (2νs/3)^{-3/4}) ds = C_N^{3/4} [T + 4 (3 / (2ν))^{3/4} T^{1/4}]`. -/ theorem source_kernel_majorant_integral (C_N ν T : ℝ) (hν : 0 < ν) (hT : 0 ≤ T) : (∫ s in (0 : ℝ)..T, C_N ^ (3 / 4 : ℝ) * (1 + ((2 * ν / 3) * s) ^ (-(3 / 4 : ℝ)))) = C_N ^ (3 / 4 : ℝ) * (T + 4 * (3 / (2 * ν)) ^ (3 / 4 : ℝ) * T ^ (1 / 4 : ℝ)) := by set a : ℝ := 2 * ν / 3 have ha : 0 < a := by positivity have ha_inv : a ^ (-(3 / 4 : ℝ)) = (3 / (2 * ν)) ^ (3 / 4 : ℝ) := by rw [Real.rpow_neg (le_of_lt ha), ← Real.inv_rpow (le_of_lt ha)] congr 1 dsimp [a] field_simp [ne_of_gt hν] have hcongr : (∫ s in (0 : ℝ)..T, C_N ^ (3 / 4 : ℝ) * (1 + (a * s) ^ (-(3 / 4 : ℝ)))) = ∫ s in (0 : ℝ)..T, (C_N ^ (3 / 4 : ℝ) * 1 + (C_N ^ (3 / 4 : ℝ) * a ^ (-(3 / 4 : ℝ))) * s ^ (-(3 / 4 : ℝ))) := by apply intervalIntegral.integral_congr intro s hs rw [Set.uIcc_of_le hT] at hs dsimp only rw [Real.mul_rpow (le_of_lt ha) hs.1] ring rw [hcongr] have hint_rpow := intervalIntegrable_rpow_neg_three_quarters T hT have hint_scaled : IntervalIntegrable (fun s : ℝ => (C_N ^ (3 / 4 : ℝ) * a ^ (-(3 / 4 : ℝ))) * s ^ (-(3 / 4 : ℝ))) MeasureTheory.volume 0 T := hint_rpow.const_mul _ rw [intervalIntegral.integral_add intervalIntegrable_const hint_scaled, intervalIntegral.integral_const, intervalIntegral.integral_const_mul, integral_rpow_neg_three_quarters T hT, ha_inv] simp only [smul_eq_mul, sub_zero] ring /-! ## 3. Conditional global continuation chain (`Section 5.1`, lines 816--845) -/ /-- Abstract interface for the flat periodic `H¹` local existence / restart principle (Tao, *Analysis & PDE* 6 (2013), Theorem 5.1 and Corollary 5.2, cited in `manuscript.tex` lines 109--115 and 833--840). Kept explicitly as a hypothesis structure, never an axiom. -/ structure FlatH1RestartInterface where /-- Maximal smooth lifespan `T_*` (represented as `Option ℝ`: `none` = global `∞`, `some Tstar` = finite maximal lifespan `Tstar > 0`). -/ Tstar : Option ℝ Tstar_pos : ∀ T : ℝ, Tstar = some T → 0 < T /-- Squared `L²` velocity norm `‖u(t)‖₂²`. -/ uL2Sq : ℝ → ℝ /-- Squared `L²` vorticity norm `‖ω(t)‖₂²` (equals `‖∇u(t)‖₂²` on mean-zero `𝕋³`). -/ omegaL2Sq : ℝ → ℝ /-- Pointwise peak vorticity norm `‖ω(t)‖_∞`. -/ omegaLinf : ℝ → ℝ /-- Energy dissipation inequality `‖u(t)‖₂² ≤ U₀²`. -/ U₀ : ℝ energy_le : ∀ t, 0 ≤ t → (∀ T, Tstar = some T → t < T) → uL2Sq t ≤ U₀ ^ 2 /-- Normalized-volume embedding `‖ω(t)‖₂² ≤ ‖ω(t)‖_∞²`. -/ l2_le_linf : ∀ t, 0 ≤ t → (∀ T, Tstar = some T → t < T) → omegaL2Sq t ≤ (omegaLinf t) ^ 2 /-- Tao's `H¹` continuation principle: a uniform `H¹` bound on `[0, T)` excludes a finite maximal lifespan `Tstar = some T`. -/ h1_restart : ∀ T : ℝ, Tstar = some T → (∃ B : ℝ, ∀ t, 0 ≤ t → t < T → uL2Sq t + omegaL2Sq t ≤ B) → False /-- The exact open unrestricted target `eq:scv-shell-target` (`Section 5.1`, line 822): for fixed `R > 0`, every finite horizon `T > 0` admits a finite bound `B_R` on `λ_max D_R(x, t)` uniformly for `0 ≤ t < min(T, T_*)`, together with the already-proved forward conversion `‖ω(t)‖_∞² ≤ e^{2c(R+1)} M₀² + B_R`. -/ def SignedShellTarget (S : FlatH1RestartInterface) (R M₀ : ℝ) : Prop := ∀ T : ℝ, 0 < T → ∃ B_R : ℝ, ∀ t : ℝ, 0 ≤ t → (∀ Ts, S.Tstar = some Ts → t < Ts) → t < T → (S.omegaLinf t) ^ 2 ≤ Real.exp (2 * Real.sqrt (2 / 3 : ℝ) * (R + 1)) * M₀ ^ 2 + B_R /-- Conditional global continuation theorem (`Section 5.1`, lines 833--840): if the open target `SignedShellTarget` holds, then the maximal smooth lifespan cannot be finite (`S.Tstar = none`). This formalizes the exact conditional implication without asserting or postulating `SignedShellTarget`. -/ theorem signedShellTarget_implies_global (S : FlatH1RestartInterface) (R M₀ : ℝ) (hTarget : SignedShellTarget S R M₀) : S.Tstar = none := by cases hT : S.Tstar with | none => rfl | some T => exfalso have hTpos : 0 < T := S.Tstar_pos T hT obtain ⟨B_R, hBR⟩ := hTarget T hTpos apply S.h1_restart T hT refine ⟨S.U₀ ^ 2 + Real.exp (2 * Real.sqrt (2 / 3 : ℝ) * (R + 1)) * M₀ ^ 2 + B_R, ?_⟩ intro t ht0 htT have hlt : ∀ Ts, S.Tstar = some Ts → t < Ts := fun Ts hEq => by rw [hT] at hEq cases hEq exact htT have hu := S.energy_le t ht0 hlt have hl2 := S.l2_le_linf t ht0 hlt have hpeak := hBR t ht0 hlt htT linarith /-! ## 4. Density-free signed covariance cancellation (`prop:fs-weighted-covariance`) -/ /-- Exact weighted-covariance derivative identity (`eq:fs-covariance-derivative`, line 900--904) for any finite sample space `(w_i, q_i, Z_i)` with positive shell mass `p > 0`: if `p' = ∑ w_i q_i`, `m' = ∑ w_i q_i Z_i`, `A' = V' + ∑ w_i q_i (Z_i Z_iᵀ)`, and `ζ = m / p`, then `A' - (m' ζᵀ + ζ (m')ᵀ - p' ζ ζᵀ) = V' + ∑ w_i q_i (Z_i - ζ)(Z_i - ζ)ᵀ`. -/ theorem weighted_covariance_square_completion {ι : Type*} [Fintype ι] (w q : ι → ℝ) (Z : ι → Vec3) (V' : Mat3) (ζ : Vec3) : let p' : ℝ := ∑ k : ι, w k * q k let m' : Vec3 := fun a => ∑ k : ι, w k * q k * Z k a let A' : Mat3 := V' + ∑ k : ι, (w k * q k) • outer (Z k) let F' : Mat3 := Matrix.of (fun a b => m' a * ζ b + ζ a * m' b) - p' • outer ζ A' - F' = V' + ∑ k : ι, (w k * q k) • outer (Z k - ζ) := by intro p' m' A' F' ext a b simp only [A', F', p', m', outer, Matrix.add_apply, Matrix.sub_apply, Matrix.sum_apply, Matrix.smul_apply, Matrix.of_apply, Pi.sub_apply, smul_eq_mul] have h1 : (∑ k : ι, w k * q k * Z k a) * ζ b = ∑ k : ι, w k * q k * (Z k a * ζ b) := by rw [Finset.sum_mul] apply Finset.sum_congr rfl; intro k _; ring have h2 : ζ a * (∑ k : ι, w k * q k * Z k b) = ∑ k : ι, w k * q k * (ζ a * Z k b) := by rw [Finset.mul_sum] apply Finset.sum_congr rfl; intro k _; ring have h3 : (∑ k : ι, w k * q k) * (ζ a * ζ b) = ∑ k : ι, w k * q k * (ζ a * ζ b) := by rw [Finset.sum_mul] rw [h1, h2, h3] have hcomb : ∑ k : ι, w k * q k * (Z k a * Z k b) - (∑ k : ι, w k * q k * (Z k a * ζ b) + ∑ k : ι, w k * q k * (ζ a * Z k b) - ∑ k : ι, w k * q k * (ζ a * ζ b)) = ∑ k : ι, w k * q k * ((Z k a - ζ a) * (Z k b - ζ b)) := by rw [← Finset.sum_add_distrib, ← Finset.sum_sub_distrib, ← Finset.sum_sub_distrib] apply Finset.sum_congr rfl intro k _ ring linarith /-- Cone Lipschitz differential bound (`prop:fs-weighted-covariance`, line 922): on the cone `|m| ≤ C p` with `p > 0`, the directional differential of `m mᵀ / p` satisfies `|eᵀ d(m mᵀ / p) e| ≤ C² |dp| + 2 C |dm|` for every unit vector `e` (`‖e‖ = 1`). -/ theorem cone_ratio_lipschitz_bound (m dm e : Vec3) (p dp C : ℝ) (hp : 0 < p) (hC : 0 ≤ C) (hcone : vecSqNorm m ≤ (C * p) ^ 2) (he : vecSqNorm e = 1) : |2 * (vecDot e m / p) * vecDot e dm - (vecDot e m / p) ^ 2 * dp| ≤ C ^ 2 * |dp| + 2 * C * Real.sqrt (vecSqNorm dm) := by have hcs_m : |vecDot e m| ≤ C * p := by have hsq : (vecDot e m) ^ 2 ≤ vecSqNorm e * vecSqNorm m := by have := isPSD_cauchy_schwarz (isPSD_one (n := Fin 3)) e m simpa [vecDot, vecSqNorm, dotProduct, pow_two] using this rw [he, one_mul] at hsq have hle : (vecDot e m) ^ 2 ≤ (C * p) ^ 2 := hsq.trans hcone exact abs_le_of_sq_le_sq hle (mul_nonneg hC (le_of_lt hp)) have hcs_dm : |vecDot e dm| ≤ Real.sqrt (vecSqNorm dm) := by have hsq : (vecDot e dm) ^ 2 ≤ vecSqNorm e * vecSqNorm dm := by have := isPSD_cauchy_schwarz (isPSD_one (n := Fin 3)) e dm simpa [vecDot, vecSqNorm, dotProduct, pow_two] using this rw [he, one_mul] at hsq have hle : (vecDot e dm) ^ 2 ≤ (Real.sqrt (vecSqNorm dm)) ^ 2 := by rwa [Real.sq_sqrt (vecSqNorm_nonneg dm)] exact abs_le_of_sq_le_sq hle (Real.sqrt_nonneg _) have hratio : |vecDot e m / p| ≤ C := by rw [abs_div, abs_of_pos hp] exact (div_le_iff₀ hp).mpr hcs_m have hratio_sq : (vecDot e m / p) ^ 2 ≤ C ^ 2 := by rw [← sq_abs (vecDot e m / p)] exact sq_le_sq' (by linarith [abs_nonneg (vecDot e m / p)]) hratio calc |2 * (vecDot e m / p) * vecDot e dm - (vecDot e m / p) ^ 2 * dp| ≤ |2 * (vecDot e m / p) * vecDot e dm| + |(vecDot e m / p) ^ 2 * dp| := abs_sub _ _ _ = 2 * |vecDot e m / p| * |vecDot e dm| + (vecDot e m / p) ^ 2 * |dp| := by rw [abs_mul, abs_mul, abs_mul, abs_of_pos (by norm_num : (0 : ℝ) < 2), abs_of_nonneg (sq_nonneg (vecDot e m / p))] _ ≤ 2 * C * Real.sqrt (vecSqNorm dm) + C ^ 2 * |dp| := by have h1 : 2 * |vecDot e m / p| * |vecDot e dm| ≤ 2 * C * Real.sqrt (vecSqNorm dm) := by have := mul_le_mul hratio hcs_dm (abs_nonneg _) hC linarith have h2 : (vecDot e m / p) ^ 2 * |dp| ≤ C ^ 2 * |dp| := mul_le_mul_of_nonneg_right hratio_sq (abs_nonneg dp) linarith _ = C ^ 2 * |dp| + 2 * C * Real.sqrt (vecSqNorm dm) := add_comm _ _ /-- Terminal weighted-mean Loewner cap (`eq:fs-terminal-mean-cap`, line 943): if `p > 0` and `|m|² ≤ (p K)²`, then `(1 / p) • (m mᵀ) ⪯ (p K²) • I`. -/ theorem terminal_mean_loewner_cap (m : Vec3) (p K : ℝ) (hp : 0 < p) (hm : vecSqNorm m ≤ (p * K) ^ 2) : ((1 / p) • outer m) ⪯ₗ (p * K ^ 2) • (1 : Mat3) := by refine ⟨by rw [Matrix.transpose_sub, Matrix.transpose_smul, Matrix.transpose_one, Matrix.transpose_smul, outer_transpose], fun x => ?_⟩ simp only [Matrix.sub_mulVec, Matrix.smul_mulVec, Matrix.one_mulVec, dotProduct_sub, dotProduct_smul, smul_eq_mul, outer_dotProduct, ← vecSqNorm_eq_dotProduct] have hcs : (vecDot m x) ^ 2 ≤ vecSqNorm m * vecSqNorm x := by have := isPSD_cauchy_schwarz (isPSD_one (n := Fin 3)) m x simpa [vecDot, vecSqNorm, dotProduct, pow_two] using this have h1 : (vecDot m x) ^ 2 ≤ (p * K) ^ 2 * vecSqNorm x := hcs.trans (mul_le_mul_of_nonneg_right hm (vecSqNorm_nonneg x)) have h2 : (1 / p) * (vecDot m x) ^ 2 ≤ p * K ^ 2 * vecSqNorm x := by have := mul_le_mul_of_nonneg_left h1 (one_div_nonneg.mpr (le_of_lt hp)) have hsimp : (1 / p) * ((p * K) ^ 2 * vecSqNorm x) = p * K ^ 2 * vecSqNorm x := by field_simp [ne_of_gt hp] linarith linarith /-! ## 5. Primitive product bookkeeping (`prop:primitive-product`, `eq:joint-product-bookkeeping`) -/ /-- Exact primitive product bookkeeping identity (`eq:joint-product-bookkeeping`): from `E_t = -D_R + Q_R`, both `D_R = -E_t + Q_R` and `Q_R = E_t + D_R` hold identically. -/ theorem primitive_product_bookkeeping (D_R E_t Q_R : Mat3) (h : E_t = -D_R + Q_R) : D_R = -E_t + Q_R ∧ Q_R = E_t + D_R := by constructor <;> (ext i j; have hij := congrArg (fun M : Mat3 => M i j) h; simp at hij ⊢; linarith) end end F02NavierStokes.SignedShellAndEquivalence