| @@ -7,14 +7,13 @@ import Mathlib.Tactic.Ring |
| 7 | 7 | /-! |
| 8 | 8 | # Exact moment algebra for the true-cone loop construction |
| 9 | 9 | |
| 10 | | -This file proves the finite-distribution form of the averaging and rephasing |
| 11 | | -identities in Lemma 6.1 of the candidate manuscript. The formulas are algebraic; |
| 12 | | -no existence, smoothness, or invertibility of a circle reparametrization is |
| 13 | | -asserted here. The hypotheses of `rephased_moments` are ordinary mass, mean, |
| 14 | | -and variance constraints, not an assumption that a desired loop exists. |
| 10 | +This file collects the algebraic ingredients of the true-cone loop construction |
| 11 | +in Lemma 6.1 of the candidate manuscript: the averaging operator, the loop shear |
| 12 | +and the rephasing density, with their elementary identities. The formulas are |
| 13 | +algebraic; no existence, smoothness, or invertibility of a circle |
| 14 | +reparametrization is asserted here. |
| 15 | 15 | |
| 16 | | -The final lemmas give explicit two-point distributions with prescribed variance. |
| 17 | | -They establish finite moment feasibility, including a one-sided support bound. |
| 16 | +It also defines a two-point probability law and its mean. |
| 18 | 17 | -/ |
| 19 | 18 | |
| 20 | 19 | namespace NavierStokes.LoopMoments |
| @@ -34,68 +33,6 @@ theorem avg_add (s : Finset ι) (w f g : ι → ℝ) : |
| 34 | 33 | avg s w (fun i => f i + g i) = avg s w f + avg s w g := by |
| 35 | 34 | simp only [avg, mul_add, Finset.sum_add_distrib] |
| 36 | 35 | |
| 37 | | -theorem avg_sub (s : Finset ι) (w f g : ι → ℝ) : |
| 38 | | - avg s w (fun i => f i - g i) = avg s w f - avg s w g := by |
| 39 | | - simp only [avg, mul_sub, Finset.sum_sub_distrib] |
| 40 | | - |
| 41 | | -theorem avg_const_mul (s : Finset ι) (w f : ι → ℝ) (c : ℝ) : |
| 42 | | - avg s w (fun i => c * f i) = c * avg s w f := by |
| 43 | | - simp only [avg, Finset.mul_sum] |
| 44 | | - apply Finset.sum_congr rfl |
| 45 | | - intro i hi |
| 46 | | - ring |
| 47 | | - |
| 48 | | -theorem avg_const (s : Finset ι) (w : ι → ℝ) (c : ℝ) |
| 49 | | - (hmass : ∑ i ∈ s, w i = 1) : |
| 50 | | - avg s w (fun _ => c) = c := by |
| 51 | | - simp only [avg, ← Finset.sum_mul, hmass, one_mul] |
| 52 | | - |
| 53 | | -theorem avg_nonneg (s : Finset ι) (w f : ι → ℝ) |
| 54 | | - (hw : ∀ i ∈ s, 0 ≤ w i) (hf : ∀ i ∈ s, 0 ≤ f i) : |
| 55 | | - 0 ≤ avg s w f := by |
| 56 | | - exact Finset.sum_nonneg (fun i hi => mul_nonneg (hw i hi) (hf i hi)) |
| 57 | | - |
| 58 | | -/-- The standard variance expansion, with mass and first moment explicit. -/ |
| 59 | | -theorem variance_identity (s : Finset ι) (w t : ι → ℝ) (m : ℝ) |
| 60 | | - (hmass : ∑ i ∈ s, w i = 1) (hmean : avg s w t = m) : |
| 61 | | - avg s w (fun i => (t i - m) ^ 2) = avg s w (fun i => t i ^ 2) - m ^ 2 := by |
| 62 | | - calc |
| 63 | | - avg s w (fun i => (t i - m) ^ 2) = |
| 64 | | - avg s w (fun i => t i ^ 2 - (2 * m) * t i + m ^ 2) := by |
| 65 | | - congr 1 |
| 66 | | - funext i |
| 67 | | - ring |
| 68 | | - _ = avg s w (fun i => t i ^ 2) - (2 * m) * avg s w t + m ^ 2 := by |
| 69 | | - rw [avg_add, avg_sub, avg_const_mul, avg_const s w (m ^ 2) hmass] |
| 70 | | - _ = avg s w (fun i => t i ^ 2) - m ^ 2 := by rw [hmean]; ring |
| 71 | | - |
| 72 | | -/-- This is `a ⟨1+t²⟩ = a(1+m²) + ρ` from the manuscript. -/ |
| 73 | | -theorem energy_moment (s : Finset ι) (w t : ι → ℝ) (a m ρ : ℝ) |
| 74 | | - (ha : a ≠ 0) (hmass : ∑ i ∈ s, w i = 1) |
| 75 | | - (hmean : avg s w t = m) |
| 76 | | - (hvar : avg s w (fun i => (t i - m) ^ 2) = ρ / a) : |
| 77 | | - a * avg s w (fun i => 1 + t i ^ 2) = a * (1 + m ^ 2) + ρ := by |
| 78 | | - have hsecond : avg s w (fun i => t i ^ 2) = m ^ 2 + ρ / a := by |
| 79 | | - have := variance_identity s w t m hmass hmean |
| 80 | | - linarith |
| 81 | | - rw [avg_add, avg_const s w 1 hmass, hsecond] |
| 82 | | - field_simp; ring |
| 83 | | - |
| 84 | | -/-- A nonnegative weighted variance cannot decrease the nominal speed. -/ |
| 85 | | -theorem variance_nonneg (s : Finset ι) (w t : ι → ℝ) (m : ℝ) |
| 86 | | - (hw : ∀ i ∈ s, 0 ≤ w i) : |
| 87 | | - 0 ≤ avg s w (fun i => (t i - m) ^ 2) := by |
| 88 | | - exact avg_nonneg s w _ hw (fun i _ => sq_nonneg (t i - m)) |
| 89 | | - |
| 90 | | -theorem required_variance_nonneg (s : Finset ι) (w t : ι → ℝ) (a m ρ : ℝ) |
| 91 | | - (ha : 0 < a) (hw : ∀ i ∈ s, 0 ≤ w i) |
| 92 | | - (hvar : avg s w (fun i => (t i - m) ^ 2) = ρ / a) : |
| 93 | | - 0 ≤ ρ := by |
| 94 | | - have h := variance_nonneg s w t m hw |
| 95 | | - rw [hvar] at h |
| 96 | | - have hmul := mul_nonneg h (le_of_lt ha) |
| 97 | | - simpa only [div_mul_cancel₀ _ (ne_of_gt ha)] using hmul |
| 98 | | - |
| 99 | 36 | /-- The rephasing density relative to the old averaging parameter. -/ |
| 100 | 37 | def phaseDensity (a v t : ℝ) : ℝ := a * (1 + t ^ 2) / v |
| 101 | 38 | |
| @@ -133,68 +70,6 @@ theorem density_times_loopC (a v t : ℝ) (hv : v ≠ 0) : |
| 133 | 70 | unfold phaseDensity loopC |
| 134 | 71 | field_simp |
| 135 | 72 | |
| 136 | | -/-- Reweighting by the manuscript's density has total mass one. -/ |
| 137 | | -theorem rephased_mass (s : Finset ι) (w t : ι → ℝ) (a m ρ v : ℝ) |
| 138 | | - (ha : a ≠ 0) (hv : v ≠ 0) (hmass : ∑ i ∈ s, w i = 1) |
| 139 | | - (hmean : avg s w t = m) |
| 140 | | - (hvar : avg s w (fun i => (t i - m) ^ 2) = ρ / a) |
| 141 | | - (hspeed : v = a * (1 + m ^ 2) + ρ) : |
| 142 | | - ∑ i ∈ s, w i * phaseDensity a v (t i) = 1 := by |
| 143 | | - have he := energy_moment s w t a m ρ ha hmass hmean hvar |
| 144 | | - rw [← hspeed] at he |
| 145 | | - calc |
| 146 | | - (∑ i ∈ s, w i * phaseDensity a v (t i)) = |
| 147 | | - (a * avg s w (fun i => 1 + t i ^ 2)) / v := by |
| 148 | | - simp only [phaseDensity, avg, div_eq_mul_inv, Finset.mul_sum, Finset.sum_mul] |
| 149 | | - apply Finset.sum_congr rfl |
| 150 | | - intro i hi |
| 151 | | - ring |
| 152 | | - _ = 1 := by rw [he, div_self hv] |
| 153 | | - |
| 154 | | -/-- The radial shear has the original mean after rephasing. -/ |
| 155 | | -theorem rephased_meanA (s : Finset ι) (w t : ι → ℝ) (a v : ℝ) |
| 156 | | - (hv : v ≠ 0) (hmass : ∑ i ∈ s, w i = 1) : |
| 157 | | - avg s (fun i => w i * phaseDensity a v (t i)) (fun i => loopA v (t i)) = a := by |
| 158 | | - calc |
| 159 | | - avg s (fun i => w i * phaseDensity a v (t i)) (fun i => loopA v (t i)) = |
| 160 | | - avg s w (fun _ => a) := by |
| 161 | | - unfold avg |
| 162 | | - apply Finset.sum_congr rfl |
| 163 | | - intro i hi |
| 164 | | - rw [mul_assoc, density_times_loopA a v (t i) hv] |
| 165 | | - _ = a := avg_const s w a hmass |
| 166 | | - |
| 167 | | -/-- The signed axial shear has the original mean after rephasing. -/ |
| 168 | | -theorem rephased_meanC (s : Finset ι) (w t : ι → ℝ) (a v m : ℝ) |
| 169 | | - (hv : v ≠ 0) (hmean : avg s w t = m) : |
| 170 | | - avg s (fun i => w i * phaseDensity a v (t i)) (fun i => loopC v (t i)) = a * m := by |
| 171 | | - calc |
| 172 | | - avg s (fun i => w i * phaseDensity a v (t i)) (fun i => loopC v (t i)) = |
| 173 | | - avg s w (fun i => a * t i) := by |
| 174 | | - unfold avg |
| 175 | | - apply Finset.sum_congr rfl |
| 176 | | - intro i hi |
| 177 | | - rw [mul_assoc, density_times_loopC a v (t i) hv] |
| 178 | | - _ = a * m := by rw [avg_const_mul, hmean] |
| 179 | | - |
| 180 | | -/-- With `m = -b/a`, the two rephased means are exactly `(a,-b)`. -/ |
| 181 | | -theorem rephased_moments (s : Finset ι) (w t : ι → ℝ) (a b ρ v : ℝ) |
| 182 | | - (ha : 0 < a) (hρ : 0 ≤ ρ) (hmass : ∑ i ∈ s, w i = 1) |
| 183 | | - (hmean : avg s w t = -b / a) |
| 184 | | - (hvar : avg s w (fun i => (t i - (-b / a)) ^ 2) = ρ / a) |
| 185 | | - (hspeed : v = a * (1 + (-b / a) ^ 2) + ρ) : |
| 186 | | - (∑ i ∈ s, w i * phaseDensity a v (t i) = 1) ∧ |
| 187 | | - avg s (fun i => w i * phaseDensity a v (t i)) (fun i => loopA v (t i)) = a ∧ |
| 188 | | - avg s (fun i => w i * phaseDensity a v (t i)) (fun i => loopC v (t i)) = -b := by |
| 189 | | - have hvpos : 0 < v := by |
| 190 | | - rw [hspeed] |
| 191 | | - exact add_pos_of_pos_of_nonneg (mul_pos ha (one_add_sq_pos (-b / a))) hρ |
| 192 | | - have hv := ne_of_gt hvpos |
| 193 | | - refine ⟨rephased_mass s w t a (-b / a) ρ v (ne_of_gt ha) hv hmass hmean hvar hspeed, |
| 194 | | - rephased_meanA s w t a v hv hmass, ?_⟩ |
| 195 | | - rw [rephased_meanC s w t a v (-b / a) hv hmean] |
| 196 | | - field_simp |
| 197 | | - |
| 198 | 73 | /-- A two-point probability law. This is a concrete finite object, without |
| 199 | 74 | any hypothesis asserting the existence of the manuscript's smooth loop. -/ |
| 200 | 75 | structure TwoPoint where |
| @@ -206,110 +81,6 @@ structure TwoPoint where |
| 206 | 81 | def TwoPoint.mean (q : TwoPoint) : ℝ := |
| 207 | 82 | q.leftWeight * q.leftValue + q.rightWeight * q.rightValue |
| 208 | 83 | |
| 209 | | -def TwoPoint.centeredSecond (q : TwoPoint) (m : ℝ) : ℝ := |
| 210 | | - q.leftWeight * (q.leftValue - m) ^ 2 + q.rightWeight * (q.rightValue - m) ^ 2 |
| 211 | | - |
| 212 | | -def TwoPoint.IsProbability (q : TwoPoint) : Prop := |
| 213 | | - 0 ≤ q.leftWeight ∧ 0 ≤ q.rightWeight ∧ q.leftWeight + q.rightWeight = 1 |
| 214 | | - |
| 215 | | -/-- For any nonnegative variance, equal masses at `m ± √V` realize it. -/ |
| 216 | | -def symmetricPair (m V : ℝ) : TwoPoint := |
| 217 | | - ⟨1 / 2, 1 / 2, m - Real.sqrt V, m + Real.sqrt V⟩ |
| 218 | | - |
| 219 | | -theorem symmetricPair_probability (m V : ℝ) : (symmetricPair m V).IsProbability := by |
| 220 | | - norm_num [TwoPoint.IsProbability, symmetricPair] |
| 221 | | - |
| 222 | | -theorem symmetricPair_mean (m V : ℝ) : (symmetricPair m V).mean = m := by |
| 223 | | - dsimp [TwoPoint.mean, symmetricPair] |
| 224 | | - ring |
| 225 | | - |
| 226 | | -theorem symmetricPair_variance (m V : ℝ) (hV : 0 ≤ V) : |
| 227 | | - (symmetricPair m V).centeredSecond m = V := by |
| 228 | | - dsimp [TwoPoint.centeredSecond, symmetricPair] |
| 229 | | - have hsq := Real.sq_sqrt hV |
| 230 | | - nlinarith |
| 231 | | - |
| 232 | | -/-- An asymmetric law preserves a lower bound on the projection `p*t`, |
| 233 | | -while allowing any nonnegative variance. For `p = 0`, use `symmetricPair`. |
| 234 | | -The lower projected deviation is `-d`, and the upper one is `V*p²/d`. -/ |
| 235 | | -def oneSidedPair (m p d V : ℝ) : TwoPoint := |
| 236 | | - ⟨V * p ^ 2 / (d ^ 2 + V * p ^ 2), d ^ 2 / (d ^ 2 + V * p ^ 2), |
| 237 | | - m - d / p, m + V * p / d⟩ |
| 238 | | - |
| 239 | | -theorem oneSidedPair_denom_pos (p d V : ℝ) (hd : 0 < d) (hV : 0 ≤ V) : |
| 240 | | - 0 < d ^ 2 + V * p ^ 2 := by |
| 241 | | - have hprod := mul_nonneg hV (sq_nonneg p) |
| 242 | | - nlinarith |
| 243 | | - |
| 244 | | -theorem oneSidedPair_probability (m p d V : ℝ) (hd : 0 < d) (hV : 0 ≤ V) : |
| 245 | | - (oneSidedPair m p d V).IsProbability := by |
| 246 | | - have hden := oneSidedPair_denom_pos p d V hd hV |
| 247 | | - dsimp [TwoPoint.IsProbability, oneSidedPair] |
| 248 | | - refine ⟨div_nonneg (mul_nonneg hV (sq_nonneg p)) (le_of_lt hden), |
| 249 | | - div_nonneg (sq_nonneg d) (le_of_lt hden), ?_⟩ |
| 250 | | - field_simp; ring |
| 251 | | - |
| 252 | | -theorem oneSidedPair_mean (m p d V : ℝ) (hp : p ≠ 0) (hd : 0 < d) (hV : 0 ≤ V) : |
| 253 | | - (oneSidedPair m p d V).mean = m := by |
| 254 | | - have hden := ne_of_gt (oneSidedPair_denom_pos p d V hd hV) |
| 255 | | - have hdne := ne_of_gt hd |
| 256 | | - dsimp [TwoPoint.mean, oneSidedPair] |
| 257 | | - field_simp; ring |
| 258 | | - |
| 259 | | -theorem oneSidedPair_variance (m p d V : ℝ) |
| 260 | | - (hp : p ≠ 0) (hd : 0 < d) (hV : 0 ≤ V) : |
| 261 | | - (oneSidedPair m p d V).centeredSecond m = V := by |
| 262 | | - have hden := ne_of_gt (oneSidedPair_denom_pos p d V hd hV) |
| 263 | | - have hdne := ne_of_gt hd |
| 264 | | - dsimp [TwoPoint.centeredSecond, oneSidedPair] |
| 265 | | - field_simp; ring |
| 266 | | - |
| 267 | | -theorem oneSidedPair_lower_projection (m p d V : ℝ) (hp : p ≠ 0) : |
| 268 | | - p * ((oneSidedPair m p d V).leftValue - m) = -d := by |
| 269 | | - dsimp [oneSidedPair] |
| 270 | | - field_simp; ring |
| 271 | | - |
| 272 | | -theorem oneSidedPair_upper_projection (m p d V : ℝ) : |
| 273 | | - p * ((oneSidedPair m p d V).rightValue - m) = V * p ^ 2 / d := by |
| 274 | | - dsimp [oneSidedPair] |
| 275 | | - ring |
| 276 | | - |
| 277 | | -/-- Every mean whose stress projection is strictly above `2` has a finite |
| 278 | | -two-point distribution with any prescribed nonnegative variance, with both |
| 279 | | -support points still strictly above that same projection threshold. This is |
| 280 | | -a feasibility statement for the tilt moments, not the full true-cone test. -/ |
| 281 | | -theorem exists_projected_twoPoint (p₁ p₂ m V : ℝ) |
| 282 | | - (hP : 2 < p₁ + p₂ * m) (hV : 0 ≤ V) : |
| 283 | | - ∃ q : TwoPoint, q.IsProbability ∧ q.mean = m ∧ q.centeredSecond m = V ∧ |
| 284 | | - 2 < p₁ + p₂ * q.leftValue ∧ 2 < p₁ + p₂ * q.rightValue := by |
| 285 | | - by_cases hp : p₂ = 0 |
| 286 | | - · refine ⟨symmetricPair m V, symmetricPair_probability m V, |
| 287 | | - symmetricPair_mean m V, symmetricPair_variance m V hV, ?_, ?_⟩ <;> |
| 288 | | - simpa only [hp, zero_mul, add_zero] using hP |
| 289 | | - · let d := (p₁ + p₂ * m - 2) / 2 |
| 290 | | - have hd : 0 < d := by dsimp [d]; linarith |
| 291 | | - refine ⟨oneSidedPair m p₂ d V, oneSidedPair_probability m p₂ d V hd hV, |
| 292 | | - oneSidedPair_mean m p₂ d V hp hd hV, |
| 293 | | - oneSidedPair_variance m p₂ d V hp hd hV, ?_, ?_⟩ |
| 294 | | - · have hleft := oneSidedPair_lower_projection m p₂ d V hp |
| 295 | | - dsimp [d] at hleft |
| 296 | | - linarith |
| 297 | | - · have hright := oneSidedPair_upper_projection m p₂ d V |
| 298 | | - have hinc : 0 ≤ V * p₂ ^ 2 / d := |
| 299 | | - div_nonneg (mul_nonneg hV (sq_nonneg p₂)) (le_of_lt hd) |
| 300 | | - linarith |
| 301 | | - |
| 302 | | -/-- The cutoff correction used by the manuscript remains between the old |
| 303 | | -speed and the target speed whenever the old speed is below that target. -/ |
| 304 | | -theorem corrected_speed_bounds (v₀ vstar ζ : ℝ) |
| 305 | | - (hz₀ : 0 ≤ ζ) (hz₁ : ζ ≤ 1) (hv : v₀ ≤ vstar) : |
| 306 | | - v₀ ≤ v₀ + ζ ^ 2 * (vstar - v₀) ∧ |
| 307 | | - v₀ + ζ ^ 2 * (vstar - v₀) ≤ vstar := by |
| 308 | | - have hs : ζ ^ 2 ≤ 1 := by nlinarith |
| 309 | | - have hlow := mul_nonneg (sq_nonneg ζ) (sub_nonneg.mpr hv) |
| 310 | | - have hupp := mul_nonneg (sub_nonneg.mpr hs) (sub_nonneg.mpr hv) |
| 311 | | - constructor <;> nlinarith |
| 312 | | - |
| 313 | 84 | end |
| 314 | 85 | |
| 315 | 86 | end NavierStokes.LoopMoments |