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.MeanIncrementBounds |
| 2 | import NavierStokes.HarmonicFields |
| 3 | import NavierStokes.TemporalMeanUpdate |
| 4 | import NavierStokes.MeanRankUpdate |
| 5 | |
| 6 | /-! |
| 7 | # Concrete fields and residuals for the correction construction |
| 8 | |
| 9 | The state stores fields, rather than a residual-solving operator. Covariances |
| 10 | are actual angular integrals, and the mean residuals are the differential |
| 11 | expressions in `MeanIncrementBounds`. The three sorts of excluded additive |
| 12 | errors are retained as fields on the same space as the oscillations. |
| 13 | -/ |
| 14 | |
| 15 | noncomputable section |
| 16 | |
| 17 | namespace NavierStokes.CorrectionState |
| 18 | |
| 19 | open Set MeasureTheory MeanIncrementBounds WeightedClasses |
| 20 | open scoped BigOperators ContDiff |
| 21 | |
| 22 | variable {D : Type} [NormedAddCommGroup D] [NormedSpace ℝ D] |
| 23 | |
| 24 | abbrev ScalarField (D : Type) := MeanIncrementBounds.Field D |
| 25 | |
| 26 | abbrev Oscillation (D : Type) := ℕ → (D × ℝ) → Fin 3 → ℝ |
| 27 | abbrev OscillatoryScalar (D : Type) := ℕ → (D × ℝ) → ℝ |
| 28 | abbrev MeanVector (D : Type) := ℕ → D → Fin 3 → ℝ |
| 29 | |
| 30 | /-- Fixed data used by every correction stage. -/ |
| 31 | structure Context (D : Type) where |
| 32 | operators : Operators D |
| 33 | base : Triple D |
| 34 | virtualTheta : ScalarField D |
| 35 | virtualAxial : ScalarField D |
| 36 | |
| 37 | /-- Additive errors are fields, not an exemption from the residual identity. -/ |
| 38 | structure ExcludedErrors (D : Type) where |
| 39 | base : Oscillation D |
| 40 | gaussian : Oscillation D |
| 41 | aliasError : Oscillation D |
| 42 | |
| 43 | namespace ExcludedErrors |
| 44 | |
| 45 | noncomputable def zero : ExcludedErrors D := ⟨0, 0, 0⟩ |
| 46 | |
| 47 | noncomputable def total (e : ExcludedErrors D) : Oscillation D := |
| 48 | e.base + e.gaussian + e.aliasError |
| 49 | |
| 50 | noncomputable def add (e f : ExcludedErrors D) : ExcludedErrors D := |
| 51 | ⟨e.base + f.base, e.gaussian + f.gaussian, e.aliasError + f.aliasError⟩ |
| 52 | |
| 53 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 54 | @[simp] theorem total_zero : (zero : ExcludedErrors D).total = 0 := by |
| 55 | simp [total, zero] |
| 56 | |
| 57 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 58 | theorem total_add (e f : ExcludedErrors D) : (e.add f).total = e.total + f.total := by |
| 59 | simp only [total, add] |
| 60 | abel |
| 61 | |
| 62 | end ExcludedErrors |
| 63 | |
| 64 | /-- An actual velocity/pressure state on a lifted chart and angular circle. -/ |
| 65 | structure State (D : Type) where |
| 66 | mean : Triple D |
| 67 | pressure : ScalarField D |
| 68 | oscillation : Oscillation D |
| 69 | oscillatoryPressure : OscillatoryScalar D |
| 70 | errors : ExcludedErrors D |
| 71 | |
| 72 | /-- The angular normalization agrees with the physical mean over one period. -/ |
| 73 | noncomputable def angularAverage (f : OscillatoryScalar D) : ScalarField D := |
| 74 | fun n x => (∫ θ in (0 : ℝ)..2 * Real.pi, f n (x, θ)) / (2 * Real.pi) |
| 75 | |
| 76 | noncomputable def bilinearCovariance (u v : Oscillation D) (i j : Fin 3) : ScalarField D := |
| 77 | angularAverage (fun n p => u n p i * v n p j) |
| 78 | |
| 79 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 80 | theorem angularAverage_axisymmetric (f : ScalarField D) : |
| 81 | angularAverage (fun n p => f n p.1) = f := by |
| 82 | funext n x |
| 83 | simp only [angularAverage, intervalIntegral.integral_const, sub_zero, smul_eq_mul] |
| 84 | field_simp [Real.pi_ne_zero] |
| 85 | |
| 86 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 87 | @[simp] theorem angularAverage_zero : angularAverage (0 : OscillatoryScalar D) = 0 := by |
| 88 | funext n x |
| 89 | simp [angularAverage] |
| 90 | |
| 91 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 92 | theorem bilinearCovariance_comm (u v : Oscillation D) (i j : Fin 3) : |
| 93 | bilinearCovariance u v i j = bilinearCovariance v u j i := by |
| 94 | simp only [bilinearCovariance, mul_comm] |
| 95 | |
| 96 | namespace State |
| 97 | |
| 98 | noncomputable def covariance (s : State D) (i j : Fin 3) : ScalarField D := |
| 99 | bilinearCovariance s.oscillation s.oscillation i j |
| 100 | |
| 101 | noncomputable def totalVelocity (s : State D) (c : Context D) : Oscillation D := |
| 102 | fun n p => ![c.base.radial n p.1 + s.mean.radial n p.1 + s.oscillation n p 0, |
| 103 | c.base.angular n p.1 + s.mean.angular n p.1 + s.oscillation n p 1, |
| 104 | c.base.axial n p.1 + s.mean.axial n p.1 + s.oscillation n p 2] |
| 105 | |
| 106 | /-- This is the pressure increment; the fixed base pressure is not part of a stage. -/ |
| 107 | noncomputable def totalPressureIncrement (s : State D) : OscillatoryScalar D := |
| 108 | fun n p => s.pressure n p.1 + s.oscillatoryPressure n p |
| 109 | |
| 110 | noncomputable def thetaResidual (s : State D) (c : Context D) : ScalarField D := |
| 111 | MeanIncrementBounds.thetaResidual c.operators c.base s.mean s.covariance c.virtualTheta |
| 112 | |
| 113 | noncomputable def axialResidual (s : State D) (c : Context D) : ScalarField D := |
| 114 | MeanIncrementBounds.axialResidual c.operators c.base s.mean s.covariance |
| 115 | s.pressure c.virtualAxial |
| 116 | |
| 117 | noncomputable def gr (s : State D) (c : Context D) : ScalarField D := |
| 118 | MeanIncrementBounds.gr c.operators c.base s.mean s.covariance |
| 119 | |
| 120 | noncomputable def radialResidual (s : State D) (c : Context D) : ScalarField D := |
| 121 | c.operators.dr s.pressure - s.gr c |
| 122 | |
| 123 | noncomputable def reducedMeanResidual (s : State D) (c : Context D) : MeanVector D := |
| 124 | fun n x => ![s.radialResidual c n x, s.thetaResidual c n x, s.axialResidual c n x] |
| 125 | |
| 126 | noncomputable def meanBaseError (s : State D) : MeanVector D := |
| 127 | fun n x i => angularAverage (fun k p => s.errors.base k p i) n x |
| 128 | |
| 129 | /-- Equation (32) omits the fixed base-flat error from (24); it is restored here. -/ |
| 130 | noncomputable def meanResidual (s : State D) (c : Context D) : MeanVector D := |
| 131 | s.reducedMeanResidual c + s.meanBaseError |
| 132 | |
| 133 | noncomputable def meanExcluded (s : State D) : MeanVector D := |
| 134 | fun n x i => angularAverage (fun k p => s.errors.total k p i) n x |
| 135 | |
| 136 | /-- Only the actual mean of the explicitly stored errors is removed here. -/ |
| 137 | noncomputable def meanGoodResidual (s : State D) (c : Context D) : MeanVector D := |
| 138 | s.meanResidual c - s.meanExcluded |
| 139 | |
| 140 | theorem meanResidual_eq_good_add_excluded (s : State D) (c : Context D) : |
| 141 | s.meanResidual c = s.meanGoodResidual c + s.meanExcluded := by |
| 142 | simp [meanGoodResidual] |
| 143 | |
| 144 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 145 | theorem covariance_symm (s : State D) (i j : Fin 3) : |
| 146 | s.covariance i j = s.covariance j i := |
| 147 | bilinearCovariance_comm _ _ _ _ |
| 148 | |
| 149 | /-- Addition of actual fields. No estimate or cancellation is part of this definition. -/ |
| 150 | noncomputable def addIncrement (s : State D) (m : Triple D) (p : ScalarField D) |
| 151 | (u : Oscillation D) (q : OscillatoryScalar D) (e : ExcludedErrors D) : State D where |
| 152 | mean := updated s.mean m |
| 153 | pressure := s.pressure + p |
| 154 | oscillation := s.oscillation + u |
| 155 | oscillatoryPressure := s.oscillatoryPressure + q |
| 156 | errors := s.errors.add e |
| 157 | |
| 158 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 159 | theorem totalVelocity_addIncrement (s : State D) (c : Context D) (m : Triple D) |
| 160 | (p : ScalarField D) (u : Oscillation D) (q : OscillatoryScalar D) (e : ExcludedErrors D) : |
| 161 | (s.addIncrement m p u q e).totalVelocity c = |
| 162 | fun n x => s.totalVelocity c n x + |
| 163 | ![m.radial n x.1, m.angular n x.1, m.axial n x.1] + u n x := by |
| 164 | funext n x i |
| 165 | fin_cases i <;> simp [totalVelocity, addIncrement, updated] <;> ring |
| 166 | |
| 167 | end State |
| 168 | |
| 169 | /-- A single grouped label. The finite group algebra records actual harmonics. -/ |
| 170 | structure HarmonicBlock (D : Type) where |
| 171 | velocity : ℕ → Fin 3 → HarmonicFields.Coefficients D |
| 172 | pressure : ℕ → HarmonicFields.Coefficients D |
| 173 | frequency : ℕ → ℝ |
| 174 | phase : ℕ → D → ℝ |
| 175 | angularFrequency : ℕ → ℤ |
| 176 | |
| 177 | namespace HarmonicBlock |
| 178 | |
| 179 | noncomputable def oscillation (b : HarmonicBlock D) : Oscillation D := |
| 180 | fun n p i => (HarmonicFields.field (b.velocity n i) (b.frequency n) |
| 181 | (b.phase n) (b.angularFrequency n) p).re |
| 182 | |
| 183 | noncomputable def oscillatoryPressure (b : HarmonicBlock D) : OscillatoryScalar D := |
| 184 | fun n p => (HarmonicFields.field (b.pressure n) (b.frequency n) |
| 185 | (b.phase n) (b.angularFrequency n) p).re |
| 186 | |
| 187 | def BandLimited (b : HarmonicBlock D) (N : ℕ) : Prop := |
| 188 | (∀ n i, HarmonicFields.BandLimited (b.velocity n i) N) ∧ |
| 189 | ∀ n, HarmonicFields.BandLimited (b.pressure n) N |
| 190 | |
| 191 | /-- Bounds are on stripped, grouped, nonzero harmonic coefficients. -/ |
| 192 | def WaveBounds (s : StripData D) (P : ℕ → D → ℝ) (α : ℝ) |
| 193 | (b : HarmonicBlock D) : Prop := |
| 194 | ∀ (i : Fin 3) (j : ℤ), j ≠ 0 → |
| 195 | WaveClass s P α (fun n x => b.velocity n i j x) |
| 196 | |
| 197 | def PressureBounds (s : StripData D) (P : ℕ → D → ℝ) (α : ℝ) |
| 198 | (b : HarmonicBlock D) : Prop := |
| 199 | ∀ j : ℤ, j ≠ 0 → WaveClass s P α (fun n x => b.pressure n j x) |
| 200 | |
| 201 | end HarmonicBlock |
| 202 | |
| 203 | /-- A representation on a finite set of labels active in a fixed chart. |
| 204 | Global local-finiteness is a separate property of the physical label assembly. -/ |
| 205 | def Represents {ι : Type} (labels : Finset ι) (blocks : ι → HarmonicBlock D) |
| 206 | (s : State D) : Prop := |
| 207 | s.oscillation = ∑ l ∈ labels, (blocks l).oscillation ∧ |
| 208 | s.oscillatoryPressure = ∑ l ∈ labels, (blocks l).oscillatoryPressure |
| 209 | |
| 210 | /-- The mean portion of the cumulative bounds after initialization. -/ |
| 211 | structure CumulativeBounds (s : StripData D) (u : State D) : Prop where |
| 212 | velocity : MeanIncrementBounds.CumulativeBounds s u.mean |
| 213 | pressure : MeanClass s (9 / 10) u.pressure |
| 214 | |
| 215 | /-- The mean residual portion of (36), computed from the state fields. -/ |
| 216 | structure MeanResidualBounds (s : StripData D) (σ : ℝ) (c : Context D) |
| 217 | (u : State D) : Prop where |
| 218 | angular : MeanClass s (1 + σ) (fun n x => u.meanGoodResidual c n x 1) |
| 219 | axial : MeanClass s (1 + σ) (fun n x => u.meanGoodResidual c n x 2) |
| 220 | |
| 221 | section Moments |
| 222 | |
| 223 | variable {S : Type} [NormedAddCommGroup S] [NormedSpace ℝ S] |
| 224 | |
| 225 | /-- Actual radial moment of the full auxiliary torus mean. -/ |
| 226 | noncomputable def radialMoment (k : ℕ) (f : ScalarField (PressureStream.Lift S)) : ScalarField S := |
| 227 | fun n p => PressureStream.pressureMass (fun x => x.1 ^ k * f n x) p |
| 228 | |
| 229 | noncomputable def pressureDefect (c : Context (PressureStream.Lift S)) |
| 230 | (u : State (PressureStream.Lift S)) : ScalarField S := radialMoment 0 (u.gr c) |
| 231 | |
| 232 | noncomputable def thetaDefect (c : Context (PressureStream.Lift S)) |
| 233 | (u : State (PressureStream.Lift S)) : ScalarField S := |
| 234 | radialMoment 2 (thetaAxial c.base u.mean + u.covariance 2 1) |
| 235 | |
| 236 | noncomputable def axialDefect (c : Context (PressureStream.Lift S)) |
| 237 | (u : State (PressureStream.Lift S)) : ScalarField S := |
| 238 | radialMoment 1 (axialAxial c.base u.mean + u.covariance 2 2) - |
| 239 | (1 / 2 : ℝ) • radialMoment 2 (u.gr c) |
| 240 | |
| 241 | /-- The row order is exactly `(P, Jθ, Jz)`, as in `MeanRankUpdate`. -/ |
| 242 | noncomputable def debt (c : Context (PressureStream.Lift S)) |
| 243 | (u : State (PressureStream.Lift S)) : ℕ → S → Fin 3 → ℝ := |
| 244 | fun n x => ![pressureDefect c u n x, thetaDefect c u n x, axialDefect c u n x] |
| 245 | |
| 246 | def DefectBounds (s : StripData S) (σ : ℝ) (c : Context (PressureStream.Lift S)) |
| 247 | (u : State (PressureStream.Lift S)) : Prop := |
| 248 | ∀ i : Fin 3, UnweightedClass s (1 + σ) (fun n x => debt c u n x i) |
| 249 | |
| 250 | def ZeroMasses (u : State (PressureStream.Lift S)) : Prop := |
| 251 | radialMoment 2 u.mean.angular = 0 ∧ radialMoment 1 u.mean.axial = 0 |
| 252 | |
| 253 | end Moments |
| 254 | |
| 255 | /-- Geometry of the genuine compact shifted pressure/stream primitive. -/ |
| 256 | structure ReconstructionData where |
| 257 | exponent : ℝ |
| 258 | inner : ℝ |
| 259 | outer : ℝ |
| 260 | inner_lt_outer : inner < outer |
| 261 | frequency : ℕ → ℝ |
| 262 | radialDirection : PressureStream.Plane |
| 263 | |
| 264 | section Fields |
| 265 | |
| 266 | variable {S : Type} [NormedAddCommGroup S] [NormedSpace ℝ S] |
| 267 | |
| 268 | abbrev Lift (S : Type) := PressureStream.Lift S |
| 269 | |
| 270 | /-- Recompute (33) from the current actual radial source. -/ |
| 271 | noncomputable def reconstructPressure (r : ReconstructionData) (c : Context (Lift S)) |
| 272 | (u : State (Lift S)) : State (Lift S) := |
| 273 | { u with pressure := (fun n => PressureStream.meanPressure r.exponent r.inner r.outer |
| 274 | (r.frequency n) r.inner_lt_outer r.radialDirection (u.gr c n)) } |
| 275 | |
| 276 | /-- The pressure alias has the sign with which it occurs in the radial residual. -/ |
| 277 | noncomputable def pressureAlias (r : ReconstructionData) (c : Context (Lift S)) |
| 278 | (u : State (Lift S)) : Oscillation (Lift S) := |
| 279 | fun n p => ![-PressureStream.pressureAlias r.exponent r.inner r.outer (r.frequency n) |
| 280 | r.inner_lt_outer r.radialDirection (u.gr c n) p.1, 0, 0] |
| 281 | |
| 282 | @[simp] theorem reconstructPressure_gr (r : ReconstructionData) (c : Context (Lift S)) |
| 283 | (u : State (Lift S)) : (reconstructPressure r c u).gr c = u.gr c := rfl |
| 284 | |
| 285 | @[simp] theorem reconstructPressure_covariance (r : ReconstructionData) |
| 286 | (c : Context (Lift S)) (u : State (Lift S)) : |
| 287 | (reconstructPressure r c u).covariance = u.covariance := rfl |
| 288 | |
| 289 | /-- Explicit graph operators with the pressure primitive's radial direction. -/ |
| 290 | noncomputable def graphOperators (r : ReconstructionData) (epsilon fast : ℕ → ℝ) |
| 291 | (axial slowTime : S × PressureStream.Plane) (temporal : PressureStream.Plane) : |
| 292 | MeanIncrementBounds.Operators (Lift S) where |
| 293 | epsilon := epsilon |
| 294 | radialFrequency := r.frequency |
| 295 | fastCoefficient := fast |
| 296 | radius := Prod.fst |
| 297 | radialProfile := fun x => RadialPullback.radialJacobian r.exponent x.1 |
| 298 | eR := (1, (0, 0)) |
| 299 | eZ := (0, axial) |
| 300 | eT := (0, slowTime) |
| 301 | vR := (0, (0, r.radialDirection)) |
| 302 | vT := (0, (0, temporal)) |
| 303 | |
| 304 | theorem graphOperators_dr (r : ReconstructionData) (epsilon fast : ℕ → ℝ) |
| 305 | (axial slowTime : S × PressureStream.Plane) (temporal : PressureStream.Plane) |
| 306 | (f : ScalarField (Lift S)) (n : ℕ) (x : Lift S) : |
| 307 | (graphOperators r epsilon fast axial slowTime temporal).dr f n x = |
| 308 | PressureStream.graphDr (PressureStream.physicalSpeed r.exponent (r.frequency n)) |
| 309 | (0, r.radialDirection) (f n) x := by |
| 310 | have he : ((1 : ℝ), ((0 : S), (0 : PressureStream.Plane))) + |
| 311 | (r.frequency n * RadialPullback.radialJacobian r.exponent x.1) • |
| 312 | ((0 : ℝ), ((0 : S), r.radialDirection)) = |
| 313 | PressureStream.radialVector (PressureStream.physicalSpeed r.exponent (r.frequency n)) |
| 314 | ((0 : S), r.radialDirection) x := by |
| 315 | simp [PressureStream.radialVector, PressureStream.physicalSpeed, mul_comm] |
| 316 | rw [PressureStream.graphDr, ← he, map_add, map_smul] |
| 317 | simp [graphOperators, MeanIncrementBounds.Operators.dr, WeightedClasses.graphDerivative, |
| 318 | smul_eq_mul, mul_assoc] |
| 319 | |
| 320 | theorem graphOperators_dz (r : ReconstructionData) (epsilon fast : ℕ → ℝ) |
| 321 | (axial slowTime : S × PressureStream.Plane) (temporal : PressureStream.Plane) |
| 322 | (f : ScalarField (Lift S)) (n : ℕ) (x : Lift S) : |
| 323 | (graphOperators r epsilon fast axial slowTime temporal).dz f n x = |
| 324 | PressureStream.graphDz (epsilon n • axial) (f n) x := by |
| 325 | have he : ((0 : ℝ), epsilon n • axial) = epsilon n • ((0 : ℝ), axial) := by simp |
| 326 | change epsilon n * fderiv ℝ (f n) x (0, axial) = |
| 327 | fderiv ℝ (f n) x (0, epsilon n • axial) |
| 328 | rw [he, map_smul] |
| 329 | rfl |
| 330 | |
| 331 | theorem graphOperators_fastTime (r : ReconstructionData) (epsilon : ℕ → ℝ) (h : ℝ) |
| 332 | (axial slowTime : S × PressureStream.Plane) (f : ScalarField (Lift S)) |
| 333 | (n : ℕ) (x : Lift S) : |
| 334 | (graphOperators r epsilon (ChartScales.timeCoefficient h) axial slowTime |
| 335 | (TorusInverse.vector .temporal)).fastTime f n x = |
| 336 | TemporalMeanUpdate.fastDerivative h n (f n) x := rfl |
| 337 | |
| 338 | theorem reconstructed_radial_residual (r : ReconstructionData) |
| 339 | (ha : 0 < r.inner) (hd : 0 < r.exponent) (c : Context (Lift S)) |
| 340 | (u : State (Lift S)) |
| 341 | (hoperator : ∀ f : ScalarField (Lift S), ∀ n x, c.operators.dr f n x = |
| 342 | PressureStream.graphDr (PressureStream.physicalSpeed r.exponent (r.frequency n)) |
| 343 | (0, r.radialDirection) (f n) x) |
| 344 | (hsmooth : ∀ n, ContDiff ℝ ∞ (u.gr c n)) |
| 345 | (hsupport : ∀ n, RadialAlias.RadiallySupported r.inner r.outer (u.gr c n)) |
| 346 | (n : ℕ) (x : Lift S) : |
| 347 | (reconstructPressure r c u).radialResidual c n x = |
| 348 | -PressureStream.rho r.inner r.outer r.inner_lt_outer x.1 * pressureDefect c u n x.2.1 + |
| 349 | pressureAlias r c u n (x, 0) 0 := by |
| 350 | rw [State.radialResidual, Pi.sub_apply, Pi.sub_apply, hoperator] |
| 351 | change PressureStream.graphDr _ _ |
| 352 | (PressureStream.meanPressure _ _ _ _ _ _ (u.gr c n)) x - u.gr c n x = _ |
| 353 | rw [PressureStream.meanPressure_radial_residual_global ha r.inner_lt_outer hd |
| 354 | r.radialDirection (hsmooth n) (hsupport n)] |
| 355 | simp [pressureDefect, radialMoment, pressureAlias, sub_eq_add_neg] |
| 356 | |
| 357 | end Fields |
| 358 | |
| 359 | section Temporal |
| 360 | |
| 361 | variable {S : Type} [NormedAddCommGroup S] [NormedSpace ℝ S] [FiniteDimensional ℝ S] |
| 362 | |
| 363 | /-- The actual temporal increment, including the compactified axial stream. -/ |
| 364 | noncomputable def temporalIncrement (r : ReconstructionData) (h : ℝ) |
| 365 | (axial : S × PressureStream.Plane) (c : Context (Lift S)) (u : State (Lift S)) : |
| 366 | MeanIncrementBounds.Triple (Lift S) where |
| 367 | radial := fun n => TemporalMeanUpdate.radialUpdate r.exponent r.inner r.outer |
| 368 | (r.frequency n) r.radialDirection (c.operators.epsilon n • axial) h n (u.axialResidual c n) |
| 369 | angular := fun n => TemporalMeanUpdate.desiredIncrement h n (u.thetaResidual c n) |
| 370 | axial := fun n => TemporalMeanUpdate.axialUpdate r.exponent r.inner r.outer |
| 371 | (r.frequency n) r.radialDirection h n (u.axialResidual c n) |
| 372 | |
| 373 | /-- The exact remaining axial fast-time error, not its asymptotic estimate. -/ |
| 374 | noncomputable def temporalAlias (r : ReconstructionData) (h : ℝ) |
| 375 | (c : Context (Lift S)) (u : State (Lift S)) : Oscillation (Lift S) := |
| 376 | fun n p => ![0, 0, -TemporalMeanUpdate.fastDerivative h n |
| 377 | (TemporalMeanUpdate.axialAlias r.exponent r.inner r.outer (r.frequency n) |
| 378 | r.radialDirection h n (u.axialResidual c n)) p.1] |
| 379 | |
| 380 | noncomputable def temporalStage (r : ReconstructionData) (h : ℝ) |
| 381 | (axial : S × PressureStream.Plane) (c : Context (Lift S)) (u : State (Lift S)) : |
| 382 | State (Lift S) := |
| 383 | reconstructPressure r c (u.addIncrement (temporalIncrement r h axial c u) 0 0 0 |
| 384 | ⟨0, 0, temporalAlias r h c u⟩) |
| 385 | |
| 386 | theorem temporal_fast_cancellation (r : ReconstructionData) (h : ℝ) |
| 387 | (axial : S × PressureStream.Plane) (c : Context (Lift S)) (u : State (Lift S)) |
| 388 | (ha : 0 < r.inner) (hd : 0 < r.exponent) |
| 389 | (hθ : ∀ n, ContDiff ℝ ∞ (u.thetaResidual c n)) |
| 390 | (hz : ∀ n, ContDiff ℝ ∞ (u.axialResidual c n)) |
| 391 | (hpθ : ∀ n, PressureStream.TorusPeriodicLift (u.thetaResidual c n)) |
| 392 | (hpz : ∀ n, PressureStream.TorusPeriodicLift (u.axialResidual c n)) |
| 393 | (hsz : ∀ n, RadialAlias.RadiallySupported r.inner r.outer (u.axialResidual c n)) |
| 394 | (n : ℕ) (x : Lift S) : |
| 395 | TemporalMeanUpdate.fastDerivative h n ((temporalIncrement r h axial c u).angular n) x + |
| 396 | TemporalMeanUpdate.centered (u.thetaResidual c n) x = 0 ∧ |
| 397 | TemporalMeanUpdate.fastDerivative h n ((temporalIncrement r h axial c u).axial n) x + |
| 398 | TemporalMeanUpdate.centered (u.axialResidual c n) x = temporalAlias r h c u n (x, 0) 2 := by |
| 399 | have hv := TemporalMeanUpdate.temporal_mean_update (M := r.frequency n) ha r.inner_lt_outer hd r.radialDirection |
| 400 | (c.operators.epsilon n • axial) h n (hθ n) (hz n) (hpθ n) (hpz n) (hsz n) x |
| 401 | exact ⟨hv.1, hv.2.1⟩ |
| 402 | |
| 403 | end Temporal |
| 404 | |
| 405 | /-- The physical length, velocity, and background amplitude used by the |
| 406 | five-row inverse. These may depend on the band and slow variables. -/ |
| 407 | structure RankData (S : Type) where |
| 408 | lambda : ℝ |
| 409 | inner : ℝ |
| 410 | outer : ℝ |
| 411 | length : ℕ → S → ℝ |
| 412 | velocity : ℕ → S → ℝ |
| 413 | coefficient : ℕ → S → ℝ |
| 414 | |
| 415 | section Rank |
| 416 | |
| 417 | variable {S : Type} [NormedAddCommGroup S] [NormedSpace ℝ S] |
| 418 | |
| 419 | noncomputable def rankAngular (r : RankData S) (c : Context (Lift S)) |
| 420 | (u : State (Lift S)) (n : ℕ) : ℝ × S → ℝ := |
| 421 | MeanRankUpdate.angularFamily r.lambda r.inner r.outer (r.length n) (r.velocity n) |
| 422 | (r.coefficient n) (debt c u n) |
| 423 | |
| 424 | noncomputable def rankDesiredAxial (r : RankData S) (c : Context (Lift S)) |
| 425 | (u : State (Lift S)) (n : ℕ) : ℝ × S → ℝ := |
| 426 | MeanRankUpdate.desiredAxialFamily r.lambda r.inner r.outer (r.length n) (r.velocity n) |
| 427 | (r.coefficient n) (debt c u n) |
| 428 | |
| 429 | noncomputable def rankPotential (p : ReconstructionData) (r : RankData S) |
| 430 | (c : Context (Lift S)) (u : State (Lift S)) (n : ℕ) : Lift S → ℝ := |
| 431 | PressureStream.streamPotential p.exponent p.inner p.outer (p.frequency n) |
| 432 | ((0 : S), p.radialDirection) (MeanRankUpdate.slowLift (rankDesiredAxial r c u n)) |
| 433 | |
| 434 | noncomputable def rankIncrement (p : ReconstructionData) (r : RankData S) |
| 435 | (axial : S × PressureStream.Plane) (c : Context (Lift S)) (u : State (Lift S)) : |
| 436 | MeanIncrementBounds.Triple (Lift S) where |
| 437 | radial := fun n => PressureStream.streamBeta (c.operators.epsilon n • axial) |
| 438 | (rankPotential p r c u n) |
| 439 | angular := fun n => MeanRankUpdate.slowLift (rankAngular r c u n) |
| 440 | axial := fun n => PressureStream.streamGamma |
| 441 | (PressureStream.physicalSpeed p.exponent (p.frequency n)) ((0 : S), p.radialDirection) |
| 442 | (rankPotential p r c u n) |
| 443 | |
| 444 | noncomputable def rankStage (p : ReconstructionData) (r : RankData S) |
| 445 | (axial : S × PressureStream.Plane) (c : Context (Lift S)) (u : State (Lift S)) : |
| 446 | State (Lift S) := |
| 447 | reconstructPressure p c (u.addIncrement (rankIncrement p r axial c u) 0 0 0 ExcludedErrors.zero) |
| 448 | |
| 449 | theorem rank_model_rows (r : RankData S) (c : Context (Lift S)) (u : State (Lift S)) |
| 450 | (n : ℕ) (x : S) (hlam : 0 < r.lambda) (hC : r.coefficient n x ≠ 0) |
| 451 | (ha : 0 < r.inner) (hab : r.inner < r.outer) (hell : 0 < r.length n x) |
| 452 | (hU : r.velocity n x ≠ 0) : |
| 453 | FiveRowRank.FiveRows |
| 454 | (MeanRankUpdate.background r.lambda (r.coefficient n x) (r.length n x) (r.velocity n x)) |
| 455 | (fun _ => 0) (debt c u n x) |
| 456 | (fun R => rankAngular r c u n (R, x)) |
| 457 | (fun R => rankDesiredAxial r c u n (R, x)) := |
| 458 | MeanRankUpdate.physical_five_rows hlam hC ha hab hell hU (debt c u n x) |
| 459 | |
| 460 | /-- The linear rows hold for the actual base whenever it agrees with the |
| 461 | prescribed background on the support of the constructed bumps. -/ |
| 462 | theorem rank_rows_on_patch (r : RankData S) (c : Context (Lift S)) (u : State (Lift S)) |
| 463 | (n : ℕ) (x : S) (Y : PressureStream.Plane) |
| 464 | (hlam : 0 < r.lambda) (hC : r.coefficient n x ≠ 0) |
| 465 | (ha : 0 < r.inner) (hab : r.inner < r.outer) (hell : 0 < r.length n x) |
| 466 | (hU : r.velocity n x ≠ 0) |
| 467 | (hV : ∀ R ∈ Ioo (r.length n x * r.inner) (r.length n x * r.outer), |
| 468 | c.base.angular n (R, (x, Y)) = |
| 469 | MeanRankUpdate.background r.lambda (r.coefficient n x) (r.length n x) (r.velocity n x) R) |
| 470 | (hG : ∀ R ∈ Ioo (r.length n x * r.inner) (r.length n x * r.outer), |
| 471 | c.base.axial n (R, (x, Y)) = 0) : |
| 472 | FiveRowRank.FiveRows (fun R => c.base.angular n (R, (x, Y))) |
| 473 | (fun R => c.base.axial n (R, (x, Y))) (debt c u n x) |
| 474 | (fun R => rankAngular r c u n (R, x)) |
| 475 | (fun R => rankDesiredAxial r c u n (R, x)) := |
| 476 | MeanRankUpdate.physical_rows_on_patch hlam hC ha hab hell hU (debt c u n x) _ _ hV hG |
| 477 | |
| 478 | theorem rank_axial_eq_desired (p : ReconstructionData) (r : RankData S) |
| 479 | (axial : S × PressureStream.Plane) (c : Context (Lift S)) (u : State (Lift S)) |
| 480 | (ha : 0 < p.inner) (hd : 0 < p.exponent) (n : ℕ) |
| 481 | (hlam : 0 < r.lambda) (hC : ∀ x, r.coefficient n x ≠ 0) |
| 482 | (hra : 0 < r.inner) (hrab : r.inner < r.outer) |
| 483 | (hell : ∀ x, 0 < r.length n x) (hU : ∀ x, r.velocity n x ≠ 0) |
| 484 | (hf : ContDiff ℝ ∞ (rankDesiredAxial r c u n)) |
| 485 | (hs : RadialAlias.RadiallySupported p.inner p.outer (rankDesiredAxial r c u n)) |
| 486 | (x : Lift S) : |
| 487 | (rankIncrement p r axial c u).axial n x = rankDesiredAxial r c u n (x.1, x.2.1) := by |
| 488 | apply MeanRankUpdate.slow_streamGamma_eq_desired ha p.inner_lt_outer hd p.radialDirection hf hs |
| 489 | intro z |
| 490 | exact (rank_model_rows r c u n z hlam (hC z) hra hrab (hell z) (hU z)).2.1 |
| 491 | |
| 492 | theorem rank_divergence_zero (p : ReconstructionData) (r : RankData S) |
| 493 | (axial : S × PressureStream.Plane) (c : Context (Lift S)) (u : State (Lift S)) |
| 494 | (ha : 0 < p.inner) (hd : 0 < p.exponent) (n : ℕ) |
| 495 | (hf : ContDiff ℝ ∞ (rankDesiredAxial r c u n)) |
| 496 | (hs : RadialAlias.RadiallySupported p.inner p.outer (rankDesiredAxial r c u n)) |
| 497 | (x : Lift S) : |
| 498 | PressureStream.graphDivergence (PressureStream.physicalSpeed p.exponent (p.frequency n)) |
| 499 | ((0 : S), p.radialDirection) (c.operators.epsilon n • axial) |
| 500 | ((rankIncrement p r axial c u).radial n) ((rankIncrement p r axial c u).axial n) x = 0 := |
| 501 | MeanRankUpdate.slow_stream_divergence_zero ha p.inner_lt_outer hd p.radialDirection |
| 502 | (c.operators.epsilon n • axial) hf hs x |
| 503 | |
| 504 | end Rank |
| 505 | |
| 506 | end NavierStokes.CorrectionState |