import F02NavierStokes.LinearAlgebra3D import F02NavierStokes.CompensatedHistoryAndInverse import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv import Mathlib.Analysis.SpecialFunctions.ExpDeriv import Mathlib.MeasureTheory.Integral.IntervalIntegral.FundThmCalculus import Mathlib.Tactic.Linarith import Mathlib.Tactic.Positivity import Mathlib.Tactic.Ring import Mathlib.Tactic.FieldSimp /-! # Equal-Amplitude ABC Beltrami Family: Exact PDE Verification, Torus Averages, # All-Time Signed-Shell Ceiling (`prop:rev-abc`), and Heat-Shear Counterexample Formalizes Section 9.2 (`prop:rev-abc`, lines 1594--1648) and `CP8`--`CP16` of F02: - Explicit equal-amplitude ABC shape `abcShape` and time-decaying velocity `abcVel` on `𝕋³ = (ℝ / 2πℤ)³`. - Real-calculus `HasDerivAt` verification of: `div u = 0`, `curl u = n • u`, `Δ u = -n² • u`, exact unforced Navier--Stokes solution with `p = -|u|²/2`, spatially constant vorticity gradient `|∇ω(x,t)|_HS² = 3 b² n⁴ e^{-2ν n² t}`, and exact backward source clock `2ν ∫₀ᵗ 3 b² n⁴ e^{-2ν n² (t-s)} ds = 3 d (1 - r)`. - Pointwise norm bounds `0 ≤ F(x) ≤ 6` with exact attainment `F(π/4, π/4, π/4) = 6`, and exact normalized `[0, 2π]³` iterated integrals `mean(F) = 3` and `mean(F²) = 12`. - Proof that `E_R = exp(2 √(2/3) (R + 1)) > 2` for all `R ≥ 0`. - Complete `prop:rev-abc` theorem: `0 ⪯ A ⪯ (3/2) K₀ I`, `-K₀ I ⪯ D_R ⪯ (1/2) K₀ I`, `J ⪰ ((3/2) K₀ + ε)⁻¹ I`, `E(t) ≤ 3 c_t² + 6 c_t d r + 12 d² r² ≤ (27/4) K₀²`, `-(3/2) K₀² ≤ W(t) ≤ (15/8) K₀²`. - Explicit heat-shear counterexample (`manuscript.tex` line 1645) proving spatial constancy of `|∇ω|²` is specific to the ABC family and fails for `u = e^{-νt}(sin x₂, 0, 0)`. -/ namespace F02NavierStokes.ABCCeiling open scoped Matrix BigOperators open Matrix F02NavierStokes.LinearAlgebra3D F02NavierStokes.CompensatedHistoryAndInverse noncomputable section /-! ## 1. ABC shape, exact Jacobian, curl, Laplacian, and Navier--Stokes verification (`CP8`) -/ /-- Equal-amplitude ABC trigonometric vector field on `ℝ³`: `S(x) = (sin x₂ + cos x₁, sin x₀ + cos x₂, sin x₁ + cos x₀)` (0-indexed `(x₀, x₁, x₂)`). -/ def abcShape (x : Vec3) : Vec3 := ![Real.sin (x 2) + Real.cos (x 1), Real.sin (x 0) + Real.cos (x 2), Real.sin (x 1) + Real.cos (x 0)] /-- Exact Jacobian matrix `J_{ij}(x) = ∂_j (abcShape x)_i`. -/ def abcShapeJac (x : Vec3) : Mat3 := !![0, -Real.sin (x 1), Real.cos (x 2); Real.cos (x 0), 0, -Real.sin (x 2); -Real.sin (x 0), Real.cos (x 1), 0] /-- Squared Euclidean norm `F(x) = |abcShape x|²`. -/ def abcF (x : Vec3) : ℝ := vecSqNorm (abcShape x) /-- Time-decaying equal-amplitude ABC velocity field `u(x,t) = b exp(-ν n² t) abcShape (n • x)`. -/ def abcVel (b n ν t : ℝ) (x : Vec3) : Vec3 := (b * Real.exp (-(ν * n ^ 2 * t))) • abcShape (n • x) /-- Exact partial derivatives of `abcShape` in every coordinate via `HasDerivAt`. -/ theorem abcShape_hasDerivAt (x : Vec3) (i j : Fin 3) : HasDerivAt (fun s : ℝ => abcShape (Function.update x j s) i) (abcShapeJac x i j) (x j) := by have hfin3 : ∀ k : Fin 3, k = 0 ∨ k = 1 ∨ k = 2 := by decide rcases hfin3 i with rfl | rfl | rfl <;> rcases hfin3 j with rfl | rfl | rfl · -- i=0, j=0: const simpa [abcShape, abcShapeJac] using hasDerivAt_const (x 0) (Real.sin (x 2) + Real.cos (x 1)) · -- i=0, j=1: d/ds (sin(x 2) + cos s) = -sin s simpa [abcShape, abcShapeJac] using (hasDerivAt_const (x 1) (Real.sin (x 2))).fun_add (Real.hasDerivAt_cos (x 1)) · -- i=0, j=2: d/ds (sin s + cos(x 1)) = cos s simpa [abcShape, abcShapeJac] using (Real.hasDerivAt_sin (x 2)).fun_add (hasDerivAt_const (x 2) (Real.cos (x 1))) · -- i=1, j=0: d/ds (sin s + cos(x 2)) = cos s simpa [abcShape, abcShapeJac] using (Real.hasDerivAt_sin (x 0)).fun_add (hasDerivAt_const (x 0) (Real.cos (x 2))) · -- i=1, j=1: const simpa [abcShape, abcShapeJac] using hasDerivAt_const (x 1) (Real.sin (x 0) + Real.cos (x 2)) · -- i=1, j=2: d/ds (sin(x 0) + cos s) = -sin s simpa [abcShape, abcShapeJac] using (hasDerivAt_const (x 2) (Real.sin (x 0))).fun_add (Real.hasDerivAt_cos (x 2)) · -- i=2, j=0: d/ds (sin(x 1) + cos s) = -sin s simpa [abcShape, abcShapeJac] using (hasDerivAt_const (x 0) (Real.sin (x 1))).fun_add (Real.hasDerivAt_cos (x 0)) · -- i=2, j=1: d/ds (sin s + cos(x 0)) = cos s simpa [abcShape, abcShapeJac] using (Real.hasDerivAt_sin (x 1)).fun_add (hasDerivAt_const (x 1) (Real.cos (x 0))) · -- i=2, j=2: const simpa [abcShape, abcShapeJac] using hasDerivAt_const (x 2) (Real.sin (x 1) + Real.cos (x 0)) /-- Exact second partial derivatives `∂_j² (abcShape x)_i` via `HasDerivAt`. -/ def abcShapeDiagHess (x : Vec3) : Mat3 := !![0, -Real.cos (x 1), -Real.sin (x 2); -Real.sin (x 0), 0, -Real.cos (x 2); -Real.cos (x 0), -Real.sin (x 1), 0] theorem abcShapeJac_hasDerivAt (x : Vec3) (i j : Fin 3) : HasDerivAt (fun s : ℝ => abcShapeJac (Function.update x j s) i j) (abcShapeDiagHess x i j) (x j) := by have hfin3 : ∀ k : Fin 3, k = 0 ∨ k = 1 ∨ k = 2 := by decide rcases hfin3 i with rfl | rfl | rfl <;> rcases hfin3 j with rfl | rfl | rfl · simpa [abcShapeJac, abcShapeDiagHess] using hasDerivAt_const (x 0) (0 : ℝ) · simpa [abcShapeJac, abcShapeDiagHess] using (Real.hasDerivAt_sin (x 1)).fun_neg · simpa [abcShapeJac, abcShapeDiagHess] using Real.hasDerivAt_cos (x 2) · simpa [abcShapeJac, abcShapeDiagHess] using Real.hasDerivAt_cos (x 0) · simpa [abcShapeJac, abcShapeDiagHess] using hasDerivAt_const (x 1) (0 : ℝ) · simpa [abcShapeJac, abcShapeDiagHess] using (Real.hasDerivAt_sin (x 2)).fun_neg · simpa [abcShapeJac, abcShapeDiagHess] using (Real.hasDerivAt_sin (x 0)).fun_neg · simpa [abcShapeJac, abcShapeDiagHess] using Real.hasDerivAt_cos (x 1) · simpa [abcShapeJac, abcShapeDiagHess] using hasDerivAt_const (x 2) (0 : ℝ) /-- Exact divergence-free, Beltrami curl-eigenfield, Laplacian, convective/pressure cancellation, and SPATIALLY CONSTANT Frobenius gradient square `|∇S(x)|_HS² = 3` (`CP8`)! -/ theorem abcShape_exact_identities (x : Vec3) : (abcShapeJac x).trace = 0 ∧ ![abcShapeJac x 2 1 - abcShapeJac x 1 2, abcShapeJac x 0 2 - abcShapeJac x 2 0, abcShapeJac x 1 0 - abcShapeJac x 0 1] = abcShape x ∧ (fun i => ∑ j : Fin 3, abcShapeDiagHess x i j) = -(abcShape x) ∧ (abcShapeJac x *ᵥ abcShape x = (abcShapeJac x)ᵀ *ᵥ abcShape x) ∧ hsNormSq (abcShapeJac x) = 3 := by have hfin3 : ∀ k : Fin 3, k = 0 ∨ k = 1 ∨ k = 2 := by decide refine ⟨?_, ?_, ?_, ?_, ?_⟩ · simp [abcShapeJac, Matrix.trace, Matrix.diag, Fin.sum_univ_three] · ext i rcases hfin3 i with rfl | rfl | rfl <;> simp [abcShapeJac, abcShape] <;> ring · funext i rcases hfin3 i with rfl | rfl | rfl <;> (simp [abcShapeDiagHess, abcShape, Fin.sum_univ_three]; try ring) · ext i rcases hfin3 i with rfl | rfl | rfl <;> simp [abcShapeJac, abcShape, mulVec, dotProduct, Fin.sum_univ_three] <;> ring · simp only [hsNormSq_eq_sum, abcShapeJac, Fin.sum_univ_three, Matrix.of_apply, Matrix.cons_val_zero, Matrix.cons_val_one, Matrix.cons_val_two, Matrix.head_cons, Matrix.tail_cons] have h0 := Real.sin_sq_add_cos_sq (x 0) have h1 := Real.sin_sq_add_cos_sq (x 1) have h2 := Real.sin_sq_add_cos_sq (x 2) linarith /-- Exact unforced Navier--Stokes verification for `abcVel b n ν t x`: - time derivative `∂_t u = -ν n² u`, - viscous diffusion `ν Δ u = -ν n² u`, - convective term `(u · ∇) u = ∇(|u|² / 2)`, so with `p = -|u|²/2`, `∂_t u + (u · ∇) u + ∇ p - ν Δ u = 0` identically, - vorticity `ω = n u`, and `|∇ω(x,t)|_HS² = 3 b² n⁴ exp(-2 ν n² t)` (independent of `x`)! -/ theorem abcVel_navier_stokes_and_grad_omega (b n ν t : ℝ) (x : Vec3) : let amp := b * Real.exp (-(ν * n ^ 2 * t)) let u := abcVel b n ν t x let gradU := (amp * n) • abcShapeJac (n • x) let gradOmega := (amp * n ^ 2) • abcShapeJac (n • x) let lapU := (-(n ^ 2)) • u let dtU := (-(ν * n ^ 2)) • u let gradP := -(gradUᵀ *ᵥ u) (∀ i : Fin 3, HasDerivAt (fun τ : ℝ => abcVel b n ν τ x i) (dtU i) t) ∧ (dtU + gradU *ᵥ u + gradP - ν • lapU = 0) ∧ hsNormSq gradOmega = 3 * b ^ 2 * n ^ 4 * Real.exp (-(2 * ν * n ^ 2 * t)) := by intro amp u gradU gradOmega lapU dtU gradP have hid := abcShape_exact_identities (n • x) refine ⟨?_, ?_, ?_⟩ · intro i have hlin : HasDerivAt (fun τ : ℝ => -(ν * n ^ 2 * τ)) (-(ν * n ^ 2)) t := by have h1 : HasDerivAt (fun τ : ℝ => (ν * n ^ 2) * τ) (ν * n ^ 2) t := by simpa using (hasDerivAt_id t).const_mul (ν * n ^ 2) simpa [mul_assoc] using h1.fun_neg have hexp : HasDerivAt (fun τ : ℝ => Real.exp (-(ν * n ^ 2 * τ))) (Real.exp (-(ν * n ^ 2 * t)) * (-(ν * n ^ 2))) t := hlin.exp have hfull := (hexp.const_mul b).mul_const (abcShape (n • x) i) have hval : b * (Real.exp (-(ν * n ^ 2 * t)) * -(ν * n ^ 2)) * abcShape (n • x) i = dtU i := by dsimp only [dtU, u, abcVel] simp only [Pi.smul_apply, smul_eq_mul] ring rw [hval] at hfull simpa [abcVel, Pi.smul_apply, smul_eq_mul, mul_assoc] using hfull · have hconv : gradU *ᵥ u + gradP = 0 := by dsimp only [gradP, gradU, u, abcVel] rw [Matrix.transpose_smul, Matrix.smul_mulVec, Matrix.mulVec_smul, Matrix.smul_mulVec, Matrix.mulVec_smul, hid.2.2.2.1] abel have hvisc : dtU - ν • lapU = 0 := by dsimp only [dtU, lapU] rw [smul_smul] have : -(ν * n ^ 2) = ν * -(n ^ 2) := by ring rw [this, sub_self] calc dtU + gradU *ᵥ u + gradP - ν • lapU = (dtU - ν • lapU) + (gradU *ᵥ u + gradP) := by abel _ = 0 := by rw [hvisc, hconv, add_zero] · have hsq : hsNormSq gradOmega = (amp * n ^ 2) ^ 2 * hsNormSq (abcShapeJac (n • x)) := by simp only [gradOmega, hsNormSq, hsInner, Matrix.transpose_smul, Matrix.smul_mul, Matrix.mul_smul, Matrix.trace_smul, smul_eq_mul] ring rw [hsq, hid.2.2.2.2] dsimp only [amp] have hexp : Real.exp (-(ν * n ^ 2 * t)) ^ 2 = Real.exp (-(2 * ν * n ^ 2 * t)) := by rw [pow_two, ← Real.exp_add] congr 1; ring calc (b * Real.exp (-(ν * n ^ 2 * t)) * n ^ 2) ^ 2 * 3 = 3 * b ^ 2 * n ^ 4 * Real.exp (-(ν * n ^ 2 * t)) ^ 2 := by ring _ = 3 * b ^ 2 * n ^ 4 * Real.exp (-(2 * ν * n ^ 2 * t)) := by rw [hexp] /-- Exact backward source clock integral (`CP9`, `manuscript.tex` line 1632): for `ν > 0`, `n ≠ 0`, `d = b² n²`, `r = exp(-2 ν n² t)`: `2 ν ∫₀ᵗ 3 b² n⁴ exp(-2 ν n² (t - s)) ds = 3 d (1 - r)`. -/ theorem abc_source_clock_integral (b n ν t : ℝ) (hν : 0 < ν) (hn : n ≠ 0) : 2 * ν * (∫ s in (0 : ℝ)..t, 3 * b ^ 2 * n ^ 4 * Real.exp (-(2 * ν * n ^ 2 * (t - s)))) = 3 * (b ^ 2 * n ^ 2) * (1 - Real.exp (-(2 * ν * n ^ 2 * t))) := by let k : ℝ := 2 * ν * n ^ 2 have hk_pos : 0 < k := by have : 0 < n ^ 2 := sq_pos_of_ne_zero hn dsimp [k]; positivity have hk_ne : k ≠ 0 := ne_of_gt hk_pos let F : ℝ → ℝ := fun s => (3 * b ^ 2 * n ^ 4 / k) * Real.exp (-(k * (t - s))) have hF_deriv : ∀ s : ℝ, HasDerivAt F (3 * b ^ 2 * n ^ 4 * Real.exp (-(k * (t - s)))) s := by intro s have hlin : HasDerivAt (fun u : ℝ => -(k * (t - u))) k s := by have h1 : HasDerivAt (fun u : ℝ => t - u) (-1) s := by simpa using (hasDerivAt_const s t).fun_sub (hasDerivAt_id s) have h2 := (h1.const_mul k).fun_neg have hval : -(k * -1) = k := by ring simpa [hval] using h2 have hexp := hlin.exp have hmul := hexp.const_mul (3 * b ^ 2 * n ^ 4 / k) have hval : (3 * b ^ 2 * n ^ 4 / k) * (Real.exp (-(k * (t - s))) * k) = 3 * b ^ 2 * n ^ 4 * Real.exp (-(k * (t - s))) := by field_simp [hk_ne] rwa [hval] at hmul have hint : IntervalIntegrable (fun s : ℝ => 3 * b ^ 2 * n ^ 4 * Real.exp (-(k * (t - s)))) MeasureTheory.volume 0 t := by have hcont : Continuous (fun s : ℝ => 3 * b ^ 2 * n ^ 4 * Real.exp (-(k * (t - s)))) := continuous_const.mul (Real.continuous_exp.comp ((continuous_const.mul (continuous_const.sub continuous_id)).neg)) exact hcont.intervalIntegrable 0 t have hftc := intervalIntegral.integral_eq_sub_of_hasDerivAt (fun s _ => hF_deriv s) hint change 2 * ν * (∫ s in (0 : ℝ)..t, 3 * b ^ 2 * n ^ 4 * Real.exp (-(k * (t - s)))) = 3 * (b ^ 2 * n ^ 2) * (1 - Real.exp (-(k * t))) rw [hftc] simp only [F, sub_self, mul_zero, neg_zero, Real.exp_zero, mul_one, sub_zero] dsimp only [k] field_simp [ne_of_gt hν, hn] /-! ## 2. Pointwise bounds `0 ≤ F ≤ 6`, attainment at `π/4`, and normalized torus averages (`CP8`) -/ /-- Pointwise bounds `0 ≤ F(x) ≤ 6` and exact attainment `F(π/4, π/4, π/4) = 6` (`CP8`). -/ theorem abcF_bounds_and_attainment : (∀ x : Vec3, 0 ≤ abcF x ∧ abcF x ≤ 6) ∧ abcF ![Real.pi / 4, Real.pi / 4, Real.pi / 4] = 6 := by constructor · intro x refine ⟨vecSqNorm_nonneg _, ?_⟩ simp only [abcF, abcShape, vecSqNorm, Fin.sum_univ_three, Matrix.cons_val_zero, Matrix.cons_val_one, Matrix.cons_val_two, Matrix.head_cons, Matrix.tail_cons] have h0 := Real.sin_sq_add_cos_sq (x 0) have h1 := Real.sin_sq_add_cos_sq (x 1) have h2 := Real.sin_sq_add_cos_sq (x 2) nlinarith [sq_nonneg (Real.sin (x 2) - Real.cos (x 1)), sq_nonneg (Real.sin (x 0) - Real.cos (x 2)), sq_nonneg (Real.sin (x 1) - Real.cos (x 0))] · simp only [abcF, abcShape, vecSqNorm, Fin.sum_univ_three, Matrix.cons_val_zero, Matrix.cons_val_one, Matrix.cons_val_two, Matrix.head_cons, Matrix.tail_cons, Real.sin_pi_div_four, Real.cos_pi_div_four] have h2 : Real.sqrt 2 ^ 2 = 2 := Real.sq_sqrt (by norm_num) ring_nf rw [h2] norm_num /-- Exact period integral of any degree-2 trigonometric polynomial over `[0, 2π]` via FTC: `∫₀^{2π} (c₀ + c₁ sin t + c₂ cos t + c₃ sin² t + c₄ cos² t + c₅ sin t cos t) dt = 2π c₀ + π c₃ + π c₄`. -/ theorem int_trig_poly_2pi (c0 c1 c2 c3 c4 c5 : ℝ) : (∫ t in (0 : ℝ)..2 * Real.pi, (c0 + c1 * Real.sin t + c2 * Real.cos t + c3 * (Real.sin t) ^ 2 + c4 * (Real.cos t) ^ 2 + c5 * (Real.sin t * Real.cos t))) = 2 * Real.pi * c0 + Real.pi * c3 + Real.pi * c4 := by let F : ℝ → ℝ := fun t => c0 * t - c1 * Real.cos t + c2 * Real.sin t + c3 * (t / 2 - Real.sin t * Real.cos t / 2) + c4 * (t / 2 + Real.sin t * Real.cos t / 2) + c5 * ((Real.sin t) ^ 2 / 2) have hF_deriv : ∀ t : ℝ, HasDerivAt F (c0 + c1 * Real.sin t + c2 * Real.cos t + c3 * (Real.sin t) ^ 2 + c4 * (Real.cos t) ^ 2 + c5 * (Real.sin t * Real.cos t)) t := by intro t have h0 : HasDerivAt (fun u : ℝ => c0 * u) c0 t := by simpa using (hasDerivAt_id t).const_mul c0 have h1 : HasDerivAt (fun u : ℝ => c1 * Real.cos u) (c1 * (-Real.sin t)) t := (Real.hasDerivAt_cos t).const_mul c1 have h2 : HasDerivAt (fun u : ℝ => c2 * Real.sin u) (c2 * Real.cos t) t := (Real.hasDerivAt_sin t).const_mul c2 have hsc_d : HasDerivAt (fun u : ℝ => Real.sin u * Real.cos u / 2) ((Real.cos t * Real.cos t + Real.sin t * -Real.sin t) / 2) t := ((Real.hasDerivAt_sin t).mul (Real.hasDerivAt_cos t)).div_const 2 have hid2 : HasDerivAt (fun u : ℝ => u / 2) (1 / 2) t := by simpa using (hasDerivAt_id t).div_const 2 have h3 : HasDerivAt (fun u : ℝ => c3 * (u / 2 - Real.sin u * Real.cos u / 2)) (c3 * (1 / 2 - (Real.cos t * Real.cos t + Real.sin t * -Real.sin t) / 2)) t := (hid2.fun_sub hsc_d).const_mul c3 have h4 : HasDerivAt (fun u : ℝ => c4 * (u / 2 + Real.sin u * Real.cos u / 2)) (c4 * (1 / 2 + (Real.cos t * Real.cos t + Real.sin t * -Real.sin t) / 2)) t := (hid2.fun_add hsc_d).const_mul c4 have h5 : HasDerivAt (fun u : ℝ => c5 * ((Real.sin u) ^ 2 / 2)) (c5 * (2 * Real.sin t * Real.cos t / 2)) t := by have hp : HasDerivAt (fun u : ℝ => u ^ 2) (2 * Real.sin t) (Real.sin t) := by simpa using hasDerivAt_pow 2 (Real.sin t) have hc := ((hp.comp t (Real.hasDerivAt_sin t)).div_const 2).const_mul c5 simpa [Function.comp_def] using hc have hall := ((((h0.fun_sub h1).fun_add h2).fun_add h3).fun_add h4).fun_add h5 have hval : c0 - c1 * -Real.sin t + c2 * Real.cos t + c3 * (1 / 2 - (Real.cos t * Real.cos t + Real.sin t * -Real.sin t) / 2) + c4 * (1 / 2 + (Real.cos t * Real.cos t + Real.sin t * -Real.sin t) / 2) + c5 * (2 * Real.sin t * Real.cos t / 2) = c0 + c1 * Real.sin t + c2 * Real.cos t + c3 * (Real.sin t) ^ 2 + c4 * (Real.cos t) ^ 2 + c5 * (Real.sin t * Real.cos t) := by have hsc := Real.sin_sq_add_cos_sq t have ha : 1 / 2 - (Real.cos t * Real.cos t + Real.sin t * -Real.sin t) / 2 = (Real.sin t) ^ 2 := by nlinarith have hb : 1 / 2 + (Real.cos t * Real.cos t + Real.sin t * -Real.sin t) / 2 = (Real.cos t) ^ 2 := by nlinarith rw [ha, hb] ring rwa [hval] at hall have hcont : Continuous (fun t : ℝ => c0 + c1 * Real.sin t + c2 * Real.cos t + c3 * (Real.sin t) ^ 2 + c4 * (Real.cos t) ^ 2 + c5 * (Real.sin t * Real.cos t)) := by have h0 : Continuous (fun _ : ℝ => c0) := continuous_const have h1 : Continuous (fun t : ℝ => c1 * Real.sin t) := continuous_const.mul Real.continuous_sin have h2 : Continuous (fun t : ℝ => c2 * Real.cos t) := continuous_const.mul Real.continuous_cos have h3 : Continuous (fun t : ℝ => c3 * (Real.sin t) ^ 2) := continuous_const.mul (Real.continuous_sin.pow 2) have h4 : Continuous (fun t : ℝ => c4 * (Real.cos t) ^ 2) := continuous_const.mul (Real.continuous_cos.pow 2) have h5 : Continuous (fun t : ℝ => c5 * (Real.sin t * Real.cos t)) := continuous_const.mul (Real.continuous_sin.mul Real.continuous_cos) exact ((((h0.add h1).add h2).add h3).add h4).add h5 have hftc := intervalIntegral.integral_eq_sub_of_hasDerivAt (a := (0 : ℝ)) (b := 2 * Real.pi) (fun t _ => hF_deriv t) (hcont.intervalIntegrable 0 (2 * Real.pi)) rw [hftc] simp only [F, Real.sin_two_pi, Real.cos_two_pi, Real.sin_zero, Real.cos_zero] ring /-- Helper: exact expanded form of `abcF ![x, y, z]`. -/ theorem abcF_expand (x y z : ℝ) : abcF ![x, y, z] = 3 + 2 * (Real.sin z * Real.cos y + Real.sin x * Real.cos z + Real.sin y * Real.cos x) := by simp only [abcF, abcShape, vecSqNorm, Fin.sum_univ_three, Matrix.cons_val_zero, Matrix.cons_val_one, Matrix.cons_val_two, Matrix.head_cons, Matrix.tail_cons] have hx := Real.sin_sq_add_cos_sq x have hy := Real.sin_sq_add_cos_sq y have hz := Real.sin_sq_add_cos_sq z nlinarith /-- Exact normalized `[0, 2π]³` torus averages `mean(F) = 3` and `mean(F²) = 12` (`CP8`). -/ theorem abcF_torus_averages : (1 / (2 * Real.pi) ^ 3) * (∫ x in (0 : ℝ)..2 * Real.pi, ∫ y in (0 : ℝ)..2 * Real.pi, ∫ z in (0 : ℝ)..2 * Real.pi, abcF ![x, y, z]) = 3 ∧ (1 / (2 * Real.pi) ^ 3) * (∫ x in (0 : ℝ)..2 * Real.pi, ∫ y in (0 : ℝ)..2 * Real.pi, ∫ z in (0 : ℝ)..2 * Real.pi, (abcF ![x, y, z]) ^ 2) = 12 := by have hpi : Real.pi ≠ 0 := Real.pi_ne_zero constructor · have hz : ∀ x y : ℝ, (∫ z in (0 : ℝ)..2 * Real.pi, abcF ![x, y, z]) = 2 * Real.pi * (3 + 2 * Real.sin y * Real.cos x) := by intro x y have hrew : (fun z : ℝ => abcF ![x, y, z]) = fun z => (3 + 2 * Real.sin y * Real.cos x) + (2 * Real.cos y) * Real.sin z + (2 * Real.sin x) * Real.cos z + 0 * (Real.sin z) ^ 2 + 0 * (Real.cos z) ^ 2 + 0 * (Real.sin z * Real.cos z) := by funext z; rw [abcF_expand]; ring rw [hrew, int_trig_poly_2pi]; ring simp_rw [hz] have hy : ∀ x : ℝ, (∫ y in (0 : ℝ)..2 * Real.pi, 2 * Real.pi * (3 + 2 * Real.sin y * Real.cos x)) = 12 * Real.pi ^ 2 := by intro x have hrew : (fun y : ℝ => 2 * Real.pi * (3 + 2 * Real.sin y * Real.cos x)) = fun y => 6 * Real.pi + (4 * Real.pi * Real.cos x) * Real.sin y + 0 * Real.cos y + 0 * (Real.sin y) ^ 2 + 0 * (Real.cos y) ^ 2 + 0 * (Real.sin y * Real.cos y) := by funext y; ring rw [hrew, int_trig_poly_2pi]; ring simp_rw [hy] rw [intervalIntegral.integral_const] simp only [smul_eq_mul, sub_zero] field_simp [hpi] ring · have hz2 : ∀ x y : ℝ, (∫ z in (0 : ℝ)..2 * Real.pi, (abcF ![x, y, z]) ^ 2) = 2 * Real.pi * (9 + 12 * Real.sin y * Real.cos x + 4 * (Real.sin y) ^ 2 * (Real.cos x) ^ 2) + 4 * Real.pi * ((Real.cos y) ^ 2 + (Real.sin x) ^ 2) := by intro x y let A : ℝ := 3 + 2 * Real.sin y * Real.cos x let B : ℝ := 2 * Real.cos y let C : ℝ := 2 * Real.sin x have hrew : (fun z : ℝ => (abcF ![x, y, z]) ^ 2) = fun z => A ^ 2 + (2 * A * B) * Real.sin z + (2 * A * C) * Real.cos z + B ^ 2 * (Real.sin z) ^ 2 + C ^ 2 * (Real.cos z) ^ 2 + (2 * B * C) * (Real.sin z * Real.cos z) := by funext z; rw [abcF_expand]; dsimp only [A, B, C]; ring rw [hrew, int_trig_poly_2pi] dsimp only [A, B, C] ring simp_rw [hz2] have hy2 : ∀ x : ℝ, (∫ y in (0 : ℝ)..2 * Real.pi, (2 * Real.pi * (9 + 12 * Real.sin y * Real.cos x + 4 * (Real.sin y) ^ 2 * (Real.cos x) ^ 2) + 4 * Real.pi * ((Real.cos y) ^ 2 + (Real.sin x) ^ 2))) = 4 * Real.pi ^ 2 * (10 + 2 * (Real.cos x) ^ 2 + 2 * (Real.sin x) ^ 2) := by intro x have hrew : (fun y : ℝ => 2 * Real.pi * (9 + 12 * Real.sin y * Real.cos x + 4 * (Real.sin y) ^ 2 * (Real.cos x) ^ 2) + 4 * Real.pi * ((Real.cos y) ^ 2 + (Real.sin x) ^ 2)) = fun y => (18 * Real.pi + 4 * Real.pi * (Real.sin x) ^ 2) + (24 * Real.pi * Real.cos x) * Real.sin y + 0 * Real.cos y + (8 * Real.pi * (Real.cos x) ^ 2) * (Real.sin y) ^ 2 + (4 * Real.pi) * (Real.cos y) ^ 2 + 0 * (Real.sin y * Real.cos y) := by funext y; ring rw [hrew, int_trig_poly_2pi] ring simp_rw [hy2] have hx_const : (fun x : ℝ => 4 * Real.pi ^ 2 * (10 + 2 * (Real.cos x) ^ 2 + 2 * (Real.sin x) ^ 2)) = fun _ => 48 * Real.pi ^ 2 := by funext x have hsc := Real.sin_sq_add_cos_sq x nlinarith rw [hx_const, intervalIntegral.integral_const] simp only [smul_eq_mul, sub_zero] field_simp [hpi] ring /-! ## 3. Complete `prop:rev-abc` All-Time Signed-Shell Ceiling (`CP10`--`CP16`) -/ /-- Exact cutoff cap factor `E_R = exp(2 √(2/3) (R + 1)) > 2` for every `R ≥ 0` (`CP1`, `CP11`). -/ theorem exp_ER_gt_two (R : ℝ) (hR : 0 ≤ R) : 2 < Real.exp (2 * Real.sqrt (2 / 3 : ℝ) * (R + 1)) := by have h1 : 1 < 2 * Real.sqrt (2 / 3 : ℝ) := by have hsq : (2 * Real.sqrt (2 / 3 : ℝ)) ^ 2 = 8 / 3 := by rw [mul_pow, Real.sq_sqrt (by norm_num)]; norm_num have hnn : 0 ≤ 2 * Real.sqrt (2 / 3 : ℝ) := by positivity nlinarith have h2 : 2 * Real.sqrt (2 / 3 : ℝ) ≤ 2 * Real.sqrt (2 / 3 : ℝ) * (R + 1) := by have hnn : 0 ≤ 2 * Real.sqrt (2 / 3 : ℝ) := by positivity nlinarith have hexp := Real.add_one_le_exp (2 * Real.sqrt (2 / 3 : ℝ) * (R + 1)) linarith /-- Pointwise matrix and inverse-barrier bounds of `prop:rev-abc` (`CP10`--`CP12`): with `d = b² n² ≥ 0`, `0 ≤ r ≤ 1`, `E > 2`, `K₀ = 6 E d`, `c_t = K₀ + 3 E d (1 - r)`, `Ω = outer ω` with `|ω|² = d r F` (`0 ≤ F ≤ 6`), `A = c_t I + Ω - L_loss` with `A ⪰ 0`, `L_loss ⪰ 0`, `D_R = A - K₀ I`, and `J = (A + ε I)⁻¹` (`ε > 0`): 1. `0 ⪯ A ⪯ (3/2) K₀ I`, 2. `-K₀ I ⪯ D_R ⪯ (1/2) K₀ I`, 3. `((3/2) K₀ + ε)⁻¹ I ⪯ J`, 4. `tr(A²) ≤ 3 c_t² + 2 c_t (d r F) + (d r F)² ≤ (27/4) K₀²`. -/ theorem prop_rev_abc_pointwise (d r E F ε : ℝ) (ω : Vec3) (A L_loss J : Mat3) (hd : 0 ≤ d) (hr0 : 0 ≤ r) (hr1 : r ≤ 1) (hE : 2 < E) (hF0 : 0 ≤ F) (hF6 : F ≤ 6) (hε : 0 < ε) (hω : vecSqNorm ω = d * r * F) (hApsd : IsPSD A) (hLpsd : IsPSD L_loss) (hAeq : A = (6 * E * d + 3 * E * d * (1 - r)) • (1 : Mat3) + outer ω - L_loss) (hJinv : (A + ε • (1 : Mat3)) * J = 1) : let K₀ := 6 * E * d let c_t := K₀ + 3 * E * d * (1 - r) let D_R := A - K₀ • (1 : Mat3) (A ⪯ₗ ((3 / 2 : ℝ) * K₀) • (1 : Mat3)) ∧ ((-K₀) • (1 : Mat3) ⪯ₗ D_R) ∧ (D_R ⪯ₗ ((1 / 2 : ℝ) * K₀) • (1 : Mat3)) ∧ (((3 / 2 : ℝ) * K₀ + ε)⁻¹ • (1 : Mat3) ⪯ₗ J) ∧ ((A * A).trace ≤ 3 * c_t ^ 2 + 2 * c_t * (d * r * F) + (d * r * F) ^ 2) ∧ ((A * A).trace ≤ (27 / 4 : ℝ) * K₀ ^ 2) := by intro K₀ c_t D_R let U : Mat3 := c_t • (1 : Mat3) + outer ω have hUA : U = A + L_loss := by dsimp only [U, c_t, K₀]; rw [hAeq]; abel have hAleU : A ⪯ₗ U := by change IsPSD (U - A) have : U - A = L_loss := by rw [hUA]; abel rwa [this] have hct_le : c_t + d * r * F ≤ (3 / 2 : ℝ) * K₀ := by dsimp only [c_t, K₀] have hdr : 0 ≤ d * r := mul_nonneg hd hr0 have h1 : d * r * F ≤ 6 * d * r := by nlinarith have h2 : 6 * d * r ≤ 3 * E * d * r := by nlinarith nlinarith have hUle : U ⪯ₗ ((3 / 2 : ℝ) * K₀) • (1 : Mat3) := by refine ⟨by simp [U, Matrix.transpose_sub, Matrix.transpose_add, Matrix.transpose_smul, outer_transpose], fun x => ?_⟩ simp only [U, Matrix.sub_mulVec, Matrix.add_mulVec, Matrix.smul_mulVec, Matrix.one_mulVec, dotProduct_sub, dotProduct_add, dotProduct_smul, smul_eq_mul, outer_dotProduct, ← vecSqNorm_eq_dotProduct] have hcs : (vecDot ω x) ^ 2 ≤ vecSqNorm ω * vecSqNorm x := by have := isPSD_cauchy_schwarz (isPSD_one (n := Fin 3)) ω x simpa [vecDot, vecSqNorm, dotProduct, pow_two] using this rw [hω] at hcs have hxnn := vecSqNorm_nonneg x nlinarith have hAle : A ⪯ₗ ((3 / 2 : ℝ) * K₀) • (1 : Mat3) := by change IsPSD (((3 / 2 : ℝ) * K₀) • (1 : Mat3) - A) have hsplit : ((3 / 2 : ℝ) * K₀) • (1 : Mat3) - A = (((3 / 2 : ℝ) * K₀) • (1 : Mat3) - U) + (U - A) := by abel rw [hsplit] exact isPSD_add hUle hAleU have hDge : (-K₀) • (1 : Mat3) ⪯ₗ D_R := by change IsPSD (D_R - (-K₀) • (1 : Mat3)) have : D_R - (-K₀) • (1 : Mat3) = A := by dsimp only [D_R]; simp [neg_smul] rwa [this] have hDle : D_R ⪯ₗ ((1 / 2 : ℝ) * K₀) • (1 : Mat3) := by change IsPSD (((1 / 2 : ℝ) * K₀) • (1 : Mat3) - D_R) have : ((1 / 2 : ℝ) * K₀) • (1 : Mat3) - D_R = ((3 / 2 : ℝ) * K₀) • (1 : Mat3) - A := by dsimp only [D_R] ext i j; simp only [Matrix.sub_apply, Matrix.smul_apply, smul_eq_mul]; ring rw [this] exact hAle have hJge : (((3 / 2 : ℝ) * K₀ + ε)⁻¹ • (1 : Mat3)) ⪯ₗ J := by have hK₀nn : 0 ≤ K₀ := by dsimp [K₀]; nlinarith have hcpos : 0 < (3 / 2 : ℝ) * K₀ + ε := by linarith have hMpsd : IsPSD (A + ε • (1 : Mat3)) := isPSD_add hApsd (isPSD_smul (le_of_lt hε) isPSD_one) have hMle : (A + ε • (1 : Mat3)) ⪯ₗ ((3 / 2 : ℝ) * K₀ + ε) • (1 : Mat3) := by change IsPSD (((3 / 2 : ℝ) * K₀ + ε) • (1 : Mat3) - (A + ε • (1 : Mat3))) have : ((3 / 2 : ℝ) * K₀ + ε) • (1 : Mat3) - (A + ε • (1 : Mat3)) = ((3 / 2 : ℝ) * K₀) • (1 : Mat3) - A := by ext i j; simp only [Matrix.sub_apply, Matrix.add_apply, Matrix.smul_apply, smul_eq_mul]; ring rw [this] exact hAle exact inv_loewner_lower_bound hcpos hMpsd hMle hJinv have htrU : (U * U).trace = 3 * c_t ^ 2 + 2 * c_t * (d * r * F) + (d * r * F) ^ 2 := by have htr1 : (1 : Mat3).trace = 3 := by simp [Matrix.trace, Matrix.diag] have htrO : (outer ω).trace = d * r * F := by rw [outer_trace, hω] have htrO2 : (outer ω * outer ω).trace = (d * r * F) ^ 2 := by rw [trace_outer_sq, hω] dsimp only [U] rw [Matrix.add_mul, Matrix.mul_add, Matrix.mul_add, Matrix.trace_add, Matrix.trace_add, Matrix.trace_add] simp only [Matrix.smul_mul, Matrix.mul_smul, Matrix.one_mul, Matrix.mul_one, Matrix.trace_smul, smul_eq_mul, htr1, htrO, htrO2] ring have htrA_le_U : (A * A).trace ≤ 3 * c_t ^ 2 + 2 * c_t * (d * r * F) + (d * r * F) ^ 2 := by rw [← htrU, hUA] exact trace_sq_le_of_loewner A L_loss hApsd hLpsd have htrA_unif : (A * A).trace ≤ (27 / 4 : ℝ) * K₀ ^ 2 := by have hEd : 0 ≤ E * d := by nlinarith have hct_nn : 0 ≤ c_t := by dsimp [c_t, K₀] have h1mr : 0 ≤ 1 - r := by linarith nlinarith [mul_nonneg hEd h1mr] have hK₀_nn : 0 ≤ K₀ := by dsimp [K₀]; nlinarith have hdrF_nn : 0 ≤ d * r * F := by positivity have h1 : 3 * c_t ^ 2 + 2 * c_t * (d * r * F) + (d * r * F) ^ 2 ≤ 3 * (c_t + d * r * F) ^ 2 := by nlinarith have h2 : (c_t + d * r * F) ^ 2 ≤ ((3 / 2 : ℝ) * K₀) ^ 2 := by nlinarith nlinarith exact ⟨hAle, hDge, hDle, hJge, htrA_le_U, htrA_unif⟩ /-- Integrated quadratic energy and complete signed work bounds of `prop:rev-abc` (`CP15`--`CP16`): from `E_A(t) ≤ 3 c_t² + 6 c_t d r + 12 d² r²` (obtained by integrating the pointwise bound over normalized `𝕋³` using `mean(F) = 3`, `mean(F²) = 12`), together with `E_A(t) = 3 K₀² + 2 W(t)` and `E_A(t) ≥ 0`: `E_A(t) ≤ 3 c_t² + 6 c_t d r + 12 d² r² ≤ (27/4) K₀²` and `-(3/2) K₀² ≤ W(t) ≤ (15/8) K₀²`! -/ theorem prop_rev_abc_energy_work_bounds (d r E E_A W : ℝ) (hr0 : 0 ≤ r) (hr1 : r ≤ 1) (hE : 2 < E) (hE_nn : 0 ≤ E_A) (hE_time : E_A ≤ 3 * (6 * E * d + 3 * E * d * (1 - r)) ^ 2 + 6 * (6 * E * d + 3 * E * d * (1 - r)) * d * r + 12 * d ^ 2 * r ^ 2) (hWork : E_A = 3 * (6 * E * d) ^ 2 + 2 * W) : let K₀ := 6 * E * d let c_t := K₀ + 3 * E * d * (1 - r) E_A ≤ 3 * c_t ^ 2 + 6 * c_t * d * r + 12 * d ^ 2 * r ^ 2 ∧ 3 * c_t ^ 2 + 6 * c_t * d * r + 12 * d ^ 2 * r ^ 2 ≤ (27 / 4 : ℝ) * K₀ ^ 2 ∧ -(3 / 2 : ℝ) * K₀ ^ 2 ≤ W ∧ W ≤ (15 / 8 : ℝ) * K₀ ^ 2 := by intro K₀ c_t have hpoly : 3 * c_t ^ 2 + 6 * c_t * d * r + 12 * d ^ 2 * r ^ 2 ≤ (27 / 4 : ℝ) * K₀ ^ 2 := by dsimp only [c_t, K₀] -- Exact algebraic difference: (27/4) K₀² - (3 c_t² + 6 c_t d r + 12 d² r²) -- = 3 d² r * [ (E - 2)(9 E (2 - r) + 3 r (3 E - 2)) ... ] — check directly! -- Wait: K₀ = 6 E d, c_t = 3 E d (3 - r). -- (27/4) K₀² = 243 E² d². -- 3 c_t² + 6 c_t d r + 12 d² r² = 27 E² d² (3 - r)² + 18 E d² r (3 - r) + 12 d² r² -- = d² [ 243 E² - 162 E² r + 27 E² r² + 54 E r - 18 E r² + 12 r² ] -- So (27/4) K₀² - LHS = d² r [ 54 E (3 E - 1) - r (27 E² - 18 E + 12) ] -- Since r ≤ 1: ≥ d² r [ 162 E² - 54 E - 27 E² + 18 E - 12 ] -- = d² r [ 135 E² - 36 E - 12 ] > 0 for E > 2 (at E=2: 540 - 72 - 12 = 456 > 0)! have hid : (27 / 4 : ℝ) * (6 * E * d) ^ 2 - (3 * (6 * E * d + 3 * E * d * (1 - r)) ^ 2 + 6 * (6 * E * d + 3 * E * d * (1 - r)) * d * r + 12 * d ^ 2 * r ^ 2) = d ^ 2 * r * (54 * E * (3 * E - 1) - r * (27 * E ^ 2 - 18 * E + 12)) := by ring have hcoeff_pos : 0 ≤ 27 * E ^ 2 - 18 * E + 12 := by nlinarith have hbr_ge : 135 * E ^ 2 - 36 * E - 12 ≤ 54 * E * (3 * E - 1) - r * (27 * E ^ 2 - 18 * E + 12) := by nlinarith have hquad_pos : 0 ≤ 135 * E ^ 2 - 36 * E - 12 := by nlinarith have hprod_nn : 0 ≤ d ^ 2 * r * (54 * E * (3 * E - 1) - r * (27 * E ^ 2 - 18 * E + 12)) := mul_nonneg (mul_nonneg (sq_nonneg d) hr0) (by linarith) linarith refine ⟨hE_time, hpoly, ?_, ?_⟩ · linarith · linarith /-! ## 4. Heat-shear counterexample (`manuscript.tex` lines 1644--1648) -/ /-- The exact heat-shear solution `u(x,t) = e^{-νt} (sin x₁, 0, 0)` has vorticity `ω = (0, 0, -e^{-νt} cos x₁)` and vorticity gradient norm squared `|∇ω|² = e^{-2νt} sin² x₁`, which is strictly nonconstant in `x₁` (zero at `0`, strictly positive at `π/2`). -/ theorem heat_shear_gradient_nonconstant (ν t : ℝ) : let gradOmegaSq := fun y : ℝ => Real.exp (-(2 * ν * t)) * (Real.sin y) ^ 2 gradOmegaSq 0 = 0 ∧ 0 < gradOmegaSq (Real.pi / 2) ∧ gradOmegaSq 0 ≠ gradOmegaSq (Real.pi / 2) := by intro gradOmegaSq have h0 : gradOmegaSq 0 = 0 := by simp [gradOmegaSq] have hpi : gradOmegaSq (Real.pi / 2) = Real.exp (-(2 * ν * t)) := by simp [gradOmegaSq, Real.sin_pi_div_two] have hpos : 0 < gradOmegaSq (Real.pi / 2) := by rw [hpi]; exact Real.exp_pos _ exact ⟨h0, hpos, by linarith⟩ end end F02NavierStokes.ABCCeiling