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.SchedulePressure |
| 2 | import NavierStokes.UniformAngularReset |
| 3 | import Mathlib.Analysis.Calculus.Deriv.MeanValue |
| 4 | |
| 5 | /-! |
| 6 | # Uniform future-pressure bounds for the actual outgoing schedule |
| 7 | |
| 8 | The estimates concern `OutgoingTail.finalAngular`, rather than a profile with an |
| 9 | assumed envelope. Its clock decay is obtained directly from the prescribed |
| 10 | slopes, including the first unit ramp. Angular derivatives are derivatives of |
| 11 | the actual improper integral. |
| 12 | -/ |
| 13 | |
| 14 | noncomputable section |
| 15 | |
| 16 | open Set Filter MeasureTheory |
| 17 | open scoped Topology ContDiff |
| 18 | open NavierStokes.OutgoingSchedule NavierStokes.OutgoingTail |
| 19 | open NavierStokes.SchedulePressure |
| 20 | |
| 21 | namespace NavierStokes.FuturePressureBounds |
| 22 | |
| 23 | /-- The logarithm of the clock factor, omitting its positive constant prefactor. -/ |
| 24 | noncomputable def logClock (d : TailData) (y : ℝ) : ℝ := |
| 25 | logAmplitude d.core.dropLength d.core.lam y - |
| 26 | sigma ((y - d.core.endpoint) / flattenLength) * Real.log 2 + |
| 27 | releaseAdjustment d (y - d.releaseStart) + |
| 28 | Real.log (tailShape d (y - tailStart d)) |
| 29 | |
| 30 | noncomputable def clockSlope (d : TailData) (y : ℝ) : ℝ := |
| 31 | slope d.core.dropLength d.core.lam y - 1 / 2 - |
| 32 | deriv sigma ((y - d.core.endpoint) / flattenLength) / flattenLength * Real.log 2 + |
| 33 | (releaseSlope d (y - d.releaseStart) + d.core.lam) + |
| 34 | tailShapeDeriv d (y - tailStart d) / tailShape d (y - tailStart d) |
| 35 | |
| 36 | theorem logClock_hasDerivAt (d : TailData) (y : ℝ) : |
| 37 | HasDerivAt (logClock d) (clockSlope d y) y := by |
| 38 | have hp := primitive_hasDerivAt |
| 39 | (g := fun t => OutgoingSchedule.slope d.core.dropLength d.core.lam t - 1 / 2) |
| 40 | ((slope_contDiff d.core.dropLength d.core.lam).continuous.sub continuous_const) y |
| 41 | have hs := ((sigma_contDiff.differentiable (by simp) |
| 42 | ((y - d.core.endpoint) / flattenLength)).hasDerivAt).comp y |
| 43 | (((hasDerivAt_id y).sub_const d.core.endpoint).div_const flattenLength) |
| 44 | have hr := (primitive_hasDerivAt |
| 45 | (g := fun t => releaseSlope d t + d.core.lam) |
| 46 | ((releaseSlope_contDiff d).continuous.add continuous_const) |
| 47 | (y - d.releaseStart)).comp y ((hasDerivAt_id y).sub_const d.releaseStart) |
| 48 | have ht0 : HasDerivAt (fun t => tailShape d (t - tailStart d)) |
| 49 | (tailShapeDeriv d (y - tailStart d)) y := by |
| 50 | convert! (tailShape_hasDerivAt d (y - tailStart d)).comp y |
| 51 | ((hasDerivAt_id y).sub_const (tailStart d)) using 1 |
| 52 | simp |
| 53 | have ht := ht0.log (tailShape_pos d (y - tailStart d)).ne' |
| 54 | convert! ((hp.sub (hs.mul_const (Real.log 2))).add hr).add ht using 1 |
| 55 | dsimp [logClock, clockSlope, logAmplitude, releaseAdjustment] |
| 56 | ring |
| 57 | |
| 58 | theorem logClock_differentiable (d : TailData) : Differentiable ℝ (logClock d) := |
| 59 | fun y => (logClock_hasDerivAt d y).differentiableAt |
| 60 | |
| 61 | theorem clockSlope_le (d : TailData) (y : ℝ) : clockSlope d y ≤ 1 / 5 := by |
| 62 | have hf : 0 ≤ deriv sigma ((y - d.core.endpoint) / flattenLength) / |
| 63 | flattenLength * Real.log 2 := mul_nonneg |
| 64 | (div_nonneg (sigma_derivative_nonneg _) flattenLength_pos.le) |
| 65 | (Real.log_nonneg (by norm_num)) |
| 66 | have hs : slope d.core.dropLength d.core.lam y ≤ 3 / 5 := by |
| 67 | have h0 := sigma_nonneg y |
| 68 | have h1 := mul_nonneg d.core.lam_pos.le |
| 69 | (sigma_nonneg (y - (d.core.dropLength + 1))) |
| 70 | dsimp [OutgoingSchedule.slope] |
| 71 | linarith |
| 72 | have hr := (releaseSlope_bounds d (y - d.releaseStart)).2 |
| 73 | have ht := (tail_taper_log_derivative d (y - tailStart d)).2 |
| 74 | dsimp [clockSlope] |
| 75 | linarith [d.core.lam_lt, d.h_pos] |
| 76 | |
| 77 | theorem clockSlope_le_after_one (d : TailData) {y : ℝ} (hy : 1 ≤ y) : |
| 78 | clockSlope d y ≤ -(2 / 5) := by |
| 79 | have hf : 0 ≤ deriv sigma ((y - d.core.endpoint) / flattenLength) / |
| 80 | flattenLength * Real.log 2 := mul_nonneg |
| 81 | (div_nonneg (sigma_derivative_nonneg _) flattenLength_pos.le) |
| 82 | (Real.log_nonneg (by norm_num)) |
| 83 | have hs : slope d.core.dropLength d.core.lam y ≤ 0 := by |
| 84 | simp only [OutgoingSchedule.slope, sigma_one hy, sub_self, mul_zero, zero_sub] |
| 85 | exact neg_nonpos.mpr (mul_nonneg d.core.lam_pos.le (sigma_nonneg _)) |
| 86 | have hr := (releaseSlope_bounds d (y - d.releaseStart)).2 |
| 87 | have ht := (tail_taper_log_derivative d (y - tailStart d)).2 |
| 88 | dsimp [clockSlope] |
| 89 | linarith [d.core.lam_lt, d.h_pos] |
| 90 | |
| 91 | theorem logClock_increment (d : TailData) {y t : ℝ} (hyt : y ≤ t) : |
| 92 | logClock d t - logClock d y ≤ (1 / 5) * (t - y) := by |
| 93 | exact image_sub_le_mul_sub_of_deriv_le (logClock_differentiable d) |
| 94 | (fun z => by rw [(logClock_hasDerivAt d z).deriv]; exact clockSlope_le d z) hyt |
| 95 | |
| 96 | theorem logClock_increment_after_one (d : TailData) {y t : ℝ} |
| 97 | (hy : 1 ≤ y) (hyt : y ≤ t) : |
| 98 | logClock d t - logClock d y ≤ -(2 / 5) * (t - y) := by |
| 99 | apply (convex_Ici (1 : ℝ)).image_sub_le_mul_sub_of_deriv_le |
| 100 | (logClock_differentiable d).continuous.continuousOn |
| 101 | (logClock_differentiable d).differentiableOn |
| 102 | (fun z hz => ?_) y hy t (hy.trans hyt) hyt |
| 103 | rw [(logClock_hasDerivAt d z).deriv] |
| 104 | exact clockSlope_le_after_one d (interior_subset hz) |
| 105 | |
| 106 | /-- The first unit ramp costs at most `3/5` in the logarithmic envelope. -/ |
| 107 | theorem logClock_future (d : TailData) {y t : ℝ} (hy : 0 ≤ y) (hyt : y ≤ t) : |
| 108 | logClock d t - logClock d y ≤ 3 / 5 - (2 / 5) * (t - y) := by |
| 109 | by_cases hy1 : 1 ≤ y |
| 110 | · linarith [logClock_increment_after_one d hy1 hyt] |
| 111 | · have hy1' : y ≤ 1 := le_of_not_ge hy1 |
| 112 | by_cases ht1 : t ≤ 1 |
| 113 | · linarith [logClock_increment d hyt] |
| 114 | · have ht1' : 1 ≤ t := le_of_not_ge ht1 |
| 115 | linarith [logClock_increment d hy1', logClock_increment_after_one d le_rfl ht1'] |
| 116 | |
| 117 | theorem finalAngular_clock_eq (d : TailData) (y : ℝ) : |
| 118 | finalAngular d (y, 0) = |
| 119 | (d.core.P / (1 - d.rho)) * Real.exp (logClock d y) := by |
| 120 | have he : Real.exp (logClock d y) = |
| 121 | Real.exp (logAmplitude d.core.dropLength d.core.lam y) * |
| 122 | Real.exp (sigma ((y - d.core.endpoint) / flattenLength) * (0 - Real.log 2)) * |
| 123 | Real.exp (releaseAdjustment d (y - d.releaseStart)) * |
| 124 | tailShape d (y - tailStart d) := by |
| 125 | simp only [logClock, sub_eq_add_neg, Real.exp_add, |
| 126 | Real.exp_log (tailShape_pos d _), zero_add, mul_neg] |
| 127 | rw [he] |
| 128 | simp only [finalAngular, flattened, angular, radialAmplitude, shape, flattenFactor, |
| 129 | logShape, zero_pow (by norm_num : 2 ≠ 0), add_zero, inv_one, mul_one, |
| 130 | Real.log_one] |
| 131 | ring |
| 132 | |
| 133 | theorem finalAngular_clock_ratio (d : TailData) (y t : ℝ) : |
| 134 | finalAngular d (t, 0) = finalAngular d (y, 0) * |
| 135 | Real.exp (logClock d t - logClock d y) := by |
| 136 | rw [finalAngular_clock_eq d t, finalAngular_clock_eq d y, |
| 137 | mul_assoc, ← Real.exp_add] |
| 138 | congr 2 |
| 139 | ring |
| 140 | |
| 141 | theorem clock_future_bound (d : TailData) {y t : ℝ} (hy : 0 ≤ y) (hyt : y ≤ t) : |
| 142 | clockWeight d t ≤ clockWeight d y * Real.exp (6 / 5) * |
| 143 | Real.exp (-(4 / 5) * (t - y)) := by |
| 144 | have he := Real.exp_le_exp.mpr (show |
| 145 | 2 * (logClock d t - logClock d y) ≤ 6 / 5 - (4 / 5) * (t - y) by |
| 146 | linarith [logClock_future d hy hyt]) |
| 147 | calc |
| 148 | clockWeight d t = clockWeight d y * Real.exp (2 * (logClock d t - logClock d y)) := by |
| 149 | rw [clockWeight, finalAngular_clock_ratio d y t, mul_pow, clockWeight] |
| 150 | rw [show 2 * (logClock d t - logClock d y) = |
| 151 | (logClock d t - logClock d y) + (logClock d t - logClock d y) by ring, |
| 152 | Real.exp_add, pow_two] |
| 153 | ring |
| 154 | _ ≤ clockWeight d y * Real.exp (6 / 5 - (4 / 5) * (t - y)) := |
| 155 | mul_le_mul_of_nonneg_left he (clockWeight_pos d y).le |
| 156 | _ = _ := by rw [sub_eq_add_neg, Real.exp_add]; ring_nf |
| 157 | |
| 158 | theorem future_clock_integral_le (d : TailData) {y : ℝ} (hy : 0 ≤ y) : |
| 159 | (∫ t in Ioi y, clockWeight d t) ≤ |
| 160 | (5 / 4) * Real.exp (6 / 5) * clockWeight d y := by |
| 161 | have hi := (TailEnergyBounds.integrableOn_shift_exp |
| 162 | (by norm_num : (0 : ℝ) < 4 / 5) y).const_mul |
| 163 | (clockWeight d y * Real.exp (6 / 5)) |
| 164 | have hb := setIntegral_mono_on (clockWeight_integrable d).integrableOn hi |
| 165 | measurableSet_Ioi (fun t ht => clock_future_bound d hy ht.le) |
| 166 | rw [integral_const_mul, TailEnergyBounds.integral_shift_exp |
| 167 | (by norm_num : (0 : ℝ) < 4 / 5) y] at hb |
| 168 | convert! hb using 1 |
| 169 | ring |
| 170 | |
| 171 | theorem angular_square_le_clock (d : TailData) (t eta : ℝ) : |
| 172 | finalAngular d (t, eta) ^ 2 ≤ clockWeight d t := by |
| 173 | rw [angular_square_factorization] |
| 174 | exact mul_le_of_le_one_right (clockWeight_pos d t).le |
| 175 | (PressureDatum.kernel_le_one (shapeExponent_bounds d t).1 eta) |
| 176 | |
| 177 | theorem clock_le_four_angular_square (d : TailData) (y : ℝ) {eta : ℝ} |
| 178 | (heta : |eta| ≤ 1) : clockWeight d y ≤ 4 * finalAngular d (y, eta) ^ 2 := by |
| 179 | have hs : eta ^ 2 ≤ 1 := by nlinarith [sq_abs eta, abs_nonneg eta] |
| 180 | have hk : (1 / 4 : ℝ) ≤ PressureDatum.kernel (shapeExponent d y) eta := by |
| 181 | apply le_trans _ (PressureDatum.kernel_antitone (shapeExponent_bounds d y).2 eta) |
| 182 | rw [PressureDatum.kernel_one] |
| 183 | have hi : (1 / 2 : ℝ) ≤ (1 + eta ^ 2)⁻¹ := by |
| 184 | have hdiv : (1 : ℝ) / 2 ≤ 1 / (1 + eta ^ 2) := |
| 185 | one_div_le_one_div_of_le (by positivity) (by linarith) |
| 186 | simpa only [one_div] using hdiv |
| 187 | nlinarith [sq_nonneg ((1 + eta ^ 2)⁻¹ - 1 / 2)] |
| 188 | rw [angular_square_factorization] |
| 189 | nlinarith [mul_le_mul_of_nonneg_left hk (clockWeight_pos d y).le] |
| 190 | |
| 191 | /-- A single numerical constant, independent of every schedule parameter. -/ |
| 192 | noncomputable def envelopeConstant : ℝ := 5 * Real.exp (6 / 5) |
| 193 | |
| 194 | theorem envelopeConstant_pos : 0 < envelopeConstant := by |
| 195 | unfold envelopeConstant |
| 196 | positivity |
| 197 | |
| 198 | theorem future_square_integral_le (d : TailData) {y eta : ℝ} |
| 199 | (hy : 0 ≤ y) (heta : |eta| ≤ 1) : |
| 200 | (∫ t in Ioi y, finalAngular d (t, eta) ^ 2) ≤ |
| 201 | envelopeConstant * finalAngular d (y, eta) ^ 2 := by |
| 202 | calc |
| 203 | _ ≤ ∫ t in Ioi y, clockWeight d t := setIntegral_mono_on |
| 204 | (angular_square_integrable d eta).integrableOn |
| 205 | (clockWeight_integrable d).integrableOn measurableSet_Ioi |
| 206 | (fun t _ => angular_square_le_clock d t eta) |
| 207 | _ ≤ (5 / 4) * Real.exp (6 / 5) * clockWeight d y := future_clock_integral_le d hy |
| 208 | _ ≤ envelopeConstant * finalAngular d (y, eta) ^ 2 := by |
| 209 | have h := mul_le_mul_of_nonneg_left (clock_le_four_angular_square d y heta) |
| 210 | (show 0 ≤ (5 / 4 : ℝ) * Real.exp (6 / 5) by positivity) |
| 211 | convert! h using 1 |
| 212 | unfold envelopeConstant |
| 213 | ring |
| 214 | |
| 215 | /-- The canonical pressure from the actual future of the clean outgoing field. -/ |
| 216 | noncomputable def Pi (d : TailData) (y eta : ℝ) : ℝ := |
| 217 | -(1 / 2 : ℝ) * ∫ t in Ioi y, finalAngular d (t, eta) ^ 2 |
| 218 | |
| 219 | /-- The moment indexed by the nonnegative shape exponent. -/ |
| 220 | noncomputable def futureMass (d : TailData) (y : ℝ) (n : ℕ) (eta : ℝ) : ℝ := |
| 221 | ∫ t in Ioi y, shapeExponent d t ^ n * finalAngular d (t, eta) ^ 2 |
| 222 | |
| 223 | noncomputable def futureWeight (d : TailData) (y : ℝ) (n : ℕ) (t : ℝ) : ℝ := |
| 224 | (Ioi y).indicator (clockWeight d) t * shapeExponent d t ^ n |
| 225 | |
| 226 | theorem futureWeight_admissible (d : TailData) (y : ℝ) (n : ℕ) : |
| 227 | PressureDatum.Admissible (futureWeight d y n) (shapeExponent d) 1 := by |
| 228 | induction n with |
| 229 | | zero => |
| 230 | have h : PressureDatum.Admissible ((Ioi y).indicator (clockWeight d)) |
| 231 | (shapeExponent d) 1 := { |
| 232 | cap_nonneg := by norm_num |
| 233 | integrable := (clockWeight_integrable d).indicator measurableSet_Ioi |
| 234 | nonneg := fun t => indicator_nonneg (fun t _ => (clockWeight_pos d t).le) t |
| 235 | measurable := (shapeExponent_contDiff d).continuous.measurable |
| 236 | exponent_nonneg := fun t => (shapeExponent_bounds d t).1 |
| 237 | exponent_le := fun t => (shapeExponent_bounds d t).2 } |
| 238 | convert! h using 1 |
| 239 | funext t |
| 240 | simp only [futureWeight, pow_zero, mul_one] |
| 241 | | succ n hn => |
| 242 | convert! PressureDatum.exponent_weight_admissible hn using 1 |
| 243 | funext t |
| 244 | simp only [futureWeight, pow_succ, mul_assoc] |
| 245 | |
| 246 | theorem futureMass_eq (d : TailData) (y : ℝ) (n : ℕ) (eta : ℝ) : |
| 247 | futureMass d y n eta = |
| 248 | ∫ t, futureWeight d y n t * PressureDatum.kernel (shapeExponent d t) eta := by |
| 249 | rw [futureMass, ← integral_indicator measurableSet_Ioi] |
| 250 | apply integral_congr_ae |
| 251 | filter_upwards [] with t |
| 252 | by_cases ht : t ∈ Ioi y |
| 253 | · simp only [futureWeight, indicator_of_mem ht, angular_square_factorization] |
| 254 | ring |
| 255 | · simp only [futureWeight, indicator_of_notMem ht, zero_mul] |
| 256 | |
| 257 | theorem futureMass_pressure (d : TailData) (y : ℝ) (n : ℕ) : |
| 258 | futureMass d y n = fun eta => |
| 259 | -2 * PressureDatum.pressure (futureWeight d y n) (shapeExponent d) eta := by |
| 260 | funext eta |
| 261 | rw [futureMass_eq] |
| 262 | unfold PressureDatum.pressure |
| 263 | ring |
| 264 | |
| 265 | theorem Pi_eq_pressure (d : TailData) (y : ℝ) : |
| 266 | Pi d y = PressureDatum.pressure (futureWeight d y 0) (shapeExponent d) := by |
| 267 | funext eta |
| 268 | have h := futureMass_eq d y 0 eta |
| 269 | simp only [futureMass, pow_zero, one_mul] at h |
| 270 | rw [Pi, h] |
| 271 | rfl |
| 272 | |
| 273 | theorem Pi_contDiff_eta (d : TailData) (y : ℝ) : ContDiff ℝ ∞ (Pi d y) := by |
| 274 | rw [Pi_eq_pressure] |
| 275 | exact PressureDatum.pressure_contDiff (futureWeight_admissible d y 0) |
| 276 | |
| 277 | theorem futureMass_nonneg (d : TailData) (y : ℝ) (n : ℕ) (eta : ℝ) : |
| 278 | 0 ≤ futureMass d y n eta := by |
| 279 | apply integral_nonneg |
| 280 | intro t |
| 281 | exact mul_nonneg (pow_nonneg (shapeExponent_bounds d t).1 n) (sq_nonneg _) |
| 282 | |
| 283 | theorem futureMass_le_zero (d : TailData) (y : ℝ) (n : ℕ) (eta : ℝ) : |
| 284 | futureMass d y n eta ≤ futureMass d y 0 eta := by |
| 285 | rw [futureMass_eq, futureMass_eq] |
| 286 | apply integral_mono |
| 287 | (PressureDatum.integrable_kernel (futureWeight_admissible d y n) eta) |
| 288 | (PressureDatum.integrable_kernel (futureWeight_admissible d y 0) eta) |
| 289 | intro t |
| 290 | have ha := pow_le_one₀ (n := n) (shapeExponent_bounds d t).1 (shapeExponent_bounds d t).2 |
| 291 | have hi : 0 ≤ (Ioi y).indicator (clockWeight d) t := |
| 292 | indicator_nonneg (fun t _ => (clockWeight_pos d t).le) t |
| 293 | simp only [futureWeight, pow_zero, mul_one] |
| 294 | exact mul_le_mul_of_nonneg_right (mul_le_of_le_one_right hi ha) |
| 295 | (PressureDatum.kernel_pos _ _).le |
| 296 | |
| 297 | theorem Pi_nonpos (d : TailData) (y eta : ℝ) : Pi d y eta ≤ 0 := by |
| 298 | rw [Pi_eq_pressure] |
| 299 | exact PressureDatum.pressure_nonpos (futureWeight_admissible d y 0) eta |
| 300 | |
| 301 | theorem Pi_abs_eq (d : TailData) (y eta : ℝ) : |
| 302 | |Pi d y eta| = (1 / 2) * futureMass d y 0 eta := by |
| 303 | rw [abs_of_nonpos (Pi_nonpos d y eta)] |
| 304 | simp only [Pi, futureMass, pow_zero, one_mul] |
| 305 | ring |
| 306 | |
| 307 | theorem Pi_abs_le (d : TailData) {y eta : ℝ} (hy : 0 ≤ y) (heta : |eta| ≤ 1) : |
| 308 | |Pi d y eta| ≤ (envelopeConstant / 2) * finalAngular d (y, eta) ^ 2 := by |
| 309 | rw [Pi_abs_eq] |
| 310 | have h := mul_le_mul_of_nonneg_left (future_square_integral_le d hy heta) |
| 311 | (show 0 ≤ (1 / 2 : ℝ) by norm_num) |
| 312 | simp only [futureMass, pow_zero, one_mul] |
| 313 | convert! h using 1 |
| 314 | ring |
| 315 | |
| 316 | theorem futureMass_hasDerivAt (d : TailData) (y : ℝ) (n : ℕ) (eta : ℝ) : |
| 317 | HasDerivAt (futureMass d y n) |
| 318 | ((-4 * eta / (1 + eta ^ 2)) * futureMass d y (n + 1) eta) eta := by |
| 319 | have hI : (∫ t, futureWeight d y n t * shapeExponent d t * |
| 320 | PressureDatum.kernel (shapeExponent d t) eta) = futureMass d y (n + 1) eta := by |
| 321 | rw [futureMass_eq] |
| 322 | apply integral_congr_ae |
| 323 | filter_upwards [] with t |
| 324 | simp only [futureWeight, pow_succ] |
| 325 | ring |
| 326 | rw [futureMass_pressure] |
| 327 | convert! (PressureDatum.hasDerivAt_pressure (futureWeight_admissible d y n) eta).const_mul |
| 328 | (-2) using 1 |
| 329 | rw [hI] |
| 330 | ring |
| 331 | |
| 332 | theorem Pi_hasDerivAt_eta (d : TailData) (y eta : ℝ) : |
| 333 | HasDerivAt (Pi d y) |
| 334 | ((2 * eta / (1 + eta ^ 2)) * futureMass d y 1 eta) eta := by |
| 335 | rw [Pi_eq_pressure] |
| 336 | convert! PressureDatum.hasDerivAt_pressure (futureWeight_admissible d y 0) eta using 1 |
| 337 | congr 1 |
| 338 | rw [futureMass_eq] |
| 339 | apply integral_congr_ae |
| 340 | filter_upwards [] with t |
| 341 | simp only [futureWeight, pow_zero, pow_one, mul_one] |
| 342 | |
| 343 | theorem Pi_deriv_eta (d : TailData) (y eta : ℝ) : |
| 344 | deriv (Pi d y) eta = (2 * eta / (1 + eta ^ 2)) * futureMass d y 1 eta := |
| 345 | (Pi_hasDerivAt_eta d y eta).deriv |
| 346 | |
| 347 | theorem Pi_second_hasDerivAt_eta (d : TailData) (y eta : ℝ) : |
| 348 | HasDerivAt (deriv (Pi d y)) |
| 349 | ((2 * (1 - eta ^ 2) / (1 + eta ^ 2) ^ 2) * futureMass d y 1 eta - |
| 350 | (8 * eta ^ 2 / (1 + eta ^ 2) ^ 2) * futureMass d y 2 eta) eta := by |
| 351 | have hden : 1 + eta ^ 2 ≠ 0 := by positivity |
| 352 | have hk : HasDerivAt (fun q : ℝ => 2 * q / (1 + q ^ 2)) |
| 353 | (2 * (1 - eta ^ 2) / (1 + eta ^ 2) ^ 2) eta := by |
| 354 | convert! ((hasDerivAt_id eta).const_mul 2).fun_div |
| 355 | ((hasDerivAt_const eta (1 : ℝ)).fun_add ((hasDerivAt_id eta).fun_pow 2)) hden using 1 |
| 356 | dsimp only [id] |
| 357 | ring |
| 358 | have hfun : deriv (Pi d y) = fun q => |
| 359 | (2 * q / (1 + q ^ 2)) * futureMass d y 1 q := funext (Pi_deriv_eta d y) |
| 360 | rw [hfun] |
| 361 | convert! hk.fun_mul (futureMass_hasDerivAt d y 1 eta) using 1 |
| 362 | norm_num |
| 363 | field_simp ; ring |
| 364 | |
| 365 | theorem Pi_second_deriv_eta (d : TailData) (y eta : ℝ) : |
| 366 | deriv (deriv (Pi d y)) eta = |
| 367 | (2 * (1 - eta ^ 2) / (1 + eta ^ 2) ^ 2) * futureMass d y 1 eta - |
| 368 | (8 * eta ^ 2 / (1 + eta ^ 2) ^ 2) * futureMass d y 2 eta := |
| 369 | (Pi_second_hasDerivAt_eta d y eta).deriv |
| 370 | |
| 371 | /-- The angular derivative retains its factor `|eta|` on the entire real axis. -/ |
| 372 | theorem Pi_deriv_abs_le_pressure (d : TailData) (y eta : ℝ) : |
| 373 | |deriv (Pi d y) eta| ≤ 4 * |eta| * |Pi d y eta| := by |
| 374 | have hden : 0 < 1 + eta ^ 2 := by positivity |
| 375 | have hc : |2 * eta / (1 + eta ^ 2)| ≤ 2 * |eta| := by |
| 376 | rw [abs_div, abs_mul, abs_of_pos hden] |
| 377 | norm_num |
| 378 | apply (div_le_iff₀ hden).mpr |
| 379 | nlinarith [sq_nonneg eta, abs_nonneg eta, |
| 380 | mul_nonneg (sq_nonneg eta) (abs_nonneg eta)] |
| 381 | rw [Pi_deriv_eta, abs_mul, abs_of_nonneg (futureMass_nonneg d y 1 eta), Pi_abs_eq] |
| 382 | calc |
| 383 | _ ≤ (2 * |eta|) * futureMass d y 0 eta := |
| 384 | mul_le_mul hc (futureMass_le_zero d y 1 eta) |
| 385 | (futureMass_nonneg d y 1 eta) (by positivity) |
| 386 | _ = _ := by ring |
| 387 | |
| 388 | theorem Pi_deriv_abs_le (d : TailData) {y eta : ℝ} |
| 389 | (hy : 0 ≤ y) (heta : |eta| ≤ 1) : |
| 390 | |deriv (Pi d y) eta| ≤ |
| 391 | (2 * envelopeConstant) * |eta| * finalAngular d (y, eta) ^ 2 := by |
| 392 | apply (Pi_deriv_abs_le_pressure d y eta).trans |
| 393 | have h := mul_le_mul_of_nonneg_left (Pi_abs_le d hy heta) |
| 394 | (show 0 ≤ 4 * |eta| by positivity) |
| 395 | convert! h using 1 |
| 396 | ring |
| 397 | |
| 398 | theorem Pi_second_deriv_abs_le_pressure (d : TailData) (y : ℝ) {eta : ℝ} |
| 399 | (heta : |eta| ≤ 1) : |
| 400 | |deriv (deriv (Pi d y)) eta| ≤ 20 * |Pi d y eta| := by |
| 401 | have hs : eta ^ 2 ≤ 1 := by nlinarith [sq_abs eta, abs_nonneg eta] |
| 402 | have hsub : 0 ≤ 1 - eta ^ 2 := sub_nonneg.mpr hs |
| 403 | have hsq : (1 : ℝ) ≤ (1 + eta ^ 2) ^ 2 := by nlinarith [sq_nonneg eta] |
| 404 | have hpos : 0 < (1 + eta ^ 2) ^ 2 := by positivity |
| 405 | have h1 : |2 * (1 - eta ^ 2) / (1 + eta ^ 2) ^ 2| ≤ 2 := by |
| 406 | rw [abs_of_nonneg (by positivity : 0 ≤ 2 * (1 - eta ^ 2) / (1 + eta ^ 2) ^ 2)] |
| 407 | apply (div_le_iff₀ hpos).mpr |
| 408 | nlinarith [sq_nonneg eta] |
| 409 | have h2 : |8 * eta ^ 2 / (1 + eta ^ 2) ^ 2| ≤ 8 := by |
| 410 | rw [abs_of_nonneg (by positivity : 0 ≤ 8 * eta ^ 2 / (1 + eta ^ 2) ^ 2)] |
| 411 | apply (div_le_iff₀ hpos).mpr |
| 412 | nlinarith |
| 413 | rw [Pi_second_deriv_eta] |
| 414 | calc |
| 415 | _ ≤ |(2 * (1 - eta ^ 2) / (1 + eta ^ 2) ^ 2) * futureMass d y 1 eta| + |
| 416 | |(8 * eta ^ 2 / (1 + eta ^ 2) ^ 2) * futureMass d y 2 eta| := abs_sub _ _ |
| 417 | _ ≤ 2 * futureMass d y 0 eta + 8 * futureMass d y 0 eta := by |
| 418 | rw [abs_mul, abs_mul, abs_of_nonneg (futureMass_nonneg d y 1 eta), |
| 419 | abs_of_nonneg (futureMass_nonneg d y 2 eta)] |
| 420 | exact add_le_add |
| 421 | (mul_le_mul h1 (futureMass_le_zero d y 1 eta) (futureMass_nonneg d y 1 eta) (by norm_num)) |
| 422 | (mul_le_mul h2 (futureMass_le_zero d y 2 eta) (futureMass_nonneg d y 2 eta) (by norm_num)) |
| 423 | _ = _ := by rw [Pi_abs_eq]; ring |
| 424 | |
| 425 | theorem Pi_second_deriv_abs_le (d : TailData) {y eta : ℝ} |
| 426 | (hy : 0 ≤ y) (heta : |eta| ≤ 1) : |
| 427 | |deriv (deriv (Pi d y)) eta| ≤ |
| 428 | (10 * envelopeConstant) * finalAngular d (y, eta) ^ 2 := by |
| 429 | apply (Pi_second_deriv_abs_le_pressure d y heta).trans |
| 430 | have h := mul_le_mul_of_nonneg_left (Pi_abs_le d hy heta) (show (0 : ℝ) ≤ 20 by norm_num) |
| 431 | convert! h using 1 |
| 432 | ring |
| 433 | |
| 434 | /-- An exact finite-history expression, valid even when the endpoint is negative. -/ |
| 435 | theorem Pi_increment (d : TailData) (a y eta : ℝ) : |
| 436 | Pi d y eta = Pi d a eta + (1 / 2) * ∫ t in a..y, finalAngular d (t, eta) ^ 2 := by |
| 437 | have hi := angular_square_integrable d eta |
| 438 | have ha := intervalIntegral.integral_Iic_add_Ioi (b := a) hi.integrableOn hi.integrableOn |
| 439 | have hy := intervalIntegral.integral_Iic_add_Ioi (b := y) hi.integrableOn hi.integrableOn |
| 440 | have hd := intervalIntegral.integral_Iic_sub_Iic (a := a) (b := y) |
| 441 | hi.integrableOn hi.integrableOn |
| 442 | unfold Pi |
| 443 | linarith |
| 444 | |
| 445 | theorem Pi_hasDerivAt_y (d : TailData) (y eta : ℝ) : |
| 446 | HasDerivAt (fun t => Pi d t eta) ((1 / 2) * finalAngular d (y, eta) ^ 2) y := by |
| 447 | have hf : Continuous (fun t => finalAngular d (t, eta) ^ 2) := |
| 448 | (((finalAngular_contDiff d).continuous.comp |
| 449 | (continuous_id.prodMk continuous_const)).pow 2) |
| 450 | have heq : (fun t => Pi d t eta) = fun t => |
| 451 | Pi d 0 eta + (1 / 2) * primitive (fun v => finalAngular d (v, eta) ^ 2) t := by |
| 452 | funext t |
| 453 | exact Pi_increment d 0 t eta |
| 454 | rw [heq] |
| 455 | exact ((primitive_hasDerivAt hf y).const_mul (1 / 2)).const_add _ |
| 456 | |
| 457 | theorem Pi_deriv_y (d : TailData) (y eta : ℝ) : |
| 458 | deriv (fun t => Pi d t eta) y = (1 / 2) * finalAngular d (y, eta) ^ 2 := |
| 459 | (Pi_hasDerivAt_y d y eta).deriv |
| 460 | |
| 461 | theorem Pi_eq_axisPressure_add (d : TailData) (y eta : ℝ) : |
| 462 | Pi d y eta = axisPressure d eta + |
| 463 | (1 / 2) * ∫ t in Iic y, finalAngular d (t, eta) ^ 2 := by |
| 464 | have hi := angular_square_integrable d eta |
| 465 | have hsum := intervalIntegral.integral_Iic_add_Ioi (b := y) |
| 466 | hi.integrableOn hi.integrableOn |
| 467 | unfold Pi axisPressure |
| 468 | linarith |
| 469 | |
| 470 | theorem ideal_left_integral (d : TailData) (eta : ℝ) : |
| 471 | (∫ t in Iic (0 : ℝ), finalAngular d (t, eta) ^ 2) = |
| 472 | 5 * d.core.P ^ 2 * shape eta ^ 2 := by |
| 473 | calc |
| 474 | _ = ∫ t in Iic (0 : ℝ), |
| 475 | (d.core.P ^ 2 * Real.exp ((1 / 5 : ℝ) * t)) * shape eta ^ 2 := by |
| 476 | apply integral_congr_ae |
| 477 | filter_upwards [ae_restrict_mem measurableSet_Iic] with t ht |
| 478 | rw [angular_square_factorization, clockWeight_ideal d ht, |
| 479 | shapeExponent_ideal d ht, PressureDatum.kernel_one] |
| 480 | rfl |
| 481 | _ = _ := by rw [integral_mul_const, PressureDatum.ideal_prefix_mass] |
| 482 | |
| 483 | theorem Pi_zero (d : TailData) (eta : ℝ) : |
| 484 | Pi d 0 eta = axisPressure d eta + (5 / 2) * d.core.P ^ 2 * shape eta ^ 2 := by |
| 485 | rw [Pi_eq_axisPressure_add, ideal_left_integral] |
| 486 | ring |
| 487 | |
| 488 | /-- The exact bridge to the initial ramp/drop pressure history. -/ |
| 489 | theorem Pi_eq_radial_history (d : TailData) {y : ℝ} |
| 490 | (hy : 0 ≤ y) (hyend : y ≤ d.core.endpoint) (eta : ℝ) : |
| 491 | Pi d y eta = axisPressure d eta + shape eta ^ 2 * |
| 492 | ((5 / 2) * d.core.P ^ 2 + (1 / 2) * |
| 493 | ∫ t in (0 : ℝ)..y, radialAmplitude d.core.P d.core.dropLength d.core.lam t ^ 2) := by |
| 494 | have hint : (∫ t in (0 : ℝ)..y, finalAngular d (t, eta) ^ 2) = |
| 495 | (∫ t in (0 : ℝ)..y, |
| 496 | radialAmplitude d.core.P d.core.dropLength d.core.lam t ^ 2) * shape eta ^ 2 := by |
| 497 | rw [← intervalIntegral.integral_mul_const] |
| 498 | apply intervalIntegral.integral_congr |
| 499 | intro t ht |
| 500 | have htend : t ≤ d.core.endpoint := ((uIcc_of_le hy ▸ ht).2).trans hyend |
| 501 | dsimp only |
| 502 | rw [finalAngular_before d eta htend] |
| 503 | simp only [angular, mul_pow] |
| 504 | rw [Pi_increment d 0 y eta, Pi_zero, hint] |
| 505 | ring |
| 506 | |
| 507 | /-- A future-supported edit with zero total integral has zero future integral. -/ |
| 508 | theorem future_integral_unchanged {f g : ℝ → ℝ} {y : ℝ} |
| 509 | (hf : Integrable f) (hg : Integrable g) |
| 510 | (hzero : (∫ t, f t - g t) = 0) (hbefore : ∀ t ≤ y, f t = g t) : |
| 511 | (∫ t in Ioi y, f t) = ∫ t in Ioi y, g t := by |
| 512 | have heq : (Ioi y).indicator (fun t => f t - g t) = fun t => f t - g t := by |
| 513 | funext t |
| 514 | by_cases ht : t ∈ Ioi y |
| 515 | · exact indicator_of_mem ht _ |
| 516 | · have hty : t ≤ y := le_of_not_gt ht |
| 517 | simp only [indicator_of_notMem ht, hbefore t hty, sub_self] |
| 518 | have hz : (∫ t in Ioi y, f t - g t) = 0 := by |
| 519 | rw [← integral_indicator measurableSet_Ioi, heq] |
| 520 | exact hzero |
| 521 | rw [integral_sub hf.integrableOn hg.integrableOn] at hz |
| 522 | exact sub_eq_zero.mp hz |
| 523 | |
| 524 | theorem corrected_square_integrable {d : TailData} {K : ℝ} |
| 525 | (w : UniformAngularReset.ResetWitness d K) (eta : ℝ) : |
| 526 | Integrable (fun t => UniformAngularReset.correctedAngular d w.coefficients (t, eta) ^ 2) := by |
| 527 | have hc : Continuous (fun t => |
| 528 | UniformAngularReset.correctedAngular d w.coefficients (t, eta) ^ 2) := |
| 529 | (((UniformAngularReset.correctedAngular_contDiff d w.coefficients w.smooth).continuous.comp |
| 530 | (continuous_id.prodMk continuous_const)).pow 2) |
| 531 | apply ((angular_square_integrable d eta).const_mul (9 / 4 : ℝ)).mono' |
| 532 | hc.aestronglyMeasurable |
| 533 | filter_upwards [] with t |
| 534 | rw [Real.norm_eq_abs, abs_of_nonneg (sq_nonneg _)] |
| 535 | have hb := abs_le.mp (w.small_jets eta (t - UniformAngularReset.correctionCenter d)).1 |
| 536 | have hr : (1 + AngularMomentReset.relative (w.coefficients eta) |
| 537 | (t - UniformAngularReset.correctionCenter d)) ^ 2 ≤ 9 / 4 := by |
| 538 | nlinarith |
| 539 | simp only [UniformAngularReset.correctedAngular, mul_pow] |
| 540 | exact (mul_le_mul_of_nonneg_left hr (sq_nonneg _)).trans_eq (mul_comm _ _) |
| 541 | |
| 542 | /-- The actual pressure-neutral angular reset may be omitted before its support. -/ |
| 543 | theorem corrected_future_integral_eq {d : TailData} {K : ℝ} |
| 544 | (w : UniformAngularReset.ResetWitness d K) {y : ℝ} |
| 545 | (hy : y ≤ d.releaseStart - 4) (eta : ℝ) : |
| 546 | (∫ t in Ioi y, UniformAngularReset.correctedAngular d w.coefficients (t, eta) ^ 2) = |
| 547 | ∫ t in Ioi y, finalAngular d (t, eta) ^ 2 := by |
| 548 | apply future_integral_unchanged (corrected_square_integrable w eta) |
| 549 | (angular_square_integrable d eta) (w.pressure_neutral eta) |
| 550 | intro t ht |
| 551 | rw [UniformAngularReset.correctedAngular_unchanged d w.coefficients eta] |
| 552 | intro hmem |
| 553 | exact (not_lt_of_ge (ht.trans hy)) hmem.1 |
| 554 | |
| 555 | theorem corrected_future_pressure_eq {d : TailData} {K : ℝ} |
| 556 | (w : UniformAngularReset.ResetWitness d K) {y : ℝ} |
| 557 | (hy : y ≤ d.releaseStart - 4) (eta : ℝ) : |
| 558 | -(1 / 2 : ℝ) * |
| 559 | (∫ t in Ioi y, UniformAngularReset.correctedAngular d w.coefficients (t, eta) ^ 2) = |
| 560 | Pi d y eta := by |
| 561 | rw [corrected_future_integral_eq w hy eta] |
| 562 | rfl |
| 563 | |
| 564 | /-- All three estimates use numerical constants uniform in `lambda`, `h`, and |
| 565 | the other choices in the constructed schedule. -/ |
| 566 | theorem uniform_pressure_bounds (d : TailData) {y eta : ℝ} |
| 567 | (hy : 0 ≤ y) (heta : |eta| ≤ 1) : |
| 568 | |Pi d y eta| ≤ (envelopeConstant / 2) * finalAngular d (y, eta) ^ 2 ∧ |
| 569 | |deriv (Pi d y) eta| ≤ |
| 570 | (2 * envelopeConstant) * |eta| * finalAngular d (y, eta) ^ 2 ∧ |
| 571 | |deriv (deriv (Pi d y)) eta| ≤ |
| 572 | (10 * envelopeConstant) * finalAngular d (y, eta) ^ 2 := |
| 573 | ⟨Pi_abs_le d hy heta, Pi_deriv_abs_le d hy heta, Pi_second_deriv_abs_le d hy heta⟩ |
| 574 | |
| 575 | end NavierStokes.FuturePressureBounds |