Navier–Stokes: the Lean blow-up proof, cleaned up together
OpenAI's 2026 Lean proofs of blowup for forced Navier–Stokes and Euler, rerun by others, not refereed, no ruling from Clay; cleaned up together: more readable, faster to build

| 1 | import NavierStokes.GaugeMomentBalances |
| 2 | import NavierStokes.LabelSumBounds |
| 3 | import NavierStokes.LocalRankDefect |
| 4 | |
| 5 | /-! |
| 6 | # The mean gain of the actual signed wave update |
| 7 | |
| 8 | The state is updated with the same primary/signed native pulses and its |
| 9 | pressure is recomputed by the moving-gauge operator. The removed physical |
| 10 | bumps are controlled by actual moment identities; the complete covariance |
| 11 | remainder retains the signed square and the curl terms. |
| 12 | -/ |
| 13 | |
| 14 | noncomputable section |
| 15 | |
| 16 | namespace NavierStokes.SignedMeanGain |
| 17 | |
| 18 | open Set Function Filter MeasureTheory |
| 19 | open scoped ContDiff Topology BigOperators |
| 20 | open WeightedClasses MeanIncrementBounds CorrectionState |
| 21 | |
| 22 | variable {D : Type} [NormedAddCommGroup D] [NormedSpace ℝ D] |
| 23 | |
| 24 | abbrev ScalarField (D : Type) := MeanIncrementBounds.Field D |
| 25 | abbrev Tensor (D : Type) := Fin 3 → Fin 3 → ScalarField D |
| 26 | |
| 27 | /-- These are changes of the literal covariance terms in (32). -/ |
| 28 | noncomputable def thetaCovarianceChange (o : Operators D) (X : Tensor D) : ScalarField D := |
| 29 | o.radialDiv 2 (X 0 1) + o.dz (X 2 1) |
| 30 | |
| 31 | noncomputable def axialCovarianceChange (o : Operators D) (X : Tensor D) : ScalarField D := |
| 32 | o.radialDiv 1 (X 0 2) + o.dz (X 2 2) |
| 33 | |
| 34 | noncomputable def radialCovarianceChange (o : Operators D) (X : Tensor D) : ScalarField D := |
| 35 | -o.radialDiv 1 (X 0 0) - o.dz (X 2 0) + o.invRadius * X 1 1 |
| 36 | |
| 37 | theorem smooth_updated {U : Set D} {m h : Triple D} |
| 38 | (hm : SmoothTriple U m) (hh : SmoothTriple U h) : SmoothTriple U (updated m h) := |
| 39 | ⟨hm.radial.add hh.radial, hm.angular.add hh.angular, hm.axial.add hh.axial⟩ |
| 40 | |
| 41 | section CovarianceChanges |
| 42 | |
| 43 | variable {U : Set D} (hU : IsOpen U) (o : Operators D) |
| 44 | {b m : Triple D} (hb : SmoothTriple U b) (hm : SmoothTriple U m) |
| 45 | (W X : Tensor D) (hW : ∀ i j, SmoothOn U (W i j)) |
| 46 | (hX : ∀ i j, SmoothOn U (X i j)) |
| 47 | |
| 48 | include hU hb hm hW hX in |
| 49 | theorem thetaResidual_covariance_change (T : ScalarField D) : |
| 50 | Agree U (thetaResidual o b m (W + X) T - thetaResidual o b m W T) |
| 51 | (thetaCovarianceChange o X) := by |
| 52 | have hr : thetaRadial b m + (W + X) 0 1 = (thetaRadial b m + W 0 1) + X 0 1 := by |
| 53 | funext n x |
| 54 | simp only [Pi.add_apply] |
| 55 | ring |
| 56 | have hz : thetaAxial b m + (W + X) 2 1 = (thetaAxial b m + W 2 1) + X 2 1 := by |
| 57 | funext n x |
| 58 | simp only [Pi.add_apply] |
| 59 | ring |
| 60 | simp only [Pi.add_apply] at hr hz |
| 61 | intro n x hx |
| 62 | simp only [thetaResidual, Pi.sub_apply, Pi.add_apply] |
| 63 | rw [hr, hz, o.radialDiv_add hU 2 ((hb.thetaRadial hm).add (hW 0 1)) (hX 0 1) n hx, |
| 64 | o.dz_add hU ((hb.thetaAxial hm).add (hW 2 1)) (hX 2 1) n hx] |
| 65 | simp only [thetaCovarianceChange, Pi.add_apply] |
| 66 | ring |
| 67 | |
| 68 | include hU hb hm hW hX in |
| 69 | theorem axialResidual_covariance_change (p T : ScalarField D) (hp : SmoothOn U p) : |
| 70 | Agree U (axialResidual o b m (W + X) p T - axialResidual o b m W p T) |
| 71 | (axialCovarianceChange o X) := by |
| 72 | have hr : axialRadial b m + (W + X) 0 2 = (axialRadial b m + W 0 2) + X 0 2 := by |
| 73 | funext n x |
| 74 | simp only [Pi.add_apply] |
| 75 | ring |
| 76 | have hz : axialAxial b m + (W + X) 2 2 + p = (axialAxial b m + W 2 2 + p) + X 2 2 := by |
| 77 | funext n x |
| 78 | simp only [Pi.add_apply] |
| 79 | ring |
| 80 | simp only [Pi.add_apply] at hr hz |
| 81 | intro n x hx |
| 82 | simp only [axialResidual, Pi.sub_apply, Pi.add_apply] |
| 83 | rw [hr, hz, o.radialDiv_add hU 1 ((hb.axialRadial hm).add (hW 0 2)) (hX 0 2) n hx, |
| 84 | o.dz_add hU (((hb.axialAxial hm).add (hW 2 2)).add hp) (hX 2 2) n hx] |
| 85 | simp only [axialCovarianceChange, Pi.add_apply] |
| 86 | ring |
| 87 | |
| 88 | include hU hb hm hW hX in |
| 89 | theorem gr_covariance_change : |
| 90 | Agree U (gr o b m (W + X) - gr o b m W) (radialCovarianceChange o X) := by |
| 91 | have hr : radialRadial b m + (W + X) 0 0 = (radialRadial b m + W 0 0) + X 0 0 := by |
| 92 | funext n x |
| 93 | simp only [Pi.add_apply] |
| 94 | ring |
| 95 | have hz : axialRadial b m + (W + X) 2 0 = (axialRadial b m + W 2 0) + X 2 0 := by |
| 96 | funext n x |
| 97 | simp only [Pi.add_apply] |
| 98 | ring |
| 99 | simp only [Pi.add_apply] at hr hz |
| 100 | intro n x hx |
| 101 | simp only [gr, Pi.sub_apply, Pi.add_apply, Pi.neg_apply, Pi.mul_apply] |
| 102 | rw [hr, hz, o.radialDiv_add hU 1 ((hb.radialRadial hm).add (hW 0 0)) (hX 0 0) n hx, |
| 103 | o.dz_add hU ((hb.axialRadial hm).add (hW 2 0)) (hX 2 0) n hx] |
| 104 | simp only [radialCovarianceChange, Pi.add_apply, Pi.sub_apply, Pi.neg_apply, Pi.mul_apply] |
| 105 | ring |
| 106 | |
| 107 | end CovarianceChanges |
| 108 | |
| 109 | /-- A bound on each actual tensor entry. It is not a bound on the resulting |
| 110 | residual and contains no update-preservation assertion. -/ |
| 111 | def TensorClass (s : StripData D) (α : ℝ) (X : Tensor D) : Prop := |
| 112 | ∀ i j, MeanClass s α (X i j) |
| 113 | |
| 114 | section CovarianceBounds |
| 115 | |
| 116 | variable {s : StripData D} {o : Operators D} {κ α : ℝ} |
| 117 | (ho : OperatorBounds s o κ) {X : Tensor D} (hX : TensorClass s α X) |
| 118 | |
| 119 | include ho hX in |
| 120 | theorem thetaCovarianceChange_mem : |
| 121 | MeanClass s (α - κ) (thetaCovarianceChange o X) := by |
| 122 | exact (ho.radialDiv (hX 0 1) 2).add |
| 123 | ((ho.dz (hX 2 1)).mono_exponent (by linarith [ho.kappa_nonneg])) |
| 124 | |
| 125 | include ho hX in |
| 126 | theorem axialCovarianceChange_mem : |
| 127 | MeanClass s (α - κ) (axialCovarianceChange o X) := by |
| 128 | exact (ho.radialDiv (hX 0 2) 1).add |
| 129 | ((ho.dz (hX 2 2)).mono_exponent (by linarith [ho.kappa_nonneg])) |
| 130 | |
| 131 | include ho hX in |
| 132 | theorem radialCovarianceChange_mem : |
| 133 | MeanClass s (α - κ) (radialCovarianceChange o X) := by |
| 134 | exact (Class.sub (Class.neg (ho.radialDiv (hX 0 0) 1)) |
| 135 | ((ho.dz (hX 2 0)).mono_exponent (by linarith [ho.kappa_nonneg]))).add |
| 136 | ((ho.inv_mul (hX 1 1)).mono_exponent (by linarith [ho.kappa_nonneg])) |
| 137 | |
| 138 | end CovarianceBounds |
| 139 | |
| 140 | |
| 141 | /-! ## Literal state and covariance increments -/ |
| 142 | |
| 143 | noncomputable def zeroTriple : Triple D := ⟨0, 0, 0⟩ |
| 144 | |
| 145 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 146 | theorem updated_zeroTriple (m : Triple D) : updated m zeroTriple = m := by |
| 147 | cases m |
| 148 | simp [updated, zeroTriple] |
| 149 | |
| 150 | noncomputable def covarianceIncrement (u w : Oscillation D) : Tensor D := |
| 151 | bilinearCovariance (u + w) (u + w) - bilinearCovariance u u |
| 152 | |
| 153 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 154 | theorem covariance_increment_split (p u t k : Oscillation D) |
| 155 | (hu : LabelSumBounds.AngularContinuous u) |
| 156 | (ht : LabelSumBounds.AngularContinuous t) |
| 157 | (hk : LabelSumBounds.AngularContinuous k) : |
| 158 | covarianceIncrement u (t + k) = LabelSumBounds.symmetricCovariance p t + |
| 159 | LabelSumBounds.signedRemainder p u t k := by |
| 160 | rw [covarianceIncrement, LabelSumBounds.covariance_increment_exact u (t + k) hu (ht.add hk)] |
| 161 | unfold LabelSumBounds.signedRemainder |
| 162 | abel |
| 163 | |
| 164 | section ActualState |
| 165 | |
| 166 | variable {S : Type} [NormedAddCommGroup S] [NormedSpace ℝ S] |
| 167 | |
| 168 | noncomputable def waveStage (g : VariableGaugeMean.GaugeData S) |
| 169 | (c : Context (PressureStream.Lift S)) (u : State (PressureStream.Lift S)) |
| 170 | (w : Oscillation (PressureStream.Lift S)) (q : OscillatoryScalar (PressureStream.Lift S)) |
| 171 | (gaussian : Oscillation (PressureStream.Lift S)) : State (PressureStream.Lift S) := |
| 172 | VariableGaugeMean.reconstructState g c (u.addIncrement zeroTriple 0 w q ⟨0, gaussian, 0⟩) |
| 173 | |
| 174 | noncomputable def pressureChange (g : VariableGaugeMean.GaugeData S) |
| 175 | (c : Context (PressureStream.Lift S)) (u : State (PressureStream.Lift S)) |
| 176 | (w : Oscillation (PressureStream.Lift S)) (q : OscillatoryScalar (PressureStream.Lift S)) |
| 177 | (gaussian : Oscillation (PressureStream.Lift S)) : ScalarField (PressureStream.Lift S) := |
| 178 | (waveStage g c u w q gaussian).pressure - u.pressure |
| 179 | |
| 180 | theorem waveStage_mean (g : VariableGaugeMean.GaugeData S) |
| 181 | (c : Context (PressureStream.Lift S)) (u : State (PressureStream.Lift S)) |
| 182 | (w : Oscillation (PressureStream.Lift S)) (q : OscillatoryScalar (PressureStream.Lift S)) |
| 183 | (gaussian : Oscillation (PressureStream.Lift S)) : |
| 184 | (waveStage g c u w q gaussian).mean = u.mean := updated_zeroTriple u.mean |
| 185 | |
| 186 | theorem waveStage_covariance (g : VariableGaugeMean.GaugeData S) |
| 187 | (c : Context (PressureStream.Lift S)) (u : State (PressureStream.Lift S)) |
| 188 | (w : Oscillation (PressureStream.Lift S)) (q : OscillatoryScalar (PressureStream.Lift S)) |
| 189 | (gaussian : Oscillation (PressureStream.Lift S)) : |
| 190 | (waveStage g c u w q gaussian).covariance = u.covariance + covarianceIncrement u.oscillation w := by |
| 191 | change bilinearCovariance (u.oscillation + w) (u.oscillation + w) = _ |
| 192 | unfold covarianceIncrement State.covariance |
| 193 | abel |
| 194 | |
| 195 | theorem waveStage_gaussian (g : VariableGaugeMean.GaugeData S) |
| 196 | (c : Context (PressureStream.Lift S)) (u : State (PressureStream.Lift S)) |
| 197 | (w : Oscillation (PressureStream.Lift S)) (q : OscillatoryScalar (PressureStream.Lift S)) |
| 198 | (gaussian : Oscillation (PressureStream.Lift S)) : |
| 199 | (waveStage g c u w q gaussian).errors.gaussian = u.errors.gaussian + gaussian := rfl |
| 200 | |
| 201 | theorem waveStage_theta_change {U : Set (PressureStream.Lift S)} (hU : IsOpen U) |
| 202 | (g : VariableGaugeMean.GaugeData S) (c : Context (PressureStream.Lift S)) |
| 203 | (u : State (PressureStream.Lift S)) (w : Oscillation (PressureStream.Lift S)) |
| 204 | (q : OscillatoryScalar (PressureStream.Lift S)) (gaussian : Oscillation (PressureStream.Lift S)) |
| 205 | (hb : SmoothTriple U c.base) (hm : SmoothTriple U u.mean) |
| 206 | (hW : ∀ i j, SmoothOn U (u.covariance i j)) |
| 207 | (hX : ∀ i j, SmoothOn U (covarianceIncrement u.oscillation w i j)) : |
| 208 | Agree U ((waveStage g c u w q gaussian).thetaResidual c - u.thetaResidual c) |
| 209 | (thetaCovarianceChange c.operators (covarianceIncrement u.oscillation w)) := by |
| 210 | change Agree U (MeanIncrementBounds.thetaResidual c.operators c.base |
| 211 | (waveStage g c u w q gaussian).mean (waveStage g c u w q gaussian).covariance c.virtualTheta - _) _ |
| 212 | rw [waveStage_mean, waveStage_covariance] |
| 213 | exact thetaResidual_covariance_change hU c.operators hb hm u.covariance |
| 214 | (covarianceIncrement u.oscillation w) hW hX c.virtualTheta |
| 215 | |
| 216 | theorem waveStage_gr_change {U : Set (PressureStream.Lift S)} (hU : IsOpen U) |
| 217 | (g : VariableGaugeMean.GaugeData S) (c : Context (PressureStream.Lift S)) |
| 218 | (u : State (PressureStream.Lift S)) (w : Oscillation (PressureStream.Lift S)) |
| 219 | (q : OscillatoryScalar (PressureStream.Lift S)) (gaussian : Oscillation (PressureStream.Lift S)) |
| 220 | (hb : SmoothTriple U c.base) (hm : SmoothTriple U u.mean) |
| 221 | (hW : ∀ i j, SmoothOn U (u.covariance i j)) |
| 222 | (hX : ∀ i j, SmoothOn U (covarianceIncrement u.oscillation w i j)) : |
| 223 | Agree U ((waveStage g c u w q gaussian).gr c - u.gr c) |
| 224 | (radialCovarianceChange c.operators (covarianceIncrement u.oscillation w)) := by |
| 225 | change Agree U (MeanIncrementBounds.gr c.operators c.base |
| 226 | (waveStage g c u w q gaussian).mean (waveStage g c u w q gaussian).covariance - _) _ |
| 227 | rw [waveStage_mean, waveStage_covariance] |
| 228 | exact gr_covariance_change hU c.operators hb hm u.covariance |
| 229 | (covarianceIncrement u.oscillation w) hW hX |
| 230 | |
| 231 | theorem axialResidual_pressure_change {U : Set D} (hU : IsOpen U) (o : Operators D) |
| 232 | {b m : Triple D} (hb : SmoothTriple U b) (hm : SmoothTriple U m) |
| 233 | (W : Tensor D) (hW : ∀ i j, SmoothOn U (W i j)) |
| 234 | (p q T : ScalarField D) (hp : SmoothOn U p) (hq : SmoothOn U q) : |
| 235 | Agree U (MeanIncrementBounds.axialResidual o b m W (p + q) T - |
| 236 | MeanIncrementBounds.axialResidual o b m W p T) (o.dz q) := by |
| 237 | have he : axialAxial b m + W 2 2 + (p + q) = (axialAxial b m + W 2 2 + p) + q := by abel |
| 238 | intro n x hx |
| 239 | simp only [MeanIncrementBounds.axialResidual, Pi.sub_apply, Pi.add_apply] |
| 240 | rw [he, o.dz_add hU (((hb.axialAxial hm).add (hW 2 2)).add hp) hq n hx] |
| 241 | simp only [Pi.add_apply] |
| 242 | ring |
| 243 | |
| 244 | theorem waveStage_axial_change {U : Set (PressureStream.Lift S)} (hU : IsOpen U) |
| 245 | (g : VariableGaugeMean.GaugeData S) (c : Context (PressureStream.Lift S)) |
| 246 | (u : State (PressureStream.Lift S)) (w : Oscillation (PressureStream.Lift S)) |
| 247 | (q : OscillatoryScalar (PressureStream.Lift S)) (e : Oscillation (PressureStream.Lift S)) |
| 248 | (hb : SmoothTriple U c.base) (hm : SmoothTriple U u.mean) |
| 249 | (hW : ∀ i j, SmoothOn U (u.covariance i j)) |
| 250 | (hX : ∀ i j, SmoothOn U (covarianceIncrement u.oscillation w i j)) |
| 251 | (hp : SmoothOn U u.pressure) (hδp : SmoothOn U (pressureChange g c u w q e)) : |
| 252 | Agree U ((waveStage g c u w q e).axialResidual c - u.axialResidual c) |
| 253 | (axialCovarianceChange c.operators (covarianceIncrement u.oscillation w) + |
| 254 | c.operators.dz (pressureChange g c u w q e)) := by |
| 255 | have hpressure : (waveStage g c u w q e).pressure = |
| 256 | u.pressure + pressureChange g c u w q e := by unfold pressureChange; abel |
| 257 | have hc := axialResidual_covariance_change hU c.operators hb hm u.covariance |
| 258 | (covarianceIncrement u.oscillation w) hW hX |
| 259 | (u.pressure + pressureChange g c u w q e) c.virtualAxial (hp.add hδp) |
| 260 | have hd := axialResidual_pressure_change hU c.operators hb hm u.covariance hW |
| 261 | u.pressure (pressureChange g c u w q e) c.virtualAxial hp hδp |
| 262 | intro n x hx |
| 263 | have hc' := hc n hx |
| 264 | have hd' := hd n hx |
| 265 | change MeanIncrementBounds.axialResidual c.operators c.base (waveStage g c u w q e).mean |
| 266 | (waveStage g c u w q e).covariance (waveStage g c u w q e).pressure c.virtualAxial n x - _ = _ |
| 267 | rw [waveStage_mean, waveStage_covariance g c u w q e, hpressure] |
| 268 | simp only [Pi.add_apply, Pi.sub_apply] at hc' hd' ⊢ |
| 269 | change _ - MeanIncrementBounds.axialResidual c.operators c.base u.mean u.covariance |
| 270 | u.pressure c.virtualAxial n x = _ |
| 271 | linarith |
| 272 | |
| 273 | |
| 274 | end ActualState |
| 275 | |
| 276 | |
| 277 | /-! ## Averaging on the actual open slow domain -/ |
| 278 | |
| 279 | section LocalAverage |
| 280 | |
| 281 | variable {S : Type} [NormedAddCommGroup S] [NormedSpace ℝ S] [FiniteDimensional ℝ S] |
| 282 | |
| 283 | open StateMomentBalances PhysicalMeanDomain |
| 284 | |
| 285 | omit [FiniteDimensional ℝ S] in |
| 286 | theorem torus_slice_continuous {U : Set S} {f : PressureStream.Lift S → ℝ} |
| 287 | (hf : ContDiffOn ℝ ∞ f (slowDomain U)) {x : ℝ × S} (hx : x.2 ∈ U) : |
| 288 | Continuous (fun Y : PressureStream.Plane => f (x.1, (x.2, Y))) := by |
| 289 | exact hf.continuousOn.comp_continuous |
| 290 | (continuous_const.prodMk (continuous_const.prodMk continuous_id)) (fun _ => hx) |
| 291 | |
| 292 | omit [FiniteDimensional ℝ S] in |
| 293 | theorem meanBar_add_on {U : Set S} {f g : ScalarField (PressureStream.Lift S)} |
| 294 | (hf : SmoothOn (slowDomain U) f) (hg : SmoothOn (slowDomain U) g) |
| 295 | (n : ℕ) {x : PressureStream.Lift S} (hx : x.2.1 ∈ U) : |
| 296 | meanBar (f + g) n x = meanBar f n x + meanBar g n x := by |
| 297 | exact FourierAlias.torusMean_add |
| 298 | (torus_slice_continuous (hf n) hx) (torus_slice_continuous (hg n) hx) |
| 299 | |
| 300 | omit [FiniteDimensional ℝ S] in |
| 301 | theorem meanBar_sub_on {U : Set S} {f g : ScalarField (PressureStream.Lift S)} |
| 302 | (hf : SmoothOn (slowDomain U) f) (hg : SmoothOn (slowDomain U) g) |
| 303 | (n : ℕ) {x : PressureStream.Lift S} (hx : x.2.1 ∈ U) : |
| 304 | meanBar (f - g) n x = meanBar f n x - meanBar g n x := by |
| 305 | exact FourierAlias.torusMean_sub |
| 306 | (torus_slice_continuous (hf n) hx) (torus_slice_continuous (hg n) hx) |
| 307 | |
| 308 | theorem meanBar_radialDiv_on {U : Set S} (hU : IsOpen U) |
| 309 | (o : Operators (PressureStream.Lift S)) (hradius : o.radius = Prod.fst) |
| 310 | (hprofile : ∀ R z Y, o.radialProfile (R, (z, Y)) = o.radialProfile (R, (z, 0))) |
| 311 | {f : ScalarField (PressureStream.Lift S)} (hf : SmoothOn (slowDomain U) f) |
| 312 | (hp : ∀ n, PeriodicOn U (f n)) (e : ℝ) (n : ℕ) |
| 313 | {x : PressureStream.Lift S} (hx : x.2.1 ∈ U) : |
| 314 | meanBar (o.radialDiv e f) n x = o.radialDiv e (meanBar f) n x := by |
| 315 | obtain ⟨χ, _, hχs, hχf, he⟩ := exists_fiber_localization hU hx (hf n) |
| 316 | let F : ScalarField (PressureStream.Lift S) := fun _ => localize χ (f n) |
| 317 | have hl : meanBar (o.radialDiv e F) n x = meanBar (o.radialDiv e f) n x := by |
| 318 | apply PressureStream.torusAverage_congr_slice |
| 319 | intro Y |
| 320 | have hj : fderiv ℝ (localize χ (f n)) (x.1, (x.2.1, Y)) = |
| 321 | fderiv ℝ (f n) (x.1, (x.2.1, Y)) := (he.eventuallyEq x.1 Y).fderiv_eq |
| 322 | have hv := (he.eventuallyEq x.1 Y).self_of_nhds |
| 323 | simp only [Operators.radialDiv, Operators.dr, graphDerivative, Operators.invRadius, |
| 324 | Pi.add_apply, Pi.smul_apply, Pi.mul_apply, smul_eq_mul, F, hj, hv] |
| 325 | have hb := (liftedTorusAverage_fiberLocal.germ he).eventuallyEq x.1 x.2.2 |
| 326 | have hr : o.radialDiv e (meanBar F) n x = o.radialDiv e (meanBar f) n x := by |
| 327 | simp only [Operators.radialDiv, Operators.dr, graphDerivative, Operators.invRadius, |
| 328 | Pi.add_apply, Pi.smul_apply, Pi.mul_apply, smul_eq_mul, meanBar, F, |
| 329 | hb.fderiv_eq, hb.self_of_nhds] |
| 330 | exact hl.symm.trans ((congrArg (fun a : ScalarField (PressureStream.Lift S) => a n x) |
| 331 | (AuxiliaryAverage.meanBar_radialDiv o hradius hprofile F (fun _ => hχf) |
| 332 | (fun _ => localize_periodic hχs (hp n)) e)).trans hr) |
| 333 | |
| 334 | omit [FiniteDimensional ℝ S] in |
| 335 | /-- Only a germ near the positive radius is used; no global extension of the |
| 336 | physical stress or the slow domain is assumed. -/ |
| 337 | theorem native_radialDiv_slow_on (r : ReconstructionData) (ε fast : ℕ → ℝ) |
| 338 | (z t : S) (v : PressureStream.Plane) {U : Set S} (hU : IsOpen U) |
| 339 | {F : ℕ → ℝ × S → ℝ} |
| 340 | (hF : SmoothOn (slowDomain U) (liftSlow F)) |
| 341 | (e : ℝ) (n : ℕ) {x : PressureStream.Lift S} (hx : x.2.1 ∈ U) : |
| 342 | (nativeOperators r ε fast z t v).radialDiv e (liftSlow F) n x = |
| 343 | IntegratedMeanBalances.radialDivergence e (fun q => F n (q, x.2.1)) x.1 := by |
| 344 | have hdiff := ((hF n).contDiffAt ((slowDomain_open hU).mem_nhds hx)).differentiableAt |
| 345 | (by simp) |
| 346 | have hd := hdiff.hasFDerivAt.comp_hasDerivAt x.1 |
| 347 | ((hasDerivAt_id x.1).prodMk (hasDerivAt_const x.1 (x.2.1, x.2.2))) |
| 348 | have hdr : deriv (fun q => F n (q, x.2.1)) x.1 = |
| 349 | fderiv ℝ (liftSlow F n) x (1, (0, 0)) := hd.deriv |
| 350 | have hv : fderiv ℝ (liftSlow F n) x (0, (0, r.radialDirection)) = 0 := by |
| 351 | have hin : HasDerivAt (fun q : ℝ => x + q • (0, (0, r.radialDirection))) |
| 352 | (0, (0, r.radialDirection)) 0 := by |
| 353 | have he := (hasDerivAt_const (0 : ℝ) x).fun_add |
| 354 | ((hasDerivAt_id (0 : ℝ)).smul_const (0, (0, r.radialDirection))) |
| 355 | simp at he ⊢ |
| 356 | exact he |
| 357 | have hf0 : HasFDerivAt (liftSlow F n) (fderiv ℝ (liftSlow F n) x) |
| 358 | (x + (0 : ℝ) • (0, (0, r.radialDirection))) := by simpa using hdiff.hasFDerivAt |
| 359 | have hh := hf0.comp_hasDerivAt (0 : ℝ) hin |
| 360 | have hc : (fun q : ℝ => liftSlow F n (x + q • (0, (0, r.radialDirection)))) = |
| 361 | (fun _ => F n (x.1, x.2.1)) := by |
| 362 | funext q |
| 363 | simp [liftSlow] |
| 364 | simpa only [zero_smul, add_zero, zero_add, one_smul, hc, Function.comp_def, deriv_const] using hh.deriv.symm |
| 365 | simp only [Operators.radialDiv, Operators.dr, graphDerivative, Operators.invRadius, |
| 366 | Pi.add_apply, Pi.smul_apply, Pi.mul_apply, smul_eq_mul, nativeOperators, graphOperators, |
| 367 | hv, mul_zero, add_zero, liftSlow, IntegratedMeanBalances.radialDivergence, hdr, |
| 368 | div_eq_mul_inv, mul_assoc] |
| 369 | |
| 370 | end LocalAverage |
| 371 | |
| 372 | |
| 373 | /-! ## Uniform estimates for the actual finite label sums -/ |
| 374 | |
| 375 | section Families |
| 376 | |
| 377 | open LabelSumBounds |
| 378 | variable {ι : Type} {s : StripData D} {P : ι → ℕ → D → ℝ} {α δ β η : ℝ} |
| 379 | |
| 380 | /-- Primitive geometry of the active label assembly; the overlap estimate |
| 381 | is derived by `LabelSumBounds` independently of the size of `labels n`. -/ |
| 382 | structure Assembly (f : SignedFamily s P α δ β η) where |
| 383 | width : ℝ |
| 384 | exponent : ℝ |
| 385 | vr : TorusInverse.Plane |
| 386 | vt : TorusInverse.Plane |
| 387 | slots : PartitionedCovariance.SlotSystem width exponent vr vt |
| 388 | labels : ℕ → Finset ι |
| 389 | label : ℕ → ι → SlotColoring.Label |
| 390 | injective : ∀ n, Set.InjOn (label n) (labels n : Set ι) |
| 391 | level : ∀ n l, l ∈ labels n → 1 ≤ (label n l).1 |
| 392 | window : ℕ → D → WindowPoint |
| 393 | window_continuous : ∀ n, ContinuousOn (window n) s.domain |
| 394 | auxiliary : ℕ → D → TorusInverse.Plane |
| 395 | primary_support : SupportedOscillations slots label window auxiliary s.domain |
| 396 | (fun l => (f.primary l).oscillation) |
| 397 | old_support : SupportedOscillations slots label window auxiliary s.domain |
| 398 | (fun l => (f.old l).oscillation) |
| 399 | tangent_support : SupportedOscillations slots label window auxiliary s.domain |
| 400 | (fun l => (f.tangent l).oscillation) |
| 401 | curl_support : SupportedOscillations slots label window auxiliary s.domain |
| 402 | (fun l => (f.curl l).oscillation) |
| 403 | |
| 404 | noncomputable def primaryField (f : SignedFamily s P α δ β η) (a : Assembly f) : Oscillation D := |
| 405 | fieldSum a.labels (fun l => (f.primary l).oscillation) |
| 406 | noncomputable def oldField (f : SignedFamily s P α δ β η) (a : Assembly f) : Oscillation D := |
| 407 | fieldSum a.labels (fun l => (f.old l).oscillation) |
| 408 | noncomputable def tangentField (f : SignedFamily s P α δ β η) (a : Assembly f) : Oscillation D := |
| 409 | fieldSum a.labels (fun l => (f.tangent l).oscillation) |
| 410 | noncomputable def curlField (f : SignedFamily s P α δ β η) (a : Assembly f) : Oscillation D := |
| 411 | fieldSum a.labels (fun l => (f.curl l).oscillation) |
| 412 | noncomputable def remainderTensor (f : SignedFamily s P α δ β η) (a : Assembly f) : Tensor D := |
| 413 | signedRemainder (primaryField f a) (oldField f a) (tangentField f a) (curlField f a) |
| 414 | noncomputable def crossTensor (f : SignedFamily s P α δ β η) (a : Assembly f) : Tensor D := |
| 415 | symmetricCovariance (primaryField f a) (tangentField f a) |
| 416 | noncomputable def incrementTensor (f : SignedFamily s P α δ β η) (a : Assembly f) : Tensor D := |
| 417 | covarianceIncrement (oldField f a) (tangentField f a + curlField f a) |
| 418 | |
| 419 | theorem incrementTensor_split (f : SignedFamily s P α δ β η) (a : Assembly f) : |
| 420 | incrementTensor f a = crossTensor f a + remainderTensor f a := by |
| 421 | exact covariance_increment_split _ _ _ _ |
| 422 | (fieldSum_angularContinuous _ _ (fun _ => block_angularContinuous _)) |
| 423 | (fieldSum_angularContinuous _ _ (fun _ => block_angularContinuous _)) |
| 424 | (fieldSum_angularContinuous _ _ (fun _ => block_angularContinuous _)) |
| 425 | |
| 426 | theorem remainderTensor_mem (f : SignedFamily s P α δ β η) (a : Assembly f) {γ : ℝ} |
| 427 | (hβη : β ≤ η) (hγd : γ ≤ δ + β) (hγc : γ ≤ α + η) (hγs : γ ≤ 2 * β) : |
| 428 | TensorClass s γ (remainderTensor f a) := by |
| 429 | intro i j |
| 430 | exact f.remainder_sum_mem hβη hγd hγc hγs a.labels a.label a.injective a.level |
| 431 | a.window a.window_continuous a.auxiliary a.primary_support a.old_support |
| 432 | a.tangent_support a.curl_support i j |
| 433 | |
| 434 | theorem incrementTensor_mem (f : SignedFamily s P α δ β η) (a : Assembly f) |
| 435 | (hαβ : α ≤ β) (hβη : β ≤ η) : TensorClass s (α + β) (incrementTensor f a) := by |
| 436 | let inc := fun l => addBlock (f.tangent l) (f.curl l) |
| 437 | have htc : ∀ l, SameCarrier (f.tangent l) (f.curl l) := fun l => |
| 438 | ⟨(f.curl_carrier l).frequency.trans (f.tangent_carrier l).frequency.symm, |
| 439 | (f.curl_carrier l).phase.trans (f.tangent_carrier l).phase.symm, |
| 440 | (f.curl_carrier l).angular.trans (f.tangent_carrier l).angular.symm⟩ |
| 441 | have he : (fun l => (inc l).oscillation) = |
| 442 | (fun l => (f.tangent l).oscillation + (f.curl l).oscillation) := by |
| 443 | funext l |
| 444 | exact addBlock_oscillation _ _ (htc l) |
| 445 | have hi : ∀ i j, UniformWaveClass s P β (fun l n x => (inc l).velocity n i j x) := |
| 446 | fun i j => (f.tangent_bounds i j).add ((f.curl_bounds i j).mono_exponent hβη) |
| 447 | have hsi : SupportedOscillations a.slots a.label a.window a.auxiliary s.domain |
| 448 | (fun l => (inc l).oscillation) := by |
| 449 | rw [he] |
| 450 | exact a.tangent_support.add a.curl_support |
| 451 | intro i j |
| 452 | have hh := harmonic_covariance_increment_sum_mem hαβ a.labels a.label a.injective a.level |
| 453 | a.window a.window_continuous a.auxiliary f.old inc f.bandwidth f.old_band |
| 454 | (fun l => addBlock_band (f.tangent_band l) (f.curl_band l)) |
| 455 | (fun l => ⟨(f.tangent_carrier l).frequency, (f.tangent_carrier l).phase, |
| 456 | (f.tangent_carrier l).angular⟩) f.old_bounds hi f.envelope_nonneg f.envelope_le_one |
| 457 | f.angular_ne_zero a.old_support hsi i j |
| 458 | simp only [he, fieldSum_add, incrementTensor, covarianceIncrement, oldField, |
| 459 | tangentField, curlField, Pi.sub_apply] at hh ⊢ |
| 460 | exact hh |
| 461 | |
| 462 | theorem signed_tensor_bounds {σ κ : ℝ} (hσ : 1 / 5 ≤ σ) |
| 463 | (hκsmall : κ ≤ 1 / 100000) |
| 464 | (f : SignedFamily s P (1 / 2) (17 / 25) (1 / 2 + σ - κ) (1 + σ - 2 * κ)) |
| 465 | (a : Assembly f) : |
| 466 | TensorClass s (1 + σ - κ) (incrementTensor f a) ∧ |
| 467 | TensorClass s (1 + σ + 17 / 100 + κ) (remainderTensor f a) := by |
| 468 | constructor |
| 469 | · convert! incrementTensor_mem f a (by linarith) (by linarith) using 1 |
| 470 | ring |
| 471 | · exact remainderTensor_mem f a (by linarith) (by linarith) (by linarith) (by linarith) |
| 472 | |
| 473 | end Families |
| 474 | |
| 475 | /-! ## The exact native cross, for the physical moving-gauge request -/ |
| 476 | |
| 477 | section Native |
| 478 | |
| 479 | open PartitionedCovariance SignedWaveUpdate |
| 480 | |
| 481 | variable {d h : ℝ} {vr vt : TorusInverse.Plane} {sys : SlotSystem d h vr vt} |
| 482 | |
| 483 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 484 | theorem nativeTangentBlock_zero {l : UnsignedLabel} (P : PairData sys l) |
| 485 | (hdet : vr.1 * vt.2 - vr.2 * vt.1 ≠ 0) (outer ε : ℝ) (a : SignedWaveUpdate.Vec2) |
| 486 | (q : ℝ) (x : SlotColoring.Position) (j : Fin 2) (hm : mask d l q x = 0) |
| 487 | (Y : TorusInverse.Plane) (θ : ℝ) (i : Fin 3) : |
| 488 | (nativeTangentBlock P hdet outer ε a q x j).oscillation 0 (Y, θ) i = 0 := by |
| 489 | rw [nativeTangentBlock, coefficientBlock_velocity] |
| 490 | simp [hm, CurlClassBounds.complexify_apply] |
| 491 | |
| 492 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 493 | theorem nativeAssembly_eq_finite {N : ℕ} |
| 494 | (P : (U : UnsignedLabel) → PairData sys (tailLabel N U)) |
| 495 | (hdet : vr.1 * vt.2 - vr.2 * vt.1 ≠ 0) (outer ε : UnsignedLabel → ℝ) |
| 496 | (a : UnsignedLabel → SignedWaveUpdate.Vec2) (q : ℝ) (x : SlotColoring.Position) |
| 497 | (F : Finset (UnsignedLabel × Fin 2)) |
| 498 | (hF : ∀ l, l ∉ F → mask d (tailLabel N l.1) q x = 0) |
| 499 | (Y : TorusInverse.Plane) (θ : ℝ) (i : Fin 3) : |
| 500 | nativeAssembly P hdet outer ε a q x Y θ i = |
| 501 | ∑ l ∈ F, (nativeTangentBlock (P l.1) hdet (outer l.1) (ε l.1) (a l.1) |
| 502 | q x l.2).oscillation 0 (Y, θ) i := by |
| 503 | unfold nativeAssembly |
| 504 | apply finsum_eq_sum_of_support_subset |
| 505 | intro l hl |
| 506 | by_contra hn |
| 507 | exact hl (nativeTangentBlock_zero (P l.1) hdet _ _ _ _ _ _ (hF l hn) Y θ i) |
| 508 | |
| 509 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 510 | theorem native_physical_cross |
| 511 | (hdet : vr.1 * vt.2 - vr.2 * vt.1 ≠ 0) (N : ℕ) (hN : 1 ≤ N) |
| 512 | (P : (U : UnsignedLabel) → PairData sys (tailLabel N U)) |
| 513 | {q : ℝ} (hq : 0 < q) (hqN : q ≤ ChartScales.Q N) (x : SlotColoring.Position) |
| 514 | (T σ : SignedWaveUpdate.Vec2) |
| 515 | (hcone : ∀ U, mask d (tailLabel N U) q x ≠ 0 → |
| 516 | SmoothCovariance.StrictCone (P U).matrix (chartTarget h q N T U)) (i : Fin 2) : |
| 517 | let primary := nativeAssembly P hdet (physicalOuter h N) (physicalViscosity h N) |
| 518 | (fun U => SmoothCovariance.amplitudes (P U).matrix (chartTarget h q N T U)) q x |
| 519 | let signed := nativeAssembly P hdet (physicalOuter h N) (physicalViscosity h N) |
| 520 | (fun U => SignedCovariance.increment (P U).matrix (chartTarget h q N T U) |
| 521 | (SignedCovariance.chartStress h N σ U)) q x |
| 522 | doubleAverage (fun Y θ => primary Y θ 0 * signed Y θ i.succ + |
| 523 | signed Y θ 0 * primary Y θ i.succ) = σ i := by |
| 524 | dsimp only |
| 525 | simp_rw [nativeAssembly_radial, nativeAssembly_tangent] |
| 526 | exact SignedCovariance.physical_signed_cross_covariance sys hdet N hN P hq hqN x T σ hcone i |
| 527 | |
| 528 | end Native |
| 529 | |
| 530 | /-! ## One moving chart and its measured debts -/ |
| 531 | |
| 532 | abbrev Point := LocalSignedRequest.Point |
| 533 | abbrev Plane := PressureStream.Plane |
| 534 | |
| 535 | structure Geometry where |
| 536 | coord : ℝ |
| 537 | region : LocalSignedRequest.SlowRegion coord |
| 538 | patch : SignedStressPrimitive.Patch |
| 539 | leftWeight : ℝ |
| 540 | rightWeight : ℝ |
| 541 | left_pos : 0 < leftWeight |
| 542 | right_pos : 0 < rightWeight |
| 543 | epsilon : ℕ → ℝ |
| 544 | slow : ℕ → ℝ |
| 545 | epsilon_pos : ∀ n, 0 < epsilon n |
| 546 | epsilon_le_one : ∀ n, epsilon n ≤ 1 |
| 547 | slow_ge_one : ∀ n, 1 ≤ slow n |
| 548 | gauge : VariableGaugeMean.GaugeData Plane |
| 549 | inner_eq : gauge.radial.inner = patch.a |
| 550 | outer_eq : gauge.radial.outer = patch.b |
| 551 | exponent_pos : 0 < gauge.radial.exponent |
| 552 | length_eq : ∀ n, gauge.length n = VariableGaugeMean.qLength coord |
| 553 | fast : ℕ → ℝ |
| 554 | axial : Plane |
| 555 | time : Plane |
| 556 | temporal : Plane |
| 557 | |
| 558 | namespace Geometry |
| 559 | |
| 560 | noncomputable def strip (G : Geometry) : StripData Point := |
| 561 | LocalSignedRequest.movingStripData G.region G.patch.a G.patch.b G.leftWeight G.rightWeight |
| 562 | G.patch.a_pos G.left_pos G.right_pos G.epsilon G.slow G.epsilon_pos |
| 563 | G.epsilon_le_one G.slow_ge_one |
| 564 | |
| 565 | noncomputable def slowStrip (G : Geometry) : StripData Plane := |
| 566 | PhysicalMeanDomain.localSlowStripData G.region.carrier G.region.isOpen G.epsilon G.slow |
| 567 | G.epsilon_pos G.epsilon_le_one G.slow_ge_one |
| 568 | |
| 569 | noncomputable def domain (G : Geometry) : Set Point := PhysicalMeanDomain.slowDomain G.region.carrier |
| 570 | |
| 571 | noncomputable def operators (G : Geometry) : Operators Point := |
| 572 | StateMomentBalances.nativeOperators G.gauge.radial G.epsilon G.fast G.axial G.time G.temporal |
| 573 | |
| 574 | theorem inner_pos (G : Geometry) : 0 < G.gauge.radial.inner := by rw [G.inner_eq]; exact G.patch.a_pos |
| 575 | |
| 576 | theorem domain_open (G : Geometry) : IsOpen G.domain := PhysicalMeanDomain.slowDomain_open G.region.isOpen |
| 577 | |
| 578 | theorem strip_subset (G : Geometry) : G.strip.domain ⊆ G.domain := by |
| 579 | intro x hx |
| 580 | exact ((LocalSignedRequest.movingStrip_domain G.region G.patch.a G.patch.b G.leftWeight |
| 581 | G.rightWeight G.patch.a_pos G.left_pos G.right_pos G.epsilon G.slow G.epsilon_pos |
| 582 | G.epsilon_le_one G.slow_ge_one x).mp hx).1 |
| 583 | |
| 584 | theorem strip_fiber (G : Geometry) {x : Point} (hx : x ∈ G.strip.domain) (Y : Plane) : |
| 585 | (x.1, (x.2.1, Y)) ∈ G.strip.domain := by |
| 586 | apply (LocalSignedRequest.movingStrip_domain G.region G.patch.a G.patch.b G.leftWeight |
| 587 | G.rightWeight G.patch.a_pos G.left_pos G.right_pos G.epsilon G.slow G.epsilon_pos |
| 588 | G.epsilon_le_one G.slow_ge_one _).mpr |
| 589 | exact (LocalSignedRequest.movingStrip_domain G.region G.patch.a G.patch.b G.leftWeight |
| 590 | G.rightWeight G.patch.a_pos G.left_pos G.right_pos G.epsilon G.slow G.epsilon_pos |
| 591 | G.epsilon_le_one G.slow_ge_one _).mp hx |
| 592 | |
| 593 | theorem strip_radius_pos (G : Geometry) {x : Point} (hx : x ∈ G.strip.domain) : 0 < x.1 := by |
| 594 | have hh := (LocalSignedRequest.movingStrip_domain G.region G.patch.a G.patch.b G.leftWeight |
| 595 | G.rightWeight G.patch.a_pos G.left_pos G.right_pos G.epsilon G.slow G.epsilon_pos |
| 596 | G.epsilon_le_one G.slow_ge_one _).mp hx |
| 597 | have hq := Real.sqrt_pos.mpr (G.region.chartQ_pos hh.1) |
| 598 | have hp : 0 < x.1 / Real.sqrt (MeanRankUpdate.chartQ G.coord x) := |
| 599 | G.patch.a_pos.trans hh.2.1 |
| 600 | exact (div_pos_iff.mp hp).resolve_right (fun hn => (not_lt_of_ge hq.le) hn.2) |>.1 |
| 601 | |
| 602 | theorem local_operators (G : Geometry) : LocalRankDefect.LocalOperators G.region.carrier G.operators := |
| 603 | ⟨rfl, (StateMomentBalances.nativeOperators_positive G.gauge.radial G.epsilon G.fast |
| 604 | G.axial G.time G.temporal).radialProfile.mono (fun _ hx => hx.1)⟩ |
| 605 | |
| 606 | theorem average_mem (G : Geometry) {α : ℝ} {f : ScalarField Point} |
| 607 | (hf : SmoothOn G.domain f) (hclass : MeanClass G.strip α f) : |
| 608 | MeanClass G.strip α (StateMomentBalances.meanBar f) := |
| 609 | LocalSignedRequest.meanClass_liftedTorusAverage G.region G.patch.a G.patch.b |
| 610 | G.leftWeight G.rightWeight G.patch.a_pos G.left_pos G.right_pos |
| 611 | G.epsilon G.slow G.epsilon_pos G.epsilon_le_one G.slow_ge_one hf hclass |
| 612 | |
| 613 | theorem average_congr (G : Geometry) {f g : ScalarField Point} (he : Agree G.strip.domain f g) : |
| 614 | Agree G.strip.domain (StateMomentBalances.meanBar f) (StateMomentBalances.meanBar g) := by |
| 615 | intro n x hx |
| 616 | exact PressureStream.torusAverage_congr_slice _ (fun Y => he n (G.strip_fiber hx Y)) |
| 617 | |
| 618 | /-- The actual slow jet bound lifts through the norm-one slow projection. -/ |
| 619 | theorem slowClass_lift (G : Geometry) {α : ℝ} {f : ℕ → Plane → ℝ} |
| 620 | (hf : UnweightedClass G.slowStrip α f) : |
| 621 | UnweightedClass G.strip α (fun n x => f n x.2.1) := by |
| 622 | let pr := StateMomentBalances.slowProjection (S := Plane) |
| 623 | have hsm : SmoothOn G.domain (fun n x => f n x.2.1) := fun n => |
| 624 | (hf.smooth n).comp_continuousLinearMap pr |
| 625 | apply VariableGaugeMean.localBandJets_unweighted_moving G.region G.patch.a_pos G.left_pos |
| 626 | G.right_pos G.epsilon G.slow G.epsilon_pos G.epsilon_le_one G.slow_ge_one hsm |
| 627 | intro m |
| 628 | obtain ⟨C, hC, k, hb⟩ := hf.bounds m |
| 629 | refine ⟨C, hC, k, ?_⟩ |
| 630 | intro n x hx j hj |
| 631 | have hpopen : IsOpen (pr ⁻¹' G.region.carrier) := G.region.isOpen.preimage pr.continuous |
| 632 | have he := pr.iteratedFDerivWithin_comp_right (hf.smooth n) G.region.isOpen.uniqueDiffOn |
| 633 | hpopen.uniqueDiffOn hx (ENat.natCast_le_of_coe_top_le_withTop le_rfl j) |
| 634 | change iteratedFDerivWithin ℝ j (f n ∘ pr) (pr ⁻¹' G.region.carrier) x = |
| 635 | (iteratedFDerivWithin ℝ j (f n) G.region.carrier (pr x)).compContinuousLinearMap (fun _ => pr) at he |
| 636 | rw [iteratedFDerivWithin_of_isOpen j hpopen hx, |
| 637 | iteratedFDerivWithin_of_isOpen (f := f n) j G.region.isOpen |
| 638 | (show pr x ∈ G.region.carrier from hx)] at he |
| 639 | have hnorm : ‖iteratedFDeriv ℝ j (fun y : Point => f n y.2.1) x‖ ≤ |
| 640 | ‖iteratedFDeriv ℝ j (f n) x.2.1‖ := by |
| 641 | rw [show (fun y : Point => f n y.2.1) = f n ∘ pr from rfl, he] |
| 642 | apply (ContinuousMultilinearMap.norm_compContinuousLinearMap_le _ _).trans |
| 643 | simp only [Finset.prod_const, Finset.card_univ, Fintype.card_fin] |
| 644 | exact mul_le_of_le_one_right (norm_nonneg _) |
| 645 | (pow_le_one₀ (norm_nonneg pr) StateMomentBalances.norm_slowProjection_le) |
| 646 | apply hnorm.trans |
| 647 | simpa only [majorant, StripData.growth, slowStrip, PhysicalMeanDomain.localSlowStripData, |
| 648 | MeanMomentBounds.slowStripData, inv_one, max_self, mul_one] using hb n x.2.1 hx j hj |
| 649 | |
| 650 | end Geometry |
| 651 | |
| 652 | /-- Regularity is imposed on actual fluxes, before any class estimate on |
| 653 | their derivatives is derived. -/ |
| 654 | def MovingField (G : Geometry) (f : ScalarField Point) : Prop := |
| 655 | GaugeMomentBalances.MovingField G.region G.patch.a G.patch.b f |
| 656 | |
| 657 | namespace MovingField |
| 658 | |
| 659 | theorem sub {G : Geometry} {f g : ScalarField Point} (hf : MovingField G f) (hg : MovingField G g) : |
| 660 | MovingField G (f - g) := by |
| 661 | refine ⟨fun n => (hf.smooth n).sub (hg.smooth n), fun n => (hf.supported n).sub (hg.supported n), ?_⟩ |
| 662 | intro n r z hz Y k |
| 663 | exact congrArg₂ (· - ·) (hf.periodic n r z hz Y k) (hg.periodic n r z hz Y k) |
| 664 | |
| 665 | theorem covariance_flux_smooth {G : Geometry} {X : Tensor Point} |
| 666 | (hX : ∀ i j, MovingField G (X i j)) : |
| 667 | SmoothOn G.domain (thetaCovarianceChange G.operators X) ∧ |
| 668 | SmoothOn G.domain (axialCovarianceChange G.operators X) ∧ |
| 669 | SmoothOn G.domain (radialCovarianceChange G.operators X) := by |
| 670 | obtain ⟨c, e, _, hc, _, _, _, hl, hr, _⟩ := |
| 671 | VariableGaugeMean.qLength_reference_bounds G.region G.patch.a_pos G.patch.a_lt_b |
| 672 | have hf (i j) : LocalRankDefect.LocalShell c e G.region.carrier (X i j) := |
| 673 | ⟨(hX i j).smooth, ((hX i j).containing hl hr).supported⟩ |
| 674 | have hθ := ((hf 0 1).radialDiv hc G.region.isOpen G.local_operators 2).add |
| 675 | ((hf 2 1).dz G.region.isOpen G.operators) |
| 676 | have hz := ((hf 0 2).radialDiv hc G.region.isOpen G.local_operators 1).add |
| 677 | ((hf 2 2).dz G.region.isOpen G.operators) |
| 678 | have hr := (((hf 0 0).radialDiv hc G.region.isOpen G.local_operators 1).neg.sub |
| 679 | ((hf 2 0).dz G.region.isOpen G.operators)).add |
| 680 | ((hf 1 1).inv_mul hc G.region.isOpen G.local_operators) |
| 681 | exact ⟨hθ.smooth, hz.smooth, hr.smooth⟩ |
| 682 | |
| 683 | end MovingField |
| 684 | |
| 685 | /-! ## Actual pressure recomputation and the physical cancellation -/ |
| 686 | |
| 687 | noncomputable def physicalSigma (G : Geometry) (e : ℕ) (f : ScalarField Point) : ScalarField Point := |
| 688 | fun n x => SignedStressPrimitive.physicalBarSigma G.patch e |
| 689 | (SimilarityCoordinates.coordinateQ G.coord) (f n) (x.1, x.2.1) |
| 690 | |
| 691 | noncomputable def removedBump (G : Geometry) (e : ℕ) (f : ScalarField Point) : ScalarField Point := |
| 692 | fun n x => SignedStressPrimitive.physicalBump G.patch e |
| 693 | (SimilarityCoordinates.coordinateQ G.coord) (PressureStream.torusAverage (f n)) (x.1, x.2.1) |
| 694 | |
| 695 | theorem radialDiv_congr {U : Set D} (hU : IsOpen U) (o : Operators D) (e : ℝ) |
| 696 | {f g : ScalarField D} (he : Agree U f g) : Agree U (o.radialDiv e f) (o.radialDiv e g) := by |
| 697 | intro n x hx |
| 698 | simp only [Operators.radialDiv, Pi.add_apply, Pi.smul_apply, Pi.mul_apply, |
| 699 | o.dr_congr hU he n hx, he n hx] |
| 700 | |
| 701 | theorem pressureChange_mem (G : Geometry) (c : Context Point) (u : State Point) |
| 702 | (w : Oscillation Point) (q : OscillatoryScalar Point) (gaussian : Oscillation Point) |
| 703 | (hfixed : VariableGaugeMean.reconstructState G.gauge c u = u) |
| 704 | (h0 : MovingField G (u.gr c)) |
| 705 | (h1 : MovingField G ((waveStage G.gauge c u w q gaussian).gr c)) |
| 706 | {α : ℝ} (hclass : MeanClass G.strip α |
| 707 | ((waveStage G.gauge c u w q gaussian).gr c - u.gr c)) : |
| 708 | MeanClass G.strip α (pressureChange G.gauge c u w q gaussian) := by |
| 709 | have hpres (s : State Point) : (VariableGaugeMean.reconstructState G.gauge c s).pressure = |
| 710 | fun n x => VariableGaugeMean.meanPressure G.gauge.radial.exponent G.patch.a G.patch.b |
| 711 | (G.gauge.radial.frequency n) G.patch.a_lt_b (VariableGaugeMean.qLength G.coord) |
| 712 | G.gauge.radial.radialDirection (s.gr c n) x := by |
| 713 | funext n x |
| 714 | simp only [VariableGaugeMean.reconstructState, G.length_eq, G.inner_eq, G.outer_eq] |
| 715 | have hold : u.pressure = fun n x => VariableGaugeMean.meanPressure G.gauge.radial.exponent |
| 716 | G.patch.a G.patch.b (G.gauge.radial.frequency n) G.patch.a_lt_b |
| 717 | (VariableGaugeMean.qLength G.coord) G.gauge.radial.radialDirection (u.gr c n) x := by |
| 718 | rw [← hfixed] |
| 719 | exact hpres (VariableGaugeMean.reconstructState G.gauge c u) |
| 720 | have hnew := hpres (u.addIncrement zeroTriple 0 w q ⟨0, gaussian, 0⟩) |
| 721 | have hh := VariableGaugeMean.meanClass_meanPressure_change G.region G.patch.a_pos |
| 722 | G.patch.a_lt_b G.exponent_pos G.left_pos G.right_pos G.epsilon G.slow |
| 723 | G.epsilon_pos G.epsilon_le_one G.slow_ge_one h1.smooth h0.smooth h1.supported h0.supported |
| 724 | hclass G.gauge.radial.frequency (fun _ => G.gauge.radial.radialDirection) |
| 725 | convert! hh using 1 |
| 726 | funext n x |
| 727 | simp only [pressureChange, Pi.sub_apply, hold] |
| 728 | exact congrArg (fun a : ℝ => a - VariableGaugeMean.meanPressure G.gauge.radial.exponent |
| 729 | G.patch.a G.patch.b (G.gauge.radial.frequency n) G.patch.a_lt_b |
| 730 | (VariableGaugeMean.qLength G.coord) G.gauge.radial.radialDirection (u.gr c n) x) |
| 731 | (congrArg (fun a : ScalarField Point => a n x) hnew) |
| 732 | |
| 733 | theorem physicalSigma_smooth (G : Geometry) (e : ℕ) {f : ScalarField Point} |
| 734 | (hf : SmoothOn G.domain f) |
| 735 | (hs : ∀ n, LocalSignedRequest.MovingSupport G.patch.a G.patch.b G.coord G.region.carrier (f n)) : |
| 736 | SmoothOn G.domain (physicalSigma G e f) := fun n => |
| 737 | LocalSignedRequest.physicalBarSigma_contDiffOn G.region G.patch e (hf n) (hs n) |
| 738 | |
| 739 | theorem physicalSigma_cancels (G : Geometry) (e : ℕ) (he : e = 2 ∨ e = 1) |
| 740 | {f : ScalarField Point} (hf : SmoothOn G.domain f) |
| 741 | (hs : ∀ n, LocalSignedRequest.MovingSupport G.patch.a G.patch.b G.coord G.region.carrier (f n)) |
| 742 | (n : ℕ) {x : Point} (hx : x ∈ G.strip.domain) : |
| 743 | StateMomentBalances.meanBar f n x + G.operators.radialDiv (e : ℝ) (physicalSigma G e f) n x = |
| 744 | removedBump G e f n x := by |
| 745 | have hrad := native_radialDiv_slow_on G.gauge.radial G.epsilon G.fast G.axial G.time G.temporal |
| 746 | G.region.isOpen (physicalSigma_smooth G e hf hs) (e : ℝ) n (G.strip_subset hx) |
| 747 | change G.operators.radialDiv (e : ℝ) (physicalSigma G e f) n x = _ at hrad |
| 748 | rw [hrad] |
| 749 | rcases he with rfl | rfl |
| 750 | · rw [show ((2 : ℕ) : ℝ) = 2 from rfl, |
| 751 | LocalSignedRequest.physicalBarSigma_angular_divergence G.region G.patch (hf n) (hs n) |
| 752 | (G.strip_subset hx) (G.strip_radius_pos hx)] |
| 753 | simp only [StateMomentBalances.meanBar, MeanMomentBounds.liftedTorusAverage, removedBump, |
| 754 | SignedStressPrimitive.physicalAdjusted] |
| 755 | ring |
| 756 | · rw [show ((1 : ℕ) : ℝ) = 1 from by norm_num, |
| 757 | LocalSignedRequest.physicalBarSigma_axial_divergence G.region G.patch (hf n) (hs n) |
| 758 | (G.strip_subset hx) (G.strip_radius_pos hx)] |
| 759 | simp only [StateMomentBalances.meanBar, MeanMomentBounds.liftedTorusAverage, removedBump, |
| 760 | SignedStressPrimitive.physicalAdjusted] |
| 761 | ring |
| 762 | |
| 763 | theorem cross_cancels (G : Geometry) (e : ℕ) (he : e = 2 ∨ e = 1) |
| 764 | {f X : ScalarField Point} (hf : SmoothOn G.domain f) |
| 765 | (hs : ∀ n, LocalSignedRequest.MovingSupport G.patch.a G.patch.b G.coord G.region.carrier (f n)) |
| 766 | (hX : MovingField G X) |
| 767 | (hcross : Agree G.strip.domain (StateMomentBalances.meanBar X) (physicalSigma G e f)) |
| 768 | (n : ℕ) {x : Point} (hx : x ∈ G.strip.domain) : |
| 769 | StateMomentBalances.meanBar f n x + StateMomentBalances.meanBar (G.operators.radialDiv (e : ℝ) X) n x = |
| 770 | removedBump G e f n x := by |
| 771 | rw [meanBar_radialDiv_on G.region.isOpen G.operators rfl |
| 772 | (fun _ _ _ => rfl) hX.smooth hX.periodic (e : ℝ) n (G.strip_subset hx), |
| 773 | radialDiv_congr G.strip.isOpen_domain G.operators (e : ℝ) hcross n hx] |
| 774 | exact physicalSigma_cancels G e he hf hs n hx |
| 775 | |
| 776 | namespace Geometry |
| 777 | |
| 778 | theorem removed_bumps_mem (G : Geometry) (c : Context Point) (u : State Point) {α : ℝ} |
| 779 | (ho : c.operators = G.operators) |
| 780 | (Hθ : GaugeMomentBalances.MovingAngularInputs G.region G.patch.a G.patch.b c u) |
| 781 | (Hz : GaugeMomentBalances.MovingAxialInputs G.region G.patch.a G.patch.b c u) |
| 782 | (hr : MovingField G (u.gr c)) |
| 783 | (hfixed : VariableGaugeMean.reconstructState G.gauge c u = u) |
| 784 | (hmθ : ∀ n z, z ∈ G.region.carrier → radialMoment 2 u.mean.angular n z = 0) |
| 785 | (hmz : ∀ n z, z ∈ G.region.carrier → radialMoment 1 u.mean.axial n z = 0) |
| 786 | (hD : ∀ i : Fin 3, UnweightedClass G.slowStrip α (fun n z => debt c u n z i)) : |
| 787 | MeanClass G.strip (α + 1) (removedBump G 2 (u.thetaResidual c)) ∧ |
| 788 | MeanClass G.strip (α + 1) (removedBump G 1 (u.axialResidual c)) := by |
| 789 | have hP := G.slowClass_lift (hD 0) |
| 790 | have hθ := G.slowClass_lift (hD 1) |
| 791 | have hz := G.slowClass_lift (hD 2) |
| 792 | simp only [debt, Matrix.cons_val_zero, Matrix.cons_val_one, Matrix.cons_val] at hP hθ hz |
| 793 | constructor |
| 794 | · exact GaugeMomentBalances.state_angular_bump_improvedClass G.region G.patch G.left_pos G.right_pos |
| 795 | G.patch.a_pos G.patch.a_lt_b G.gauge.radial G.epsilon G.fast G.slow G.epsilon_pos |
| 796 | G.epsilon_le_one G.slow_ge_one G.axial G.time G.temporal c u α ho Hθ hmθ hθ |
| 797 | · apply GaugeMomentBalances.state_axial_bump_improvedClass G.region G.patch G.left_pos G.right_pos |
| 798 | G.gauge G.inner_pos G.exponent_pos G.length_eq G.epsilon G.fast G.slow G.epsilon_pos |
| 799 | G.epsilon_le_one G.slow_ge_one G.axial G.time G.temporal c u α ho |
| 800 | · simpa only [G.inner_eq, G.outer_eq] using Hz |
| 801 | · simp only [G.inner_eq, G.outer_eq] |
| 802 | exact hr |
| 803 | · exact hfixed |
| 804 | · exact hmz |
| 805 | · exact hP |
| 806 | · exact hz |
| 807 | |
| 808 | end Geometry |
| 809 | |
| 810 | /-! ## The literal averaged residual after the update -/ |
| 811 | |
| 812 | noncomputable def thetaRemainderField (G : Geometry) (S E : Tensor Point) : ScalarField Point := |
| 813 | thetaCovarianceChange G.operators E + G.operators.dz (S 2 1) |
| 814 | |
| 815 | noncomputable def axialRemainderField (G : Geometry) (S E : Tensor Point) (p : ScalarField Point) : |
| 816 | ScalarField Point := axialCovarianceChange G.operators E + G.operators.dz (S 2 2) + G.operators.dz p |
| 817 | |
| 818 | /-- These hypotheses concern local regularity and the actual incoming |
| 819 | state. None is a bound or a cancellation assertion about the updated residual. -/ |
| 820 | structure LocalData (G : Geometry) (c : Context Point) (u : State Point) |
| 821 | (w : Oscillation Point) (q : OscillatoryScalar Point) (gaussian : Oscillation Point) : Prop where |
| 822 | operators_eq : c.operators = G.operators |
| 823 | base : SmoothTriple G.strip.domain c.base |
| 824 | mean : SmoothTriple G.strip.domain u.mean |
| 825 | covariance : ∀ i j, SmoothOn G.strip.domain (u.covariance i j) |
| 826 | theta : SmoothOn G.domain (u.thetaResidual c) |
| 827 | axial : SmoothOn G.domain (u.axialResidual c) |
| 828 | theta_support : ∀ n, LocalSignedRequest.MovingSupport G.patch.a G.patch.b G.coord |
| 829 | G.region.carrier (u.thetaResidual c n) |
| 830 | axial_support : ∀ n, LocalSignedRequest.MovingSupport G.patch.a G.patch.b G.coord |
| 831 | G.region.carrier (u.axialResidual c n) |
| 832 | angular_flux : GaugeMomentBalances.MovingAngularInputs G.region G.patch.a G.patch.b c u |
| 833 | axial_flux : GaugeMomentBalances.MovingAxialInputs G.region G.patch.a G.patch.b c u |
| 834 | source : MovingField G (u.gr c) |
| 835 | updated_source : MovingField G ((waveStage G.gauge c u w q gaussian).gr c) |
| 836 | reconstructed : VariableGaugeMean.reconstructState G.gauge c u = u |
| 837 | angular_mass : ∀ n z, z ∈ G.region.carrier → radialMoment 2 u.mean.angular n z = 0 |
| 838 | axial_mass : ∀ n z, z ∈ G.region.carrier → radialMoment 1 u.mean.axial n z = 0 |
| 839 | |
| 840 | namespace LocalData |
| 841 | |
| 842 | variable {G : Geometry} {c : Context Point} {u : State Point} {w : Oscillation Point} |
| 843 | {q : OscillatoryScalar Point} {gaussian : Oscillation Point} |
| 844 | (H : LocalData G c u w q gaussian) |
| 845 | |
| 846 | include H |
| 847 | |
| 848 | theorem pressure_smooth : SmoothOn G.domain u.pressure := by |
| 849 | have hh := GaugeMomentBalances.pressureRecipe_movingField G.region G.gauge G.inner_pos |
| 850 | G.exponent_pos G.length_eq c u |
| 851 | (by simp only [G.inner_eq, G.outer_eq]; exact H.source) |
| 852 | have he := hh.smooth |
| 853 | simp only [GaugeMomentBalances.pressureRecipe, H.reconstructed] at he |
| 854 | exact he |
| 855 | |
| 856 | theorem pressureChange_smooth : SmoothOn G.domain (pressureChange G.gauge c u w q gaussian) := by |
| 857 | have hh := GaugeMomentBalances.pressureRecipe_movingField G.region G.gauge G.inner_pos |
| 858 | G.exponent_pos G.length_eq c (waveStage G.gauge c u w q gaussian) |
| 859 | (by simp only [G.inner_eq, G.outer_eq]; exact H.updated_source) |
| 860 | have hn : SmoothOn G.domain (waveStage G.gauge c u w q gaussian).pressure := by |
| 861 | have he := hh.smooth |
| 862 | simp only [GaugeMomentBalances.pressureRecipe, waveStage, |
| 863 | GaugeMomentBalances.reconstructState_idempotent] at he ⊢ |
| 864 | exact he |
| 865 | exact hn.sub H.pressure_smooth |
| 866 | |
| 867 | theorem pressureChange_mem {α κ : ℝ} (ho : OperatorBounds G.strip G.operators κ) |
| 868 | (hX : TensorClass G.strip α (covarianceIncrement u.oscillation w)) : |
| 869 | MeanClass G.strip (α - κ) (pressureChange G.gauge c u w q gaussian) := by |
| 870 | apply SignedMeanGain.pressureChange_mem G c u w q gaussian H.reconstructed H.source H.updated_source |
| 871 | apply class_congr (radialCovarianceChange_mem ho hX) |
| 872 | simpa only [H.operators_eq] using waveStage_gr_change G.strip.isOpen_domain |
| 873 | G.gauge c u w q gaussian H.base H.mean H.covariance (fun i j => (hX i j).smooth) |
| 874 | |
| 875 | theorem theta_split {S E : Tensor Point} |
| 876 | (hS : ∀ i j, SmoothOn G.strip.domain (S i j)) |
| 877 | (hE : ∀ i j, SmoothOn G.strip.domain (E i j)) |
| 878 | (hX : covarianceIncrement u.oscillation w = S + E) : |
| 879 | Agree G.strip.domain ((waveStage G.gauge c u w q gaussian).thetaResidual c) |
| 880 | (u.thetaResidual c + G.operators.radialDiv 2 (S 0 1) + thetaRemainderField G S E) := by |
| 881 | have hXs : ∀ i j, SmoothOn G.strip.domain (covarianceIncrement u.oscillation w i j) := by |
| 882 | rw [hX] |
| 883 | exact fun i j => (hS i j).add (hE i j) |
| 884 | intro n x hx |
| 885 | have hh := waveStage_theta_change G.strip.isOpen_domain G.gauge c u w q gaussian |
| 886 | H.base H.mean H.covariance hXs n hx |
| 887 | rw [H.operators_eq, hX] at hh |
| 888 | have hr := G.operators.radialDiv_add G.strip.isOpen_domain 2 (hS 0 1) (hE 0 1) n hx |
| 889 | have hz := G.operators.dz_add G.strip.isOpen_domain (hS 2 1) (hE 2 1) n hx |
| 890 | simp only [thetaCovarianceChange, Pi.sub_apply, Pi.add_apply] at hh hr hz |
| 891 | simp only [thetaRemainderField, thetaCovarianceChange, Pi.add_apply] |
| 892 | linarith |
| 893 | |
| 894 | theorem axial_split {S E : Tensor Point} |
| 895 | (hS : ∀ i j, SmoothOn G.strip.domain (S i j)) |
| 896 | (hE : ∀ i j, SmoothOn G.strip.domain (E i j)) |
| 897 | (hX : covarianceIncrement u.oscillation w = S + E) : |
| 898 | Agree G.strip.domain ((waveStage G.gauge c u w q gaussian).axialResidual c) |
| 899 | (u.axialResidual c + G.operators.radialDiv 1 (S 0 2) + |
| 900 | axialRemainderField G S E (pressureChange G.gauge c u w q gaussian)) := by |
| 901 | have hXs : ∀ i j, SmoothOn G.strip.domain (covarianceIncrement u.oscillation w i j) := by |
| 902 | rw [hX] |
| 903 | exact fun i j => (hS i j).add (hE i j) |
| 904 | intro n x hx |
| 905 | have hh := waveStage_axial_change G.strip.isOpen_domain G.gauge c u w q gaussian |
| 906 | H.base H.mean H.covariance hXs (fun n => (H.pressure_smooth n).mono G.strip_subset) |
| 907 | (fun n => (H.pressureChange_smooth n).mono G.strip_subset) n hx |
| 908 | rw [H.operators_eq, hX] at hh |
| 909 | have hr := G.operators.radialDiv_add G.strip.isOpen_domain 1 (hS 0 2) (hE 0 2) n hx |
| 910 | have hz := G.operators.dz_add G.strip.isOpen_domain (hS 2 2) (hE 2 2) n hx |
| 911 | simp only [axialCovarianceChange, Pi.sub_apply, Pi.add_apply] at hh hr hz |
| 912 | simp only [axialRemainderField, axialCovarianceChange, Pi.add_apply] |
| 913 | linarith |
| 914 | |
| 915 | end LocalData |
| 916 | |
| 917 | /-- A direct identity for the torus average: the radial primary cross |
| 918 | cancels the adjusted old residual. The axial cross flux and pressure change |
| 919 | are displayed explicitly in the remaining term. -/ |
| 920 | theorem averaged_residual_decomposition (G : Geometry) (c : Context Point) (u : State Point) |
| 921 | (w : Oscillation Point) (q : OscillatoryScalar Point) (gaussian : Oscillation Point) |
| 922 | (H : LocalData G c u w q gaussian) (S E : Tensor Point) |
| 923 | (hS : ∀ i j, MovingField G (S i j)) (hE : ∀ i j, MovingField G (E i j)) |
| 924 | (hX : covarianceIncrement u.oscillation w = S + E) |
| 925 | (hcrossθ : Agree G.strip.domain (StateMomentBalances.meanBar (S 0 1)) |
| 926 | (physicalSigma G 2 (u.thetaResidual c))) |
| 927 | (hcrossz : Agree G.strip.domain (StateMomentBalances.meanBar (S 0 2)) |
| 928 | (physicalSigma G 1 (u.axialResidual c))) : |
| 929 | Agree G.strip.domain (StateMomentBalances.meanBar ((waveStage G.gauge c u w q gaussian).thetaResidual c)) |
| 930 | (removedBump G 2 (u.thetaResidual c) + StateMomentBalances.meanBar (thetaRemainderField G S E)) ∧ |
| 931 | Agree G.strip.domain (StateMomentBalances.meanBar ((waveStage G.gauge c u w q gaussian).axialResidual c)) |
| 932 | (removedBump G 1 (u.axialResidual c) + |
| 933 | StateMomentBalances.meanBar (axialRemainderField G S E (pressureChange G.gauge c u w q gaussian))) := by |
| 934 | have hSs := fun i j n => ((hS i j).smooth n).mono G.strip_subset |
| 935 | have hEs := fun i j n => ((hE i j).smooth n).mono G.strip_subset |
| 936 | have hRestθ : SmoothOn G.domain (thetaRemainderField G S E) := |
| 937 | (MovingField.covariance_flux_smooth hE).1.add (SmoothOn.dz (hS 2 1).smooth G.domain_open G.operators) |
| 938 | have hRestz : SmoothOn G.domain (axialRemainderField G S E (pressureChange G.gauge c u w q gaussian)) := |
| 939 | ((MovingField.covariance_flux_smooth hE).2.1.add |
| 940 | (SmoothOn.dz (hS 2 2).smooth G.domain_open G.operators)).add |
| 941 | (H.pressureChange_smooth.dz G.domain_open G.operators) |
| 942 | obtain ⟨a, b, _, ha, _, _, _, hl, hr, _⟩ := |
| 943 | VariableGaugeMean.qLength_reference_bounds G.region G.patch.a_pos G.patch.a_lt_b |
| 944 | have hlocal (i j) : LocalRankDefect.LocalShell a b G.region.carrier (S i j) := |
| 945 | ⟨(hS i j).smooth, ((hS i j).containing hl hr).supported⟩ |
| 946 | constructor |
| 947 | · intro n x hx |
| 948 | have hbar := G.average_congr (H.theta_split hSs hEs hX) n hx |
| 949 | have hrad := ((hlocal 0 1).radialDiv ha G.region.isOpen G.local_operators 2).smooth |
| 950 | have hbump := cross_cancels G 2 (Or.inl rfl) H.theta H.theta_support (hS 0 1) hcrossθ n hx |
| 951 | rw [meanBar_add_on (H.theta.add hrad) hRestθ n (G.strip_subset hx), |
| 952 | meanBar_add_on H.theta hrad n (G.strip_subset hx)] at hbar |
| 953 | norm_num only [Nat.cast_ofNat] at hbump |
| 954 | simp only [Pi.add_apply] at hbar hbump ⊢ |
| 955 | linarith |
| 956 | · intro n x hx |
| 957 | have hbar := G.average_congr (H.axial_split hSs hEs hX) n hx |
| 958 | have hrad := ((hlocal 0 2).radialDiv ha G.region.isOpen G.local_operators 1).smooth |
| 959 | have hbump := cross_cancels G 1 (Or.inr rfl) H.axial H.axial_support (hS 0 2) hcrossz n hx |
| 960 | rw [meanBar_add_on (H.axial.add hrad) hRestz n (G.strip_subset hx), |
| 961 | meanBar_add_on H.axial hrad n (G.strip_subset hx)] at hbar |
| 962 | norm_num only [Nat.cast_ofNat] at hbump |
| 963 | simp only [Pi.add_apply] at hbar hbump ⊢ |
| 964 | linarith |
| 965 | |
| 966 | /-! ## Quantitative mean gain -/ |
| 967 | |
| 968 | /-- This intermediate estimate isolates the two exact cross identities. |
| 969 | The native theorem below discharges them by the signed inverse construction. -/ |
| 970 | theorem signed_mean_gain_of_cross |
| 971 | (G : Geometry) (c : Context Point) (u : State Point) |
| 972 | {ι : Type} {P : ι → ℕ → Point → ℝ} {σ κ : ℝ} |
| 973 | (hσ : 1 / 5 ≤ σ) (hκ : 0 ≤ κ) (hκsmall : κ ≤ 1 / 100000) |
| 974 | (f : LabelSumBounds.SignedFamily G.strip P (1 / 2) (17 / 25) |
| 975 | (1 / 2 + σ - κ) (1 + σ - 2 * κ)) (a : Assembly f) |
| 976 | (q : OscillatoryScalar Point) (gaussian : Oscillation Point) |
| 977 | (hold : u.oscillation = oldField f a) |
| 978 | (H : LocalData G c u (tangentField f a + curlField f a) q gaussian) |
| 979 | (ho : OperatorBounds G.strip G.operators κ) |
| 980 | (hX : ∀ i j, MovingField G (incrementTensor f a i j)) |
| 981 | (hS : ∀ i j, MovingField G (crossTensor f a i j)) |
| 982 | (hθ : MeanClass G.strip (1 + σ - κ) (u.thetaResidual c)) |
| 983 | (hz : MeanClass G.strip (1 + σ - κ) (u.axialResidual c)) |
| 984 | (hd : DefectBounds G.slowStrip (σ - κ) c u) |
| 985 | (hcrossθ : Agree G.strip.domain (StateMomentBalances.meanBar (crossTensor f a 0 1)) |
| 986 | (physicalSigma G 2 (u.thetaResidual c))) |
| 987 | (hcrossz : Agree G.strip.domain (StateMomentBalances.meanBar (crossTensor f a 0 2)) |
| 988 | (physicalSigma G 1 (u.axialResidual c))) : |
| 989 | let v := waveStage G.gauge c u (tangentField f a + curlField f a) q gaussian |
| 990 | MeanClass G.strip (1 + σ - 2 * κ) (v.thetaResidual c) ∧ |
| 991 | MeanClass G.strip (1 + σ - 2 * κ) (v.axialResidual c) ∧ |
| 992 | MeanClass G.strip (1 + σ + 17 / 100) (StateMomentBalances.meanBar (v.thetaResidual c)) ∧ |
| 993 | MeanClass G.strip (1 + σ + 17 / 100) (StateMomentBalances.meanBar (v.axialResidual c)) := by |
| 994 | dsimp only |
| 995 | obtain ⟨hXi, hEi⟩ := signed_tensor_bounds hσ hκsmall f a |
| 996 | have hEeq : remainderTensor f a = incrementTensor f a - crossTensor f a := by |
| 997 | rw [incrementTensor_split] |
| 998 | abel |
| 999 | have hSeq : crossTensor f a = incrementTensor f a - remainderTensor f a := by |
| 1000 | rw [incrementTensor_split] |
| 1001 | abel |
| 1002 | have hEc : ∀ i j, MovingField G (remainderTensor f a i j) := by |
| 1003 | intro i j |
| 1004 | rw [hEeq] |
| 1005 | exact (hX i j).sub (hS i j) |
| 1006 | have hSi : TensorClass G.strip (1 + σ - κ) (crossTensor f a) := by |
| 1007 | intro i j |
| 1008 | rw [hSeq] |
| 1009 | exact Class.sub (hXi i j) ((hEi i j).mono_exponent (by linarith)) |
| 1010 | have hactual : covarianceIncrement u.oscillation (tangentField f a + curlField f a) = |
| 1011 | crossTensor f a + remainderTensor f a := by |
| 1012 | rw [hold] |
| 1013 | exact incrementTensor_split f a |
| 1014 | have hactualClass : TensorClass G.strip (1 + σ - κ) |
| 1015 | (covarianceIncrement u.oscillation (tangentField f a + curlField f a)) := by |
| 1016 | simp only [hold] |
| 1017 | exact hXi |
| 1018 | have hp : MeanClass G.strip (1 + σ - 2 * κ) |
| 1019 | (pressureChange G.gauge c u (tangentField f a + curlField f a) q gaussian) := by |
| 1020 | convert! H.pressureChange_mem ho hactualClass using 1 |
| 1021 | ring |
| 1022 | have htchange : MeanClass G.strip (1 + σ - 2 * κ) |
| 1023 | ((waveStage G.gauge c u (tangentField f a + curlField f a) q gaussian).thetaResidual c - |
| 1024 | u.thetaResidual c) := by |
| 1025 | have hh := thetaCovarianceChange_mem ho hactualClass |
| 1026 | have heq := waveStage_theta_change G.strip.isOpen_domain G.gauge c u |
| 1027 | (tangentField f a + curlField f a) q gaussian H.base H.mean H.covariance |
| 1028 | (fun i j => (hactualClass i j).smooth) |
| 1029 | rw [H.operators_eq] at heq |
| 1030 | convert! class_congr hh heq using 1 |
| 1031 | ring |
| 1032 | have hzchange : MeanClass G.strip (1 + σ - 2 * κ) |
| 1033 | ((waveStage G.gauge c u (tangentField f a + curlField f a) q gaussian).axialResidual c - |
| 1034 | u.axialResidual c) := by |
| 1035 | have hh : MeanClass G.strip (1 + σ - 2 * κ) |
| 1036 | (axialCovarianceChange G.operators |
| 1037 | (covarianceIncrement u.oscillation (tangentField f a + curlField f a))) := by |
| 1038 | convert! axialCovarianceChange_mem ho hactualClass using 1 |
| 1039 | ring |
| 1040 | have heq := waveStage_axial_change G.strip.isOpen_domain G.gauge c u |
| 1041 | (tangentField f a + curlField f a) q gaussian H.base H.mean H.covariance |
| 1042 | (fun i j => (hactualClass i j).smooth) |
| 1043 | (fun n => (H.pressure_smooth n).mono G.strip_subset) hp.smooth |
| 1044 | rw [H.operators_eq] at heq |
| 1045 | exact class_congr (hh.add ((ho.dz hp).mono_exponent (by linarith))) heq |
| 1046 | have hRestθ : MeanClass G.strip (1 + σ + 17 / 100) |
| 1047 | (thetaRemainderField G (crossTensor f a) (remainderTensor f a)) := by |
| 1048 | apply MemClass.add |
| 1049 | · convert! thetaCovarianceChange_mem ho hEi using 1 |
| 1050 | ring |
| 1051 | · exact (ho.dz (hSi 2 1)).mono_exponent (by linarith) |
| 1052 | have hRestz : MeanClass G.strip (1 + σ + 17 / 100) |
| 1053 | (axialRemainderField G (crossTensor f a) (remainderTensor f a) |
| 1054 | (pressureChange G.gauge c u (tangentField f a + curlField f a) q gaussian)) := by |
| 1055 | apply MemClass.add |
| 1056 | · apply MemClass.add |
| 1057 | · convert! axialCovarianceChange_mem ho hEi using 1 |
| 1058 | ring |
| 1059 | · exact (ho.dz (hSi 2 2)).mono_exponent (by linarith) |
| 1060 | · exact (ho.dz hp).mono_exponent (by linarith) |
| 1061 | have hRestθs : SmoothOn G.domain (thetaRemainderField G (crossTensor f a) (remainderTensor f a)) := |
| 1062 | (MovingField.covariance_flux_smooth hEc).1.add |
| 1063 | (SmoothOn.dz (hS 2 1).smooth G.domain_open G.operators) |
| 1064 | have hRestzs : SmoothOn G.domain (axialRemainderField G (crossTensor f a) (remainderTensor f a) |
| 1065 | (pressureChange G.gauge c u (tangentField f a + curlField f a) q gaussian)) := |
| 1066 | ((MovingField.covariance_flux_smooth hEc).2.1.add |
| 1067 | (SmoothOn.dz (hS 2 2).smooth G.domain_open G.operators)).add |
| 1068 | (H.pressureChange_smooth.dz G.domain_open G.operators) |
| 1069 | have hdebt : ∀ i : Fin 3, UnweightedClass G.slowStrip (1 + σ - κ) (fun n z => debt c u n z i) := by |
| 1070 | intro i |
| 1071 | convert! hd i using 1 |
| 1072 | ring |
| 1073 | obtain ⟨hbθ, hbz⟩ := G.removed_bumps_mem c u H.operators_eq H.angular_flux H.axial_flux |
| 1074 | H.source H.reconstructed H.angular_mass H.axial_mass hdebt |
| 1075 | have hbar := averaged_residual_decomposition G c u (tangentField f a + curlField f a) |
| 1076 | q gaussian H (crossTensor f a) (remainderTensor f a) hS hEc hactual hcrossθ hcrossz |
| 1077 | refine ⟨?_, ?_, ?_, ?_⟩ |
| 1078 | · apply class_congr ((hθ.mono_exponent (by linarith)).add htchange) |
| 1079 | intro n x _ |
| 1080 | simp only [Pi.sub_apply] |
| 1081 | ring |
| 1082 | · apply class_congr ((hz.mono_exponent (by linarith)).add hzchange) |
| 1083 | intro n x _ |
| 1084 | simp only [Pi.sub_apply] |
| 1085 | ring |
| 1086 | · exact class_congr ((hbθ.mono_exponent (by linarith)).add (G.average_mem hRestθs hRestθ)) hbar.1 |
| 1087 | · exact class_congr ((hbz.mono_exponent (by linarith)).add (G.average_mem hRestzs hRestz)) hbar.2 |
| 1088 | |
| 1089 | /-! ## A shared native construction, before any signed output is known -/ |
| 1090 | |
| 1091 | abbrev NativeIndex := PartitionedCovariance.UnsignedLabel × Fin 2 |
| 1092 | |
| 1093 | /-- All matches concern the common matrix, unit fundamental, mask and |
| 1094 | carrier. The signed coefficient is constructed below from the measured |
| 1095 | physical request, not included as a realization hypothesis. -/ |
| 1096 | structure NativeData (G : Geometry) where |
| 1097 | width : ℝ |
| 1098 | exponent : ℝ |
| 1099 | vr : Plane |
| 1100 | vt : Plane |
| 1101 | slots : PartitionedCovariance.SlotSystem width exponent vr vt |
| 1102 | determinant : vr.1 * vt.2 - vr.2 * vt.1 ≠ 0 |
| 1103 | index : ℕ → ℕ |
| 1104 | index_pos : ∀ n, 1 ≤ index n |
| 1105 | pairs : (n : ℕ) → (ℝ × Plane) → (l : PartitionedCovariance.UnsignedLabel) → |
| 1106 | PartitionedCovariance.PairData slots (PartitionedCovariance.tailLabel (index n) l) |
| 1107 | position : ℕ → (ℝ × Plane) → SlotColoring.Position |
| 1108 | modelTarget : ℕ → (ℝ × Plane) → SignedWaveUpdate.Vec2 |
| 1109 | matrix : PartitionedCovariance.UnsignedLabel → ℕ → Point → SignedWaveUpdate.Mat2 |
| 1110 | target : PartitionedCovariance.UnsignedLabel → ℕ → Point → SignedWaveUpdate.Vec2 |
| 1111 | mask : PartitionedCovariance.UnsignedLabel → ℕ → Point → ℝ |
| 1112 | unit : NativeIndex → ℕ → Point → SignedWaveUpdate.Space |
| 1113 | frequency : NativeIndex → ℕ → ℝ |
| 1114 | phase : NativeIndex → ℕ → Point → ℝ |
| 1115 | angular : NativeIndex → ℕ → ℤ |
| 1116 | matrix_match : ∀ l n x, x ∈ G.strip.domain → |
| 1117 | matrix l n x = (pairs n (x.1, x.2.1) l).matrix |
| 1118 | target_match : ∀ l n x, x ∈ G.strip.domain → target l n x = |
| 1119 | PartitionedCovariance.chartTarget exponent (SimilarityCoordinates.coordinateQ G.coord x.2.1) |
| 1120 | (index n) (modelTarget n (x.1, x.2.1)) l |
| 1121 | mask_match : ∀ l n x, x ∈ G.strip.domain → mask l n x = |
| 1122 | PartitionedCovariance.mask width (PartitionedCovariance.tailLabel (index n) l) |
| 1123 | (SimilarityCoordinates.coordinateQ G.coord x.2.1) (position n (x.1, x.2.1)) |
| 1124 | unit_match : ∀ l n x, x ∈ G.strip.domain → unit l n x = |
| 1125 | SignedWaveUpdate.nativeUnit (pairs n (x.1, x.2.1) l.1) determinant l.2 x.2.2 |
| 1126 | phase_match : ∀ l n x, x ∈ G.strip.domain → frequency l n * phase l n x = |
| 1127 | (pairs n (x.1, x.2.1) l.1).phases l.2 x.2.2 |
| 1128 | angular_match : ∀ l n x, x ∈ G.strip.domain → angular l n = (pairs n (x.1, x.2.1) l.1).modes l.2 |
| 1129 | tail_bound : ∀ n x, x ∈ G.strip.domain → |
| 1130 | SimilarityCoordinates.coordinateQ G.coord x.2.1 ≤ ChartScales.Q (index n) |
| 1131 | cone : ∀ n x, x ∈ G.strip.domain → ∀ l, |
| 1132 | PartitionedCovariance.mask width (PartitionedCovariance.tailLabel (index n) l) |
| 1133 | (SimilarityCoordinates.coordinateQ G.coord x.2.1) (position n (x.1, x.2.1)) ≠ 0 → |
| 1134 | SmoothCovariance.StrictCone (pairs n (x.1, x.2.1) l).matrix |
| 1135 | (PartitionedCovariance.chartTarget exponent (SimilarityCoordinates.coordinateQ G.coord x.2.1) |
| 1136 | (index n) (modelTarget n (x.1, x.2.1)) l) |
| 1137 | labels : ℕ → Finset NativeIndex |
| 1138 | coverage : ∀ n x, x ∈ G.strip.domain → ∀ l, l ∉ labels n → |
| 1139 | PartitionedCovariance.mask width (PartitionedCovariance.tailLabel (index n) l.1) |
| 1140 | (SimilarityCoordinates.coordinateQ G.coord x.2.1) (position n (x.1, x.2.1)) = 0 |
| 1141 | |
| 1142 | namespace NativeData |
| 1143 | |
| 1144 | variable {G : Geometry} (B : NativeData G) |
| 1145 | |
| 1146 | noncomputable def block (A : PartitionedCovariance.UnsignedLabel → ℕ → Point → SignedWaveUpdate.Vec2) |
| 1147 | (l : NativeIndex) : HarmonicBlock Point := |
| 1148 | SignedWaveUpdate.coefficientBlock (B.frequency l) (B.phase l) (B.angular l) |
| 1149 | (fun n x => CurlClassBounds.complexify |
| 1150 | ((PartitionedCovariance.physicalOuter B.exponent (B.index n) l.1 * |
| 1151 | (Real.sqrt (PartitionedCovariance.physicalViscosity B.exponent (B.index n) l.1) * |
| 1152 | A l.1 n x l.2 * B.mask l.1 n x)) • B.unit l n x)) 0 |
| 1153 | |
| 1154 | noncomputable def primaryBlocks : NativeIndex → HarmonicBlock Point := |
| 1155 | B.block (fun l n x => SmoothCovariance.amplitudes (B.matrix l n x) (B.target l n x)) |
| 1156 | |
| 1157 | noncomputable def signedBlocks (c : Context Point) (u : State Point) : NativeIndex → HarmonicBlock Point := |
| 1158 | B.block (fun l n x => SignedCovariance.increment (B.matrix l n x) (B.target l n x) |
| 1159 | (SignedCovariance.chartStress B.exponent (B.index n) |
| 1160 | (LocalSignedRequest.requestedStress G.patch G.coord c u n x) l)) |
| 1161 | |
| 1162 | theorem block_realization |
| 1163 | (A : PartitionedCovariance.UnsignedLabel → ℕ → Point → SignedWaveUpdate.Vec2) |
| 1164 | (l : NativeIndex) (n : ℕ) {x : Point} (hx : x ∈ G.strip.domain) (θ : ℝ) (i : Fin 3) : |
| 1165 | (B.block A l).oscillation n (x, θ) i = |
| 1166 | (SignedWaveUpdate.nativeTangentBlock (B.pairs n (x.1, x.2.1) l.1) B.determinant |
| 1167 | (PartitionedCovariance.physicalOuter B.exponent (B.index n) l.1) |
| 1168 | (PartitionedCovariance.physicalViscosity B.exponent (B.index n) l.1) |
| 1169 | (A l.1 n x) (SimilarityCoordinates.coordinateQ G.coord x.2.1) |
| 1170 | (B.position n (x.1, x.2.1)) l.2).oscillation 0 (x.2.2, θ) i := by |
| 1171 | simp only [block, SignedWaveUpdate.nativeTangentBlock, SignedWaveUpdate.coefficientBlock_velocity] |
| 1172 | rw [B.unit_match l n x hx, B.mask_match l.1 n x hx, B.phase_match l n x hx, |
| 1173 | B.angular_match l n x hx] |
| 1174 | simp only [one_mul] |
| 1175 | |
| 1176 | theorem primary_realization (l : NativeIndex) (n : ℕ) {x : Point} (hx : x ∈ G.strip.domain) |
| 1177 | (θ : ℝ) (i : Fin 3) : |
| 1178 | (B.primaryBlocks l).oscillation n (x, θ) i = |
| 1179 | (SignedWaveUpdate.nativeTangentBlock (B.pairs n (x.1, x.2.1) l.1) B.determinant |
| 1180 | (PartitionedCovariance.physicalOuter B.exponent (B.index n) l.1) |
| 1181 | (PartitionedCovariance.physicalViscosity B.exponent (B.index n) l.1) |
| 1182 | (SmoothCovariance.amplitudes (B.pairs n (x.1, x.2.1) l.1).matrix |
| 1183 | (PartitionedCovariance.chartTarget B.exponent (SimilarityCoordinates.coordinateQ G.coord x.2.1) |
| 1184 | (B.index n) (B.modelTarget n (x.1, x.2.1)) l.1)) |
| 1185 | (SimilarityCoordinates.coordinateQ G.coord x.2.1) |
| 1186 | (B.position n (x.1, x.2.1)) l.2).oscillation 0 (x.2.2, θ) i := by |
| 1187 | rw [primaryBlocks, B.block_realization _ l n hx θ i, B.matrix_match l.1 n x hx, |
| 1188 | B.target_match l.1 n x hx] |
| 1189 | |
| 1190 | theorem signed_realization (c : Context Point) (u : State Point) |
| 1191 | (l : NativeIndex) (n : ℕ) {x : Point} (hx : x ∈ G.strip.domain) (θ : ℝ) (i : Fin 3) : |
| 1192 | (B.signedBlocks c u l).oscillation n (x, θ) i = |
| 1193 | (SignedWaveUpdate.nativeTangentBlock (B.pairs n (x.1, x.2.1) l.1) B.determinant |
| 1194 | (PartitionedCovariance.physicalOuter B.exponent (B.index n) l.1) |
| 1195 | (PartitionedCovariance.physicalViscosity B.exponent (B.index n) l.1) |
| 1196 | (SignedCovariance.increment (B.pairs n (x.1, x.2.1) l.1).matrix |
| 1197 | (PartitionedCovariance.chartTarget B.exponent (SimilarityCoordinates.coordinateQ G.coord x.2.1) |
| 1198 | (B.index n) (B.modelTarget n (x.1, x.2.1)) l.1) |
| 1199 | (SignedCovariance.chartStress B.exponent (B.index n) |
| 1200 | (LocalSignedRequest.requestedStress G.patch G.coord c u n x) l.1)) |
| 1201 | (SimilarityCoordinates.coordinateQ G.coord x.2.1) |
| 1202 | (B.position n (x.1, x.2.1)) l.2).oscillation 0 (x.2.2, θ) i := by |
| 1203 | rw [signedBlocks, B.block_realization _ l n hx θ i, B.matrix_match l.1 n x hx, |
| 1204 | B.target_match l.1 n x hx] |
| 1205 | |
| 1206 | end NativeData |
| 1207 | |
| 1208 | theorem meanBar_symmetricCovariance (p t : Oscillation Point) |
| 1209 | (hp : LabelSumBounds.AngularContinuous p) (ht : LabelSumBounds.AngularContinuous t) |
| 1210 | (i j : Fin 3) (n : ℕ) (x : Point) : |
| 1211 | StateMomentBalances.meanBar (LabelSumBounds.symmetricCovariance p t i j) n x = |
| 1212 | PartitionedCovariance.doubleAverage (fun Y θ => |
| 1213 | p n ((x.1, (x.2.1, Y)), θ) i * t n ((x.1, (x.2.1, Y)), θ) j + |
| 1214 | t n ((x.1, (x.2.1, Y)), θ) i * p n ((x.1, (x.2.1, Y)), θ) j) := by |
| 1215 | change PressureStream.torusAverage |
| 1216 | (fun z => bilinearCovariance p t i j n z + bilinearCovariance t p i j n z) (x.1, x.2.1) = |
| 1217 | PressureStream.torusAverage (fun z => SmoothLoop.angularMean (fun θ => |
| 1218 | p n (z, θ) i * t n (z, θ) j + t n (z, θ) i * p n (z, θ) j)) (x.1, x.2.1) |
| 1219 | apply PressureStream.torusAverage_congr_slice |
| 1220 | intro Y |
| 1221 | simp only [ bilinearCovariance, |
| 1222 | angularAverage, SmoothLoop.angularMean] |
| 1223 | rw [intervalIntegral.integral_add (((hp n _ i).fun_mul (ht n _ j)).intervalIntegrable _ _) |
| 1224 | (((ht n _ i).fun_mul (hp n _ j)).intervalIntegrable _ _), add_div] |
| 1225 | |
| 1226 | theorem NativeData.requested_cross {G : Geometry} (B : NativeData G) |
| 1227 | (c : Context Point) (u : State Point) (i : Fin 2) : |
| 1228 | Agree G.strip.domain |
| 1229 | (StateMomentBalances.meanBar (LabelSumBounds.symmetricCovariance |
| 1230 | (LabelSumBounds.fieldSum B.labels (fun l => (B.primaryBlocks l).oscillation)) |
| 1231 | (LabelSumBounds.fieldSum B.labels (fun l => (B.signedBlocks c u l).oscillation)) 0 i.succ)) |
| 1232 | (fun n x => LocalSignedRequest.requestedStress G.patch G.coord c u n x i) := by |
| 1233 | intro n x hx |
| 1234 | rw [meanBar_symmetricCovariance _ _ |
| 1235 | (LabelSumBounds.fieldSum_angularContinuous _ _ (fun _ => LabelSumBounds.block_angularContinuous _)) |
| 1236 | (LabelSumBounds.fieldSum_angularContinuous _ _ (fun _ => LabelSumBounds.block_angularContinuous _))] |
| 1237 | have hp (Y : Plane) (θ : ℝ) (j : Fin 3) : |
| 1238 | LabelSumBounds.fieldSum B.labels (fun l => (B.primaryBlocks l).oscillation) |
| 1239 | n ((x.1, (x.2.1, Y)), θ) j = |
| 1240 | SignedWaveUpdate.nativeAssembly (B.pairs n (x.1, x.2.1)) B.determinant |
| 1241 | (PartitionedCovariance.physicalOuter B.exponent (B.index n)) |
| 1242 | (PartitionedCovariance.physicalViscosity B.exponent (B.index n)) |
| 1243 | (fun l => SmoothCovariance.amplitudes (B.pairs n (x.1, x.2.1) l).matrix |
| 1244 | (PartitionedCovariance.chartTarget B.exponent (SimilarityCoordinates.coordinateQ G.coord x.2.1) |
| 1245 | (B.index n) (B.modelTarget n (x.1, x.2.1)) l)) |
| 1246 | (SimilarityCoordinates.coordinateQ G.coord x.2.1) (B.position n (x.1, x.2.1)) Y θ j := by |
| 1247 | rw [nativeAssembly_eq_finite _ _ _ _ _ _ _ (B.labels n) (B.coverage n x hx)] |
| 1248 | apply Finset.sum_congr rfl |
| 1249 | intro l _ |
| 1250 | exact B.primary_realization l n (G.strip_fiber hx Y) θ j |
| 1251 | have ht (Y : Plane) (θ : ℝ) (j : Fin 3) : |
| 1252 | LabelSumBounds.fieldSum B.labels (fun l => (B.signedBlocks c u l).oscillation) |
| 1253 | n ((x.1, (x.2.1, Y)), θ) j = |
| 1254 | SignedWaveUpdate.nativeAssembly (B.pairs n (x.1, x.2.1)) B.determinant |
| 1255 | (PartitionedCovariance.physicalOuter B.exponent (B.index n)) |
| 1256 | (PartitionedCovariance.physicalViscosity B.exponent (B.index n)) |
| 1257 | (fun l => SignedCovariance.increment (B.pairs n (x.1, x.2.1) l).matrix |
| 1258 | (PartitionedCovariance.chartTarget B.exponent (SimilarityCoordinates.coordinateQ G.coord x.2.1) |
| 1259 | (B.index n) (B.modelTarget n (x.1, x.2.1)) l) |
| 1260 | (SignedCovariance.chartStress B.exponent (B.index n) |
| 1261 | (LocalSignedRequest.requestedStress G.patch G.coord c u n x) l)) |
| 1262 | (SimilarityCoordinates.coordinateQ G.coord x.2.1) (B.position n (x.1, x.2.1)) Y θ j := by |
| 1263 | rw [nativeAssembly_eq_finite _ _ _ _ _ _ _ (B.labels n) (B.coverage n x hx)] |
| 1264 | apply Finset.sum_congr rfl |
| 1265 | intro l _ |
| 1266 | exact B.signed_realization c u l n (G.strip_fiber hx Y) θ j |
| 1267 | simp_rw [hp, ht] |
| 1268 | exact native_physical_cross B.determinant (B.index n) (B.index_pos n) _ |
| 1269 | (G.region.qlo_pos.trans_le (G.region.q_mem x.2.1 (G.strip_subset hx)).1) |
| 1270 | (B.tail_bound n x hx) _ _ _ (B.cone n x hx) i |
| 1271 | |
| 1272 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 1273 | /-- Equality of the stored harmonic coefficients and carrier metadata |
| 1274 | identifies the actual oscillations; the pressure coefficients need not agree. -/ |
| 1275 | theorem oscillation_eq_of_coefficients (a b : HarmonicBlock D) |
| 1276 | (hv : a.velocity = b.velocity) (hc : LabelSumBounds.SameCarrier a b) : |
| 1277 | a.oscillation = b.oscillation := by |
| 1278 | unfold HarmonicBlock.oscillation |
| 1279 | rw [hv, hc.frequency, hc.phase, hc.angular] |
| 1280 | |
| 1281 | /-- This binds the abstract label-estimate package to the explicit common |
| 1282 | native construction by its coefficient definitions. The physical cross is |
| 1283 | a conclusion, with no signed-output realization as a hypothesis. -/ |
| 1284 | theorem native_family_cross |
| 1285 | (G : Geometry) (B : NativeData G) (c : Context Point) (u : State Point) |
| 1286 | {P : NativeIndex → ℕ → Point → ℝ} {α δ β η : ℝ} |
| 1287 | (f : LabelSumBounds.SignedFamily G.strip P α δ β η) (a : Assembly f) |
| 1288 | (hl : a.labels = B.labels) |
| 1289 | (hp : ∀ l, (f.primary l).velocity = (B.primaryBlocks l).velocity) |
| 1290 | (hcp : ∀ l, LabelSumBounds.SameCarrier (f.primary l) (B.primaryBlocks l)) |
| 1291 | (ht : ∀ l, (f.tangent l).velocity = (B.signedBlocks c u l).velocity) |
| 1292 | (hct : ∀ l, LabelSumBounds.SameCarrier (f.tangent l) (B.signedBlocks c u l)) : |
| 1293 | Agree G.strip.domain (StateMomentBalances.meanBar (crossTensor f a 0 1)) |
| 1294 | (physicalSigma G 2 (u.thetaResidual c)) ∧ |
| 1295 | Agree G.strip.domain (StateMomentBalances.meanBar (crossTensor f a 0 2)) |
| 1296 | (physicalSigma G 1 (u.axialResidual c)) := by |
| 1297 | have hprimary : primaryField f a = LabelSumBounds.fieldSum B.labels |
| 1298 | (fun l => (B.primaryBlocks l).oscillation) := by |
| 1299 | unfold primaryField |
| 1300 | rw [hl] |
| 1301 | apply congrArg (LabelSumBounds.fieldSum B.labels) |
| 1302 | funext l |
| 1303 | exact oscillation_eq_of_coefficients _ _ (hp l) (hcp l) |
| 1304 | have htangent : tangentField f a = LabelSumBounds.fieldSum B.labels |
| 1305 | (fun l => (B.signedBlocks c u l).oscillation) := by |
| 1306 | unfold tangentField |
| 1307 | rw [hl] |
| 1308 | apply congrArg (LabelSumBounds.fieldSum B.labels) |
| 1309 | funext l |
| 1310 | exact oscillation_eq_of_coefficients _ _ (ht l) (hct l) |
| 1311 | constructor |
| 1312 | · have he := B.requested_cross c u 0 |
| 1313 | simp only [crossTensor, hprimary, htangent, LocalSignedRequest.requestedStress, |
| 1314 | Matrix.cons_val_zero] at he ⊢ |
| 1315 | exact he |
| 1316 | · have he := B.requested_cross c u 1 |
| 1317 | simp only [crossTensor, hprimary, htangent, LocalSignedRequest.requestedStress, |
| 1318 | Matrix.cons_val_one] at he ⊢ |
| 1319 | exact he |
| 1320 | |
| 1321 | /-- The signed-wave mean gain for the actual reconstructed state. Incoming |
| 1322 | raw residuals and measured defects have exponent `1+σ-κ`; the output raw |
| 1323 | residuals have exponent `1+σ-2κ`, and their actual torus means gain `17/100`. |
| 1324 | The same native primary, masks, matrix, quotient, and fundamental supply the |
| 1325 | cross cancellation. All remaining covariance terms are estimated literally. -/ |
| 1326 | theorem native_signed_mean_gain |
| 1327 | (G : Geometry) (B : NativeData G) (c : Context Point) (u : State Point) |
| 1328 | {P : NativeIndex → ℕ → Point → ℝ} {σ κ : ℝ} |
| 1329 | (hσ : 1 / 5 ≤ σ) (hκ : 0 ≤ κ) (hκsmall : κ ≤ 1 / 100000) |
| 1330 | (f : LabelSumBounds.SignedFamily G.strip P (1 / 2) (17 / 25) |
| 1331 | (1 / 2 + σ - κ) (1 + σ - 2 * κ)) (a : Assembly f) |
| 1332 | (hl : a.labels = B.labels) |
| 1333 | (hp : ∀ l, (f.primary l).velocity = (B.primaryBlocks l).velocity) |
| 1334 | (hcp : ∀ l, LabelSumBounds.SameCarrier (f.primary l) (B.primaryBlocks l)) |
| 1335 | (ht : ∀ l, (f.tangent l).velocity = (B.signedBlocks c u l).velocity) |
| 1336 | (hct : ∀ l, LabelSumBounds.SameCarrier (f.tangent l) (B.signedBlocks c u l)) |
| 1337 | (q : OscillatoryScalar Point) (gaussian : Oscillation Point) |
| 1338 | (hold : u.oscillation = oldField f a) |
| 1339 | (H : LocalData G c u (tangentField f a + curlField f a) q gaussian) |
| 1340 | (ho : OperatorBounds G.strip G.operators κ) |
| 1341 | (hX : ∀ i j, MovingField G (incrementTensor f a i j)) |
| 1342 | (hS : ∀ i j, MovingField G (crossTensor f a i j)) |
| 1343 | (hθ : MeanClass G.strip (1 + σ - κ) (u.thetaResidual c)) |
| 1344 | (hz : MeanClass G.strip (1 + σ - κ) (u.axialResidual c)) |
| 1345 | (hd : DefectBounds G.slowStrip (σ - κ) c u) : |
| 1346 | let v := waveStage G.gauge c u (tangentField f a + curlField f a) q gaussian |
| 1347 | MeanClass G.strip (1 + σ - 2 * κ) (v.thetaResidual c) ∧ |
| 1348 | MeanClass G.strip (1 + σ - 2 * κ) (v.axialResidual c) ∧ |
| 1349 | MeanClass G.strip (1 + σ + 17 / 100) (StateMomentBalances.meanBar (v.thetaResidual c)) ∧ |
| 1350 | MeanClass G.strip (1 + σ + 17 / 100) (StateMomentBalances.meanBar (v.axialResidual c)) := by |
| 1351 | obtain ⟨hcθ, hcz⟩ := native_family_cross G B c u f a hl hp hcp ht hct |
| 1352 | exact signed_mean_gain_of_cross G c u hσ hκ hκsmall f a q gaussian hold H ho hX hS hθ hz hd hcθ hcz |
| 1353 | |
| 1354 | /-- The excluded Gaussian field is carried by the very same output state. |
| 1355 | The raw mean estimate does not set this field or its average to zero. -/ |
| 1356 | theorem native_stage_gaussian_retained |
| 1357 | (G : Geometry) (c : Context Point) (u : State Point) |
| 1358 | {ι : Type} {P : ι → ℕ → Point → ℝ} {α δ β η : ℝ} |
| 1359 | (f : LabelSumBounds.SignedFamily G.strip P α δ β η) (a : Assembly f) |
| 1360 | (q : OscillatoryScalar Point) (gaussian : Oscillation Point) : |
| 1361 | (waveStage G.gauge c u (tangentField f a + curlField f a) q gaussian).errors.gaussian = |
| 1362 | u.errors.gaussian + gaussian := rfl |
| 1363 | |
| 1364 | end NavierStokes.SignedMeanGain |