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.FuturePressureBounds |
| 2 | import NavierStokes.TransportPrimitive |
| 3 | |
| 4 | /-! |
| 5 | # Pressure through the actual angular reset |
| 6 | |
| 7 | The corrected pressure is the improper integral of the actual corrected field. |
| 8 | The difference from the clean pressure is an explicit finite partial-reset |
| 9 | integral. Bounds use the first angular coefficient jet supplied by the proved |
| 10 | reset witness; no parity or second-jet estimate is assumed. |
| 11 | -/ |
| 12 | |
| 13 | noncomputable section |
| 14 | |
| 15 | open Set Filter MeasureTheory |
| 16 | open scoped Topology ContDiff |
| 17 | open NavierStokes.OutgoingSchedule NavierStokes.OutgoingTail |
| 18 | open NavierStokes.AngularMomentReset NavierStokes.UniformAngularReset |
| 19 | open NavierStokes.FuturePressureBounds |
| 20 | |
| 21 | namespace NavierStokes.CorrectedPressureBounds |
| 22 | |
| 23 | noncomputable def correctedPi {d : TailData} {K : ℝ} |
| 24 | (w : ResetWitness d K) (y eta : ℝ) : ℝ := |
| 25 | -(1 / 2 : ℝ) * ∫ t in Ioi y, correctedAngular d w.coefficients (t, eta) ^ 2 |
| 26 | |
| 27 | noncomputable def editDensity {d : TailData} {K : ℝ} |
| 28 | (w : ResetWitness d K) (p : ℝ × ℝ) : ℝ := |
| 29 | correctedAngular d w.coefficients p ^ 2 - finalAngular d p ^ 2 |
| 30 | |
| 31 | noncomputable def releaseSquare (d : TailData) : ℝ := |
| 32 | finalAngular d (d.releaseStart, 0) ^ 2 |
| 33 | |
| 34 | noncomputable def editSize (d : TailData) (K : ℝ) : ℝ := K * d.core.lam ^ (28 : ℕ) |
| 35 | |
| 36 | theorem releaseSquare_pos (d : TailData) : 0 < releaseSquare d := |
| 37 | sq_pos_of_pos (finalAngular_pos d _) |
| 38 | |
| 39 | theorem editSize_nonneg {d : TailData} {K : ℝ} (w : ResetWitness d K) : |
| 40 | 0 ≤ editSize d K := |
| 41 | (norm_nonneg (w.coefficients 0)).trans (w.coefficient_bound 0) |
| 42 | |
| 43 | theorem relative_abs_le_two_norm (c : Coeff) (t : ℝ) : |relative c t| ≤ 2 * ‖c‖ := by |
| 44 | have h0 : |c 0| ≤ ‖c‖ := by simpa only [Real.norm_eq_abs] using norm_le_pi_norm c 0 |
| 45 | have h1 : |c 1| ≤ ‖c‖ := by simpa only [Real.norm_eq_abs] using norm_le_pi_norm c 1 |
| 46 | have hb (j : Fin 2) : |bump j t| ≤ 1 := by |
| 47 | rw [abs_of_nonneg (bump_nonneg j t)] |
| 48 | exact bump_le_one j t |
| 49 | calc |
| 50 | _ ≤ |c 0| * |bump 0 t| + |c 1| * |bump 1 t| := by |
| 51 | simpa only [relative, abs_mul] using abs_add_le (c 0 * bump 0 t) (c 1 * bump 1 t) |
| 52 | _ ≤ ‖c‖ * 1 + ‖c‖ * 1 := add_le_add |
| 53 | (mul_le_mul h0 (hb 0) (abs_nonneg _) (norm_nonneg _)) |
| 54 | (mul_le_mul h1 (hb 1) (abs_nonneg _) (norm_nonneg _)) |
| 55 | _ = _ := by ring |
| 56 | |
| 57 | theorem relative_eta_hasDerivAt {d : TailData} {K : ℝ} |
| 58 | (w : ResetWitness d K) (eta t : ℝ) : |
| 59 | HasDerivAt (fun q => relative (w.coefficients q) t) |
| 60 | (relative (deriv w.coefficients eta) t) eta := by |
| 61 | have hc := (w.smooth.differentiable (by simp) eta).hasDerivAt |
| 62 | simpa only [relative] using |
| 63 | ((hasDerivAt_pi.mp hc 0).mul_const (bump 0 t)).fun_add |
| 64 | ((hasDerivAt_pi.mp hc 1).mul_const (bump 1 t)) |
| 65 | |
| 66 | theorem relative_eta_bound {d : TailData} {K : ℝ} |
| 67 | (w : ResetWitness d K) (eta t : ℝ) : |
| 68 | |relative (deriv w.coefficients eta) t| ≤ 2 * editSize d K := |
| 69 | (relative_abs_le_two_norm _ _).trans |
| 70 | (mul_le_mul_of_nonneg_left (w.eta_derivative_bound eta) (by norm_num)) |
| 71 | |
| 72 | theorem corrected_square_comparison {d : TailData} {K : ℝ} |
| 73 | (w : ResetWitness d K) (p : ℝ × ℝ) : |
| 74 | (1 / 4) * finalAngular d p ^ 2 ≤ correctedAngular d w.coefficients p ^ 2 ∧ |
| 75 | correctedAngular d w.coefficients p ^ 2 ≤ (9 / 4) * finalAngular d p ^ 2 := by |
| 76 | have hr := abs_le.mp (w.small_jets p.2 (p.1 - correctionCenter d)).1 |
| 77 | have hsq : (1 / 4 : ℝ) ≤ (1 + relative (w.coefficients p.2) |
| 78 | (p.1 - correctionCenter d)) ^ 2 ∧ |
| 79 | (1 + relative (w.coefficients p.2) (p.1 - correctionCenter d)) ^ 2 ≤ 9 / 4 := by |
| 80 | constructor <;> nlinarith |
| 81 | simp only [correctedAngular, mul_pow] |
| 82 | constructor |
| 83 | · simpa only [mul_comm (1 / 4 : ℝ)] using |
| 84 | mul_le_mul_of_nonneg_left hsq.1 (sq_nonneg (finalAngular d p)) |
| 85 | · simpa only [mul_comm (9 / 4 : ℝ)] using |
| 86 | mul_le_mul_of_nonneg_left hsq.2 (sq_nonneg (finalAngular d p)) |
| 87 | |
| 88 | theorem baseE_square_ratio (lam amp t r : ℝ) : |
| 89 | baseE lam amp t ^ 2 = baseE lam amp r ^ 2 * Real.exp ((1 + 2 * lam) * (r - t)) := by |
| 90 | simp only [baseE, mul_pow, ← Real.exp_nat_mul] |
| 91 | rw [mul_assoc, ← Real.exp_add] |
| 92 | congr 2 |
| 93 | ring |
| 94 | |
| 95 | theorem window_square_bounds (d : TailData) {t : ℝ} |
| 96 | (ht : t ∈ Icc (d.releaseStart - 4) d.releaseStart) (eta : ℝ) : |
| 97 | releaseSquare d ≤ finalAngular d (t, eta) ^ 2 ∧ |
| 98 | finalAngular d (t, eta) ^ 2 ≤ Real.exp 5 * releaseSquare d := by |
| 99 | have hdt : 0 ≤ d.releaseStart - t := sub_nonneg.mpr ht.2 |
| 100 | have hdt4 : d.releaseStart - t ≤ 4 := by linarith [ht.1] |
| 101 | have h0 : 0 ≤ (1 + 2 * d.core.lam) * (d.releaseStart - t) := |
| 102 | mul_nonneg (by linarith [d.core.lam_pos]) hdt |
| 103 | have h5 : (1 + 2 * d.core.lam) * (d.releaseStart - t) ≤ 5 := by |
| 104 | have hm := mul_le_mul (show 1 + 2 * d.core.lam ≤ (6 / 5 : ℝ) by linarith [d.core.lam_lt]) |
| 105 | hdt4 hdt (by norm_num) |
| 106 | linarith |
| 107 | have htR : d.releaseStart ∈ Icc (d.releaseStart - 4) d.releaseStart := by |
| 108 | constructor <;> linarith |
| 109 | rw [original_matches_reference d eta ht, baseE_square_ratio _ _ t d.releaseStart] |
| 110 | have hR : releaseSquare d = baseE d.core.lam (referenceAmplitude d) d.releaseStart ^ 2 := by |
| 111 | rw [releaseSquare, original_matches_reference d 0 htR] |
| 112 | rw [← hR] |
| 113 | constructor |
| 114 | · exact le_mul_of_one_le_right (releaseSquare_pos d).le (Real.one_le_exp_iff.mpr h0) |
| 115 | · simpa only [mul_comm (Real.exp 5)] using |
| 116 | mul_le_mul_of_nonneg_left (Real.exp_le_exp.mpr h5) (releaseSquare_pos d).le |
| 117 | |
| 118 | theorem editDensity_contDiff {d : TailData} {K : ℝ} (w : ResetWitness d K) : |
| 119 | ContDiff ℝ ∞ (editDensity w) := |
| 120 | ((correctedAngular_contDiff d w.coefficients w.smooth).pow 2).sub |
| 121 | ((finalAngular_contDiff d).pow 2) |
| 122 | |
| 123 | theorem editDensity_eq {d : TailData} {K : ℝ} (w : ResetWitness d K) (t eta : ℝ) : |
| 124 | editDensity w (t, eta) = baseE d.core.lam (referenceAmplitude d) t ^ 2 * |
| 125 | ((1 + relative (w.coefficients eta) (t - correctionCenter d)) ^ 2 - 1) := by |
| 126 | rw [editDensity, corrected_pressure_reference] |
| 127 | unfold modifiedE |
| 128 | ring |
| 129 | |
| 130 | noncomputable def editDensityEta {d : TailData} {K : ℝ} |
| 131 | (w : ResetWitness d K) (p : ℝ × ℝ) : ℝ := |
| 132 | 2 * baseE d.core.lam (referenceAmplitude d) p.1 ^ 2 * |
| 133 | (1 + relative (w.coefficients p.2) (p.1 - correctionCenter d)) * |
| 134 | relative (deriv w.coefficients p.2) (p.1 - correctionCenter d) |
| 135 | |
| 136 | theorem editDensity_hasDerivAt_eta {d : TailData} {K : ℝ} |
| 137 | (w : ResetWitness d K) (t eta : ℝ) : |
| 138 | HasDerivAt (fun q => editDensity w (t, q)) (editDensityEta w (t, eta)) eta := by |
| 139 | have heq : (fun q => editDensity w (t, q)) = fun q => |
| 140 | baseE d.core.lam (referenceAmplitude d) t ^ 2 * |
| 141 | ((1 + relative (w.coefficients q) (t - correctionCenter d)) ^ 2 - 1) := |
| 142 | funext (editDensity_eq w t) |
| 143 | rw [heq] |
| 144 | convert! ((((relative_eta_hasDerivAt w eta (t - correctionCenter d)).const_add 1).pow 2).sub_const 1).const_mul |
| 145 | (baseE d.core.lam (referenceAmplitude d) t ^ 2) using 1 |
| 146 | dsimp [editDensityEta] |
| 147 | ring |
| 148 | |
| 149 | theorem editDensityEta_zero_outside {d : TailData} {K : ℝ} |
| 150 | (w : ResetWitness d K) (eta : ℝ) {t : ℝ} |
| 151 | (ht : t ∉ Ioo (d.releaseStart - 4) d.releaseStart) : editDensityEta w (t, eta) = 0 := by |
| 152 | simp only [editDensityEta, relative_zero_outside d _ ht, mul_zero] |
| 153 | |
| 154 | theorem editDensityEta_continuous_t {d : TailData} {K : ℝ} |
| 155 | (w : ResetWitness d K) (eta : ℝ) : Continuous (fun t => editDensityEta w (t, eta)) := by |
| 156 | apply Continuous.mul |
| 157 | · apply Continuous.mul |
| 158 | · exact continuous_const.mul (((baseE_contDiff _ _).continuous).pow 2) |
| 159 | · exact continuous_const.add ((relative_contDiff (w.coefficients eta)).continuous.comp |
| 160 | (continuous_id.sub continuous_const)) |
| 161 | · exact (relative_contDiff (deriv w.coefficients eta)).continuous.comp |
| 162 | (continuous_id.sub continuous_const) |
| 163 | |
| 164 | theorem editDensityEta_abs_le {d : TailData} {K : ℝ} |
| 165 | (w : ResetWitness d K) (t eta : ℝ) : |
| 166 | |editDensityEta w (t, eta)| ≤ 6 * editSize d K * Real.exp 5 * releaseSquare d := by |
| 167 | have hR := releaseSquare_pos d |
| 168 | by_cases ht : t ∈ Ioo (d.releaseStart - 4) d.releaseStart |
| 169 | · have hs := (w.small_jets eta (t - correctionCenter d)).1 |
| 170 | have hr := relative_eta_bound w eta (t - correctionCenter d) |
| 171 | have hsize := editSize_nonneg w |
| 172 | have ha : |1 + relative (w.coefficients eta) (t - correctionCenter d)| ≤ 3 / 2 := by |
| 173 | have h := abs_add_le (1 : ℝ) (relative (w.coefficients eta) (t - correctionCenter d)) |
| 174 | norm_num at h |
| 175 | linarith |
| 176 | have hbase : baseE d.core.lam (referenceAmplitude d) t ^ 2 ≤ Real.exp 5 * releaseSquare d := by |
| 177 | rw [← original_matches_reference d eta ⟨ht.1.le, ht.2.le⟩] |
| 178 | exact (window_square_bounds d ⟨ht.1.le, ht.2.le⟩ eta).2 |
| 179 | rw [editDensityEta, abs_mul, abs_mul, abs_mul, |
| 180 | abs_of_nonneg (sq_nonneg (baseE d.core.lam (referenceAmplitude d) t))] |
| 181 | norm_num |
| 182 | have h1 := mul_le_mul_of_nonneg_left hbase (show (0 : ℝ) ≤ 2 by norm_num) |
| 183 | have h2 := mul_le_mul h1 ha (abs_nonneg _) (by positivity : 0 ≤ 2 * (Real.exp 5 * releaseSquare d)) |
| 184 | have h3 := mul_le_mul h2 hr (abs_nonneg _) |
| 185 | (by positivity : 0 ≤ 2 * (Real.exp 5 * releaseSquare d) * (3 / 2)) |
| 186 | linarith |
| 187 | · rw [editDensityEta_zero_outside w eta ht, abs_zero] |
| 188 | exact mul_nonneg (mul_nonneg (mul_nonneg (by norm_num) (editSize_nonneg w)) |
| 189 | (Real.exp_pos _).le) (releaseSquare_pos d).le |
| 190 | |
| 191 | theorem integral_Ioi_increment {f : ℝ → ℝ} (hf : Integrable f) (a y : ℝ) : |
| 192 | (∫ t in Ioi y, f t) = (∫ t in Ioi a, f t) - ∫ t in a..y, f t := by |
| 193 | have ha := intervalIntegral.integral_Iic_add_Ioi (b := a) hf.integrableOn hf.integrableOn |
| 194 | have hy := intervalIntegral.integral_Iic_add_Ioi (b := y) hf.integrableOn hf.integrableOn |
| 195 | have hd := intervalIntegral.integral_Iic_sub_Iic (a := a) (b := y) |
| 196 | hf.integrableOn hf.integrableOn |
| 197 | linarith |
| 198 | |
| 199 | theorem correctedPi_increment {d : TailData} {K : ℝ} |
| 200 | (w : ResetWitness d K) (a y eta : ℝ) : |
| 201 | correctedPi w y eta = correctedPi w a eta + |
| 202 | (1 / 2) * ∫ t in a..y, correctedAngular d w.coefficients (t, eta) ^ 2 := by |
| 203 | rw [correctedPi, integral_Ioi_increment (corrected_square_integrable w eta) a y, |
| 204 | correctedPi] |
| 205 | ring |
| 206 | |
| 207 | theorem correctedPi_eq_before {d : TailData} {K : ℝ} |
| 208 | (w : ResetWitness d K) {y : ℝ} (hy : y ≤ d.releaseStart - 4) (eta : ℝ) : |
| 209 | correctedPi w y eta = Pi d y eta := corrected_future_pressure_eq w hy eta |
| 210 | |
| 211 | theorem correctedPi_eq_after {d : TailData} {K : ℝ} |
| 212 | (w : ResetWitness d K) {y : ℝ} (hy : d.releaseStart ≤ y) (eta : ℝ) : |
| 213 | correctedPi w y eta = Pi d y eta := by |
| 214 | unfold correctedPi Pi |
| 215 | congr 1 |
| 216 | apply integral_congr_ae |
| 217 | filter_upwards [ae_restrict_mem measurableSet_Ioi] with t ht |
| 218 | rw [correctedAngular_unchanged d w.coefficients eta] |
| 219 | intro hmem |
| 220 | exact (not_lt_of_ge (hy.trans ht.le)) hmem.2 |
| 221 | |
| 222 | theorem correctedPi_eq_partial {d : TailData} {K : ℝ} |
| 223 | (w : ResetWitness d K) (y eta : ℝ) : |
| 224 | correctedPi w y eta = Pi d y eta + |
| 225 | (1 / 2) * ∫ t in (d.releaseStart - 4)..y, editDensity w (t, eta) := by |
| 226 | have hn : IntervalIntegrable (fun t => correctedAngular d w.coefficients (t, eta) ^ 2) |
| 227 | volume (d.releaseStart - 4) y := |
| 228 | (corrected_square_integrable w eta).intervalIntegrable |
| 229 | have ho : IntervalIntegrable (fun t => finalAngular d (t, eta) ^ 2) |
| 230 | volume (d.releaseStart - 4) y := |
| 231 | (SchedulePressure.angular_square_integrable d eta).intervalIntegrable |
| 232 | rw [correctedPi_increment w (d.releaseStart - 4) y eta, |
| 233 | correctedPi_eq_before w le_rfl eta, Pi_increment d (d.releaseStart - 4) y eta] |
| 234 | simp only [editDensity] |
| 235 | rw [intervalIntegral.integral_sub hn ho] |
| 236 | ring |
| 237 | |
| 238 | noncomputable def pressureChange {d : TailData} {K : ℝ} |
| 239 | (w : ResetWitness d K) (y eta : ℝ) : ℝ := correctedPi w y eta - Pi d y eta |
| 240 | |
| 241 | theorem pressureChange_eq_partial {d : TailData} {K : ℝ} |
| 242 | (w : ResetWitness d K) (y eta : ℝ) : |
| 243 | pressureChange w y eta = (1 / 2) * ∫ t in (d.releaseStart - 4)..y, editDensity w (t, eta) := by |
| 244 | rw [pressureChange, correctedPi_eq_partial] |
| 245 | ring |
| 246 | |
| 247 | theorem pressureChange_zero_before {d : TailData} {K : ℝ} |
| 248 | (w : ResetWitness d K) {y : ℝ} (hy : y ≤ d.releaseStart - 4) (eta : ℝ) : |
| 249 | pressureChange w y eta = 0 := by rw [pressureChange, correctedPi_eq_before w hy, sub_self] |
| 250 | |
| 251 | theorem pressureChange_zero_after {d : TailData} {K : ℝ} |
| 252 | (w : ResetWitness d K) {y : ℝ} (hy : d.releaseStart ≤ y) (eta : ℝ) : |
| 253 | pressureChange w y eta = 0 := by rw [pressureChange, correctedPi_eq_after w hy, sub_self] |
| 254 | |
| 255 | theorem pressureChange_hasDerivAt_eta {d : TailData} {K : ℝ} |
| 256 | (w : ResetWitness d K) (y eta : ℝ) : |
| 257 | HasDerivAt (pressureChange w y) |
| 258 | ((1 / 2) * ∫ t in (d.releaseStart - 4)..y, editDensityEta w (t, eta)) eta := by |
| 259 | have hc (q : ℝ) : Continuous (fun t => editDensity w (t, q)) := |
| 260 | (editDensity_contDiff w).continuous.comp (continuous_id.prodMk continuous_const) |
| 261 | have h := intervalIntegral.hasDerivAt_integral_of_dominated_loc_of_deriv_le |
| 262 | (F := fun q t => editDensity w (t, q)) (F' := fun q t => editDensityEta w (t, q)) |
| 263 | (x₀ := eta) (μ := volume) (a := d.releaseStart - 4) (b := y) |
| 264 | (bound := fun _ => 6 * editSize d K * Real.exp 5 * releaseSquare d) |
| 265 | (Metric.ball_mem_nhds eta (show (0 : ℝ) < 1 by norm_num)) |
| 266 | (Eventually.of_forall fun q => (hc q).aestronglyMeasurable) |
| 267 | ((hc eta).intervalIntegrable _ _) |
| 268 | ((editDensityEta_continuous_t w eta).aestronglyMeasurable) |
| 269 | (Eventually.of_forall fun t _ q _ => by |
| 270 | simpa only [Real.norm_eq_abs] using editDensityEta_abs_le w t q) |
| 271 | intervalIntegrable_const |
| 272 | (Eventually.of_forall fun t _ q _ => editDensity_hasDerivAt_eta w t q) |
| 273 | have heq : pressureChange w y = fun q => |
| 274 | (1 / 2) * ∫ t in (d.releaseStart - 4)..y, editDensity w (t, q) := |
| 275 | funext (pressureChange_eq_partial w y) |
| 276 | rw [heq] |
| 277 | exact h.2.const_mul (1 / 2) |
| 278 | |
| 279 | theorem correctedPi_hasDerivAt_eta {d : TailData} {K : ℝ} |
| 280 | (w : ResetWitness d K) (y eta : ℝ) : |
| 281 | HasDerivAt (correctedPi w y) |
| 282 | (deriv (Pi d y) eta + (1 / 2) * |
| 283 | ∫ t in (d.releaseStart - 4)..y, editDensityEta w (t, eta)) eta := by |
| 284 | have heq : correctedPi w y = fun q => Pi d y q + pressureChange w y q := by |
| 285 | funext q |
| 286 | simp [pressureChange] |
| 287 | rw [heq] |
| 288 | exact ((Pi_contDiff_eta d y).differentiable (by simp) eta).hasDerivAt.add |
| 289 | (pressureChange_hasDerivAt_eta w y eta) |
| 290 | |
| 291 | theorem correctedPi_deriv_eta {d : TailData} {K : ℝ} |
| 292 | (w : ResetWitness d K) (y eta : ℝ) : |
| 293 | deriv (correctedPi w y) eta = deriv (Pi d y) eta + deriv (pressureChange w y) eta := by |
| 294 | rw [(correctedPi_hasDerivAt_eta w y eta).deriv, |
| 295 | (pressureChange_hasDerivAt_eta w y eta).deriv] |
| 296 | |
| 297 | theorem pressureChange_deriv_zero_before {d : TailData} {K : ℝ} |
| 298 | (w : ResetWitness d K) {y : ℝ} (hy : y ≤ d.releaseStart - 4) (eta : ℝ) : |
| 299 | deriv (pressureChange w y) eta = 0 := by |
| 300 | have heq : pressureChange w y = fun _ => 0 := funext (pressureChange_zero_before w hy) |
| 301 | rw [heq] |
| 302 | simp |
| 303 | |
| 304 | theorem pressureChange_deriv_zero_after {d : TailData} {K : ℝ} |
| 305 | (w : ResetWitness d K) {y : ℝ} (hy : d.releaseStart ≤ y) (eta : ℝ) : |
| 306 | deriv (pressureChange w y) eta = 0 := by |
| 307 | have heq : pressureChange w y = fun _ => 0 := funext (pressureChange_zero_after w hy) |
| 308 | rw [heq] |
| 309 | simp |
| 310 | |
| 311 | theorem cleanPi_eta_independent_after_flatten (d : TailData) {y : ℝ} |
| 312 | (hy : d.flattenEnd ≤ y) (eta eta' : ℝ) : Pi d y eta = Pi d y eta' := by |
| 313 | unfold Pi |
| 314 | congr 1 |
| 315 | apply integral_congr_ae |
| 316 | filter_upwards [ae_restrict_mem measurableSet_Ioi] with t ht |
| 317 | rw [finalAngular_eta_independent d eta eta' (hy.trans ht.le)] |
| 318 | |
| 319 | theorem correctedPi_eta_independent_after {d : TailData} {K : ℝ} |
| 320 | (w : ResetWitness d K) {y : ℝ} (hy : d.releaseStart ≤ y) (eta eta' : ℝ) : |
| 321 | correctedPi w y eta = correctedPi w y eta' := by |
| 322 | rw [correctedPi_eq_after w hy, correctedPi_eq_after w hy] |
| 323 | exact cleanPi_eta_independent_after_flatten d ((releaseStart_gt_flattenEnd d).le.trans hy) _ _ |
| 324 | |
| 325 | theorem correctedPi_deriv_eta_zero_after {d : TailData} {K : ℝ} |
| 326 | (w : ResetWitness d K) {y : ℝ} (hy : d.releaseStart ≤ y) (eta : ℝ) : |
| 327 | deriv (correctedPi w y) eta = 0 := by |
| 328 | have heq : correctedPi w y = fun _ => correctedPi w y 0 := |
| 329 | funext (fun q => correctedPi_eta_independent_after w hy q 0) |
| 330 | rw [heq] |
| 331 | simp |
| 332 | |
| 333 | theorem half_partial_integral_abs_le {f : ℝ → ℝ} {B r y : ℝ} |
| 334 | (hB : 0 ≤ B) (hy : y ∈ Icc (r - 4) r) (hbound : ∀ t, |f t| ≤ B) : |
| 335 | |(1 / 2 : ℝ) * ∫ t in (r - 4)..y, f t| ≤ 2 * B := by |
| 336 | have hi := intervalIntegral.norm_integral_le_of_norm_le_const |
| 337 | (a := r - 4) (b := y) (f := f) |
| 338 | (fun t _ => by simpa only [Real.norm_eq_abs] using hbound t) |
| 339 | have hlen : |y - (r - 4)| ≤ 4 := by |
| 340 | rw [abs_of_nonneg (by linarith [hy.1])] |
| 341 | linarith [hy.2] |
| 342 | rw [Real.norm_eq_abs] at hi |
| 343 | rw [abs_mul] |
| 344 | rw [abs_of_nonneg (by norm_num : (0 : ℝ) ≤ 1 / 2)] |
| 345 | linarith [mul_le_mul_of_nonneg_left hlen hB] |
| 346 | |
| 347 | theorem pressureChange_deriv_abs_le {d : TailData} {K : ℝ} |
| 348 | (w : ResetWitness d K) (y eta : ℝ) : |
| 349 | |deriv (pressureChange w y) eta| ≤ |
| 350 | 12 * editSize d K * Real.exp 5 * releaseSquare d := by |
| 351 | have hsize := editSize_nonneg w |
| 352 | have hR := releaseSquare_pos d |
| 353 | by_cases hl : y ≤ d.releaseStart - 4 |
| 354 | · rw [pressureChange_deriv_zero_before w hl, abs_zero] |
| 355 | positivity |
| 356 | by_cases hr : d.releaseStart ≤ y |
| 357 | · rw [pressureChange_deriv_zero_after w hr, abs_zero] |
| 358 | positivity |
| 359 | rw [(pressureChange_hasDerivAt_eta w y eta).deriv] |
| 360 | have h := half_partial_integral_abs_le |
| 361 | (B := 6 * editSize d K * Real.exp 5 * releaseSquare d) |
| 362 | (by positivity) ⟨(le_of_not_ge hl), (le_of_not_ge hr)⟩ |
| 363 | (fun t => editDensityEta_abs_le w t eta) |
| 364 | convert! h using 1 |
| 365 | ring |
| 366 | |
| 367 | theorem clean_square_le_corrected {d : TailData} {K : ℝ} |
| 368 | (w : ResetWitness d K) (p : ℝ × ℝ) : |
| 369 | finalAngular d p ^ 2 ≤ 4 * correctedAngular d w.coefficients p ^ 2 := by |
| 370 | linarith [(corrected_square_comparison w p).1] |
| 371 | |
| 372 | /-- The edit derivative is controlled by the actual local corrected field. -/ |
| 373 | theorem pressureChange_deriv_abs_le_corrected {d : TailData} {K : ℝ} |
| 374 | (w : ResetWitness d K) (y eta : ℝ) : |
| 375 | |deriv (pressureChange w y) eta| ≤ |
| 376 | (48 * Real.exp 5 * editSize d K) * correctedAngular d w.coefficients (y, eta) ^ 2 := by |
| 377 | have hsize := editSize_nonneg w |
| 378 | by_cases hl : y ≤ d.releaseStart - 4 |
| 379 | · rw [pressureChange_deriv_zero_before w hl, abs_zero] |
| 380 | positivity |
| 381 | by_cases hr : d.releaseStart ≤ y |
| 382 | · rw [pressureChange_deriv_zero_after w hr, abs_zero] |
| 383 | positivity |
| 384 | have hR : releaseSquare d ≤ 4 * correctedAngular d w.coefficients (y, eta) ^ 2 := |
| 385 | ((window_square_bounds d ⟨le_of_not_ge hl, le_of_not_ge hr⟩ eta).1).trans |
| 386 | (clean_square_le_corrected w _) |
| 387 | apply (pressureChange_deriv_abs_le w y eta).trans |
| 388 | have h := mul_le_mul_of_nonneg_left hR |
| 389 | (show 0 ≤ 12 * editSize d K * Real.exp 5 by positivity) |
| 390 | convert! h using 1 |
| 391 | ring |
| 392 | |
| 393 | theorem correctedPi_nonpos {d : TailData} {K : ℝ} |
| 394 | (w : ResetWitness d K) (y eta : ℝ) : correctedPi w y eta ≤ 0 := by |
| 395 | unfold correctedPi |
| 396 | exact mul_nonpos_of_nonpos_of_nonneg (by norm_num) (integral_nonneg fun _ => sq_nonneg _) |
| 397 | |
| 398 | theorem correctedPi_abs_eq {d : TailData} {K : ℝ} |
| 399 | (w : ResetWitness d K) (y eta : ℝ) : |
| 400 | |correctedPi w y eta| = (1 / 2) * |
| 401 | ∫ t in Ioi y, correctedAngular d w.coefficients (t, eta) ^ 2 := by |
| 402 | rw [abs_of_nonpos (correctedPi_nonpos w y eta)] |
| 403 | unfold correctedPi |
| 404 | ring |
| 405 | |
| 406 | theorem correctedPi_abs_le {d : TailData} {K : ℝ} |
| 407 | (w : ResetWitness d K) {y eta : ℝ} (hy : 0 ≤ y) (heta : |eta| ≤ 1) : |
| 408 | |correctedPi w y eta| ≤ ((9 / 2) * envelopeConstant) * |
| 409 | correctedAngular d w.coefficients (y, eta) ^ 2 := by |
| 410 | have hi : (∫ t in Ioi y, correctedAngular d w.coefficients (t, eta) ^ 2) ≤ |
| 411 | (9 / 4) * ∫ t in Ioi y, finalAngular d (t, eta) ^ 2 := by |
| 412 | rw [← integral_const_mul] |
| 413 | exact setIntegral_mono_on (corrected_square_integrable w eta).integrableOn |
| 414 | ((SchedulePressure.angular_square_integrable d eta).const_mul (9 / 4)).integrableOn |
| 415 | measurableSet_Ioi (fun t _ => (corrected_square_comparison w (t, eta)).2) |
| 416 | have hI := hi.trans (mul_le_mul_of_nonneg_left (future_square_integral_le d hy heta) |
| 417 | (show (0 : ℝ) ≤ 9 / 4 by norm_num)) |
| 418 | have he := mul_le_mul_of_nonneg_left (clean_square_le_corrected w (y, eta)) |
| 419 | envelopeConstant_pos.le |
| 420 | have hI' := hI.trans (mul_le_mul_of_nonneg_left he (show (0 : ℝ) ≤ 9 / 4 by norm_num)) |
| 421 | rw [correctedPi_abs_eq] |
| 422 | have h := mul_le_mul_of_nonneg_left hI' (show (0 : ℝ) ≤ 1 / 2 by norm_num) |
| 423 | convert! h using 1 |
| 424 | ring |
| 425 | |
| 426 | theorem correctedPi_deriv_abs_le {d : TailData} {K : ℝ} |
| 427 | (w : ResetWitness d K) {y eta : ℝ} (hy : 0 ≤ y) (heta : |eta| ≤ 1) : |
| 428 | |deriv (correctedPi w y) eta| ≤ |
| 429 | (8 * envelopeConstant * |eta| + 48 * Real.exp 5 * editSize d K) * |
| 430 | correctedAngular d w.coefficients (y, eta) ^ 2 := by |
| 431 | have hc : |deriv (Pi d y) eta| ≤ (8 * envelopeConstant * |eta|) * |
| 432 | correctedAngular d w.coefficients (y, eta) ^ 2 := by |
| 433 | apply (Pi_deriv_abs_le d hy heta).trans |
| 434 | have h := mul_le_mul_of_nonneg_left (clean_square_le_corrected w (y, eta)) |
| 435 | (show 0 ≤ (2 * envelopeConstant) * |eta| by |
| 436 | exact mul_nonneg (mul_nonneg (by norm_num) envelopeConstant_pos.le) (abs_nonneg eta)) |
| 437 | convert! h using 1 |
| 438 | ring |
| 439 | rw [correctedPi_deriv_eta] |
| 440 | apply (abs_add_le _ _).trans |
| 441 | calc |
| 442 | _ ≤ (8 * envelopeConstant * |eta|) * correctedAngular d w.coefficients (y, eta) ^ 2 + |
| 443 | (48 * Real.exp 5 * editSize d K) * correctedAngular d w.coefficients (y, eta) ^ 2 := |
| 444 | add_le_add hc (pressureChange_deriv_abs_le_corrected w y eta) |
| 445 | _ = _ := by ring |
| 446 | |
| 447 | noncomputable def correctedConstant : ℝ := 13 * envelopeConstant + 48 * Real.exp 5 |
| 448 | |
| 449 | theorem correctedConstant_pos : 0 < correctedConstant := by |
| 450 | have h := envelopeConstant_pos |
| 451 | unfold correctedConstant |
| 452 | positivity |
| 453 | |
| 454 | theorem corrected_bounds_of_small {d : TailData} {K : ℝ} |
| 455 | (w : ResetWitness d K) (hsmall : editSize d K ≤ 1) {y eta : ℝ} |
| 456 | (hy : 0 ≤ y) (heta : |eta| ≤ 1) : |
| 457 | |correctedPi w y eta| ≤ correctedConstant * correctedAngular d w.coefficients (y, eta) ^ 2 ∧ |
| 458 | |deriv (correctedPi w y) eta| ≤ correctedConstant * correctedAngular d w.coefficients (y, eta) ^ 2 := by |
| 459 | have hM := envelopeConstant_pos |
| 460 | have he := Real.exp_pos (5 : ℝ) |
| 461 | have hfirst : (9 / 2 : ℝ) * envelopeConstant ≤ correctedConstant := by |
| 462 | unfold correctedConstant |
| 463 | linarith |
| 464 | have hderiv : 8 * envelopeConstant * |eta| + 48 * Real.exp 5 * editSize d K ≤ |
| 465 | correctedConstant := by |
| 466 | have hη := mul_le_mul_of_nonneg_left heta (show 0 ≤ 8 * envelopeConstant by positivity) |
| 467 | have hs := mul_le_mul_of_nonneg_left hsmall (show 0 ≤ 48 * Real.exp 5 by positivity) |
| 468 | unfold correctedConstant |
| 469 | linarith |
| 470 | exact ⟨(correctedPi_abs_le w hy heta).trans |
| 471 | (mul_le_mul_of_nonneg_right hfirst (sq_nonneg _)), |
| 472 | (correctedPi_deriv_abs_le w hy heta).trans |
| 473 | (mul_le_mul_of_nonneg_right hderiv (sq_nonneg _))⟩ |
| 474 | |
| 475 | /-- Canonical forward pressure with the unchanged whole-axis pressure datum. -/ |
| 476 | theorem correctedPi_eq_axisPressure_add {d : TailData} {K : ℝ} |
| 477 | (w : ResetWitness d K) (y eta : ℝ) : |
| 478 | correctedPi w y eta = SchedulePressure.axisPressure d eta + (1 / 2) * |
| 479 | ∫ t in Iic y, correctedAngular d w.coefficients (t, eta) ^ 2 := by |
| 480 | have hi := corrected_square_integrable w eta |
| 481 | have hz := w.pressure_neutral eta |
| 482 | rw [integral_sub hi (SchedulePressure.angular_square_integrable d eta)] at hz |
| 483 | have hsum := intervalIntegral.integral_Iic_add_Ioi (b := y) hi.integrableOn hi.integrableOn |
| 484 | unfold correctedPi SchedulePressure.axisPressure |
| 485 | linarith |
| 486 | |
| 487 | end NavierStokes.CorrectedPressureBounds |