import F02NavierStokes.LinearAlgebra3D import F02NavierStokes.RawConcentrationAndEnvelope import F02NavierStokes.HopfEquivariantS3 import Mathlib.Analysis.SpecialFunctions.ExpDeriv import Mathlib.Analysis.SpecialFunctions.Pow.Real import Mathlib.Analysis.SpecialFunctions.Pow.Continuity import Mathlib.Analysis.SpecialFunctions.Log.Basic import Mathlib.Analysis.Calculus.MeanValue import Mathlib.MeasureTheory.Integral.IntervalIntegral.FundThmCalculus import Mathlib.Topology.Order.Compact import Mathlib.Tactic.FinCases import Mathlib.Tactic.Linarith import Mathlib.Tactic.Positivity import Mathlib.Tactic.Ring import Mathlib.Tactic.FieldSimp /-! # Certified Unmodified 2nd-Order Full Nonlinear Navier–Stokes Closures This module formalizes all certified global and finite-horizon closures for **unmodified 2nd-order full nonlinear unforced periodic 3D Navier–Stokes** (full advection `∇_u u` with `μ = 0`, zero Hopf symmetry assumed) proved in Paul Cooper's Navier–Stokes research corpus outside the Hopf-equivariant / `δ < 1` / `J_Y(T)` regimes: 1. **Kinetic/Enstrophy Critical Product Global Closure** (`S3_CRITICAL_PRODUCT_PEAK_BOUND.md`, `CP0`–`CP12`): - Exact Young optimization `c E^(3/4) D^(3/4) ≤ (ν/2) D + (27 c⁴ / (32 ν³)) E³` (`CP3`–`CP4`) yielding `E' + ν D ≤ A ν⁻³ E³` with `A = 27 C_S⁶ / 64`. - Exact reciprocal-enstrophy ODE closure (`CP4`–`CP6`): whenever `β := 27 C_S⁶ U₀² E₀ / (128 ν⁴) < 1` (independent of higher derivatives `A₃(0), A₄(0), M₀`), `1/E(t) - (A/(2ν⁴)) U(t)²` is monotone nondecreasing, proving the global all-time ceiling `E(t) ≤ E₀ / (1 - β)`. - Mittag-Leffler `E_{1/4}` peak ceiling, four-term elementary exponential envelope, signed-budget bound `B_a^CP`, and normalized peak integral bound (`CP9`–`CP12`). 2. **Large-`A₃` (`q₀ > 1`) Energy-Entry Global Closure** (`S3_SIGNED_CLOSURE_ATTEMPT_V2.md`, `SC1`–`SC15`): - Exact `H³/H¹` spectral-weight interpolation `p₃(λ)^(3/2) ≤ √(1 + λ₁⁻²) p₁(λ)^(1/2) λ p₃(λ)` (`SC7`) and strict `H³` decay `(1/2)(A₃²)' + (ν/2) D₃² ≤ 0` when `A₁ ≤ ν/(2 C₃ C_I)` (`SC8`). - Forward-invariant enstrophy trap (`SC9`–`SC11`) via `sInf` first-crossing analysis: once `E(t₀) ≤ E_bar := min{ν²√λ₁/(4 c_*²), ν²/(4 C₃² C_I² C_P²)}`, both `E(t) ≤ E(t₀) e^{-νλ₁(t-t₀)}` and `A₃(t) ≤ A₃(t₀) e^{-νλ₁(t-t₀)/2}` hold for all `t ≥ t₀`. - Energy-entry pigeonhole theorem (`SC12`–`SC15`): even when `q₀ = C₃ A₀ / (ν λ₁) > 1`, if `τ_ent := U₀² / (ν E_bar) < t_b := (ν λ₁)⁻¹ log(q₀ / (q₀ - 1))`, then `∃ t₀ ∈ [0, τ_ent]` with `E(t₀) ≤ E_bar / 2`, proving global all-time bounds `sup M ≤ C_M A_bar`, `∫₀ᵀ M ≤ C_M A_bar (τ_ent + 2/(ν λ₁))`, and `C_a(t) ≤ log(C_M A_bar / M₀) + C_u U₀ / (ν λ₁)`. 3. **Signed-Shell Initial-Data Barriers, `A₄` Linear Propagation, Zero-Shell & Causal Extension** (`S13_SIGNED_SHELL_INITIAL_DATA_BARRIER.md` `IB1`–`IB15`, `DERIVATION_CAUSAL_EXTENSION.txt` eqs (8)–(12), (27)): - Zero-safe linear `A₄` ODE propagation `A₄(t) ≤ A₄(0) e^{-β t} d(t)^{-C₄/C₃}` on `[0, T]` (`T < T_B`, `IB10`–`IB11`) and global propagation `A₄(t) ≤ A₄(0) e^{-β t + C₄ I_∞}` (`IB15`, valid for both `q < 1` and the `q > 1` energy-entry class). - Matrix Loewner signed-shell upper (`B_R^IB`, `B_R^global`) and lower (`IB13`) bounds, exact zero-shell certificate (`IB7`), and arbitrary-amplitude curl-eigenfield zero-shell radius `s₀ / (ν λ²)` (`IB14`). - Exact first-exit optimization `q(λ) = (λ - 1) / λ^(3/2) ≤ 2/(3√3)` attained uniquely at `λ = 3`, strict `T_opt > 3 T_seed` comparison, and geometric sum bound `< 9/8`. 4. **Conditional Periodic Direction Coherence (`C1`–`C5`, `H1`–`H7`, `I1`) and Exact Linked Covariance Cancellation & Polar Distortion (`VC1`–`VC13`)** (`S3_PRIMARY_PDE_REVIEW.md`, `S3_HIGH_VORTICITY_INITIAL_DATA.md`, `S3_COVARIANCE_CLOSURE_ATTEMPT_V2.md`): - Real-calculus Gronwall closures for high-vorticity half-Hölder coherence (`C2`–`C4`, `H2`–`H7`) and signed production (`C5`), plus exact unit-direction Lipschitz bound (`I1`, valid across vorticity zeros). - Two-sided active-maximum signed-budget stability (`VC1`–`VC3`, `SC2`), exact transverse and mixed covariance cancellation `P_e A P_e = P_e V P_e`, `P_e A e = P_e V e`, longitudinal residual `⟨e, (A - V) e⟩ = r²` (`VC4`–`VC5`), and sharp polar-distortion ratio bound `|P_n C n| / ⟨n, C n⟩ ≤ (χ - χ⁻¹) / 2` attained at the harmonic mean `2αβ/(α+β)` (`VC13`). Every result is proved with zero `sorry` and zero custom axioms, keeping explicit the exact boundary between these certified regimes and the open unrestricted arbitrary-initial-data problem. -/ namespace F02NavierStokes.UnmodifiedNSClosures open scoped Matrix BigOperators open F02NavierStokes.LinearAlgebra3D open F02NavierStokes.RawConcentrationAndEnvelope open F02NavierStokes.HopfEquivariantS3 noncomputable section /-! ## Helper: Monotone comparison on an arbitrary closed interval `[a, b]` -/ /-- If `g` has derivative `≤ 0` at every point of `[a, b]` (`a ≤ b`), then `g t ≤ g a` for all `t ∈ [a, b]`. -/ private theorem le_start_of_hasDerivAt_nonpos {g : ℝ → ℝ} {a b : ℝ} (hg : ∀ s ∈ Set.Icc a b, ∃ dg : ℝ, HasDerivAt g dg s ∧ dg ≤ 0) : ∀ t ∈ Set.Icc a b, g t ≤ g a := by have hcont : ContinuousOn g (Set.Icc a b) := fun s hs => by obtain ⟨dg, hdg, _⟩ := hg s hs exact hdg.continuousAt.continuousWithinAt let dgFun : ℝ → ℝ := fun s => if h : s ∈ Set.Icc a b then Classical.choose (hg s h) else 0 exact image_le_of_deriv_right_le_deriv_boundary hcont (f' := dgFun) (fun s hs => by have hs_icc : s ∈ Set.Icc a b := ⟨hs.1, le_of_lt hs.2⟩ simp only [dgFun, hs_icc, ↓reduceDIte] exact (Classical.choose_spec (hg s hs_icc)).1.hasDerivWithinAt) (B := fun _ => g a) (B' := fun _ => 0) le_rfl continuousOn_const (fun s _ => hasDerivWithinAt_const s (Set.Ici s) (g a)) (fun s hs => by have hs_icc : s ∈ Set.Icc a b := ⟨hs.1, le_of_lt hs.2⟩ simp only [dgFun, hs_icc, ↓reduceDIte] exact (Classical.choose_spec (hg s hs_icc)).2) /-- Primitive continuity on `[a, b]` for a function `ContinuousOn f (Set.Icc a b)` (`a ≤ b`). -/ private theorem primitive_continuousOn_Icc {f : ℝ → ℝ} {a b : ℝ} (hab : a ≤ b) (hf : ContinuousOn f (Set.Icc a b)) : ContinuousOn (fun u => ∫ x in a..u, f x) (Set.Icc a b) := by have hIo : MeasureTheory.IntegrableOn f (Set.uIcc a b) MeasureTheory.volume := by rw [Set.uIcc_of_le hab] exact hf.integrableOn_Icc have hcont := intervalIntegral.continuousOn_primitive_interval hIo rwa [Set.uIcc_of_le hab] at hcont /-- Right-hand derivative of the indefinite integral `u ↦ ∫ₐᵘ f` at any `s ∈ [a, b)` for `ContinuousOn f (Set.Icc a b)`, proved directly from the `ε`-`δ` slope limit. -/ private theorem primitive_hasDerivWithinAt_Ici {f : ℝ → ℝ} {a b s : ℝ} (hf : ContinuousOn f (Set.Icc a b)) (hs : s ∈ Set.Ico a b) : HasDerivWithinAt (fun u => ∫ x in a..u, f x) (f s) (Set.Ici s) s := by rw [hasDerivWithinAt_iff_tendsto_slope, Metric.tendsto_nhdsWithin_nhds] intro ε hε have hsub : ContinuousOn f (Set.Icc s b) := hf.mono (fun u hu => ⟨le_trans hs.1 hu.1, hu.2⟩) have hcwa : ContinuousWithinAt f (Set.Icc s b) s := hsub s ⟨le_rfl, le_of_lt hs.2⟩ rw [Metric.continuousWithinAt_iff] at hcwa obtain ⟨δ₁, hδ₁_pos, hδ₁⟩ := hcwa (ε / 2) (half_pos hε) refine ⟨min δ₁ (b - s), lt_min hδ₁_pos (sub_pos.mpr hs.2), ?_⟩ intro u hu hdist have hu_ge : s ≤ u := hu.1 have hu_ne : u ≠ s := fun h => hu.2 (Set.mem_singleton_iff.mpr h) have hus : s < u := lt_of_le_of_ne hu_ge (Ne.symm hu_ne) have hu_dist : u - s < min δ₁ (b - s) := by rwa [Real.dist_eq, abs_of_pos (sub_pos.mpr hus)] at hdist have hu_lt_δ₁ : u - s < δ₁ := lt_of_lt_of_le hu_dist (min_le_left _ _) have hu_lt_b : u < b := by linarith [lt_of_lt_of_le hu_dist (min_le_right _ _)] have hint_as : IntervalIntegrable f MeasureTheory.volume a s := (hf.mono (fun x hx => ⟨hx.1, le_trans hx.2 (le_of_lt hs.2)⟩)).intervalIntegrable_of_Icc hs.1 have hint_su : IntervalIntegrable f MeasureTheory.volume s u := (hf.mono (fun x hx => ⟨le_trans hs.1 hx.1, le_trans hx.2 (le_of_lt hu_lt_b)⟩)).intervalIntegrable_of_Icc (le_of_lt hus) have hdiff : (∫ x in a..u, f x) - (∫ x in a..s, f x) = ∫ x in s..u, f x := by have hadd := intervalIntegral.integral_add_adjacent_intervals hint_as hint_su linarith have hsub_eq : (∫ x in s..u, f x) - (u - s) * f s = ∫ x in s..u, (f x - f s) := by rw [intervalIntegral.integral_sub hint_su intervalIntegrable_const, intervalIntegral.integral_const, smul_eq_mul] have hpt_bound : ∀ x ∈ Set.Icc s u, -(ε / 2) ≤ f x - f s ∧ f x - f s ≤ ε / 2 := by intro x hx have hx_mem : x ∈ Set.Icc s b := ⟨hx.1, le_trans hx.2 (le_of_lt hu_lt_b)⟩ have hx_dist : dist x s < δ₁ := by rw [Real.dist_eq, abs_of_nonneg (sub_nonneg.mpr hx.1)] linarith [hx.2] have hlt := hδ₁ hx_mem hx_dist rw [Real.dist_eq, abs_lt] at hlt exact ⟨le_of_lt hlt.1, le_of_lt hlt.2⟩ have hhi := intervalIntegral.integral_mono_on (le_of_lt hus) (hint_su.sub intervalIntegrable_const) intervalIntegrable_const (fun x hx => (hpt_bound x hx).2) have hlo := intervalIntegral.integral_mono_on (le_of_lt hus) intervalIntegrable_const (hint_su.sub intervalIntegrable_const) (fun x hx => (hpt_bound x hx).1) rw [intervalIntegral.integral_const, smul_eq_mul] at hhi hlo have hslope_eq : slope (fun v => ∫ x in a..v, f x) s u - f s = (u - s)⁻¹ * (∫ x in s..u, (f x - f s)) := by rw [slope_def_field, hdiff, ← hsub_eq] field_simp [ne_of_gt (sub_pos.mpr hus)] rw [Real.dist_eq, hslope_eq, abs_lt] have hpos_inv : 0 < (u - s)⁻¹ := inv_pos.mpr (sub_pos.mpr hus) have h1 : (u - s)⁻¹ * ((u - s) * -(ε / 2)) = -(ε / 2) := by field_simp [ne_of_gt (sub_pos.mpr hus)] have h2 : (u - s)⁻¹ * ((u - s) * (ε / 2)) = ε / 2 := by field_simp [ne_of_gt (sub_pos.mpr hus)] have hlo' := mul_le_mul_of_nonneg_left hlo (le_of_lt hpos_inv) have hhi' := mul_le_mul_of_nonneg_left hhi (le_of_lt hpos_inv) rw [h1] at hlo' rw [h2] at hhi' exact ⟨by linarith, by linarith⟩ /-- Elementary energy-dissipation integral inequality: if `U_sq' ≤ -2 ν E` and `U_sq ≥ 0` on `[0, T]` with `U_sq 0 = U₀²`, then `∫₀ᵗ E ≤ U₀² / (2 ν)` for every `t ∈ [0, T]`. -/ theorem energy_budget_of_dissipation {U_sq E : ℝ → ℝ} {ν U₀ T : ℝ} (hν : 0 < ν) (hU₀ : U_sq 0 = U₀ ^ 2) (hU_nn : ∀ t ∈ Set.Icc 0 T, 0 ≤ U_sq t) (hE_cont : ContinuousOn E (Set.Icc 0 T)) (hU_deriv : ∀ t ∈ Set.Icc 0 T, ∃ dU : ℝ, HasDerivAt U_sq dU t ∧ dU ≤ -(2 * ν) * E t) : ∀ t ∈ Set.Icc 0 T, (∫ s in (0 : ℝ)..t, E s) ≤ U₀ ^ 2 / (2 * ν) := by intro t ht have hE_cont_t : ContinuousOn E (Set.Icc 0 t) := hE_cont.mono (Set.Icc_subset_Icc_right ht.2) let dUFun : ℝ → ℝ := fun s => if h : s ∈ Set.Icc 0 T then Classical.choose (hU_deriv s h) else 0 have hU_cont : ContinuousOn U_sq (Set.Icc 0 t) := fun s hs => by have hsT : s ∈ Set.Icc 0 T := ⟨hs.1, le_trans hs.2 ht.2⟩ obtain ⟨dU, hdU, _⟩ := hU_deriv s hsT exact hdU.continuousAt.continuousWithinAt let F : ℝ → ℝ := fun s => U_sq s + 2 * ν * ∫ u in (0 : ℝ)..s, E u have hF_cont : ContinuousOn F (Set.Icc 0 t) := hU_cont.add (continuousOn_const.mul (primitive_continuousOn_Icc ht.1 hE_cont_t)) have hF_le : ∀ s ∈ Set.Icc 0 t, F s ≤ F 0 := by refine image_le_of_deriv_right_le_deriv_boundary hF_cont (f' := fun s => dUFun s + 2 * ν * E s) ?_ (B := fun _ => F 0) (B' := fun _ => 0) le_rfl continuousOn_const (fun s _ => hasDerivWithinAt_const s (Set.Ici s) (F 0)) ?_ · intro s hs have hsT : s ∈ Set.Icc 0 T := ⟨hs.1, le_trans (le_of_lt hs.2) ht.2⟩ have hdU : HasDerivWithinAt U_sq (dUFun s) (Set.Ici s) s := by simp only [dUFun, hsT, ↓reduceDIte] exact (Classical.choose_spec (hU_deriv s hsT)).1.hasDerivWithinAt have hI_deriv : HasDerivWithinAt (fun u => ∫ x in (0 : ℝ)..u, E x) (E s) (Set.Ici s) s := primitive_hasDerivWithinAt_Ici hE_cont_t hs exact hdU.add (hI_deriv.const_mul (2 * ν)) · intro s hs have hsT : s ∈ Set.Icc 0 T := ⟨hs.1, le_trans (le_of_lt hs.2) ht.2⟩ simp only [dUFun, hsT, ↓reduceDIte] have hle := (Classical.choose_spec (hU_deriv s hsT)).2 linarith have hFt := hF_le t ⟨ht.1, le_rfl⟩ dsimp only [F] at hFt rw [intervalIntegral.integral_same, mul_zero, add_zero, hU₀] at hFt have hUt : 0 ≤ U_sq t := hU_nn t ht rw [le_div_iff₀ (by positivity : 0 < 2 * ν)] linarith /-! ## 1. Kinetic/Enstrophy Critical Product Global Closure (`CP0`–`CP12`) -/ section CriticalProductClosure /-- Exact Young optimization for the flat-torus enstrophy inequality (`CP3`–`CP4`, `S3_CRITICAL_PRODUCT_PEAK_BOUND.md` lines 78–97): with `c = C_S^(3/2) / √2` and `A = 27 C_S⁶ / 64`: 1. `c E^(3/4) D^(3/4) ≤ (ν / 2) D + (27 c⁴ / (32 ν³)) E³`, 2. `2 * (27 c⁴ / (32 ν³)) = A / ν³`, 3. `(1 / 2) dE + ν D ≤ c E^(3/4) D^(3/4) → dE + ν D ≤ (A / ν³) E³`. -/ theorem critical_product_young_step {C_S ν E D dE : ℝ} (hC_S : 0 < C_S) (hν : 0 < ν) (hE : 0 ≤ E) (hD : 0 ≤ D) : let c := C_S ^ (3 / 2 : ℝ) / Real.sqrt 2 let A := 27 * C_S ^ 6 / 64 c * E ^ (3 / 4 : ℝ) * D ^ (3 / 4 : ℝ) ≤ (ν / 2) * D + (27 * c ^ 4 / (32 * ν ^ 3)) * E ^ 3 ∧ 2 * (27 * c ^ 4 / (32 * ν ^ 3)) = A / ν ^ 3 ∧ ((1 / 2) * dE + ν * D ≤ c * E ^ (3 / 4 : ℝ) * D ^ (3 / 4 : ℝ) → dE + ν * D ≤ (A / ν ^ 3) * E ^ 3) := by intro c A have hsqrt2_pos : 0 < Real.sqrt 2 := Real.sqrt_pos.mpr (by norm_num) have hc_pos : 0 < c := by dsimp [c]; positivity set a : ℝ := c * E ^ (3 / 4 : ℝ) have ha_nn : 0 ≤ a := by dsimp [a]; positivity set t : ℝ := D ^ (1 / 4 : ℝ) have ht_nn : 0 ≤ t := by dsimp [t]; positivity have ht3 : t ^ 3 = D ^ (3 / 4 : ℝ) := by dsimp [t] rw [← Real.rpow_natCast, ← Real.rpow_mul hD] norm_num have ht4 : t ^ 4 = D := by dsimp [t] rw [← Real.rpow_natCast, ← Real.rpow_mul hD] norm_num have ha4 : a ^ 4 = c ^ 4 * E ^ 3 := by have hE4 : (E ^ (3 / 4 : ℝ)) ^ 4 = E ^ 3 := by rw [← Real.rpow_natCast, ← Real.rpow_mul hE] norm_num dsimp [a] rw [mul_pow, hE4] set m : ℝ := 3 * a / (2 * ν) have hm_nn : 0 ≤ m := by dsimp [m]; positivity have hpoly : 0 ≤ (ν / 6) * (t - m) ^ 2 * (3 * t ^ 2 + 2 * m * t + m ^ 2) := by have h1 : 0 ≤ (ν / 6) * (t - m) ^ 2 := by positivity have h2 : 0 ≤ 3 * t ^ 2 + 2 * m * t + m ^ 2 := by positivity exact mul_nonneg h1 h2 have hident : (ν / 2) * t ^ 4 + (27 * a ^ 4 / (32 * ν ^ 3)) - a * t ^ 3 = (ν / 6) * (t - m) ^ 2 * (3 * t ^ 2 + 2 * m * t + m ^ 2) := by dsimp [m] field_simp [ne_of_gt hν] ring have hyoung : c * E ^ (3 / 4 : ℝ) * D ^ (3 / 4 : ℝ) ≤ (ν / 2) * D + (27 * c ^ 4 / (32 * ν ^ 3)) * E ^ 3 := by have h1 : a * t ^ 3 ≤ (ν / 2) * t ^ 4 + 27 * a ^ 4 / (32 * ν ^ 3) := by linarith rw [ht3, ht4, ha4] at h1 have h2 : 27 * (c ^ 4 * E ^ 3) / (32 * ν ^ 3) = (27 * c ^ 4 / (32 * ν ^ 3)) * E ^ 3 := by ring dsimp only [a] at h1 linarith have hc4 : c ^ 4 = C_S ^ 6 / 4 := by dsimp [c] rw [div_pow, ← Real.rpow_natCast, ← Real.rpow_mul (le_of_lt hC_S)] have hs4 : (Real.sqrt 2) ^ 4 = 4 := by have : (Real.sqrt 2) ^ 4 = ((Real.sqrt 2) ^ 2) ^ 2 := by ring rw [this, Real.sq_sqrt (by norm_num)] norm_num rw [hs4] norm_num have hcoef : 2 * (27 * c ^ 4 / (32 * ν ^ 3)) = A / ν ^ 3 := by rw [hc4] dsimp [A] field_simp [ne_of_gt hν] ring refine ⟨hyoung, hcoef, ?_⟩ intro hineq have hmul : dE + 2 * ν * D ≤ ν * D + 2 * (27 * c ^ 4 / (32 * ν ^ 3)) * E ^ 3 := by linarith rw [hcoef] at hmul linarith /-- Full real-calculus kinetic/enstrophy critical-product global enstrophy closure (`CP4`–`CP6`, `S3_CRITICAL_PRODUCT_PEAK_BOUND.md` lines 96–117): on any finite horizon `[0, T]` (`T ≥ 0`) of a classical solution with `E(0) = E₀ > 0`, `E > 0`, `D ≥ 0`, `U_sq(0) = U₀²`, `U_sq ≥ 0`, `E' + ν D ≤ (A / ν³) E³` (`A = 27 C_S⁶ / 64`), and kinetic dissipation `U_sq' ≤ -2 ν E`: the Lyapunov functional `1 / E(t) - (A / (2 ν⁴)) U_sq(t)` is monotone nondecreasing on `[0, T]`. Consequently, whenever the purely initial-data critical product satisfies `β := 27 C_S⁶ U₀² E₀ / (128 ν⁴) < 1` (with NO smallness condition on `A₃(0)`, `A₄(0)`, or `M₀`), we obtain the uniform all-time enstrophy ceiling `E(t) ≤ E₀ / (1 - β)` for all `t ∈ [0, T]`. -/ theorem critical_product_reciprocal_enstrophy_closure {E D U_sq : ℝ → ℝ} {C_S ν U₀ E₀ T : ℝ} (hC_S : 0 < C_S) (hν : 0 < ν) (hE₀ : 0 < E₀) (hE0 : E 0 = E₀) (hU0 : U_sq 0 = U₀ ^ 2) (hEpos : ∀ t ∈ Set.Icc 0 T, 0 < E t) (hDnn : ∀ t ∈ Set.Icc 0 T, 0 ≤ D t) (hUnn : ∀ t ∈ Set.Icc 0 T, 0 ≤ U_sq t) (hEderiv : ∀ t ∈ Set.Icc 0 T, ∃ dE : ℝ, HasDerivAt E dE t ∧ dE + ν * D t ≤ (27 * C_S ^ 6 / 64) / ν ^ 3 * (E t) ^ 3) (hUderiv : ∀ t ∈ Set.Icc 0 T, ∃ dU : ℝ, HasDerivAt U_sq dU t ∧ dU ≤ -(2 * ν) * E t) (hβ : 27 * C_S ^ 6 * U₀ ^ 2 * E₀ / (128 * ν ^ 4) < 1) : let β := 27 * C_S ^ 6 * U₀ ^ 2 * E₀ / (128 * ν ^ 4) ∀ t ∈ Set.Icc 0 T, (1 - β) / E₀ ≤ 1 / E t ∧ E t ≤ E₀ / (1 - β) := by intro β set A : ℝ := 27 * C_S ^ 6 / 64 have hA_pos : 0 < A := by dsimp [A]; positivity let g : ℝ → ℝ := fun t => -(1 / E t - (A / (2 * ν ^ 4)) * U_sq t) have hg_deriv : ∀ t ∈ Set.Icc 0 T, ∃ dg : ℝ, HasDerivAt g dg t ∧ dg ≤ 0 := by intro t ht obtain ⟨dE, hdE, hE_ineq⟩ := hEderiv t ht obtain ⟨dU, hdU, hU_ineq⟩ := hUderiv t ht have hEt : 0 < E t := hEpos t ht have hEt_ne : E t ≠ 0 := ne_of_gt hEt have hinv : HasDerivAt (fun u => 1 / E u) (-dE / (E t) ^ 2) t := by have h1 := (hasDerivAt_const t (1 : ℝ)).fun_div hdE hEt_ne have hval : (0 * E t - 1 * dE) / (E t) ^ 2 = -dE / (E t) ^ 2 := by ring rwa [hval] at h1 have hterm2 := hdU.const_mul (A / (2 * ν ^ 4)) refine ⟨-(-dE / (E t) ^ 2 - (A / (2 * ν ^ 4)) * dU), (hinv.fun_sub hterm2).fun_neg, ?_⟩ have hdE_le : dE ≤ A / ν ^ 3 * (E t) ^ 3 := by have hνD : 0 ≤ ν * D t := mul_nonneg (le_of_lt hν) (hDnn t ht) dsimp only [A] linarith have h1 : dE / (E t) ^ 2 ≤ A / ν ^ 3 * E t := by rw [div_le_iff₀ (sq_pos_of_pos hEt)] calc dE ≤ A / ν ^ 3 * (E t) ^ 3 := hdE_le _ = A / ν ^ 3 * E t * (E t) ^ 2 := by ring have h2 : (A / (2 * ν ^ 4)) * dU ≤ -(A / ν ^ 3 * E t) := by have hcoef : 0 ≤ A / (2 * ν ^ 4) := by positivity calc (A / (2 * ν ^ 4)) * dU ≤ (A / (2 * ν ^ 4)) * (-(2 * ν) * E t) := mul_le_mul_of_nonneg_left hU_ineq hcoef _ = -(A / ν ^ 3 * E t) := by field_simp [ne_of_gt hν] have hsimp : -(-dE / (E t) ^ 2 - (A / (2 * ν ^ 4)) * dU) = dE / (E t) ^ 2 + (A / (2 * ν ^ 4)) * dU := by ring linarith have hg_le := le_start_of_hasDerivAt_nonpos hg_deriv intro t ht have hgt := hg_le t ht dsimp only [g] at hgt rw [hE0, hU0] at hgt have hU_nonneg : 0 ≤ (A / (2 * ν ^ 4)) * U_sq t := mul_nonneg (by positivity) (hUnn t ht) have hβ_eq : (1 - β) / E₀ = 1 / E₀ - (A / (2 * ν ^ 4)) * U₀ ^ 2 := by dsimp only [β, A] field_simp [ne_of_gt hE₀, ne_of_gt hν] ring have hrec : (1 - β) / E₀ ≤ 1 / E t := by linarith refine ⟨hrec, ?_⟩ have h1mβ : 0 < 1 - β := by linarith have hEt : 0 < E t := hEpos t ht rw [le_div_iff₀ h1mβ] have hmul := mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hrec (le_of_lt hE₀)) (le_of_lt hEt) have hL : E₀ * ((1 - β) / E₀) * E t = E t * (1 - β) := by field_simp [ne_of_gt hE₀] have hR : E₀ * (1 / E t) * E t = E₀ := by field_simp [ne_of_gt hEt] linarith /-- Monotonicity of the quarter-order Mittag-Leffler series `E_{1/4}(z)` for `0 ≤ z₁ ≤ z₂`. -/ theorem mittagLefflerQuarter_mono {G : ℝ → ℝ} (hG : GammaLike G) {z₁ z₂ : ℝ} (hz₁ : 0 ≤ z₁) (hle : z₁ ≤ z₂) : mittagLefflerQuarter G z₁ ≤ mittagLefflerQuarter G z₂ := by have hz₂ : 0 ≤ z₂ := le_trans hz₁ hle have hs₁ := (mittagLefflerQuarter_bound_and_remainder hG hz₁).1 have hs₂ := (mittagLefflerQuarter_bound_and_remainder hG hz₂).1 apply hs₁.tsum_le_tsum _ hs₂ intro j have hGj : 0 < G (1 + (j : ℝ) / 4) := hG.pos _ (by positivity) exact div_le_div_of_nonneg_right (pow_le_pow_left₀ hz₁ hle j) (le_of_lt hGj) /-- Positivity lower bound `1 ≤ E_{1/4}(z)` for `z ≥ 0` when `G(1) = 1` (e.g. `Γ(1) = 1`). -/ theorem one_le_mittagLefflerQuarter {G : ℝ → ℝ} (hG : GammaLike G) (hG1 : G 1 = 1) {z : ℝ} (hz : 0 ≤ z) : 1 ≤ mittagLefflerQuarter G z := by have hs := (mittagLefflerQuarter_bound_and_remainder hG hz).1 have h0 : z ^ 0 / G (1 + (0 : ℕ) / 4) ≤ ∑' j : ℕ, z ^ j / G (1 + (j : ℝ) / 4) := hs.le_tsum 0 (fun j _ => div_nonneg (pow_nonneg hz j) (le_of_lt (hG.pos _ (by positivity)))) simpa [mittagLefflerQuarter, hG1] using h0 /-- Critical-product Mittag-Leffler peak envelope, four-term exponential bound, signed-budget bound `B_a^CP`, and normalized peak integral (`CP9`–`CP12`, `S3_CRITICAL_PRODUCT_PEAK_BOUND.md` lines 156–190). -/ theorem critical_product_mittag_leffler_peak_and_budget {G M C_a : ℝ → ℝ} {M₀ k C_u U₀ ν lam₁ T : ℝ} (hG : GammaLike G) (hG1 : G 1 = 1) (hM₀ : 0 < M₀) (hk : 0 ≤ k) (hC_u : 0 ≤ C_u) (hU₀ : 0 ≤ U₀) (hν : 0 < ν) (hlam₁ : 0 < lam₁) (hT : 0 ≤ T) (hM_cont : ContinuousOn M (Set.Icc 0 T)) (hM_le : ∀ t ∈ Set.Icc 0 T, M t ≤ M₀ * mittagLefflerQuarter G (G (1 / 4) * k * t ^ (1 / 4 : ℝ))) (hCa_stab : ∀ t ∈ Set.Icc 0 T, 0 < M t → |C_a t - Real.log (M t / M₀)| ≤ C_u * U₀ * (1 - Real.exp (-(ν * lam₁ * t))) / (ν * lam₁)) : let z : ℝ → ℝ := fun t => G (1 / 4) * k * t ^ (1 / 4 : ℝ) (∀ t ∈ Set.Icc 0 T, M t ≤ M₀ * Real.exp ((z T) ^ 4) * ∑ ℓ : Fin 4, (z T) ^ (ℓ : ℕ) / G (1 + (ℓ : ℝ) / 4)) ∧ (∀ t ∈ Set.Icc 0 T, 0 < M t → C_a t ≤ Real.log (mittagLefflerQuarter G (z T)) + C_u * U₀ * (1 - Real.exp (-(ν * lam₁ * T))) / (ν * lam₁)) ∧ ((1 / M₀) * (∫ t in (0 : ℝ)..T, M t) ≤ T * mittagLefflerQuarter G (z T)) := by intro z have hG14 : 0 < G (1 / 4) := hG.pos _ (by norm_num) have hz_nn : ∀ t ∈ Set.Icc 0 T, 0 ≤ z t := fun t ht => by dsimp [z] exact mul_nonneg (mul_nonneg (le_of_lt hG14) hk) (Real.rpow_nonneg ht.1 _) have hz_le : ∀ t ∈ Set.Icc 0 T, z t ≤ z T := fun t ht => by dsimp [z] exact mul_le_mul_of_nonneg_left (Real.rpow_le_rpow ht.1 ht.2 (by norm_num)) (mul_nonneg (le_of_lt hG14) hk) have hzT_nn : 0 ≤ z T := hz_nn T ⟨hT, le_rfl⟩ have hE_ge1 : 1 ≤ mittagLefflerQuarter G (z T) := one_le_mittagLefflerQuarter hG hG1 hzT_nn have hE_pos : 0 < mittagLefflerQuarter G (z T) := by linarith have hM_unif : ∀ t ∈ Set.Icc 0 T, M t ≤ M₀ * mittagLefflerQuarter G (z T) := fun t ht => le_trans (hM_le t ht) (mul_le_mul_of_nonneg_left (mittagLefflerQuarter_mono hG (hz_nn t ht) (hz_le t ht)) (le_of_lt hM₀)) refine ⟨?_, ?_, ?_⟩ · intro t ht have hML := (mittagLefflerQuarter_bound_and_remainder hG hzT_nn).2.1 calc M t ≤ M₀ * mittagLefflerQuarter G (z T) := hM_unif t ht _ ≤ M₀ * (Real.exp ((z T) ^ 4) * ∑ ℓ : Fin 4, (z T) ^ (ℓ : ℕ) / G (1 + (ℓ : ℝ) / 4)) := mul_le_mul_of_nonneg_left hML (le_of_lt hM₀) _ = M₀ * Real.exp ((z T) ^ 4) * ∑ ℓ : Fin 4, (z T) ^ (ℓ : ℕ) / G (1 + (ℓ : ℝ) / 4) := by ring · intro t ht hMt_pos have hstab := (abs_le.mp (hCa_stab t ht hMt_pos)).2 have hratio : M t / M₀ ≤ mittagLefflerQuarter G (z T) := (div_le_iff₀ hM₀).mpr (by linarith [hM_unif t ht]) have hlog : Real.log (M t / M₀) ≤ Real.log (mittagLefflerQuarter G (z T)) := Real.log_le_log (div_pos hMt_pos hM₀) hratio have hexp : 1 - Real.exp (-(ν * lam₁ * t)) ≤ 1 - Real.exp (-(ν * lam₁ * T)) := by have : Real.exp (-(ν * lam₁ * T)) ≤ Real.exp (-(ν * lam₁ * t)) := Real.exp_le_exp.mpr (by nlinarith [ht.2, mul_pos hν hlam₁]) linarith have hfar : C_u * U₀ * (1 - Real.exp (-(ν * lam₁ * t))) / (ν * lam₁) ≤ C_u * U₀ * (1 - Real.exp (-(ν * lam₁ * T))) / (ν * lam₁) := div_le_div_of_nonneg_right (mul_le_mul_of_nonneg_left hexp (mul_nonneg hC_u hU₀)) (le_of_lt (mul_pos hν hlam₁)) linarith · have hint : IntervalIntegrable M MeasureTheory.volume 0 T := hM_cont.intervalIntegrable_of_Icc hT have hint_c : IntervalIntegrable (fun _ : ℝ => M₀ * mittagLefflerQuarter G (z T)) MeasureTheory.volume 0 T := intervalIntegrable_const have hmono := intervalIntegral.integral_mono_on hT hint hint_c hM_unif rw [intervalIntegral.integral_const, sub_zero, smul_eq_mul] at hmono calc (1 / M₀) * (∫ t in (0 : ℝ)..T, M t) ≤ (1 / M₀) * (T * (M₀ * mittagLefflerQuarter G (z T))) := mul_le_mul_of_nonneg_left hmono (by positivity) _ = T * mittagLefflerQuarter G (z T) := by field_simp [ne_of_gt hM₀] end CriticalProductClosure /-! ## 2. Large-`A₃` (`q₀ > 1`) Energy-Entry Global Closure (`SC1`–`SC15`) -/ section EnergyEntryClosure /-- Exact `H³/H¹` spectral-weight interpolation (`SC7`–`SC8`, `S3_SIGNED_CLOSURE_ATTEMPT_V2.md` lines 105–129): for every `λ ≥ λ₁ > 0`, with `p₁(λ) = 1 + λ`, `p₃(λ) = 1 + λ + λ² + λ³`, and `C_I = √(1 + λ₁⁻²)`: 1. `p₃(λ) = (1 + λ)(1 + λ²)`, 2. `p₃(λ)^(3/2) ≤ C_I p₁(λ)^(1/2) (λ p₃(λ))`, 3. From `(1/2) dA₃sq + ν D₃sq ≤ C₃ A₃³`, `A₃³ ≤ C_I A₁ D₃sq`, and `A₁ ≤ ν / (2 C₃ C_I)`: `(1/2) dA₃sq + (ν/2) D₃sq ≤ 0` (`SC8`). -/ theorem spectral_weight_H3_H1_interpolation_SC7 {lam₁ lam ν C₃ A₁ A₃ D₃sq dA₃sq : ℝ} (hlam₁ : 0 < lam₁) (hlam : lam₁ ≤ lam) (hC₃ : 0 < C₃) (hD₃ : 0 ≤ D₃sq) : let p₁ := 1 + lam let p₃ := 1 + lam + lam ^ 2 + lam ^ 3 let C_I := Real.sqrt (1 + lam₁ ^ (-(2 : ℤ))) p₃ = (1 + lam) * (1 + lam ^ 2) ∧ p₃ ^ (3 / 2 : ℝ) ≤ C_I * p₁ ^ (1 / 2 : ℝ) * (lam * p₃) ∧ (((1 / 2) * dA₃sq + ν * D₃sq ≤ C₃ * A₃ ^ 3) → (A₃ ^ 3 ≤ C_I * A₁ * D₃sq) → (A₁ ≤ ν / (2 * C₃ * C_I)) → (1 / 2) * dA₃sq + (ν / 2) * D₃sq ≤ 0) := by intro p₁ p₃ C_I have hlam_pos : 0 < lam := lt_of_lt_of_le hlam₁ hlam have hp₃_fac : p₃ = (1 + lam) * (1 + lam ^ 2) := by dsimp [p₃]; ring have hp₁_pos : 0 < p₁ := by dsimp [p₁]; linarith have hp₃_pos : 0 < p₃ := by rw [hp₃_fac]; positivity have hCI_sq : C_I ^ 2 = 1 + lam₁ ^ (-(2 : ℤ)) := by dsimp [C_I] exact Real.sq_sqrt (by positivity) have hCI_pos : 0 < C_I := Real.sqrt_pos.mpr (by positivity) have hspec : p₃ ^ (3 / 2 : ℝ) ≤ C_I * p₁ ^ (1 / 2 : ℝ) * (lam * p₃) := by have hL_nn : 0 ≤ p₃ ^ (3 / 2 : ℝ) := Real.rpow_nonneg (le_of_lt hp₃_pos) _ have hR_nn : 0 ≤ C_I * p₁ ^ (1 / 2 : ℝ) * (lam * p₃) := by positivity rw [← sq_le_sq₀ hL_nn hR_nn] have hL_sq : (p₃ ^ (3 / 2 : ℝ)) ^ 2 = p₃ ^ 3 := by rw [← Real.rpow_natCast, ← Real.rpow_mul (le_of_lt hp₃_pos)]; norm_num have hp1_sq : (p₁ ^ (1 / 2 : ℝ)) ^ 2 = p₁ := by rw [← Real.rpow_natCast, ← Real.rpow_mul (le_of_lt hp₁_pos)]; norm_num have hR_sq : (C_I * p₁ ^ (1 / 2 : ℝ) * (lam * p₃)) ^ 2 = (1 + lam₁ ^ (-(2 : ℤ))) * p₁ * lam ^ 2 * p₃ ^ 2 := by calc (C_I * p₁ ^ (1 / 2 : ℝ) * (lam * p₃)) ^ 2 = C_I ^ 2 * (p₁ ^ (1 / 2 : ℝ)) ^ 2 * lam ^ 2 * p₃ ^ 2 := by ring _ = (1 + lam₁ ^ (-(2 : ℤ))) * p₁ * lam ^ 2 * p₃ ^ 2 := by rw [hCI_sq, hp1_sq] rw [hL_sq, hR_sq] have hratio : 1 ≤ lam ^ 2 / lam₁ ^ 2 := by rw [one_le_div (sq_pos_of_pos hlam₁)] nlinarith have hdiff : (1 + lam₁ ^ (-(2 : ℤ))) * p₁ * lam ^ 2 * p₃ ^ 2 - p₃ ^ 3 = p₃ ^ 2 * p₁ * (lam ^ 2 / lam₁ ^ 2 - 1) := by have hz : lam₁ ^ (-(2 : ℤ)) = (lam₁ ^ 2)⁻¹ := by rw [zpow_neg, zpow_two, pow_two] rw [hz, hp₃_fac] dsimp only [p₁] field_simp [ne_of_gt hlam₁] ring have hnn : 0 ≤ p₃ ^ 2 * p₁ * (lam ^ 2 / lam₁ ^ 2 - 1) := mul_nonneg (mul_nonneg (sq_nonneg p₃) (le_of_lt hp₁_pos)) (by linarith) linarith refine ⟨hp₃_fac, hspec, ?_⟩ intro hineq hinterp hA₁ have h1 : C₃ * C_I * A₁ ≤ ν / 2 := by have hmul := mul_le_mul_of_nonneg_left hA₁ (le_of_lt (mul_pos hC₃ hCI_pos)) have hR : C₃ * C_I * (ν / (2 * C₃ * C_I)) = ν / 2 := by field_simp [ne_of_gt hC₃, ne_of_gt hCI_pos] linarith have h2 : C₃ * A₃ ^ 3 ≤ (ν / 2) * D₃sq := by calc C₃ * A₃ ^ 3 ≤ C₃ * (C_I * A₁ * D₃sq) := mul_le_mul_of_nonneg_left hinterp (le_of_lt hC₃) _ = (C₃ * C_I * A₁) * D₃sq := by ring _ ≤ (ν / 2) * D₃sq := mul_le_mul_of_nonneg_right h1 hD₃ linarith /-- Forward-invariant enstrophy trap and simultaneous exponential decay of `E` and `A₃` (`SC9`–`SC11`, `S3_SIGNED_CLOSURE_ATTEMPT_V2.md` lines 144–169): with `E_bar := min{ν² √λ₁ / (4 c_*²), ν² / (4 C₃² C_I² C_P²)}`: once `E(t₀) ≤ E_bar` at any classical time `t₀ ≤ T`, the `sInf` first-crossing argument forces `E(t) ≤ E_bar` throughout `[t₀, T]`, proving for ALL `t ∈ [t₀, T]` (zero-safe): 1. `E(t) ≤ E_bar`, 2. `E(t) ≤ E(t₀) e^{-ν λ₁ (t - t₀)}`, 3. `A₁(t) ≤ ν / (2 C₃ C_I)`, 4. `A₃(t) ≤ A₃(t₀) e^{-ν λ₁ (t - t₀) / 2}`. -/ theorem forward_invariant_enstrophy_trap_SC9_SC11 {E D A₁ A₃ D₃sq : ℝ → ℝ} {ν lam₁ c_star C₃ C_I C_P t₀ T : ℝ} (hν : 0 < ν) (hlam₁ : 0 < lam₁) (hc : 0 < c_star) (hC₃ : 0 < C₃) (hC_I : 0 < C_I) (hC_P : 0 < C_P) (ht₀T : t₀ ≤ T) (hEt₀ : E t₀ ≤ min (ν ^ 2 * Real.sqrt lam₁ / (4 * c_star ^ 2)) (ν ^ 2 / (4 * C₃ ^ 2 * C_I ^ 2 * C_P ^ 2))) (hEnn : ∀ t ∈ Set.Icc t₀ T, 0 ≤ E t) (hD_poin : ∀ t ∈ Set.Icc t₀ T, lam₁ * E t ≤ D t) (hE_deriv : ∀ t ∈ Set.Icc t₀ T, ∃ dE : ℝ, HasDerivAt E dE t ∧ dE + 2 * ν * D t ≤ 2 * c_star * lam₁ ^ (-(1 / 4 : ℝ)) * Real.sqrt (E t) * D t) (hA₁_le : ∀ t ∈ Set.Icc t₀ T, A₁ t ≤ C_P * Real.sqrt (E t)) (hA₃_nn : ∀ t ∈ Set.Icc t₀ T, 0 ≤ A₃ t) (hD₃_poin : ∀ t ∈ Set.Icc t₀ T, lam₁ * (A₃ t) ^ 2 ≤ D₃sq t) (hA₃_interp : ∀ t ∈ Set.Icc t₀ T, (A₃ t) ^ 3 ≤ C_I * A₁ t * D₃sq t) (hA₃sq_deriv : ∀ t ∈ Set.Icc t₀ T, ∃ dA : ℝ, HasDerivAt (fun u => (A₃ u) ^ 2) dA t ∧ (1 / 2) * dA + ν * D₃sq t ≤ C₃ * (A₃ t) ^ 3) : let E_bar := min (ν ^ 2 * Real.sqrt lam₁ / (4 * c_star ^ 2)) (ν ^ 2 / (4 * C₃ ^ 2 * C_I ^ 2 * C_P ^ 2)) ∀ t ∈ Set.Icc t₀ T, E t ≤ E_bar ∧ E t ≤ E t₀ * Real.exp (-(ν * lam₁ * (t - t₀))) ∧ A₁ t ≤ ν / (2 * C₃ * C_I) ∧ A₃ t ≤ A₃ t₀ * Real.exp (-(ν * lam₁ * (t - t₀) / 2)) := by intro E_bar have hEbar_pos : 0 < E_bar := by dsimp [E_bar] exact lt_min (by positivity) (by positivity) have hEbar_le1 : E_bar ≤ ν ^ 2 * Real.sqrt lam₁ / (4 * c_star ^ 2) := min_le_left _ _ have hEbar_le2 : E_bar ≤ ν ^ 2 / (4 * C₃ ^ 2 * C_I ^ 2 * C_P ^ 2) := min_le_right _ _ -- Helper: whenever E s ≤ E_bar, 2 * c_star * lam₁^(-1/4) * √(E s) ≤ ν. have hcoef_le_nu : ∀ x : ℝ, 0 ≤ x → x ≤ E_bar → 2 * c_star * lam₁ ^ (-(1 / 4 : ℝ)) * Real.sqrt x ≤ ν := by intro x hx hxle have hL_nn : 0 ≤ 2 * c_star * lam₁ ^ (-(1 / 4 : ℝ)) * Real.sqrt x := by positivity rw [← sq_le_sq₀ hL_nn (le_of_lt hν)] have hlam_sq : (lam₁ ^ (-(1 / 4 : ℝ))) ^ 2 = (Real.sqrt lam₁)⁻¹ := by rw [← Real.rpow_natCast, ← Real.rpow_mul (le_of_lt hlam₁), Real.sqrt_eq_rpow, ← Real.rpow_neg (le_of_lt hlam₁)] norm_num calc (2 * c_star * lam₁ ^ (-(1 / 4 : ℝ)) * Real.sqrt x) ^ 2 = 4 * c_star ^ 2 * (lam₁ ^ (-(1 / 4 : ℝ))) ^ 2 * (Real.sqrt x) ^ 2 := by ring _ = 4 * c_star ^ 2 * (Real.sqrt lam₁)⁻¹ * x := by rw [hlam_sq, Real.sq_sqrt hx] _ ≤ 4 * c_star ^ 2 * (Real.sqrt lam₁)⁻¹ * (ν ^ 2 * Real.sqrt lam₁ / (4 * c_star ^ 2)) := mul_le_mul_of_nonneg_left (le_trans hxle hEbar_le1) (by positivity) _ = ν ^ 2 := by have hs : Real.sqrt lam₁ ≠ 0 := ne_of_gt (Real.sqrt_pos.mpr hlam₁) field_simp [ne_of_gt hc, hs] -- Step 1: Forward invariance E t ≤ E_bar on [t₀, T] via sInf first-crossing. have hE_trap : ∀ t ∈ Set.Icc t₀ T, E t ≤ E_bar := by by_contra hnot push Not at hnot let S : Set ℝ := {s ∈ Set.Icc t₀ T | E_bar < E s} have hS_ne : S.Nonempty := by obtain ⟨t, ht, hgt⟩ := hnot exact ⟨t, ht, hgt⟩ have hS_bdd : BddBelow S := ⟨t₀, fun s hs => hs.1.1⟩ set s₁ : ℝ := sInf S have hs₁_ge : t₀ ≤ s₁ := le_csInf hS_ne (fun s hs => hs.1.1) have hs₁_le : s₁ ≤ T := by obtain ⟨t, ht⟩ := hS_ne exact le_trans (csInf_le hS_bdd ht) ht.1.2 have hs₁_mem : s₁ ∈ Set.Icc t₀ T := ⟨hs₁_ge, hs₁_le⟩ obtain ⟨dE, hdE, hE_ineq⟩ := hE_deriv s₁ hs₁_mem have hE_cont_s₁ : ContinuousAt E s₁ := hdE.continuousAt -- Prove E s₁ ≥ E_bar (from s₁ = sInf S and continuity). have hEs₁_ge : E_bar ≤ E s₁ := by by_contra hlt push Not at hlt have hev : ∀ᶠ u in nhds s₁, E u < E_bar := hE_cont_s₁.eventually (Iio_mem_nhds hlt) obtain ⟨δ, hδ_pos, hδ⟩ := Metric.eventually_nhds_iff.mp hev obtain ⟨u, huS, hu_lt⟩ := exists_lt_of_csInf_lt hS_ne (lt_add_of_pos_right s₁ hδ_pos) have hs₁_le_u : s₁ ≤ u := csInf_le hS_bdd huS have hdist : dist u s₁ < δ := by rw [Real.dist_eq, abs_of_nonneg (sub_nonneg.mpr hs₁_le_u)] linarith have hEu_lt : E u < E_bar := hδ hdist linarith [huS.2] -- Prove E s₁ ≤ E_bar (from E t₀ ≤ E_bar and E u ≤ E_bar for t₀ ≤ u < s₁). have hEs₁_le : E s₁ ≤ E_bar := by rcases eq_or_lt_of_le hs₁_ge with hs₁_eq | hs₁_gt · rw [← hs₁_eq]; exact hEt₀ · let useq : ℕ → ℝ := fun n => s₁ - (s₁ - t₀) / ((n : ℝ) + 2) have huseq_tend : Filter.Tendsto useq Filter.atTop (nhds s₁) := by have h0 : Filter.Tendsto (fun n : ℕ => (s₁ - t₀) / ((n : ℝ) + 2)) Filter.atTop (nhds 0) := by simpa [Function.comp_def, Nat.cast_add, Nat.cast_ofNat] using (tendsto_const_div_atTop_nhds_zero_nat (s₁ - t₀)).comp (Filter.tendsto_add_atTop_nat 2) simpa [useq] using tendsto_const_nhds.sub h0 have huseq_le : ∀ n : ℕ, E (useq n) ≤ E_bar := by intro n have hpos : 0 < (s₁ - t₀) / ((n : ℝ) + 2) := div_pos (by linarith) (by positivity) have hlt : (s₁ - t₀) / ((n : ℝ) + 2) < s₁ - t₀ := by rw [div_lt_iff₀ (by positivity : (0 : ℝ) < (n : ℝ) + 2)] nlinarith [Nat.cast_nonneg (α := ℝ) n] have hu_mem : useq n ∈ Set.Icc t₀ T := by dsimp [useq]; exact ⟨by linarith, by linarith⟩ have hu_lt : useq n < s₁ := by dsimp [useq]; linarith by_contra hgt push Not at hgt have : s₁ ≤ useq n := csInf_le hS_bdd ⟨hu_mem, hgt⟩ linarith exact le_of_tendsto (hE_cont_s₁.tendsto.comp huseq_tend) (Filter.Eventually.of_forall huseq_le) have hEs₁_eq : E s₁ = E_bar := le_antisymm hEs₁_le hEs₁_ge -- At s₁, dE ≤ -ν λ₁ E_bar < 0, contradicting s₁ = sInf S! have hD_pos : lam₁ * E_bar ≤ D s₁ := by have := hD_poin s₁ hs₁_mem; rwa [hEs₁_eq] at this have hD_nn : 0 ≤ D s₁ := le_trans (mul_nonneg (le_of_lt hlam₁) (le_of_lt hEbar_pos)) hD_pos have hcoef_s₁ := hcoef_le_nu (E s₁) (hEnn s₁ hs₁_mem) hEs₁_le have hprod_le : 2 * c_star * lam₁ ^ (-(1 / 4 : ℝ)) * Real.sqrt (E s₁) * D s₁ ≤ ν * D s₁ := mul_le_mul_of_nonneg_right hcoef_s₁ hD_nn have hdE_neg : dE < 0 := by have h1 : dE ≤ -(ν * D s₁) := by linarith have h2 : 0 < ν * (lam₁ * E_bar) := mul_pos hν (mul_pos hlam₁ hEbar_pos) nlinarith have hslope := hdE.tendsto_slope_zero_right obtain ⟨δ, hδ_pos, hδ⟩ := Metric.tendsto_nhdsWithin_nhds.mp hslope (-dE / 2) (by linarith) obtain ⟨u, huS, hu_lt⟩ := exists_lt_of_csInf_lt hS_ne (lt_add_of_pos_right s₁ hδ_pos) have hs₁_le_u : s₁ ≤ u := csInf_le hS_bdd huS have hu_gt : s₁ < u := lt_of_le_of_ne hs₁_le_u (fun heq => by rw [← heq] at huS; linarith [huS.2]) set h : ℝ := u - s₁ have hh_pos : 0 < h := sub_pos.mpr hu_gt have hh_dist : dist h 0 < δ := by rw [Real.dist_eq, sub_zero, abs_of_pos hh_pos]; dsimp [h]; linarith have hquot_dist : dist (h⁻¹ * (E (s₁ + h) - E s₁)) dE < -dE / 2 := hδ hh_pos hh_dist have hquot_neg : h⁻¹ * (E (s₁ + h) - E s₁) < 0 := by rw [Real.dist_eq, abs_lt] at hquot_dist linarith have hu_eq : s₁ + h = u := by dsimp [h]; ring rw [hu_eq, hEs₁_eq] at hquot_neg have hpos_quot : 0 < h⁻¹ * (E u - E_bar) := mul_pos (inv_pos.mpr hh_pos) (sub_pos.mpr huS.2) linarith -- Step 2: Exponential decay of E on [t₀, T] via gE(t) = E(t) e^{ν λ₁ (t - t₀)}. let gE : ℝ → ℝ := fun t => E t * Real.exp (ν * lam₁ * (t - t₀)) have hgE_deriv : ∀ t ∈ Set.Icc t₀ T, ∃ dg : ℝ, HasDerivAt gE dg t ∧ dg ≤ 0 := by intro t ht obtain ⟨dE, hdE, hE_ineq⟩ := hE_deriv t ht have hlin : HasDerivAt (fun u : ℝ => ν * lam₁ * (u - t₀)) (ν * lam₁) t := by simpa using ((hasDerivAt_id t).sub_const t₀).const_mul (ν * lam₁) have hexp := hlin.exp refine ⟨dE * Real.exp (ν * lam₁ * (t - t₀)) + E t * (Real.exp (ν * lam₁ * (t - t₀)) * (ν * lam₁)), hdE.mul hexp, ?_⟩ have hD_poin_t := hD_poin t ht have hD_nn : 0 ≤ D t := le_trans (mul_nonneg (le_of_lt hlam₁) (hEnn t ht)) hD_poin_t have hcoef_t := hcoef_le_nu (E t) (hEnn t ht) (hE_trap t ht) have hprod_le : 2 * c_star * lam₁ ^ (-(1 / 4 : ℝ)) * Real.sqrt (E t) * D t ≤ ν * D t := mul_le_mul_of_nonneg_right hcoef_t hD_nn have hdE_le : dE + ν * lam₁ * E t ≤ 0 := by nlinarith have hfac : dE * Real.exp (ν * lam₁ * (t - t₀)) + E t * (Real.exp (ν * lam₁ * (t - t₀)) * (ν * lam₁)) = Real.exp (ν * lam₁ * (t - t₀)) * (dE + ν * lam₁ * E t) := by ring rw [hfac] exact mul_nonpos_of_nonneg_of_nonpos (le_of_lt (Real.exp_pos _)) hdE_le have hgE_le := le_start_of_hasDerivAt_nonpos hgE_deriv -- Step 3: A₁(t) ≤ ν / (2 C₃ C_I) on [t₀, T]. have hA₁_trap : ∀ t ∈ Set.Icc t₀ T, A₁ t ≤ ν / (2 * C₃ * C_I) := by intro t ht have hsqrt_le : Real.sqrt (E t) ≤ ν / (2 * C₃ * C_I * C_P) := by rw [← sq_le_sq₀ (Real.sqrt_nonneg _) (by positivity), Real.sq_sqrt (hEnn t ht)] calc E t ≤ E_bar := hE_trap t ht _ ≤ ν ^ 2 / (4 * C₃ ^ 2 * C_I ^ 2 * C_P ^ 2) := hEbar_le2 _ = (ν / (2 * C₃ * C_I * C_P)) ^ 2 := by ring calc A₁ t ≤ C_P * Real.sqrt (E t) := hA₁_le t ht _ ≤ C_P * (ν / (2 * C₃ * C_I * C_P)) := mul_le_mul_of_nonneg_left hsqrt_le (le_of_lt hC_P) _ = ν / (2 * C₃ * C_I) := by field_simp [ne_of_gt hC_P, ne_of_gt hC₃, ne_of_gt hC_I] -- Step 4: Exponential decay of A₃(t)² on [t₀, T] via gA(t) = A₃(t)² e^{ν λ₁ (t - t₀)} (zero-safe). let gA : ℝ → ℝ := fun t => (A₃ t) ^ 2 * Real.exp (ν * lam₁ * (t - t₀)) have hgA_deriv : ∀ t ∈ Set.Icc t₀ T, ∃ dg : ℝ, HasDerivAt gA dg t ∧ dg ≤ 0 := by intro t ht obtain ⟨dA, hdA, hA_ineq⟩ := hA₃sq_deriv t ht have hlin : HasDerivAt (fun u : ℝ => ν * lam₁ * (u - t₀)) (ν * lam₁) t := by simpa using ((hasDerivAt_id t).sub_const t₀).const_mul (ν * lam₁) have hexp := hlin.exp refine ⟨dA * Real.exp (ν * lam₁ * (t - t₀)) + (A₃ t) ^ 2 * (Real.exp (ν * lam₁ * (t - t₀)) * (ν * lam₁)), hdA.mul hexp, ?_⟩ have hD₃_nn : 0 ≤ D₃sq t := le_trans (mul_nonneg (le_of_lt hlam₁) (sq_nonneg _)) (hD₃_poin t ht) have hC3CI : C₃ * C_I * A₁ t ≤ ν / 2 := by have hmul := mul_le_mul_of_nonneg_left (hA₁_trap t ht) (le_of_lt (mul_pos hC₃ hC_I)) have hR : C₃ * C_I * (ν / (2 * C₃ * C_I)) = ν / 2 := by field_simp [ne_of_gt hC₃, ne_of_gt hC_I] linarith have hcub : C₃ * (A₃ t) ^ 3 ≤ (ν / 2) * D₃sq t := by calc C₃ * (A₃ t) ^ 3 ≤ C₃ * (C_I * A₁ t * D₃sq t) := mul_le_mul_of_nonneg_left (hA₃_interp t ht) (le_of_lt hC₃) _ = (C₃ * C_I * A₁ t) * D₃sq t := by ring _ ≤ (ν / 2) * D₃sq t := mul_le_mul_of_nonneg_right hC3CI hD₃_nn have hdA_le : dA + ν * lam₁ * (A₃ t) ^ 2 ≤ 0 := by have hD₃p := hD₃_poin t ht nlinarith have hfac : dA * Real.exp (ν * lam₁ * (t - t₀)) + (A₃ t) ^ 2 * (Real.exp (ν * lam₁ * (t - t₀)) * (ν * lam₁)) = Real.exp (ν * lam₁ * (t - t₀)) * (dA + ν * lam₁ * (A₃ t) ^ 2) := by ring rw [hfac] exact mul_nonpos_of_nonneg_of_nonpos (le_of_lt (Real.exp_pos _)) hdA_le have hgA_le := le_start_of_hasDerivAt_nonpos hgA_deriv intro t ht refine ⟨hE_trap t ht, ?_, hA₁_trap t ht, ?_⟩ · have h1 := hgE_le t ht dsimp only [gE] at h1 simp only [sub_self, mul_zero, Real.exp_zero, mul_one] at h1 have h2 := mul_le_mul_of_nonneg_right h1 (le_of_lt (Real.exp_pos (-(ν * lam₁ * (t - t₀))))) rw [mul_assoc, ← Real.exp_add] at h2 simpa [add_neg_cancel] using h2 · have h1 := hgA_le t ht dsimp only [gA] at h1 simp only [sub_self, mul_zero, Real.exp_zero, mul_one] at h1 have h2 := mul_le_mul_of_nonneg_right h1 (le_of_lt (Real.exp_pos (-(ν * lam₁ * (t - t₀))))) rw [mul_assoc, ← Real.exp_add, add_neg_cancel, Real.exp_zero, mul_one] at h2 have hsq : (A₃ t) ^ 2 ≤ (A₃ t₀ * Real.exp (-(ν * lam₁ * (t - t₀) / 2))) ^ 2 := by rw [mul_pow, ← Real.exp_nat_mul] have hexp_eq : (2 : ℕ) * -(ν * lam₁ * (t - t₀) / 2) = -(ν * lam₁ * (t - t₀)) := by push_cast; ring rwa [hexp_eq] have hR_nn : 0 ≤ A₃ t₀ * Real.exp (-(ν * lam₁ * (t - t₀) / 2)) := mul_nonneg (hA₃_nn t₀ ⟨le_rfl, ht₀T⟩) (le_of_lt (Real.exp_pos _)) exact (sq_le_sq₀ (hA₃_nn t ht) hR_nn).mp hsq /-- Energy-entry pigeonhole lemma (`SC12`, `S3_SIGNED_CLOSURE_ATTEMPT_V2.md` lines 173–182): if `E` is continuous on `[0, τ_ent]` (`τ_ent = U₀² / (ν E_bar) > 0`) and satisfies the kinetic energy budget `∫₀^{τ_ent} E ≤ U₀² / (2 ν)`, then there exists a time `t₀ ∈ [0, τ_ent]` where `E(t₀) ≤ E_bar / 2` (in particular strictly inside the forward-invariant trap `E_bar`). -/ theorem energy_entry_exists_time {E : ℝ → ℝ} {U₀ ν E_bar : ℝ} (hU₀ : 0 < U₀) (hν : 0 < ν) (hEbar : 0 < E_bar) (hE_cont : ContinuousOn E (Set.Icc 0 (U₀ ^ 2 / (ν * E_bar)))) (hbudget : (∫ s in (0 : ℝ)..(U₀ ^ 2 / (ν * E_bar)), E s) ≤ U₀ ^ 2 / (2 * ν)) : ∃ t₀ ∈ Set.Icc 0 (U₀ ^ 2 / (ν * E_bar)), E t₀ ≤ E_bar / 2 := by set τ : ℝ := U₀ ^ 2 / (ν * E_bar) have hτ_pos : 0 < τ := by dsimp [τ]; positivity obtain ⟨t₀, ht₀, hmin⟩ := isCompact_Icc.exists_isMinOn (Set.nonempty_Icc.mpr (le_of_lt hτ_pos)) hE_cont refine ⟨t₀, ht₀, ?_⟩ have hint : IntervalIntegrable E MeasureTheory.volume 0 τ := hE_cont.intervalIntegrable_of_Icc (le_of_lt hτ_pos) have hmono := intervalIntegral.integral_mono_on (le_of_lt hτ_pos) (intervalIntegrable_const (c := E t₀)) hint (fun s hs => hmin hs) rw [intervalIntegral.integral_const, sub_zero, smul_eq_mul] at hmono have hrhs : U₀ ^ 2 / (2 * ν) = τ * (E_bar / 2) := by dsimp [τ] field_simp [ne_of_gt hν, ne_of_gt hEbar] have hle : τ * E t₀ ≤ τ * (E_bar / 2) := by linarith exact (mul_le_mul_iff_right₀ hτ_pos).mp hle /-- Full large-`A₃` (`q₀ > 1`) energy-entry global peak & signed-budget closure (`SC12`–`SC15`, `S3_SIGNED_CLOSURE_ATTEMPT_V2.md` lines 173–198): even when the initial `H³` norm exceeds the small-data Riccati threshold (`q₀ = C₃ A₀ / (ν λ₁) > 1`), if the purely initial-data entry time `τ_ent = U₀² / (ν E_bar)` is strictly below the Riccati barrier `t_b = (ν λ₁)⁻¹ log(q₀ / (q₀ - 1))`, then combining the derivative-barrier Riccati bound on `[0, t₀]` with the forward-invariant trap on `[t₀, T]` proves for EVERY finite horizon `T ≥ τ_ent`, with `A_bar := max A₀ (f τ_ent)`: 1. `∀ t ∈ [0, T], A₃(t) ≤ A_bar` and `M(t) ≤ C_M A_bar` (`SC13`), 2. `∫₀ᵀ M(t) dt ≤ C_M A_bar (τ_ent + 2 / (ν λ₁))` (`SC14`), 3. `∀ t ∈ [0, T], 0 < M(t) → C_a(t) ≤ log(C_M A_bar / M₀) + C_u U₀ / (ν λ₁)` (`SC15`). -/ theorem energy_entry_global_closure_SC12_SC15 {E D A₁ A₃ D₃sq M C_a : ℝ → ℝ} {U₀ ν lam₁ c_star C₃ C_I C_P C_M C_u A₀ M₀ T : ℝ} (hU₀ : 0 < U₀) (hν : 0 < ν) (hlam₁ : 0 < lam₁) (hc : 0 < c_star) (hC₃ : 0 < C₃) (hC_I : 0 < C_I) (hC_P : 0 < C_P) (hC_M : 0 ≤ C_M) (hC_u : 0 ≤ C_u) (hA₀ : 0 < A₀) (hM₀ : 0 < M₀) (hq₀ : 1 < C₃ * A₀ / (ν * lam₁)) (hτ_lt_tb : U₀ ^ 2 / (ν * min (ν ^ 2 * Real.sqrt lam₁ / (4 * c_star ^ 2)) (ν ^ 2 / (4 * C₃ ^ 2 * C_I ^ 2 * C_P ^ 2))) < (ν * lam₁)⁻¹ * Real.log ((C₃ * A₀ / (ν * lam₁)) / (C₃ * A₀ / (ν * lam₁) - 1))) (hτ_le_T : U₀ ^ 2 / (ν * min (ν ^ 2 * Real.sqrt lam₁ / (4 * c_star ^ 2)) (ν ^ 2 / (4 * C₃ ^ 2 * C_I ^ 2 * C_P ^ 2))) ≤ T) (hA₃0 : A₃ 0 = A₀) (hEnn : ∀ t ∈ Set.Icc 0 T, 0 ≤ E t) (hD_poin : ∀ t ∈ Set.Icc 0 T, lam₁ * E t ≤ D t) (hE_deriv : ∀ t ∈ Set.Icc 0 T, ∃ dE : ℝ, HasDerivAt E dE t ∧ dE + 2 * ν * D t ≤ 2 * c_star * lam₁ ^ (-(1 / 4 : ℝ)) * Real.sqrt (E t) * D t) (hbudget : (∫ s in (0 : ℝ)..(U₀ ^ 2 / (ν * min (ν ^ 2 * Real.sqrt lam₁ / (4 * c_star ^ 2)) (ν ^ 2 / (4 * C₃ ^ 2 * C_I ^ 2 * C_P ^ 2)))), E s) ≤ U₀ ^ 2 / (2 * ν)) (hA₁_le : ∀ t ∈ Set.Icc 0 T, A₁ t ≤ C_P * Real.sqrt (E t)) (hA₃_pos : ∀ t ∈ Set.Icc 0 T, 0 < A₃ t) (hD₃_poin : ∀ t ∈ Set.Icc 0 T, lam₁ * (A₃ t) ^ 2 ≤ D₃sq t) (hA₃_interp : ∀ t ∈ Set.Icc 0 T, (A₃ t) ^ 3 ≤ C_I * A₁ t * D₃sq t) (hA₃_deriv : ∀ t ∈ Set.Icc 0 T, ∃ dA : ℝ, HasDerivAt A₃ dA t ∧ dA ≤ -(ν * lam₁) * A₃ t + C₃ * (A₃ t) ^ 2) (hA₃sq_deriv : ∀ t ∈ Set.Icc 0 T, ∃ dA : ℝ, HasDerivAt (fun u => (A₃ u) ^ 2) dA t ∧ (1 / 2) * dA + ν * D₃sq t ≤ C₃ * (A₃ t) ^ 3) (hM_cont : ContinuousOn M (Set.Icc 0 T)) (hM_le : ∀ t ∈ Set.Icc 0 T, M t ≤ C_M * A₃ t) (hCa_stab : ∀ t ∈ Set.Icc 0 T, 0 < M t → |C_a t - Real.log (M t / M₀)| ≤ C_u * U₀ * (1 - Real.exp (-(ν * lam₁ * t))) / (ν * lam₁)) : let E_bar := min (ν ^ 2 * Real.sqrt lam₁ / (4 * c_star ^ 2)) (ν ^ 2 / (4 * C₃ ^ 2 * C_I ^ 2 * C_P ^ 2)) let τ_ent := U₀ ^ 2 / (ν * E_bar) let μ := ν * lam₁ let q₀ := C₃ * A₀ / μ let fτ := A₀ * Real.exp (-(μ * τ_ent)) / (1 - q₀ * (1 - Real.exp (-(μ * τ_ent)))) let A_bar := max A₀ fτ (∀ t ∈ Set.Icc 0 T, A₃ t ≤ A_bar ∧ M t ≤ C_M * A_bar) ∧ ((∫ t in (0 : ℝ)..T, M t) ≤ C_M * A_bar * (τ_ent + 2 / μ)) ∧ (∀ t ∈ Set.Icc 0 T, 0 < M t → C_a t ≤ Real.log (C_M * A_bar / M₀) + C_u * U₀ / μ) := by intro E_bar τ_ent μ q₀ fτ A_bar have hμ_pos : 0 < μ := mul_pos hν hlam₁ have hEbar_pos : 0 < E_bar := by dsimp [E_bar]; exact lt_min (by positivity) (by positivity) have hτ_pos : 0 < τ_ent := by dsimp [τ_ent]; positivity have hT_nn : 0 ≤ T := le_trans (le_of_lt hτ_pos) hτ_le_T -- Step 1: d(τ_ent) > 0 via derivative_barrier_regimes. have hd_τ : 0 < 1 - q₀ * (1 - Real.exp (-(μ * τ_ent))) := ((derivative_barrier_regimes hμ_pos).2 hq₀).mpr hτ_lt_tb -- Step 2: Energy-entry pigeonhole gives t₀ ∈ [0, τ_ent] with E t₀ ≤ E_bar / 2 ≤ E_bar. have hE_cont_τ : ContinuousOn E (Set.Icc 0 τ_ent) := fun s hs => by obtain ⟨dE, hdE, _⟩ := hE_deriv s ⟨hs.1, le_trans hs.2 hτ_le_T⟩ exact hdE.continuousAt.continuousWithinAt obtain ⟨t₀, ht₀, hEt₀_half⟩ := energy_entry_exists_time hU₀ hν hEbar_pos hE_cont_τ hbudget have hEt₀ : E t₀ ≤ E_bar := by linarith have ht₀_le_T : t₀ ≤ T := le_trans ht₀.2 hτ_le_T -- Step 3: Derivative-barrier Riccati on [0, τ_ent] bounds A₃(t) ≤ f(t) ≤ f(τ_ent) ≤ A_bar. have hricc := (derivative_barrier_riccati (C_inf := 1) hμ_pos hC₃ hA₀ (le_of_lt hτ_pos) hA₃0 (fun s hs => hA₃_pos s ⟨hs.1, le_trans hs.2 hτ_le_T⟩) (fun s hs => hA₃_deriv s ⟨hs.1, le_trans hs.2 hτ_le_T⟩) hd_τ).1 have hA₃_pre : ∀ t ∈ Set.Icc 0 τ_ent, A₃ t ≤ A_bar := by intro t ht obtain ⟨hdt, hAt_le⟩ := hricc t ht -- Monotonicity of f on [0, τ_ent] for q₀ > 1: f(t) ≤ f(τ_ent). have hf_le : A₀ * Real.exp (-(μ * t)) / (1 - q₀ * (1 - Real.exp (-(μ * t)))) ≤ fτ := by dsimp only [fτ] rw [div_le_div_iff₀ hdt hd_τ] have hexp_le : Real.exp (-(μ * τ_ent)) ≤ Real.exp (-(μ * t)) := Real.exp_le_exp.mpr (by nlinarith [ht.2]) have hdiff : A₀ * Real.exp (-(μ * τ_ent)) * (1 - q₀ * (1 - Real.exp (-(μ * t)))) - A₀ * Real.exp (-(μ * t)) * (1 - q₀ * (1 - Real.exp (-(μ * τ_ent)))) = A₀ * (q₀ - 1) * (Real.exp (-(μ * t)) - Real.exp (-(μ * τ_ent))) := by ring have hnn : 0 ≤ A₀ * (q₀ - 1) * (Real.exp (-(μ * t)) - Real.exp (-(μ * τ_ent))) := mul_nonneg (mul_nonneg (le_of_lt hA₀) (by linarith)) (by linarith) linarith exact le_trans (le_trans hAt_le hf_le) (le_max_right _ _) have hA₃t₀_le : A₃ t₀ ≤ A_bar := hA₃_pre t₀ ht₀ -- Step 4: Forward-invariant trap on [t₀, T] gives A₃(t) ≤ A₃(t₀) e^{-μ (t - t₀) / 2}. have htrap := forward_invariant_enstrophy_trap_SC9_SC11 hν hlam₁ hc hC₃ hC_I hC_P ht₀_le_T hEt₀ (fun s hs => hEnn s ⟨le_trans ht₀.1 hs.1, hs.2⟩) (fun s hs => hD_poin s ⟨le_trans ht₀.1 hs.1, hs.2⟩) (fun s hs => hE_deriv s ⟨le_trans ht₀.1 hs.1, hs.2⟩) (fun s hs => hA₁_le s ⟨le_trans ht₀.1 hs.1, hs.2⟩) (fun s hs => le_of_lt (hA₃_pos s ⟨le_trans ht₀.1 hs.1, hs.2⟩)) (fun s hs => hD₃_poin s ⟨le_trans ht₀.1 hs.1, hs.2⟩) (fun s hs => hA₃_interp s ⟨le_trans ht₀.1 hs.1, hs.2⟩) (fun s hs => hA₃sq_deriv s ⟨le_trans ht₀.1 hs.1, hs.2⟩) have hA_bar_pos : 0 < A_bar := lt_of_lt_of_le hA₀ (le_max_left _ _) have hpoint : ∀ t ∈ Set.Icc 0 T, A₃ t ≤ A_bar ∧ M t ≤ C_M * A_bar := by intro t ht have hA₃_le : A₃ t ≤ A_bar := by by_cases hle : t ≤ t₀ · exact hA₃_pre t ⟨ht.1, le_trans hle ht₀.2⟩ · push Not at hle have ht_post : t ∈ Set.Icc t₀ T := ⟨le_of_lt hle, ht.2⟩ have hdec := (htrap t ht_post).2.2.2 have hexp_le1 : Real.exp (-(μ * (t - t₀) / 2)) ≤ 1 := Real.exp_le_one_iff.mpr (by nlinarith) calc A₃ t ≤ A₃ t₀ * Real.exp (-(μ * (t - t₀) / 2)) := hdec _ ≤ A_bar * 1 := mul_le_mul hA₃t₀_le hexp_le1 (le_of_lt (Real.exp_pos _)) (le_of_lt hA_bar_pos) _ = A_bar := mul_one _ exact ⟨hA₃_le, le_trans (hM_le t ht) (mul_le_mul_of_nonneg_left hA₃_le hC_M)⟩ refine ⟨hpoint, ?_, ?_⟩ · -- Step 5: Split integral ∫₀ᵀ M = ∫₀^{t₀} M + ∫_{t₀}ᵀ M. have hint1 : IntervalIntegrable M MeasureTheory.volume 0 t₀ := (hM_cont.mono (Set.Icc_subset_Icc_right ht₀_le_T)).intervalIntegrable_of_Icc ht₀.1 have hint2 : IntervalIntegrable M MeasureTheory.volume t₀ T := (hM_cont.mono (Set.Icc_subset_Icc_left ht₀.1)).intervalIntegrable_of_Icc ht₀_le_T rw [← intervalIntegral.integral_add_adjacent_intervals hint1 hint2] have hI1 : (∫ t in (0 : ℝ)..t₀, M t) ≤ C_M * A_bar * t₀ := by have hmono := intervalIntegral.integral_mono_on ht₀.1 hint1 (intervalIntegrable_const (c := C_M * A_bar)) (fun s hs => (hpoint s ⟨hs.1, le_trans hs.2 ht₀_le_T⟩).2) rw [intervalIntegral.integral_const, sub_zero, smul_eq_mul] at hmono linarith let expMaj : ℝ → ℝ := fun t => C_M * A_bar * Real.exp (-(μ * (t - t₀) / 2)) have hexpMaj_cont : Continuous expMaj := continuous_const.mul (Real.continuous_exp.comp (((continuous_const.mul (continuous_id.sub continuous_const)).div_const 2).neg)) have hI2_le : (∫ t in t₀..T, M t) ≤ ∫ t in t₀..T, expMaj t := by apply intervalIntegral.integral_mono_on ht₀_le_T hint2 (hexpMaj_cont.intervalIntegrable t₀ T) intro s hs have hdec := (htrap s hs).2.2.2 calc M s ≤ C_M * A₃ s := hM_le s ⟨le_trans ht₀.1 hs.1, hs.2⟩ _ ≤ C_M * (A₃ t₀ * Real.exp (-(μ * (s - t₀) / 2))) := mul_le_mul_of_nonneg_left hdec hC_M _ ≤ C_M * (A_bar * Real.exp (-(μ * (s - t₀) / 2))) := mul_le_mul_of_nonneg_left (mul_le_mul_of_nonneg_right hA₃t₀_le (le_of_lt (Real.exp_pos _))) hC_M _ = expMaj s := by dsimp [expMaj]; ring -- Exact antiderivative of expMaj on [t₀, T]: let F : ℝ → ℝ := fun t => -(2 * C_M * A_bar / μ) * Real.exp (-(μ * (t - t₀) / 2)) have hF_deriv : ∀ t : ℝ, HasDerivAt F (expMaj t) t := by intro t have hlin : HasDerivAt (fun u : ℝ => -(μ * (u - t₀) / 2)) (-(μ / 2)) t := by have h1 : HasDerivAt (fun u : ℝ => μ * (u - t₀) / 2) (μ / 2) t := by simpa [mul_div_assoc] using (((hasDerivAt_id t).sub_const t₀).const_mul μ).div_const 2 exact h1.fun_neg have hF := hlin.exp.const_mul (-(2 * C_M * A_bar / μ)) have hval : -(2 * C_M * A_bar / μ) * (Real.exp (-(μ * (t - t₀) / 2)) * -(μ / 2)) = expMaj t := by dsimp [expMaj] field_simp [ne_of_gt hμ_pos] rwa [hval] at hF have hI2_eq : (∫ t in t₀..T, expMaj t) = (2 * C_M * A_bar / μ) * (1 - Real.exp (-(μ * (T - t₀) / 2))) := by rw [intervalIntegral.integral_eq_sub_of_hasDerivAt (fun t _ => hF_deriv t) (hexpMaj_cont.intervalIntegrable t₀ T)] dsimp only [F] simp only [sub_self, mul_zero, zero_div, neg_zero, Real.exp_zero, mul_one] ring have hI2 : (∫ t in t₀..T, M t) ≤ C_M * A_bar * (2 / μ) := by have hexp_pos : 0 < Real.exp (-(μ * (T - t₀) / 2)) := Real.exp_pos _ have hcoef_nn : 0 ≤ 2 * C_M * A_bar / μ := by positivity calc (∫ t in t₀..T, M t) ≤ (2 * C_M * A_bar / μ) * (1 - Real.exp (-(μ * (T - t₀) / 2))) := by linarith _ ≤ (2 * C_M * A_bar / μ) * 1 := mul_le_mul_of_nonneg_left (by linarith) hcoef_nn _ = C_M * A_bar * (2 / μ) := by ring have hCMA_nn : 0 ≤ C_M * A_bar := mul_nonneg hC_M (le_of_lt hA_bar_pos) have ht₀_bound : C_M * A_bar * t₀ ≤ C_M * A_bar * τ_ent := mul_le_mul_of_nonneg_left ht₀.2 hCMA_nn linarith · -- Step 6: Signed-budget bound SC15. intro t ht hMt_pos have hstab := (abs_le.mp (hCa_stab t ht hMt_pos)).2 have hM_le_t : M t ≤ C_M * A_bar := (hpoint t ht).2 have hlog : Real.log (M t / M₀) ≤ Real.log (C_M * A_bar / M₀) := Real.log_le_log (div_pos hMt_pos hM₀) (div_le_div_of_nonneg_right hM_le_t (le_of_lt hM₀)) have hexp_pos : 0 < Real.exp (-(μ * t)) := Real.exp_pos _ have hfar : C_u * U₀ * (1 - Real.exp (-(μ * t))) / μ ≤ C_u * U₀ / μ := by have hnum : C_u * U₀ * (1 - Real.exp (-(μ * t))) ≤ C_u * U₀ * 1 := mul_le_mul_of_nonneg_left (by linarith) (mul_nonneg hC_u (le_of_lt hU₀)) simpa using div_le_div_of_nonneg_right hnum (le_of_lt hμ_pos) linarith end EnergyEntryClosure /-! ## 3. Signed-Shell Initial-Data Barriers, `A₄` Linear Propagation & Causal Extension (`IB1`–`IB15`) -/ section SignedShellBarriersAndCausalExtension /-- Exact zero-safe linear `A₄` ODE propagation on `[0, T]` (`T < T_B`, `IB10`–`IB11`, `S13_SIGNED_SHELL_INITIAL_DATA_BARRIER.md` lines 166–176): from `(1/2)(A₄²)' + ν D₄² ≤ C₄ A₃ A₄²` with Poincaré `λ_gap A₄² ≤ D₄²` (`β = ν λ_gap`), `0 ≤ A₃(t) ≤ A₀ e^{-β t} / d(t)`, and `d(T) > 0`: the zero-safe integrating factor `Ψ(t) = A₄(t)² e^{2 β t} d(t)^{2 C₄ / C₃}` satisfies `Ψ'(t) ≤ 0`, yielding for all `t ∈ [0, T]`: 1. `A₄(t) ≤ A₄(0) e^{-β t} d(t)^{-C₄ / C₃}`, 2. Uniform ceiling `A₄(t) ≤ A₄(0) d(T)^{-C₄ / C₃}`. -/ theorem a4_linear_propagation_IB10 {A₃ A₄ D₄sq : ℝ → ℝ} {ν lam_gap C₃ C₄ A₀ T : ℝ} (hν : 0 < ν) (hlam : 0 < lam_gap) (hC₃ : 0 < C₃) (hC₄ : 0 ≤ C₄) (hA₀ : 0 < A₀) (hT : 0 ≤ T) (hdT : 0 < 1 - (C₃ * A₀ / (ν * lam_gap)) * (1 - Real.exp (-(ν * lam_gap * T)))) (hA₄_nn : ∀ t ∈ Set.Icc 0 T, 0 ≤ A₄ t) (hD₄_poin : ∀ t ∈ Set.Icc 0 T, lam_gap * (A₄ t) ^ 2 ≤ D₄sq t) (hA₃_le : ∀ t ∈ Set.Icc 0 T, A₃ t ≤ A₀ * Real.exp (-(ν * lam_gap * t)) / (1 - (C₃ * A₀ / (ν * lam_gap)) * (1 - Real.exp (-(ν * lam_gap * t))))) (hA₄sq_deriv : ∀ t ∈ Set.Icc 0 T, ∃ dA : ℝ, HasDerivAt (fun u => (A₄ u) ^ 2) dA t ∧ (1 / 2) * dA + ν * D₄sq t ≤ C₄ * A₃ t * (A₄ t) ^ 2) : let β := ν * lam_gap let q := C₃ * A₀ / β let d : ℝ → ℝ := fun t => 1 - q * (1 - Real.exp (-(β * t))) ∀ t ∈ Set.Icc 0 T, A₄ t ≤ A₄ 0 * Real.exp (-(β * t)) * (d t) ^ (-(C₄ / C₃)) ∧ A₄ t ≤ A₄ 0 * (d T) ^ (-(C₄ / C₃)) := by intro β q d have hβ_pos : 0 < β := mul_pos hν hlam have hq_pos : 0 < q := by dsimp [q]; positivity have hd_le_mono : ∀ t ∈ Set.Icc 0 T, d T ≤ d t := fun t ht => by have hexp : Real.exp (-(β * T)) ≤ Real.exp (-(β * t)) := Real.exp_le_exp.mpr (by nlinarith [ht.2]) dsimp [d] nlinarith have hd_pos : ∀ t ∈ Set.Icc 0 T, 0 < d t := fun t ht => lt_of_lt_of_le hdT (hd_le_mono t ht) let p : ℝ := 2 * C₄ / C₃ let Ψ : ℝ → ℝ := fun t => (A₄ t) ^ 2 * Real.exp (2 * β * t) * (d t) ^ p have hΨ_deriv : ∀ t ∈ Set.Icc 0 T, ∃ dΨ : ℝ, HasDerivAt Ψ dΨ t ∧ dΨ ≤ 0 := by intro t ht obtain ⟨dA, hdA, hA_ineq⟩ := hA₄sq_deriv t ht have hdt : 0 < d t := hd_pos t ht have hlin1 : HasDerivAt (fun u : ℝ => 2 * β * u) (2 * β) t := by simpa using (hasDerivAt_id t).const_mul (2 * β) have hexp := hlin1.exp have hlin2 : HasDerivAt (fun u : ℝ => -(β * u)) (-β) t := by simpa using ((hasDerivAt_id t).const_mul β).fun_neg have hd_deriv : HasDerivAt d (-q * β * Real.exp (-(β * t))) t := by have h1 : HasDerivAt (fun u : ℝ => 1 - Real.exp (-(β * u))) (-(Real.exp (-(β * t)) * (-β))) t := by simpa using (hasDerivAt_const t (1 : ℝ)).fun_sub hlin2.exp have h2 := (hasDerivAt_const t (1 : ℝ)).fun_sub (h1.const_mul q) have hval : 0 - q * -(Real.exp (-(β * t)) * -β) = -q * β * Real.exp (-(β * t)) := by ring rwa [hval] at h2 have hdp_deriv : HasDerivAt (fun u => (d u) ^ p) (p * (d t) ^ (p - 1) * (-q * β * Real.exp (-(β * t)))) t := by simpa [Function.comp_def] using (hasDerivAt_rpow_const_pos (p := p) hdt).comp t hd_deriv have hprod := (hdA.mul hexp).mul hdp_deriv refine ⟨_, hprod, ?_⟩ have hpow_rel : (d t) ^ (p - 1) = (d t) ^ p / d t := by rw [Real.rpow_sub hdt, Real.rpow_one] have hcoef_f : p * (d t) ^ (p - 1) * (-q * β * Real.exp (-(β * t))) = -(2 * C₄ * (A₀ * Real.exp (-(β * t)) / d t)) * (d t) ^ p := by rw [hpow_rel] dsimp only [p, q] field_simp [ne_of_gt hC₃, ne_of_gt hβ_pos, ne_of_gt hdt] set f_t : ℝ := A₀ * Real.exp (-(β * t)) / d t have hA₃_t : A₃ t ≤ f_t := hA₃_le t ht have hD₄_t := hD₄_poin t ht have hdA_le : dA + 2 * β * (A₄ t) ^ 2 - 2 * C₄ * f_t * (A₄ t) ^ 2 ≤ 0 := by have hC4A3 : C₄ * A₃ t * (A₄ t) ^ 2 ≤ C₄ * f_t * (A₄ t) ^ 2 := mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hA₃_t hC₄) (sq_nonneg _) dsimp only [β] nlinarith have hfac : (dA * Real.exp (2 * β * t) + (A₄ t) ^ 2 * (Real.exp (2 * β * t) * (2 * β))) * (d t) ^ p + (A₄ t) ^ 2 * Real.exp (2 * β * t) * (p * (d t) ^ (p - 1) * (-q * β * Real.exp (-(β * t)))) = Real.exp (2 * β * t) * (d t) ^ p * (dA + 2 * β * (A₄ t) ^ 2 - 2 * C₄ * f_t * (A₄ t) ^ 2) := by rw [hcoef_f] dsimp only [f_t] ring simp only [Pi.mul_apply] rw [hfac] exact mul_nonpos_of_nonneg_of_nonpos (mul_nonneg (le_of_lt (Real.exp_pos _)) (Real.rpow_nonneg (le_of_lt hdt) p)) hdA_le have hΨ_le := le_start_of_hasDerivAt_nonpos hΨ_deriv intro t ht have hdt : 0 < d t := hd_pos t ht have hΨt := hΨ_le t ht dsimp only [Ψ] at hΨt have hd0 : d 0 = 1 := by simp [d] simp only [mul_zero, Real.exp_zero, mul_one, hd0, Real.one_rpow] at hΨt -- Multiply both sides by e^{-2 β t} * (d t)^{-p}. have hmul := mul_le_mul_of_nonneg_right hΨt (mul_nonneg (le_of_lt (Real.exp_pos (-(2 * β * t)))) (Real.rpow_nonneg (le_of_lt hdt) (-p))) have hL_eq : (A₄ t) ^ 2 * Real.exp (2 * β * t) * (d t) ^ p * (Real.exp (-(2 * β * t)) * (d t) ^ (-p)) = (A₄ t) ^ 2 := by calc (A₄ t) ^ 2 * Real.exp (2 * β * t) * (d t) ^ p * (Real.exp (-(2 * β * t)) * (d t) ^ (-p)) = (A₄ t) ^ 2 * (Real.exp (2 * β * t) * Real.exp (-(2 * β * t))) * ((d t) ^ p * (d t) ^ (-p)) := by ring _ = (A₄ t) ^ 2 * 1 * 1 := by rw [← Real.exp_add, add_neg_cancel, Real.exp_zero, ← Real.rpow_add hdt, add_neg_cancel, Real.rpow_zero] _ = (A₄ t) ^ 2 := by ring have hR_eq : (A₄ 0) ^ 2 * (Real.exp (-(2 * β * t)) * (d t) ^ (-p)) = (A₄ 0 * Real.exp (-(β * t)) * (d t) ^ (-(C₄ / C₃))) ^ 2 := by have hd2 : ((d t) ^ (-(C₄ / C₃))) ^ 2 = (d t) ^ (-p) := by rw [← Real.rpow_natCast, ← Real.rpow_mul (le_of_lt hdt)] congr 1; dsimp [p]; ring rw [mul_pow, mul_pow, ← Real.exp_nat_mul, hd2] have h1 : (2 : ℕ) * -(β * t) = -(2 * β * t) := by push_cast; ring rw [h1] ring rw [hL_eq, hR_eq] at hmul have hR_nn : 0 ≤ A₄ 0 * Real.exp (-(β * t)) * (d t) ^ (-(C₄ / C₃)) := mul_nonneg (mul_nonneg (hA₄_nn 0 ⟨le_rfl, hT⟩) (le_of_lt (Real.exp_pos _))) (Real.rpow_nonneg (le_of_lt hdt) _) have hpt : A₄ t ≤ A₄ 0 * Real.exp (-(β * t)) * (d t) ^ (-(C₄ / C₃)) := (sq_le_sq₀ (hA₄_nn t ht) hR_nn).mp hmul refine ⟨hpt, ?_⟩ have hexp_le1 : Real.exp (-(β * t)) ≤ 1 := Real.exp_le_one_iff.mpr (by nlinarith [ht.1]) have hdp_le : (d t) ^ (-(C₄ / C₃)) ≤ (d T) ^ (-(C₄ / C₃)) := by rw [Real.rpow_neg (le_of_lt hdt), Real.rpow_neg (le_of_lt hdT)] have hle_pos : (d T) ^ (C₄ / C₃) ≤ (d t) ^ (C₄ / C₃) := Real.rpow_le_rpow (le_of_lt hdT) (hd_le_mono t ht) (div_nonneg hC₄ (le_of_lt hC₃)) exact inv_anti₀ (Real.rpow_pos_of_pos hdT _) hle_pos calc A₄ t ≤ A₄ 0 * Real.exp (-(β * t)) * (d t) ^ (-(C₄ / C₃)) := hpt _ ≤ A₄ 0 * 1 * (d T) ^ (-(C₄ / C₃)) := mul_le_mul (mul_le_mul_of_nonneg_left hexp_le1 (hA₄_nn 0 ⟨le_rfl, hT⟩)) hdp_le (Real.rpow_nonneg (le_of_lt hdt) _) (mul_nonneg (hA₄_nn 0 ⟨le_rfl, hT⟩) (by norm_num)) _ = A₄ 0 * (d T) ^ (-(C₄ / C₃)) := by ring /-- Global time-uniform `A₄` propagation and integrated gradient budget (`IB15`, `S13_SIGNED_SHELL_INITIAL_DATA_BARRIER.md` lines 248–278): under ANY global `H³` integral budget `J(t) = ∫₀ᵗ A₃ ≤ I_∞` (instantiated by BOTH `q < 1` with `I_∞ = -(1/C₃) log(1 - q)` AND the `q > 1` energy-entry class with `I_∞ = A_bar (τ_ent + 2/β)`), the zero-safe Lyapunov functional `Φ(t) = A₄(t)² e^{2 β t - 2 C₄ J(t)}` is nonincreasing, giving: 1. `A₄(t) ≤ A₄(0) e^{-β t + C₄ I_∞}` for all `t ∈ [0, T]`, 2. `∫₀ᵀ 2 ν (C_ω₁ A₄(s))² ds ≤ (C_ω₁² A₄(0)² / λ_gap) e^{2 C₄ I_∞}` (time-uniform!). -/ theorem a4_global_propagation_IB15 {A₃ A₄ D₄sq J : ℝ → ℝ} {ν lam_gap C₄ C_ω₁ I_inf T : ℝ} (hν : 0 < ν) (hlam : 0 < lam_gap) (hC₄ : 0 ≤ C₄) (hT : 0 ≤ T) (hJ0 : J 0 = 0) (hJ_le : ∀ t ∈ Set.Icc 0 T, J t ≤ I_inf) (hJ_deriv : ∀ t ∈ Set.Icc 0 T, HasDerivAt J (A₃ t) t) (hA₄_nn : ∀ t ∈ Set.Icc 0 T, 0 ≤ A₄ t) (hA₄_cont : ContinuousOn A₄ (Set.Icc 0 T)) (hD₄_poin : ∀ t ∈ Set.Icc 0 T, lam_gap * (A₄ t) ^ 2 ≤ D₄sq t) (hA₄sq_deriv : ∀ t ∈ Set.Icc 0 T, ∃ dA : ℝ, HasDerivAt (fun u => (A₄ u) ^ 2) dA t ∧ (1 / 2) * dA + ν * D₄sq t ≤ C₄ * A₃ t * (A₄ t) ^ 2) : let β := ν * lam_gap (∀ t ∈ Set.Icc 0 T, A₄ t ≤ A₄ 0 * Real.exp (-(β * t) + C₄ * I_inf)) ∧ ((∫ s in (0 : ℝ)..T, 2 * ν * (C_ω₁ * A₄ s) ^ 2) ≤ (C_ω₁ ^ 2 * (A₄ 0) ^ 2 / lam_gap) * Real.exp (2 * C₄ * I_inf)) := by intro β have hβ_pos : 0 < β := mul_pos hν hlam let Φ : ℝ → ℝ := fun t => (A₄ t) ^ 2 * Real.exp (2 * β * t - 2 * C₄ * J t) have hΦ_deriv : ∀ t ∈ Set.Icc 0 T, ∃ dΦ : ℝ, HasDerivAt Φ dΦ t ∧ dΦ ≤ 0 := by intro t ht obtain ⟨dA, hdA, hA_ineq⟩ := hA₄sq_deriv t ht have hlin : HasDerivAt (fun u : ℝ => 2 * β * u) (2 * β) t := by simpa using (hasDerivAt_id t).const_mul (2 * β) have harg : HasDerivAt (fun u : ℝ => 2 * β * u - 2 * C₄ * J u) (2 * β - 2 * C₄ * A₃ t) t := hlin.fun_sub ((hJ_deriv t ht).const_mul (2 * C₄)) have hexp := harg.exp refine ⟨_, hdA.mul hexp, ?_⟩ have hD₄_t := hD₄_poin t ht have hdA_le : dA + (2 * β - 2 * C₄ * A₃ t) * (A₄ t) ^ 2 ≤ 0 := by dsimp only [β] nlinarith have hfac : dA * Real.exp (2 * β * t - 2 * C₄ * J t) + (A₄ t) ^ 2 * (Real.exp (2 * β * t - 2 * C₄ * J t) * (2 * β - 2 * C₄ * A₃ t)) = Real.exp (2 * β * t - 2 * C₄ * J t) * (dA + (2 * β - 2 * C₄ * A₃ t) * (A₄ t) ^ 2) := by ring rw [hfac] exact mul_nonpos_of_nonneg_of_nonpos (le_of_lt (Real.exp_pos _)) hdA_le have hΦ_le := le_start_of_hasDerivAt_nonpos hΦ_deriv have hsq_bound : ∀ t ∈ Set.Icc 0 T, (A₄ t) ^ 2 ≤ (A₄ 0) ^ 2 * Real.exp (-(2 * β * t) + 2 * C₄ * I_inf) := by intro t ht have h1 := hΦ_le t ht dsimp only [Φ] at h1 simp only [mul_zero, hJ0, sub_zero, Real.exp_zero, mul_one] at h1 have h2 := mul_le_mul_of_nonneg_right h1 (le_of_lt (Real.exp_pos (-(2 * β * t - 2 * C₄ * J t)))) rw [mul_assoc, ← Real.exp_add, add_neg_cancel, Real.exp_zero, mul_one] at h2 have hexp_le : Real.exp (-(2 * β * t - 2 * C₄ * J t)) ≤ Real.exp (-(2 * β * t) + 2 * C₄ * I_inf) := Real.exp_le_exp.mpr (by nlinarith [hJ_le t ht]) exact le_trans h2 (mul_le_mul_of_nonneg_left hexp_le (sq_nonneg _)) have hpt : ∀ t ∈ Set.Icc 0 T, A₄ t ≤ A₄ 0 * Real.exp (-(β * t) + C₄ * I_inf) := by intro t ht have h1 := hsq_bound t ht have hR_eq : (A₄ 0) ^ 2 * Real.exp (-(2 * β * t) + 2 * C₄ * I_inf) = (A₄ 0 * Real.exp (-(β * t) + C₄ * I_inf)) ^ 2 := by rw [mul_pow, ← Real.exp_nat_mul] congr 2; push_cast; ring rw [hR_eq] at h1 have hR_nn : 0 ≤ A₄ 0 * Real.exp (-(β * t) + C₄ * I_inf) := mul_nonneg (hA₄_nn 0 ⟨le_rfl, hT⟩) (le_of_lt (Real.exp_pos _)) exact (sq_le_sq₀ (hA₄_nn t ht) hR_nn).mp h1 refine ⟨hpt, ?_⟩ let maj : ℝ → ℝ := fun s => 2 * ν * C_ω₁ ^ 2 * (A₄ 0) ^ 2 * Real.exp (2 * C₄ * I_inf) * Real.exp (-(2 * β * s)) have hcont_lhs : ContinuousOn (fun s => 2 * ν * (C_ω₁ * A₄ s) ^ 2) (Set.Icc 0 T) := continuousOn_const.mul ((continuousOn_const.mul hA₄_cont).pow 2) have hcont_maj : Continuous maj := continuous_const.mul (Real.continuous_exp.comp ((continuous_const.mul continuous_id).neg)) have hmono : (∫ s in (0 : ℝ)..T, 2 * ν * (C_ω₁ * A₄ s) ^ 2) ≤ ∫ s in (0 : ℝ)..T, maj s := by apply intervalIntegral.integral_mono_on hT (hcont_lhs.intervalIntegrable_of_Icc hT) (hcont_maj.intervalIntegrable 0 T) intro s hs have h1 := hsq_bound s hs have h2 : Real.exp (-(2 * β * s) + 2 * C₄ * I_inf) = Real.exp (2 * C₄ * I_inf) * Real.exp (-(2 * β * s)) := by rw [← Real.exp_add]; congr 1; ring rw [h2] at h1 have hmul := mul_le_mul_of_nonneg_left h1 (by positivity : 0 ≤ 2 * ν * C_ω₁ ^ 2) dsimp [maj] linarith [show 2 * ν * (C_ω₁ * A₄ s) ^ 2 = 2 * ν * C_ω₁ ^ 2 * (A₄ s) ^ 2 by ring, show 2 * ν * C_ω₁ ^ 2 * ((A₄ 0) ^ 2 * (Real.exp (2 * C₄ * I_inf) * Real.exp (-(2 * β * s)))) = 2 * ν * C_ω₁ ^ 2 * (A₄ 0) ^ 2 * Real.exp (2 * C₄ * I_inf) * Real.exp (-(2 * β * s)) by ring] let F : ℝ → ℝ := fun s => -(C_ω₁ ^ 2 * (A₄ 0) ^ 2 / lam_gap * Real.exp (2 * C₄ * I_inf)) * Real.exp (-(2 * β * s)) have hF_deriv : ∀ s : ℝ, HasDerivAt F (maj s) s := by intro s have hlin : HasDerivAt (fun u : ℝ => -(2 * β * u)) (-(2 * β)) s := by simpa using ((hasDerivAt_id s).const_mul (2 * β)).fun_neg have hF := hlin.exp.const_mul (-(C_ω₁ ^ 2 * (A₄ 0) ^ 2 / lam_gap * Real.exp (2 * C₄ * I_inf))) have hval : -(C_ω₁ ^ 2 * (A₄ 0) ^ 2 / lam_gap * Real.exp (2 * C₄ * I_inf)) * (Real.exp (-(2 * β * s)) * -(2 * β)) = maj s := by dsimp [maj, β] field_simp [ne_of_gt hlam] rwa [hval] at hF have hint_eq : (∫ s in (0 : ℝ)..T, maj s) = (C_ω₁ ^ 2 * (A₄ 0) ^ 2 / lam_gap) * Real.exp (2 * C₄ * I_inf) * (1 - Real.exp (-(2 * β * T))) := by rw [intervalIntegral.integral_eq_sub_of_hasDerivAt (fun s _ => hF_deriv s) (hcont_maj.intervalIntegrable 0 T)] dsimp only [F] simp only [mul_zero, neg_zero, Real.exp_zero, mul_one] ring have hexp_pos : 0 < Real.exp (-(2 * β * T)) := Real.exp_pos _ have hcoef_nn : 0 ≤ (C_ω₁ ^ 2 * (A₄ 0) ^ 2 / lam_gap) * Real.exp (2 * C₄ * I_inf) := by positivity calc (∫ s in (0 : ℝ)..T, 2 * ν * (C_ω₁ * A₄ s) ^ 2) ≤ (C_ω₁ ^ 2 * (A₄ 0) ^ 2 / lam_gap) * Real.exp (2 * C₄ * I_inf) * (1 - Real.exp (-(2 * β * T))) := by linarith _ ≤ (C_ω₁ ^ 2 * (A₄ 0) ^ 2 / lam_gap) * Real.exp (2 * C₄ * I_inf) * 1 := mul_le_mul_of_nonneg_left (by linarith) hcoef_nn _ = (C_ω₁ ^ 2 * (A₄ 0) ^ 2 / lam_gap) * Real.exp (2 * C₄ * I_inf) := mul_one _ /-- Exact signed-shell Loewner inequalities (`IB1`–`IB2`, `IB12`–`IB13`, `IB15`) and arbitrary-amplitude curl-eigenfield zero-shell radius (`IB14`, `S13_SIGNED_SHELL_INITIAL_DATA_BARRIER.md` lines 40–50, 189–206, 229–244): for `D_R = R_phys - A_chi + V_chi` in `Mat3` with `R_phys, A_chi, V_chi ⪰ 0`: 1. `D_R ⪯ₗ R_phys + V_chi` (`IB2`), 2. If `R_phys ⪯ₗ B₁ I` and `V_chi ⪯ₗ B₂ I`, then `D_R ⪯ₗ (B₁ + B₂) I` (`IB12` & `IB15`), 3. If `A_chi ⪯ₗ B_low I`, then `(-B_low) I ⪯ₗ D_R` (`IB13`), 4. Exact curl-eigenfield logstretch integral (`IB14`): for `0 ≤ s ≤ t`, `ν > 0`, `λ ≠ 0`, `s₀ ≥ 0`, `∫_{t-s}^t s₀ e^{-ν λ² τ} dτ = s₀ e^{-ν λ² (t-s)} (1 - e^{-ν λ² s}) / (ν λ²) ≤ s₀ / (ν λ²)`. -/ theorem signed_shell_loewner_and_eigenfield_IB2_IB14 {R_phys A_chi V_chi : Mat3} {B₁ B₂ B_low : ℝ} (hR_psd : IsPSD R_phys) (hA_psd : IsPSD A_chi) (hV_psd : IsPSD V_chi) (hR_le : R_phys ⪯ₗ B₁ • (1 : Mat3)) (hV_le : V_chi ⪯ₗ B₂ • (1 : Mat3)) (hA_le : A_chi ⪯ₗ B_low • (1 : Mat3)) {s₀ ν lam t s : ℝ} (hs₀ : 0 ≤ s₀) (hν : 0 < ν) (hlam : lam ≠ 0) (hs_nn : 0 ≤ s) (hs_le : s ≤ t) : let D_R : Mat3 := R_phys - A_chi + V_chi D_R ⪯ₗ (R_phys + V_chi) ∧ D_R ⪯ₗ (B₁ + B₂) • (1 : Mat3) ∧ (-B_low) • (1 : Mat3) ⪯ₗ D_R ∧ ((∫ τ in (t - s)..t, s₀ * Real.exp (-(ν * lam ^ 2 * τ))) = s₀ * Real.exp (-(ν * lam ^ 2 * (t - s))) * (1 - Real.exp (-(ν * lam ^ 2 * s))) / (ν * lam ^ 2) ∧ (∫ τ in (t - s)..t, s₀ * Real.exp (-(ν * lam ^ 2 * τ))) ≤ s₀ / (ν * lam ^ 2)) := by intro D_R refine ⟨?_, ?_, ?_, ?_⟩ · -- (R_phys + V_chi) - D_R = A_chi ⪰ 0. have heq : (R_phys + V_chi) - D_R = A_chi := by dsimp [D_R]; abel change IsPSD ((R_phys + V_chi) - D_R) rw [heq] exact hA_psd · -- (B₁ + B₂) I - D_R = (B₁ I - R_phys) + (B₂ I - V_chi) + A_chi ⪰ 0. change IsPSD ((B₁ + B₂) • (1 : Mat3) - D_R) have heq : (B₁ + B₂) • (1 : Mat3) - D_R = (B₁ • (1 : Mat3) - R_phys) + (B₂ • (1 : Mat3) - V_chi) + A_chi := by dsimp [D_R]; rw [add_smul]; abel rw [heq] refine ⟨by simp [hR_le.1, hV_le.1, hA_psd.1], fun x => ?_⟩ have h1 := hR_le.2 x have h2 := hV_le.2 x have h3 := hA_psd.2 x simp only [Matrix.add_mulVec, dotProduct_add] linarith · -- D_R - (-B_low) I = R_phys + V_chi + (B_low I - A_chi) ⪰ 0. change IsPSD (D_R - (-B_low) • (1 : Mat3)) have heq : D_R - (-B_low) • (1 : Mat3) = R_phys + V_chi + (B_low • (1 : Mat3) - A_chi) := by dsimp [D_R]; rw [neg_smul]; abel rw [heq] refine ⟨by simp [hR_psd.1, hV_psd.1, hA_le.1], fun x => ?_⟩ have h1 := hR_psd.2 x have h2 := hV_psd.2 x have h3 := hA_le.2 x simp only [Matrix.add_mulVec, dotProduct_add] linarith · -- Curl-eigenfield exact integral IB14. set k : ℝ := ν * lam ^ 2 have hk_pos : 0 < k := mul_pos hν (sq_pos_of_ne_zero hlam) let F : ℝ → ℝ := fun τ => -(s₀ / k) * Real.exp (-(k * τ)) have hF_deriv : ∀ τ : ℝ, HasDerivAt F (s₀ * Real.exp (-(k * τ))) τ := by intro τ have hlin : HasDerivAt (fun u : ℝ => -(k * u)) (-k) τ := by simpa using ((hasDerivAt_id τ).const_mul k).fun_neg have hF := hlin.exp.const_mul (-(s₀ / k)) have hval : -(s₀ / k) * (Real.exp (-(k * τ)) * -k) = s₀ * Real.exp (-(k * τ)) := by field_simp [ne_of_gt hk_pos] rwa [hval] at hF have hcont : Continuous (fun τ : ℝ => s₀ * Real.exp (-(k * τ))) := continuous_const.mul (Real.continuous_exp.comp ((continuous_const.mul continuous_id).neg)) have hint_eq : (∫ τ in (t - s)..t, s₀ * Real.exp (-(k * τ))) = s₀ * Real.exp (-(k * (t - s))) * (1 - Real.exp (-(k * s))) / k := by rw [intervalIntegral.integral_eq_sub_of_hasDerivAt (fun τ _ => hF_deriv τ) (hcont.intervalIntegrable (t - s) t)] dsimp only [F] have hexp_split : Real.exp (-(k * t)) = Real.exp (-(k * (t - s))) * Real.exp (-(k * s)) := by rw [← Real.exp_add]; congr 1; ring rw [hexp_split] field_simp [ne_of_gt hk_pos] ring refine ⟨hint_eq, ?_⟩ rw [hint_eq] have h1 : Real.exp (-(k * (t - s))) ≤ 1 := Real.exp_le_one_iff.mpr (by nlinarith) have h2 : 1 - Real.exp (-(k * s)) ≤ 1 := by linarith [Real.exp_pos (-(k * s))] have h2_nn : 0 ≤ 1 - Real.exp (-(k * s)) := by have : Real.exp (-(k * s)) ≤ 1 := Real.exp_le_one_iff.mpr (by nlinarith) linarith have hprod : Real.exp (-(k * (t - s))) * (1 - Real.exp (-(k * s))) ≤ 1 := by calc Real.exp (-(k * (t - s))) * (1 - Real.exp (-(k * s))) ≤ 1 * 1 := mul_le_mul h1 h2 h2_nn (by norm_num) _ = 1 := mul_one 1 have hnum : s₀ * Real.exp (-(k * (t - s))) * (1 - Real.exp (-(k * s))) ≤ s₀ := by calc s₀ * Real.exp (-(k * (t - s))) * (1 - Real.exp (-(k * s))) = s₀ * (Real.exp (-(k * (t - s))) * (1 - Real.exp (-(k * s)))) := by ring _ ≤ s₀ * 1 := mul_le_mul_of_nonneg_left hprod hs₀ _ = s₀ := mul_one s₀ exact div_le_div_of_nonneg_right hnum (le_of_lt hk_pos) /-- Causal retained-history extension algebraic certificates (`DERIVATION_CAUSAL_EXTENSION.txt` eqs (8)–(12), (27)): 1. Exact first-exit optimum: for every `λ > 0`, `(λ - 1) / λ^(3/2) ≤ 2 / (3 √3)`, with equality iff `λ = 3`. 2. Exact strict improvement over the seed interval (`T_opt > 3 T_seed`): `(3 + 3^(1/4)) / 8 < 13 / 24 < √(8 / 27) = √2 * (2 / (3 √3))`. 3. Exact finite-sum qualification for the geometric stage schedule (eq. (27)): `∑_{j=0}^{n-1} 3^{-2j} < 9 / 8` for every `n : ℕ`. -/ theorem causal_extension_first_exit_lambda3 : (∀ lam : ℝ, 0 < lam → (lam - 1) / lam ^ (3 / 2 : ℝ) ≤ 2 / (3 * Real.sqrt 3) ∧ ((lam - 1) / lam ^ (3 / 2 : ℝ) = 2 / (3 * Real.sqrt 3) ↔ lam = 3)) ∧ ((3 + (3 : ℝ) ^ (1 / 4 : ℝ)) / 8 < 13 / 24 ∧ (13 / 24 : ℝ) < Real.sqrt (8 / 27) ∧ Real.sqrt (8 / 27) = Real.sqrt 2 * (2 / (3 * Real.sqrt 3))) ∧ (∀ n : ℕ, (∑ j ∈ Finset.range n, (1 / 9 : ℝ) ^ j) < 9 / 8) := by refine ⟨?_, ?_, ?_⟩ · intro lam hlam set x : ℝ := Real.sqrt lam have hx_pos : 0 < x := Real.sqrt_pos.mpr hlam have hx2 : x ^ 2 = lam := Real.sq_sqrt (le_of_lt hlam) have hx3 : x ^ 3 = lam ^ (3 / 2 : ℝ) := by dsimp [x] rw [Real.sqrt_eq_rpow, ← Real.rpow_natCast, ← Real.rpow_mul (le_of_lt hlam)] norm_num have hs3_pos : 0 < Real.sqrt 3 := Real.sqrt_pos.mpr (by norm_num) have hs3_sq : (Real.sqrt 3) ^ 2 = 3 := Real.sq_sqrt (by norm_num) have hident : 2 * x ^ 3 - 3 * Real.sqrt 3 * (x ^ 2 - 1) = (x - Real.sqrt 3) ^ 2 * (2 * x + Real.sqrt 3) := by have h1 : (x - Real.sqrt 3) ^ 2 * (2 * x + Real.sqrt 3) = 2 * x ^ 3 - 3 * Real.sqrt 3 * x ^ 2 + (Real.sqrt 3) ^ 2 * Real.sqrt 3 := by nlinarith [hs3_sq] rw [hs3_sq] at h1 linarith have hnn : 0 ≤ 2 * x ^ 3 - 3 * Real.sqrt 3 * (x ^ 2 - 1) := by rw [hident] exact mul_nonneg (sq_nonneg _) (by positivity) have hlam32_pos : 0 < lam ^ (3 / 2 : ℝ) := Real.rpow_pos_of_pos hlam _ have hle : (lam - 1) / lam ^ (3 / 2 : ℝ) ≤ 2 / (3 * Real.sqrt 3) := by rw [div_le_div_iff₀ hlam32_pos (by positivity)] rw [← hx3, ← hx2] linarith refine ⟨hle, ?_⟩ constructor · intro heq rw [div_eq_div_iff (ne_of_gt hlam32_pos) (by positivity)] at heq rw [← hx3, ← hx2] at heq have hzero : (x - Real.sqrt 3) ^ 2 * (2 * x + Real.sqrt 3) = 0 := by linarith have hpos_fac : 0 < 2 * x + Real.sqrt 3 := by positivity have hsq0 : (x - Real.sqrt 3) ^ 2 = 0 := (mul_eq_zero.mp hzero).resolve_right (ne_of_gt hpos_fac) have hxeq : x = Real.sqrt 3 := sub_eq_zero.mp (sq_eq_zero_iff.mp hsq0) calc lam = x ^ 2 := hx2.symm _ = (Real.sqrt 3) ^ 2 := by rw [hxeq] _ = 3 := hs3_sq · intro rfl have h3pow : (3 : ℝ) ^ (3 / 2 : ℝ) = 3 * Real.sqrt 3 := by calc (3 : ℝ) ^ (3 / 2 : ℝ) = x ^ 3 := hx3.symm _ = x ^ 2 * x := by ring _ = 3 * Real.sqrt 3 := by rw [hx2] rw [h3pow] ring · -- (3 + 3^(1/4)) / 8 < 13 / 24 < √(8/27) = √2 * (2 / (3 √3)) have h3q_lt : (3 : ℝ) ^ (1 / 4 : ℝ) < 4 / 3 := by have h4 : ((3 : ℝ) ^ (1 / 4 : ℝ)) ^ 4 = 3 := by rw [← Real.rpow_natCast, ← Real.rpow_mul (by norm_num)]; norm_num have hnn : 0 ≤ (3 : ℝ) ^ (1 / 4 : ℝ) := by positivity by_contra hge push Not at hge have hpow : (4 / 3 : ℝ) ^ 4 ≤ ((3 : ℝ) ^ (1 / 4 : ℝ)) ^ 4 := pow_le_pow_left₀ (by norm_num) hge 4 rw [h4] at hpow norm_num at hpow have h1 : (3 + (3 : ℝ) ^ (1 / 4 : ℝ)) / 8 < 13 / 24 := by linarith have h2 : (13 / 24 : ℝ) < Real.sqrt (8 / 27) := by rw [← sq_lt_sq₀ (by norm_num) (Real.sqrt_nonneg _), Real.sq_sqrt (by norm_num)] norm_num have h3 : Real.sqrt (8 / 27) = Real.sqrt 2 * (2 / (3 * Real.sqrt 3)) := by have hL_nn : 0 ≤ Real.sqrt (8 / 27) := Real.sqrt_nonneg _ have hR_nn : 0 ≤ Real.sqrt 2 * (2 / (3 * Real.sqrt 3)) := by positivity apply (sq_eq_sq₀ hL_nn hR_nn).mp rw [Real.sq_sqrt (by norm_num), mul_pow, div_pow, mul_pow, Real.sq_sqrt (by norm_num), Real.sq_sqrt (by norm_num)] norm_num exact ⟨h1, h2, h3⟩ · -- ∑_{j=0}^{n-1} (1/9)^j = (9/8) * (1 - (1/9)^n) < 9/8. intro n have hsum := geom_sum_eq (by norm_num : (1 / 9 : ℝ) ≠ 1) n rw [hsum] have heq : ((1 / 9 : ℝ) ^ n - 1) / (1 / 9 - 1) = (9 / 8) * (1 - (1 / 9 : ℝ) ^ n) := by ring rw [heq] have hpow_pos : (0 : ℝ) < (1 / 9 : ℝ) ^ n := by positivity linarith end SignedShellBarriersAndCausalExtension /-! ## 4. Conditional Direction Coherence (`C1`–`C5`, `H1`–`H7`, `I1`) & Covariance / Polar Algebra (`VC1`–`VC13`) -/ section CoherenceAndCovariance /-- Elementary Cauchy–Schwarz integral inequality for `√E` (`C3`–`C4`, `H7`): for any continuous nonnegative `E` on `[0, t]` (`t ≥ 0`), `(∫₀ᵗ √(E s) ds)² ≤ t * ∫₀ᵗ E s ds`. -/ theorem sqrt_intervalIntegral_sq_le {E : ℝ → ℝ} {t : ℝ} (ht : 0 ≤ t) (hE_nn : ∀ s ∈ Set.Icc 0 t, 0 ≤ E s) (hE_cont : ContinuousOn E (Set.Icc 0 t)) : (∫ s in (0 : ℝ)..t, Real.sqrt (E s)) ^ 2 ≤ t * (∫ s in (0 : ℝ)..t, E s) := by have hint_E : IntervalIntegrable E MeasureTheory.volume 0 t := hE_cont.intervalIntegrable_of_Icc ht have hint_sq : IntervalIntegrable (fun s => Real.sqrt (E s)) MeasureTheory.volume 0 t := hE_cont.sqrt.intervalIntegrable_of_Icc ht set I : ℝ := ∫ s in (0 : ℝ)..t, E s set J : ℝ := ∫ s in (0 : ℝ)..t, Real.sqrt (E s) have hI_nn : 0 ≤ I := intervalIntegral.integral_nonneg ht (fun s hs => hE_nn s hs) have hJ_nn : 0 ≤ J := intervalIntegral.integral_nonneg ht (fun s _ => Real.sqrt_nonneg _) -- For every r : ℝ, 0 ≤ ∫₀ᵗ (r √(E s) - 1)² ds = r² I - 2 r J + t. have hquad : ∀ r : ℝ, 0 ≤ r ^ 2 * I - 2 * r * J + t := by intro r have hpt : ∀ s ∈ Set.Icc 0 t, r ^ 2 * E s - 2 * r * Real.sqrt (E s) + 1 = (r * Real.sqrt (E s) - 1) ^ 2 := by intro s hs have hsq : (Real.sqrt (E s)) ^ 2 = E s := Real.sq_sqrt (hE_nn s hs) nlinarith have hint_comb : IntervalIntegrable (fun s => r ^ 2 * E s - 2 * r * Real.sqrt (E s) + 1) MeasureTheory.volume 0 t := ((hint_E.const_mul (r ^ 2)).sub (hint_sq.const_mul (2 * r))).add intervalIntegrable_const have hnonneg : 0 ≤ ∫ s in (0 : ℝ)..t, (r ^ 2 * E s - 2 * r * Real.sqrt (E s) + 1) := intervalIntegral.integral_nonneg ht (fun s hs => by rw [hpt s hs]; exact sq_nonneg _) have heval : (∫ s in (0 : ℝ)..t, (r ^ 2 * E s - 2 * r * Real.sqrt (E s) + 1)) = r ^ 2 * I - 2 * r * J + t := by rw [intervalIntegral.integral_add ((hint_E.const_mul (r ^ 2)).sub (hint_sq.const_mul (2 * r))) intervalIntegrable_const, intervalIntegral.integral_sub (hint_E.const_mul (r ^ 2)) (hint_sq.const_mul (2 * r)), intervalIntegral.integral_const_mul, intervalIntegral.integral_const_mul, intervalIntegral.integral_const, sub_zero, smul_eq_mul, mul_one] linarith rcases eq_or_lt_of_le hI_nn with hI0 | hI_pos · -- If I = 0 then J = 0. have hJ0 : J = 0 := by by_contra hJne have hJ_pos : 0 < J := lt_of_le_of_ne hJ_nn (Ne.symm hJne) have h := hquad ((t + 1) / (2 * J)) rw [← hI0, mul_zero, zero_sub] at h have hsimp : 2 * ((t + 1) / (2 * J)) * J = t + 1 := by field_simp [ne_of_gt hJ_pos] linarith rw [hJ0, ← hI0]; norm_num · -- Plug r = J / I into the nonnegative quadratic. have h := hquad (J / I) have hsimp : (J / I) ^ 2 * I - 2 * (J / I) * J + t = t - J ^ 2 / I := by field_simp [ne_of_gt hI_pos]; ring rw [hsimp] at h have hdiv : J ^ 2 / I ≤ t := by linarith have hmul := (div_le_iff₀ hI_pos).mp hdiv linarith /-- Full real-calculus Gronwall closure for periodic half-Hölder vorticity-direction coherence (simultaneously covering `C2`–`C4` in `S3_PRIMARY_PDE_REVIEW.md` with `a₀ = 0` and the high-vorticity threshold theorem `H2`–`H7` in `S3_HIGH_VORTICITY_INITIAL_DATA.md` with `a₀ = C (Ω + ν⁻³ Ω⁴)`): if `E ≥ 0`, `D ≥ 0`, `(1/2) E' + ν D ≤ (ν/2) D + a₀ E + a₁ E² + a₂ E^(3/2)` (`a₀, a₁, a₂ ≥ 0`), and `∫₀ᵗ E ≤ U₀² / (2 ν)` on `[0, T]`, then for every `t ∈ [0, T]`: `E(t) ≤ E(0) exp(2 a₀ T + a₁ U₀² / ν + 2 a₂ U₀ √(T / (2 ν)))`. -/ theorem high_vorticity_coherence_gronwall_C2_C4_H2 {E D : ℝ → ℝ} {ν U₀ a₀ a₁ a₂ T : ℝ} (hν : 0 < ν) (hU₀ : 0 ≤ U₀) (ha₀ : 0 ≤ a₀) (ha₁ : 0 ≤ a₁) (ha₂ : 0 ≤ a₂) (hT : 0 ≤ T) (hEnn : ∀ t ∈ Set.Icc 0 T, 0 ≤ E t) (hDnn : ∀ t ∈ Set.Icc 0 T, 0 ≤ D t) (hE_deriv : ∀ t ∈ Set.Icc 0 T, ∃ dE : ℝ, HasDerivAt E dE t ∧ (1 / 2) * dE + ν * D t ≤ (ν / 2) * D t + a₀ * E t + a₁ * (E t) ^ 2 + a₂ * E t * Real.sqrt (E t)) (hbudget : ∀ t ∈ Set.Icc 0 T, (∫ s in (0 : ℝ)..t, E s) ≤ U₀ ^ 2 / (2 * ν)) : ∀ t ∈ Set.Icc 0 T, E t ≤ E 0 * Real.exp (2 * a₀ * T + a₁ * U₀ ^ 2 / ν + 2 * a₂ * U₀ * Real.sqrt (T / (2 * ν))) := by have hE_cont : ContinuousOn E (Set.Icc 0 T) := fun s hs => by obtain ⟨dE, hdE, _⟩ := hE_deriv s hs exact hdE.continuousAt.continuousWithinAt have hE_int : IntervalIntegrable E MeasureTheory.volume 0 T := hE_cont.intervalIntegrable_of_Icc hT have hsq_int : IntervalIntegrable (fun s => Real.sqrt (E s)) MeasureTheory.volume 0 T := hE_cont.sqrt.intervalIntegrable_of_Icc hT -- Define φ(s) = 2 a₀ + 2 a₁ E(s) + 2 a₂ √(E(s)) and Φ(t) = E(t) exp(-∫₀ᵗ φ). let φ : ℝ → ℝ := fun s => 2 * a₀ + 2 * a₁ * E s + 2 * a₂ * Real.sqrt (E s) have hφ_cont : ContinuousOn φ (Set.Icc 0 T) := (continuousOn_const.add (continuousOn_const.mul hE_cont)).add (continuousOn_const.mul hE_cont.sqrt) have hφ_int : IntervalIntegrable φ MeasureTheory.volume 0 T := hφ_cont.intervalIntegrable_of_Icc hT let Φ : ℝ → ℝ := fun t => E t * Real.exp (-(∫ s in (0 : ℝ)..t, φ s)) have hΦ_cont : ContinuousOn Φ (Set.Icc 0 T) := hE_cont.mul (Real.continuous_exp.comp_continuousOn (primitive_continuousOn_Icc hT hφ_cont).neg) let dEFun : ℝ → ℝ := fun s => if h : s ∈ Set.Icc 0 T then Classical.choose (hE_deriv s h) else 0 have hΦ_le : ∀ t ∈ Set.Icc 0 T, Φ t ≤ Φ 0 := by refine image_le_of_deriv_right_le_deriv_boundary hΦ_cont (f' := fun s => dEFun s * Real.exp (-(∫ u in (0 : ℝ)..s, φ u)) + E s * (Real.exp (-(∫ u in (0 : ℝ)..s, φ u)) * (-φ s))) ?_ (B := fun _ => Φ 0) (B' := fun _ => 0) le_rfl continuousOn_const (fun s _ => hasDerivWithinAt_const s (Set.Ici s) (Φ 0)) ?_ · intro s hs have hs_icc : s ∈ Set.Icc 0 T := ⟨hs.1, le_of_lt hs.2⟩ have hdE : HasDerivWithinAt E (dEFun s) (Set.Ici s) s := by simp only [dEFun, hs_icc, ↓reduceDIte] exact (Classical.choose_spec (hE_deriv s hs_icc)).1.hasDerivWithinAt have hI_deriv : HasDerivWithinAt (fun u => ∫ x in (0 : ℝ)..u, φ x) (φ s) (Set.Ici s) s := primitive_hasDerivWithinAt_Ici hφ_cont hs exact hdE.mul hI_deriv.neg.exp · intro s hs have hs_icc : s ∈ Set.Icc 0 T := ⟨hs.1, le_of_lt hs.2⟩ simp only [dEFun, hs_icc, ↓reduceDIte] have hineq := (Classical.choose_spec (hE_deriv s hs_icc)).2 have hνD : 0 ≤ (ν / 2) * D s := mul_nonneg (by positivity) (hDnn s hs_icc) have hdE_le : Classical.choose (hE_deriv s hs_icc) - E s * φ s ≤ 0 := by dsimp only [φ] nlinarith have hfac : Classical.choose (hE_deriv s hs_icc) * Real.exp (-(∫ u in (0 : ℝ)..s, φ u)) + E s * (Real.exp (-(∫ u in (0 : ℝ)..s, φ u)) * (-φ s)) = Real.exp (-(∫ u in (0 : ℝ)..s, φ u)) * (Classical.choose (hE_deriv s hs_icc) - E s * φ s) := by ring rw [hfac] exact mul_nonpos_of_nonneg_of_nonpos (le_of_lt (Real.exp_pos _)) hdE_le intro t ht have hΦt := hΦ_le t ht dsimp only [Φ] at hΦt rw [intervalIntegral.integral_same, neg_zero, Real.exp_zero, mul_one] at hΦt have hEt_le : E t ≤ E 0 * Real.exp (∫ s in (0 : ℝ)..t, φ s) := by have hmul := mul_le_mul_of_nonneg_right hΦt (le_of_lt (Real.exp_pos (∫ s in (0 : ℝ)..t, φ s))) rw [mul_assoc, ← Real.exp_add, neg_add_cancel, Real.exp_zero, mul_one] at hmul exact hmul -- Evaluate and bound ∫₀ᵗ φ s ds. have hE_int_t : IntervalIntegrable E MeasureTheory.volume 0 t := hE_int.mono_set (Set.uIcc_subset_uIcc_left (Set.mem_uIcc_of_le ht.1 ht.2)) have hsq_int_t : IntervalIntegrable (fun s => Real.sqrt (E s)) MeasureTheory.volume 0 t := hsq_int.mono_set (Set.uIcc_subset_uIcc_left (Set.mem_uIcc_of_le ht.1 ht.2)) have hφ_eval : (∫ s in (0 : ℝ)..t, φ s) = 2 * a₀ * t + 2 * a₁ * (∫ s in (0 : ℝ)..t, E s) + 2 * a₂ * (∫ s in (0 : ℝ)..t, Real.sqrt (E s)) := by dsimp only [φ] rw [intervalIntegral.integral_add (intervalIntegrable_const.add (hE_int_t.const_mul (2 * a₁))) (hsq_int_t.const_mul (2 * a₂)), intervalIntegral.integral_add intervalIntegrable_const (hE_int_t.const_mul (2 * a₁)), intervalIntegral.integral_const, sub_zero, smul_eq_mul, intervalIntegral.integral_const_mul, intervalIntegral.integral_const_mul] ring have hcs := sqrt_intervalIntegral_sq_le ht.1 (fun s hs => hEnn s ⟨hs.1, le_trans hs.2 ht.2⟩) (hE_cont.mono (Set.Icc_subset_Icc_right ht.2)) have hsq_bound : (∫ s in (0 : ℝ)..t, Real.sqrt (E s)) ≤ U₀ * Real.sqrt (T / (2 * ν)) := by have hL_nn : 0 ≤ ∫ s in (0 : ℝ)..t, Real.sqrt (E s) := intervalIntegral.integral_nonneg ht.1 (fun s _ => Real.sqrt_nonneg _) have hR_nn : 0 ≤ U₀ * Real.sqrt (T / (2 * ν)) := by positivity rw [← sq_le_sq₀ hL_nn hR_nn, mul_pow, Real.sq_sqrt (by positivity)] calc (∫ s in (0 : ℝ)..t, Real.sqrt (E s)) ^ 2 ≤ t * (∫ s in (0 : ℝ)..t, E s) := hcs _ ≤ T * (U₀ ^ 2 / (2 * ν)) := mul_le_mul ht.2 (hbudget t ht) (intervalIntegral.integral_nonneg ht.1 (fun s hs => hEnn s ⟨hs.1, le_trans hs.2 ht.2⟩)) hT _ = U₀ ^ 2 * (T / (2 * ν)) := by ring have hφ_le : (∫ s in (0 : ℝ)..t, φ s) ≤ 2 * a₀ * T + a₁ * U₀ ^ 2 / ν + 2 * a₂ * U₀ * Real.sqrt (T / (2 * ν)) := by rw [hφ_eval] have h1 : 2 * a₀ * t ≤ 2 * a₀ * T := mul_le_mul_of_nonneg_left ht.2 (by positivity) have h2 : 2 * a₁ * (∫ s in (0 : ℝ)..t, E s) ≤ a₁ * U₀ ^ 2 / ν := by calc 2 * a₁ * (∫ s in (0 : ℝ)..t, E s) ≤ 2 * a₁ * (U₀ ^ 2 / (2 * ν)) := mul_le_mul_of_nonneg_left (hbudget t ht) (by positivity) _ = a₁ * U₀ ^ 2 / ν := by field_simp [ne_of_gt hν] have h3 : 2 * a₂ * (∫ s in (0 : ℝ)..t, Real.sqrt (E s)) ≤ 2 * a₂ * U₀ * Real.sqrt (T / (2 * ν)) := by calc 2 * a₂ * (∫ s in (0 : ℝ)..t, Real.sqrt (E s)) ≤ 2 * a₂ * (U₀ * Real.sqrt (T / (2 * ν))) := mul_le_mul_of_nonneg_left hsq_bound (by positivity) _ = 2 * a₂ * U₀ * Real.sqrt (T / (2 * ν)) := by ring linarith exact le_trans hEt_le (mul_le_mul_of_nonneg_left (Real.exp_le_exp.mpr hφ_le) (hEnn 0 ⟨le_rfl, hT⟩)) /-- Signed-production Gronwall closure (`C5`, `S3_PRIMARY_PDE_REVIEW.md` lines 247–254): if `(1/2) E' + ν D ≤ (ν/2) D + b(t) E` on `[0, T]` (`E ≥ 0, D ≥ 0`) with `b` continuous and `∫₀ᵀ max (b s) 0 ds ≤ B`, then `E(t) ≤ E(0) exp(2 B)` for all `t ∈ [0, T]`. -/ theorem signed_production_gronwall_C5 {E D b : ℝ → ℝ} {ν B T : ℝ} (hν : 0 < ν) (hT : 0 ≤ T) (hEnn : ∀ t ∈ Set.Icc 0 T, 0 ≤ E t) (hDnn : ∀ t ∈ Set.Icc 0 T, 0 ≤ D t) (hb_cont : ContinuousOn b (Set.Icc 0 T)) (hE_deriv : ∀ t ∈ Set.Icc 0 T, ∃ dE : ℝ, HasDerivAt E dE t ∧ (1 / 2) * dE + ν * D t ≤ (ν / 2) * D t + b t * E t) (hB : (∫ s in (0 : ℝ)..T, max (b s) 0) ≤ B) : ∀ t ∈ Set.Icc 0 T, E t ≤ E 0 * Real.exp (2 * B) := by have hE_cont : ContinuousOn E (Set.Icc 0 T) := fun s hs => by obtain ⟨dE, hdE, _⟩ := hE_deriv s hs exact hdE.continuousAt.continuousWithinAt let bp : ℝ → ℝ := fun s => 2 * max (b s) 0 have hbp_cont : ContinuousOn bp (Set.Icc 0 T) := by have hmax_eq : (fun s => max (b s) 0) = fun s => (b s + |b s|) / 2 := by funext s rcases le_total (b s) 0 with h | h · rw [max_eq_right h, abs_of_nonpos h]; ring · rw [max_eq_left h, abs_of_nonneg h]; ring have hmax_cont : ContinuousOn (fun s => max (b s) 0) (Set.Icc 0 T) := by rw [hmax_eq] exact (hb_cont.add hb_cont.abs).div_const 2 exact continuousOn_const.mul hmax_cont have hbp_int : IntervalIntegrable bp MeasureTheory.volume 0 T := hbp_cont.intervalIntegrable_of_Icc hT let Φ : ℝ → ℝ := fun t => E t * Real.exp (-(∫ s in (0 : ℝ)..t, bp s)) have hΦ_cont : ContinuousOn Φ (Set.Icc 0 T) := hE_cont.mul (Real.continuous_exp.comp_continuousOn (primitive_continuousOn_Icc hT hbp_cont).neg) let dEFun : ℝ → ℝ := fun s => if h : s ∈ Set.Icc 0 T then Classical.choose (hE_deriv s h) else 0 have hΦ_le : ∀ t ∈ Set.Icc 0 T, Φ t ≤ Φ 0 := by refine image_le_of_deriv_right_le_deriv_boundary hΦ_cont (f' := fun s => dEFun s * Real.exp (-(∫ u in (0 : ℝ)..s, bp u)) + E s * (Real.exp (-(∫ u in (0 : ℝ)..s, bp u)) * (-bp s))) ?_ (B := fun _ => Φ 0) (B' := fun _ => 0) le_rfl continuousOn_const (fun s _ => hasDerivWithinAt_const s (Set.Ici s) (Φ 0)) ?_ · intro s hs have hs_icc : s ∈ Set.Icc 0 T := ⟨hs.1, le_of_lt hs.2⟩ have hdE : HasDerivWithinAt E (dEFun s) (Set.Ici s) s := by simp only [dEFun, hs_icc, ↓reduceDIte] exact (Classical.choose_spec (hE_deriv s hs_icc)).1.hasDerivWithinAt have hI_deriv : HasDerivWithinAt (fun u => ∫ x in (0 : ℝ)..u, bp x) (bp s) (Set.Ici s) s := primitive_hasDerivWithinAt_Ici hbp_cont hs exact hdE.mul hI_deriv.neg.exp · intro s hs have hs_icc : s ∈ Set.Icc 0 T := ⟨hs.1, le_of_lt hs.2⟩ simp only [dEFun, hs_icc, ↓reduceDIte] have hineq := (Classical.choose_spec (hE_deriv s hs_icc)).2 have hνD : 0 ≤ (ν / 2) * D s := mul_nonneg (by positivity) (hDnn s hs_icc) have hble : b s * E s ≤ max (b s) 0 * E s := mul_le_mul_of_nonneg_right (le_max_left _ _) (hEnn s hs_icc) have hdE_le : Classical.choose (hE_deriv s hs_icc) - E s * bp s ≤ 0 := by dsimp only [bp]; linarith have hfac : Classical.choose (hE_deriv s hs_icc) * Real.exp (-(∫ u in (0 : ℝ)..s, bp u)) + E s * (Real.exp (-(∫ u in (0 : ℝ)..s, bp u)) * (-bp s)) = Real.exp (-(∫ u in (0 : ℝ)..s, bp u)) * (Classical.choose (hE_deriv s hs_icc) - E s * bp s) := by ring rw [hfac] exact mul_nonpos_of_nonneg_of_nonpos (le_of_lt (Real.exp_pos _)) hdE_le intro t ht have hΦt := hΦ_le t ht dsimp only [Φ] at hΦt rw [intervalIntegral.integral_same, neg_zero, Real.exp_zero, mul_one] at hΦt have hEt_le : E t ≤ E 0 * Real.exp (∫ s in (0 : ℝ)..t, bp s) := by have hmul := mul_le_mul_of_nonneg_right hΦt (le_of_lt (Real.exp_pos (∫ s in (0 : ℝ)..t, bp s))) rw [mul_assoc, ← Real.exp_add, neg_add_cancel, Real.exp_zero, mul_one] at hmul exact hmul have hint_t : IntervalIntegrable bp MeasureTheory.volume 0 t := hbp_int.mono_set (Set.uIcc_subset_uIcc_left (Set.mem_uIcc_of_le ht.1 ht.2)) have hint_rem : IntervalIntegrable bp MeasureTheory.volume t T := hbp_int.mono_set (Set.uIcc_subset_uIcc_right (Set.mem_uIcc_of_le ht.1 ht.2)) have hrem_nn : 0 ≤ ∫ s in t..T, bp s := intervalIntegral.integral_nonneg ht.2 (fun s _ => mul_nonneg (by norm_num) (le_max_right _ _)) have hI_le : (∫ s in (0 : ℝ)..t, bp s) ≤ 2 * B := by have hsplit := intervalIntegral.integral_add_adjacent_intervals hint_t hint_rem have hT_eq : (∫ s in (0 : ℝ)..T, bp s) = 2 * ∫ s in (0 : ℝ)..T, max (b s) 0 := by dsimp only [bp] exact intervalIntegral.integral_const_mul 2 _ linarith exact le_trans hEt_le (mul_le_mul_of_nonneg_left (Real.exp_le_exp.mpr hI_le) (hEnn 0 ⟨le_rfl, hT⟩)) /-- Sharp unit-direction Lipschitz bound valid across intervening vorticity zeros (`I1`, `S3_HIGH_VORTICITY_INITIAL_DATA.md` lines 109–116): for any `a, b : Vec3` with `|a|, |b| ≥ Ω > 0`, `|a/|a| - b/|b|| ≤ |a - b| / Ω ≤ (2 / Ω) |a - b|`. -/ theorem unit_direction_lipschitz_I1 {a b : Vec3} {Ω : ℝ} (hΩ : 0 < Ω) (ha : Ω ≤ Real.sqrt (vecSqNorm a)) (hb : Ω ≤ Real.sqrt (vecSqNorm b)) : let ra := Real.sqrt (vecSqNorm a) let rb := Real.sqrt (vecSqNorm b) Real.sqrt (vecSqNorm (ra⁻¹ • a - rb⁻¹ • b)) ≤ (1 / Ω) * Real.sqrt (vecSqNorm (a - b)) ∧ Real.sqrt (vecSqNorm (ra⁻¹ • a - rb⁻¹ • b)) ≤ (2 / Ω) * Real.sqrt (vecSqNorm (a - b)) := by intro ra rb have hra_pos : 0 < ra := lt_of_lt_of_le hΩ ha have hrb_pos : 0 < rb := lt_of_lt_of_le hΩ hb have hra2 : ra ^ 2 = vecSqNorm a := Real.sq_sqrt (vecSqNorm_nonneg a) have hrb2 : rb ^ 2 = vecSqNorm b := Real.sq_sqrt (vecSqNorm_nonneg b) have hexp_diff : vecSqNorm (a - b) = ra ^ 2 + rb ^ 2 - 2 * vecDot a b := by rw [hra2, hrb2] simp only [vecSqNorm, vecDot, Fin.sum_univ_three, Pi.sub_apply] ring have hexp_unit : vecSqNorm (ra⁻¹ • a - rb⁻¹ • b) = 2 - 2 * vecDot a b / (ra * rb) := by have h0 : vecSqNorm (ra⁻¹ • a - rb⁻¹ • b) = ra⁻¹ ^ 2 * vecSqNorm a + rb⁻¹ ^ 2 * vecSqNorm b - 2 * (ra⁻¹ * rb⁻¹) * vecDot a b := by simp only [vecSqNorm, vecDot, Fin.sum_univ_three, Pi.sub_apply, Pi.smul_apply, smul_eq_mul] ring rw [h0, ← hra2, ← hrb2] field_simp [ne_of_gt hra_pos, ne_of_gt hrb_pos] ring have hkey : ra * rb * vecSqNorm (ra⁻¹ • a - rb⁻¹ • b) ≤ vecSqNorm (a - b) := by rw [hexp_diff, hexp_unit] have hmul : ra * rb * (2 - 2 * vecDot a b / (ra * rb)) = 2 * ra * rb - 2 * vecDot a b := by field_simp [ne_of_gt hra_pos, ne_of_gt hrb_pos] nlinarith [sq_nonneg (ra - rb)] have hΩ2 : Ω ^ 2 * vecSqNorm (ra⁻¹ • a - rb⁻¹ • b) ≤ vecSqNorm (a - b) := by have h1 : Ω ^ 2 ≤ ra * rb := by nlinarith exact le_trans (mul_le_mul_of_nonneg_right h1 (vecSqNorm_nonneg _)) hkey have h1 : Real.sqrt (vecSqNorm (ra⁻¹ • a - rb⁻¹ • b)) ≤ (1 / Ω) * Real.sqrt (vecSqNorm (a - b)) := by rw [← sq_le_sq₀ (Real.sqrt_nonneg _) (by positivity), mul_pow, Real.sq_sqrt (vecSqNorm_nonneg _), Real.sq_sqrt (vecSqNorm_nonneg _)] have hdiv : vecSqNorm (ra⁻¹ • a - rb⁻¹ • b) ≤ vecSqNorm (a - b) / Ω ^ 2 := (le_div_iff₀ (sq_pos_of_pos hΩ)).mpr (by linarith) have hsimp : (1 / Ω) ^ 2 * vecSqNorm (a - b) = vecSqNorm (a - b) / Ω ^ 2 := by ring linarith refine ⟨h1, ?_⟩ have hnn : 0 ≤ Real.sqrt (vecSqNorm (a - b)) := Real.sqrt_nonneg _ have h12 : 1 / Ω ≤ 2 / Ω := div_le_div_of_nonneg_right (by norm_num) (le_of_lt hΩ) exact le_trans h1 (mul_le_mul_of_nonneg_right h12 hnn) /-- Two-sided active-maximum signed-budget stability (`VC1`–`VC3`, `SC2`, `S3_COVARIANCE_CLOSURE_ATTEMPT_V2.md` lines 18–34): if `|b_a(s) - q(s)| ≤ F(s)` on `[0, t]`, `∫₀ᵗ q = log(M(t) / M₀)`, and `∫₀ᵗ F ≤ Fbound`, then: 1. `|∫₀ᵗ b_a - log(M(t) / M₀)| ≤ Fbound`, 2. `M₀ exp(C_a(t) - Fbound) ≤ M(t) ≤ M₀ exp(C_a(t) + Fbound)`. -/ theorem two_sided_signed_budget_stability_VC1_VC3 {b_a q F : ℝ → ℝ} {M_t M₀ Fbound t : ℝ} (hM_t : 0 < M_t) (hM₀ : 0 < M₀) (ht : 0 ≤ t) (hb_int : IntervalIntegrable b_a MeasureTheory.volume 0 t) (hq_int : IntervalIntegrable q MeasureTheory.volume 0 t) (hF_int : IntervalIntegrable F MeasureTheory.volume 0 t) (hstab : ∀ s ∈ Set.Icc 0 t, |b_a s - q s| ≤ F s) (hq_eq : (∫ s in (0 : ℝ)..t, q s) = Real.log (M_t / M₀)) (hF_le : (∫ s in (0 : ℝ)..t, F s) ≤ Fbound) : let C_a := ∫ s in (0 : ℝ)..t, b_a s |C_a - Real.log (M_t / M₀)| ≤ Fbound ∧ M₀ * Real.exp (C_a - Fbound) ≤ M_t ∧ M_t ≤ M₀ * Real.exp (C_a + Fbound) := by intro C_a have hdiff : C_a - Real.log (M_t / M₀) = ∫ s in (0 : ℝ)..t, (b_a s - q s) := by dsimp only [C_a] rw [← hq_eq, intervalIntegral.integral_sub hb_int hq_int] have habs_le : |C_a - Real.log (M_t / M₀)| ≤ Fbound := by rw [hdiff] have hupper := intervalIntegral.integral_mono_on ht (hb_int.sub hq_int) hF_int (fun s hs => (abs_le.mp (hstab s hs)).2) have hlower : -(∫ s in (0 : ℝ)..t, F s) ≤ ∫ s in (0 : ℝ)..t, (b_a s - q s) := by have h := intervalIntegral.integral_mono_on ht hF_int.neg (hb_int.sub hq_int) (fun s hs => (abs_le.mp (hstab s hs)).1) have hneg : (∫ u in (0 : ℝ)..t, (-F) u) = -(∫ u in (0 : ℝ)..t, F u) := intervalIntegral.integral_neg linarith exact abs_le.mpr ⟨by linarith, by linarith⟩ have ⟨hlo, hhi⟩ := abs_le.mp habs_le refine ⟨habs_le, ?_, ?_⟩ · have h1 : C_a - Fbound ≤ Real.log (M_t / M₀) := by linarith have h2 : Real.exp (C_a - Fbound) ≤ M_t / M₀ := by have := Real.exp_le_exp.mpr h1 rwa [Real.exp_log (div_pos hM_t hM₀)] at this exact (le_div_iff₀ hM₀).mp h2 |> fun h => by linarith · have h1 : Real.log (M_t / M₀) ≤ C_a + Fbound := by linarith have h2 : M_t / M₀ ≤ Real.exp (C_a + Fbound) := by have := Real.exp_le_exp.mpr h1 rwa [Real.exp_log (div_pos hM_t hM₀)] at this exact (div_le_iff₀ hM₀).mp h2 |> fun h => by linarith /-- Exact transverse and mixed covariance cancellation (`VC4`–`VC5`, `S3_COVARIANCE_CLOSURE_ATTEMPT_V2.md` lines 47–55): for any `A, V : Mat3`, unit vector `e : Vec3` (`|e|² = 1`), `ω = r • e`, and orthogonal transverse projector `P_e = I - outer e`, if `A - V = outer ω`, then: 1. `P_e * A * P_e = P_e * V * P_e` (exact transverse second-moment cancellation), 2. `P_e *ᵥ (A *ᵥ e) = P_e *ᵥ (V *ᵥ e)` (exact mixed transverse/longitudinal cancellation), 3. `⟨e, A e⟩ - ⟨e, V e⟩ = r²` (all unresolved amplitude lies solely in the longitudinal block), 4. At a vorticity zero (`r = 0`), `A = V`. -/ theorem covariance_transverse_cancellation_VC5 {A V : Mat3} {ω e : Vec3} {r : ℝ} (he : vecSqNorm e = 1) (hω : ω = r • e) (hAV : A - V = outer ω) : let P_e : Mat3 := (1 : Mat3) - outer e P_e * A * P_e = P_e * V * P_e ∧ P_e *ᵥ (A *ᵥ e) = P_e *ᵥ (V *ᵥ e) ∧ vecDot e (A *ᵥ e) - vecDot e (V *ᵥ e) = r ^ 2 ∧ (r = 0 → A = V) := by intro P_e have hA_eq : A = V + outer (r • e) := by rw [← hω, ← hAV]; abel have houter_smul : outer (r • e) = (r ^ 2) • outer e := by ext i j simp only [outer, Matrix.of_apply, Pi.smul_apply, smul_eq_mul, Matrix.smul_apply] ring have he_sum : e 0 ^ 2 + e 1 ^ 2 + e 2 ^ 2 = 1 := by simpa [vecSqNorm, Fin.sum_univ_three] using he have hPe_outer : P_e * outer e = 0 := by have hfac : ∀ i j : Fin 3, (P_e * outer e) i j = e i * e j * (1 - (e 0 ^ 2 + e 1 ^ 2 + e 2 ^ 2)) := by intro i j dsimp [P_e, outer] fin_cases i <;> fin_cases j <;> simp [Matrix.mul_apply, Fin.sum_univ_three] <;> ring ext i j rw [hfac i j, he_sum] simp have houter_e : outer e *ᵥ e = e := by have hfac : ∀ i : Fin 3, (outer e *ᵥ e) i = e i * (e 0 ^ 2 + e 1 ^ 2 + e 2 ^ 2) := by intro i dsimp [outer] fin_cases i <;> simp [Matrix.mulVec, dotProduct, Fin.sum_univ_three] <;> ring ext i rw [hfac i, he_sum, mul_one] have hPe_e : P_e *ᵥ e = 0 := by dsimp [P_e] rw [Matrix.sub_mulVec, Matrix.one_mulVec, houter_e, sub_self] refine ⟨?_, ?_, ?_, ?_⟩ · rw [hA_eq, houter_smul, Matrix.mul_add, Matrix.mul_smul, hPe_outer, smul_zero, add_zero] · rw [hA_eq, houter_smul, Matrix.add_mulVec, Matrix.smul_mulVec, houter_e, Matrix.mulVec_add, Matrix.mulVec_smul, hPe_e, smul_zero, add_zero] · rw [hA_eq, houter_smul, Matrix.add_mulVec, Matrix.smul_mulVec, houter_e] simp only [vecDot, Fin.sum_univ_three, Pi.add_apply, Pi.smul_apply, smul_eq_mul] nlinarith [he_sum] · intro hr rw [hA_eq, houter_smul, hr] simp /-- Sharp spectral polar-distortion ratio bound (`VC13`, `S3_COVARIANCE_CLOSURE_ATTEMPT_V2.md` lines 114–124): for `0 < α ≤ c ≤ β` (eigenvalue bounds `α = σ_min(F)²`, `β = σ_max(F)²`, `c = ⟨n, C n⟩`), with `q = ⟨n, C² n⟩ ≤ (α + β) c - α β` and `|P_n C n|² = q - c² ≥ 0`: 1. `|P_n C n|² ≤ (c - α)(β - c)`, 2. `(c - α)(β - c) / c² ≤ (β - α)² / (4 α β)` (exact perfect-square surplus), 3. Sharpness: attained at the harmonic mean `c_* = 2 α β / (α + β) ∈ [α, β]`, 4. With condition number `χ = √(β / α)`: `|θ_F| = |P_n C n| / c ≤ (χ - χ⁻¹) / 2`. -/ theorem polar_distortion_ratio_bound_VC13 {α β c q p_sq : ℝ} (hα : 0 < α) (hαc : α ≤ c) (hcβ : c ≤ β) (hq : q ≤ (α + β) * c - α * β) (hp_nn : 0 ≤ p_sq) (hp_eq : p_sq = q - c ^ 2) : let c_star := 2 * α * β / (α + β) let χ := Real.sqrt (β / α) p_sq ≤ (c - α) * (β - c) ∧ (c - α) * (β - c) / c ^ 2 ≤ (β - α) ^ 2 / (4 * α * β) ∧ (α ≤ c_star ∧ c_star ≤ β ∧ (c_star - α) * (β - c_star) / c_star ^ 2 = (β - α) ^ 2 / (4 * α * β)) ∧ Real.sqrt p_sq / c ≤ (χ - χ⁻¹) / 2 := by intro c_star χ have hc_pos : 0 < c := lt_of_lt_of_le hα hαc have hβ_pos : 0 < β := lt_of_lt_of_le hc_pos hcβ have hαβ_pos : 0 < α + β := by linarith have h1 : p_sq ≤ (c - α) * (β - c) := by nlinarith have h2 : (c - α) * (β - c) / c ^ 2 ≤ (β - α) ^ 2 / (4 * α * β) := by have hdiff : (β - α) ^ 2 / (4 * α * β) - (c - α) * (β - c) / c ^ 2 = ((α + β) * c - 2 * α * β) ^ 2 / (4 * α * β * c ^ 2) := by field_simp [ne_of_gt hα, ne_of_gt hβ_pos, ne_of_gt hc_pos] ring have hnn : 0 ≤ ((α + β) * c - 2 * α * β) ^ 2 / (4 * α * β * c ^ 2) := by positivity linarith have h3 : α ≤ c_star ∧ c_star ≤ β ∧ (c_star - α) * (β - c_star) / c_star ^ 2 = (β - α) ^ 2 / (4 * α * β) := by refine ⟨?_, ?_, ?_⟩ · dsimp [c_star]; rw [le_div_iff₀ hαβ_pos]; nlinarith · dsimp [c_star]; rw [div_le_iff₀ hαβ_pos]; nlinarith · dsimp [c_star] field_simp [ne_of_gt hα, ne_of_gt hβ_pos, ne_of_gt hαβ_pos] ring have h4 : Real.sqrt p_sq / c ≤ (χ - χ⁻¹) / 2 := by have hχ_ge1 : 1 ≤ χ := by dsimp [χ] rw [← Real.sqrt_one] exact Real.sqrt_le_sqrt ((one_le_div hα).mpr (le_trans hαc hcβ)) have hχ_pos : 0 < χ := by linarith have hR_nn : 0 ≤ (χ - χ⁻¹) / 2 := by have : χ⁻¹ ≤ 1 := inv_le_one_of_one_le₀ hχ_ge1 linarith rw [← sq_le_sq₀ (div_nonneg (Real.sqrt_nonneg _) (le_of_lt hc_pos)) hR_nn] rw [div_pow, Real.sq_sqrt hp_nn] have hχ_sq : χ ^ 2 = β / α := Real.sq_sqrt (div_nonneg (le_of_lt hβ_pos) (le_of_lt hα)) have hR_sq : ((χ - χ⁻¹) / 2) ^ 2 = (β - α) ^ 2 / (4 * α * β) := by have hsub : ((χ - χ⁻¹) / 2) ^ 2 = (χ ^ 2 + (χ ^ 2)⁻¹ - 2) / 4 := by field_simp [ne_of_gt hχ_pos]; ring rw [hsub, hχ_sq, inv_div] field_simp [ne_of_gt hα, ne_of_gt hβ_pos] ring rw [hR_sq] exact le_trans (div_le_div_of_nonneg_right h1 (sq_nonneg c)) h2 exact ⟨h1, h2, h3, h4⟩ end CoherenceAndCovariance end end F02NavierStokes.UnmodifiedNSClosures