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.LocalizedMomentRepair |
| 2 | import NavierStokes.SmoothMomentRepair |
| 3 | import Mathlib.MeasureTheory.Group.Integral |
| 4 | import Mathlib.Topology.Algebra.Module.FiniteDimension |
| 5 | import Mathlib.Tactic.FinCases |
| 6 | |
| 7 | /-! |
| 8 | # A pressure-neutral angular-moment reset |
| 9 | |
| 10 | Two identical translated smooth relative bumps repair the angular moment while |
| 11 | preserving the pressure integral exactly. The actual two-row derivative matrix |
| 12 | is proved nonsingular, and the small smooth nonlinear branch is constructed. |
| 13 | -/ |
| 14 | |
| 15 | noncomputable section |
| 16 | |
| 17 | open Set Function Filter MeasureTheory |
| 18 | open scoped BigOperators ContDiff Topology |
| 19 | |
| 20 | namespace NavierStokes.AngularMomentReset |
| 21 | |
| 22 | abbrev Coeff := Fin 2 → ℝ |
| 23 | |
| 24 | def template : ℝ → ℝ := LocalizedMomentRepair.bump (-3 / 10) (3 / 10) |
| 25 | |
| 26 | def bump (j : Fin 2) (y : ℝ) : ℝ := template (y - 2 * (j.val : ℝ)) |
| 27 | |
| 28 | theorem template_contDiff : ContDiff ℝ ∞ template := |
| 29 | LocalizedMomentRepair.bump_contDiff _ _ |
| 30 | |
| 31 | theorem template_at_zero : template 0 = 1 := by |
| 32 | have h := LocalizedMomentRepair.bump_at_center (-3 / 10) (3 / 10) |
| 33 | norm_num at h |
| 34 | simpa [template, neg_div] using h |
| 35 | |
| 36 | theorem template_support : support template ⊆ Icc (-3 / 20 : ℝ) (3 / 20) := by |
| 37 | have h := LocalizedMomentRepair.bump_support_subset (-3 / 10) (3 / 10) (by norm_num) |
| 38 | norm_num [LocalizedMomentRepair.innerLower, LocalizedMomentRepair.innerUpper] at h |
| 39 | simpa [template, neg_div] using h |
| 40 | |
| 41 | theorem template_hasCompactSupport : HasCompactSupport template := |
| 42 | HasCompactSupport.of_support_subset_isCompact isCompact_Icc template_support |
| 43 | |
| 44 | theorem bump_contDiff (j : Fin 2) : ContDiff ℝ ∞ (bump j) := |
| 45 | template_contDiff.comp (contDiff_id.sub contDiff_const) |
| 46 | |
| 47 | theorem bump_nonneg (j : Fin 2) (y : ℝ) : 0 ≤ bump j y := |
| 48 | LocalizedMomentRepair.bump_nonneg _ _ _ |
| 49 | |
| 50 | theorem bump_le_one (j : Fin 2) (y : ℝ) : bump j y ≤ 1 := |
| 51 | LocalizedMomentRepair.bump_le_one _ _ _ |
| 52 | |
| 53 | theorem bump_support (j : Fin 2) : |
| 54 | support (bump j) ⊆ Icc (2 * (j.val : ℝ) - 3 / 20) (2 * (j.val : ℝ) + 3 / 20) := by |
| 55 | intro y hy |
| 56 | have h := template_support hy |
| 57 | change (-3 : ℝ) / 20 ≤ y - 2 * (j.val : ℝ) ∧ y - 2 * (j.val : ℝ) ≤ 3 / 20 at h |
| 58 | constructor <;> linarith [h.1, h.2] |
| 59 | |
| 60 | theorem bump_hasCompactSupport (j : Fin 2) : HasCompactSupport (bump j) := |
| 61 | HasCompactSupport.of_support_subset_isCompact isCompact_Icc (bump_support j) |
| 62 | |
| 63 | theorem bumps_disjoint (y : ℝ) : bump 0 y * bump 1 y = 0 := by |
| 64 | by_cases h0 : bump 0 y = 0 |
| 65 | · simp [h0] |
| 66 | by_cases h1 : bump 1 y = 0 |
| 67 | · simp [h1] |
| 68 | have hs0 := bump_support 0 h0 |
| 69 | have hs1 := bump_support 1 h1 |
| 70 | norm_num at hs0 hs1 |
| 71 | linarith [hs0.2, hs1.1] |
| 72 | |
| 73 | def moment (s : ℝ) : ℝ := ∫ y, Real.exp (s * y) * template y |
| 74 | |
| 75 | theorem weighted_bump_integrable (s : ℝ) (j : Fin 2) : |
| 76 | Integrable (fun y => Real.exp (s * y) * bump j y) := |
| 77 | ((Real.continuous_exp.comp (continuous_const.mul continuous_id)).mul |
| 78 | (bump_contDiff j).continuous).integrable_of_hasCompactSupport |
| 79 | (bump_hasCompactSupport j).mul_left |
| 80 | |
| 81 | theorem weighted_bump_sq_integrable (s : ℝ) (j : Fin 2) : |
| 82 | Integrable (fun y => Real.exp (s * y) * (bump j y) ^ 2) := by |
| 83 | have hc : HasCompactSupport (fun y => (bump j y) ^ 2) := by |
| 84 | simpa only [pow_two, Pi.mul_def] using (bump_hasCompactSupport j).mul_right (f' := bump j) |
| 85 | exact ((Real.continuous_exp.comp (continuous_const.mul continuous_id)).mul |
| 86 | ((bump_contDiff j).continuous.pow 2)).integrable_of_hasCompactSupport hc.mul_left |
| 87 | |
| 88 | theorem moment_pos (s : ℝ) : 0 < moment s := by |
| 89 | apply Continuous.integral_pos_of_hasCompactSupport_nonneg_nonzero |
| 90 | ((Real.continuous_exp.comp (continuous_const.mul continuous_id)).mul template_contDiff.continuous) |
| 91 | template_hasCompactSupport.mul_left |
| 92 | · intro y |
| 93 | exact mul_nonneg (Real.exp_pos _).le (LocalizedMomentRepair.bump_nonneg _ _ _) |
| 94 | · exact (show Real.exp (s * 0) * template 0 ≠ 0 by simp [template_at_zero]) |
| 95 | |
| 96 | /-- Translation multiplies an exponential bump moment by its exact exponential factor. -/ |
| 97 | theorem bump_moment (s : ℝ) (j : Fin 2) : |
| 98 | (∫ y, Real.exp (s * y) * bump j y) = |
| 99 | Real.exp (s * (2 * (j.val : ℝ))) * moment s := by |
| 100 | rw [← integral_add_right_eq_self (fun y => Real.exp (s * y) * bump j y) |
| 101 | (2 * (j.val : ℝ))] |
| 102 | have hf : (fun y => Real.exp (s * (y + 2 * (j.val : ℝ))) * bump j (y + 2 * (j.val : ℝ))) = |
| 103 | (fun y => Real.exp (s * (2 * (j.val : ℝ))) * (Real.exp (s * y) * template y)) := by |
| 104 | funext y |
| 105 | simp only [bump, add_sub_cancel_right, mul_add, Real.exp_add] |
| 106 | ring |
| 107 | rw [hf, integral_const_mul] |
| 108 | rfl |
| 109 | |
| 110 | def angularSlope (lam : ℝ) : ℝ := 1 - lam |
| 111 | def pressureSlope (lam : ℝ) : ℝ := -1 - 2 * lam |
| 112 | |
| 113 | /-- The actual derivative matrix of the two integral changes at zero coefficients. -/ |
| 114 | def linearMatrix (lam : ℝ) : Matrix (Fin 2) (Fin 2) ℝ := |
| 115 | !![moment (angularSlope lam), Real.exp (2 * angularSlope lam) * moment (angularSlope lam); |
| 116 | 2 * moment (pressureSlope lam), |
| 117 | 2 * (Real.exp (2 * pressureSlope lam) * moment (pressureSlope lam))] |
| 118 | |
| 119 | theorem linearMatrix_det (lam : ℝ) : |
| 120 | (linearMatrix lam).det = 2 * moment (angularSlope lam) * moment (pressureSlope lam) * |
| 121 | (Real.exp (2 * pressureSlope lam) - Real.exp (2 * angularSlope lam)) := by |
| 122 | simp [linearMatrix, Matrix.det_fin_two] |
| 123 | ring |
| 124 | |
| 125 | theorem linearMatrix_det_ne_zero (lam : ℝ) (hlam : 0 < lam) : |
| 126 | (linearMatrix lam).det ≠ 0 := by |
| 127 | rw [linearMatrix_det] |
| 128 | apply mul_ne_zero |
| 129 | · exact mul_ne_zero (mul_ne_zero (by norm_num) (moment_pos _).ne') (moment_pos _).ne' |
| 130 | · apply ne_of_lt |
| 131 | apply sub_neg.mpr |
| 132 | apply Real.exp_lt_exp.mpr |
| 133 | unfold angularSlope pressureSlope |
| 134 | linarith |
| 135 | |
| 136 | /-- The integral derivative is an actual continuous linear equivalence. -/ |
| 137 | def linearEquiv (lam : ℝ) (hlam : 0 < lam) : Coeff ≃L[ℝ] Coeff := |
| 138 | LinearEquiv.toContinuousLinearEquiv |
| 139 | { toFun := (linearMatrix lam).mulVec |
| 140 | invFun := (linearMatrix lam)⁻¹.mulVec |
| 141 | map_add' := Matrix.mulVec_add _ |
| 142 | map_smul' := fun r c => Matrix.mulVec_smul _ r c |
| 143 | left_inv := fun c => by |
| 144 | rw [Matrix.mulVec_mulVec, Matrix.nonsing_inv_mul _ |
| 145 | (isUnit_iff_ne_zero.mpr (linearMatrix_det_ne_zero lam hlam)), Matrix.one_mulVec] |
| 146 | right_inv := fun c => by |
| 147 | rw [Matrix.mulVec_mulVec, Matrix.mul_nonsing_inv _ |
| 148 | (isUnit_iff_ne_zero.mpr (linearMatrix_det_ne_zero lam hlam)), Matrix.one_mulVec] } |
| 149 | |
| 150 | def relative (c : Coeff) (y : ℝ) : ℝ := c 0 * bump 0 y + c 1 * bump 1 y |
| 151 | |
| 152 | theorem relative_contDiff (c : Coeff) : ContDiff ℝ ∞ (relative c) := |
| 153 | (contDiff_const.mul (bump_contDiff 0)).add (contDiff_const.mul (bump_contDiff 1)) |
| 154 | |
| 155 | theorem relative_support (c : Coeff) : support (relative c) ⊆ Icc (-3 / 20 : ℝ) (43 / 20) := by |
| 156 | intro y hy |
| 157 | by_cases h0 : bump 0 y = 0 |
| 158 | · have h1 : bump 1 y ≠ 0 := by intro h1; exact hy (by simp [relative, h0, h1]) |
| 159 | have hs := bump_support 1 h1 |
| 160 | norm_num at hs |
| 161 | constructor <;> linarith [hs.1, hs.2] |
| 162 | · have hs := bump_support 0 h0 |
| 163 | norm_num at hs |
| 164 | constructor <;> linarith [hs.1, hs.2] |
| 165 | |
| 166 | theorem relative_hasCompactSupport (c : Coeff) : HasCompactSupport (relative c) := |
| 167 | HasCompactSupport.of_support_subset_isCompact isCompact_Icc (relative_support c) |
| 168 | |
| 169 | def quadraticMoment (lam : ℝ) (j : Fin 2) : ℝ := |
| 170 | ∫ y, Real.exp (pressureSlope lam * y) * (bump j y) ^ 2 |
| 171 | |
| 172 | def quadraticBilin (lam : ℝ) : Coeff →ₗ[ℝ] Coeff →ₗ[ℝ] Coeff where |
| 173 | toFun c := |
| 174 | { toFun := fun d => ![0, quadraticMoment lam 0 * c 0 * d 0 + quadraticMoment lam 1 * c 1 * d 1] |
| 175 | map_add' := fun d e => by |
| 176 | ext i |
| 177 | fin_cases i <;> simp [Pi.add_apply] |
| 178 | ring |
| 179 | map_smul' := fun r d => by |
| 180 | ext i |
| 181 | fin_cases i <;> simp [Pi.smul_apply, smul_eq_mul] |
| 182 | ring } |
| 183 | map_add' c d := by |
| 184 | ext e i |
| 185 | fin_cases i <;> simp [Pi.add_apply] |
| 186 | ring |
| 187 | map_smul' r c := by |
| 188 | ext e i |
| 189 | fin_cases i <;> simp [Pi.smul_apply, smul_eq_mul] |
| 190 | ring |
| 191 | |
| 192 | def quadraticCLM (lam : ℝ) : Coeff →L[ℝ] Coeff →L[ℝ] Coeff := |
| 193 | LinearMap.toContinuousLinearMap |
| 194 | ((LinearMap.toContinuousLinearMap (𝕜 := ℝ) (E := Coeff) (F' := Coeff)).toLinearMap.comp |
| 195 | (quadraticBilin lam)) |
| 196 | |
| 197 | theorem quadraticCLM_apply (lam : ℝ) (c d : Coeff) : |
| 198 | quadraticCLM lam c d = |
| 199 | ![0, quadraticMoment lam 0 * c 0 * d 0 + quadraticMoment lam 1 * c 1 * d 1] := rfl |
| 200 | |
| 201 | theorem weighted_relative_integrable (s : ℝ) (c : Coeff) : |
| 202 | Integrable (fun y => Real.exp (s * y) * relative c y) := |
| 203 | ((Real.continuous_exp.comp (continuous_const.mul continuous_id)).mul |
| 204 | (relative_contDiff c).continuous).integrable_of_hasCompactSupport |
| 205 | (relative_hasCompactSupport c).mul_left |
| 206 | |
| 207 | theorem weighted_relative_sq_integrable (s : ℝ) (c : Coeff) : |
| 208 | Integrable (fun y => Real.exp (s * y) * (relative c y) ^ 2) := by |
| 209 | have hc : HasCompactSupport (fun y => (relative c y) ^ 2) := by |
| 210 | simpa only [pow_two, Pi.mul_def] using (relative_hasCompactSupport c).mul_right (f' := relative c) |
| 211 | exact ((Real.continuous_exp.comp (continuous_const.mul continuous_id)).mul |
| 212 | ((relative_contDiff c).continuous.pow 2)).integrable_of_hasCompactSupport hc.mul_left |
| 213 | |
| 214 | theorem relative_moment (s : ℝ) (c : Coeff) : |
| 215 | (∫ y, Real.exp (s * y) * relative c y) = |
| 216 | moment s * c 0 + Real.exp (2 * s) * moment s * c 1 := by |
| 217 | have hf : (fun y => Real.exp (s * y) * relative c y) = |
| 218 | (fun y => c 0 * (Real.exp (s * y) * bump 0 y) + |
| 219 | c 1 * (Real.exp (s * y) * bump 1 y)) := by |
| 220 | funext y |
| 221 | dsimp [relative] |
| 222 | ring |
| 223 | rw [hf, integral_add ((weighted_bump_integrable s 0).const_mul _) |
| 224 | ((weighted_bump_integrable s 1).const_mul _), integral_const_mul, integral_const_mul, |
| 225 | bump_moment, bump_moment] |
| 226 | norm_num |
| 227 | rw [mul_comm s 2] |
| 228 | ring |
| 229 | |
| 230 | theorem relative_square (c : Coeff) (y : ℝ) : |
| 231 | (relative c y) ^ 2 = (c 0) ^ 2 * (bump 0 y) ^ 2 + (c 1) ^ 2 * (bump 1 y) ^ 2 := by |
| 232 | calc |
| 233 | _ = (c 0) ^ 2 * (bump 0 y) ^ 2 + (c 1) ^ 2 * (bump 1 y) ^ 2 + |
| 234 | 2 * c 0 * c 1 * (bump 0 y * bump 1 y) := by dsimp [relative]; ring |
| 235 | _ = _ := by rw [bumps_disjoint]; ring |
| 236 | |
| 237 | theorem relative_square_moment (lam : ℝ) (c : Coeff) : |
| 238 | (∫ y, Real.exp (pressureSlope lam * y) * (relative c y) ^ 2) = |
| 239 | quadraticMoment lam 0 * (c 0) ^ 2 + quadraticMoment lam 1 * (c 1) ^ 2 := by |
| 240 | have hf : (fun y => Real.exp (pressureSlope lam * y) * (relative c y) ^ 2) = |
| 241 | (fun y => (c 0) ^ 2 * (Real.exp (pressureSlope lam * y) * (bump 0 y) ^ 2) + |
| 242 | (c 1) ^ 2 * (Real.exp (pressureSlope lam * y) * (bump 1 y) ^ 2)) := by |
| 243 | funext y |
| 244 | rw [relative_square] |
| 245 | ring |
| 246 | rw [hf, integral_add ((weighted_bump_sq_integrable _ 0).const_mul _) |
| 247 | ((weighted_bump_sq_integrable _ 1).const_mul _), integral_const_mul, integral_const_mul] |
| 248 | dsimp [quadraticMoment] |
| 249 | ring |
| 250 | |
| 251 | theorem pressure_change_moment (lam : ℝ) (c : Coeff) : |
| 252 | (∫ y, Real.exp (pressureSlope lam * y) * ((1 + relative c y) ^ 2 - 1)) = |
| 253 | 2 * (moment (pressureSlope lam) * c 0 + |
| 254 | Real.exp (2 * pressureSlope lam) * moment (pressureSlope lam) * c 1) + |
| 255 | quadraticMoment lam 0 * (c 0) ^ 2 + quadraticMoment lam 1 * (c 1) ^ 2 := by |
| 256 | have hf : (fun y => Real.exp (pressureSlope lam * y) * ((1 + relative c y) ^ 2 - 1)) = |
| 257 | (fun y => 2 * (Real.exp (pressureSlope lam * y) * relative c y) + |
| 258 | Real.exp (pressureSlope lam * y) * (relative c y) ^ 2) := by funext y; ring |
| 259 | rw [hf, integral_add ((weighted_relative_integrable _ c).const_mul 2) |
| 260 | (weighted_relative_sq_integrable _ c), integral_const_mul, relative_moment, relative_square_moment] |
| 261 | ring |
| 262 | |
| 263 | def debt (δ : ℝ) : Coeff := ![δ, 0] |
| 264 | |
| 265 | theorem debt_contDiff : ContDiff ℝ ∞ debt := by |
| 266 | apply contDiff_pi.mpr |
| 267 | intro i |
| 268 | fin_cases i |
| 269 | · exact contDiff_id |
| 270 | · exact contDiff_const |
| 271 | |
| 272 | theorem debt_norm_le (δ : ℝ) : ‖debt δ‖ ≤ |δ| := by |
| 273 | apply (pi_norm_le_iff_of_nonneg (abs_nonneg δ)).mpr |
| 274 | intro i |
| 275 | fin_cases i <;> simp [debt] |
| 276 | |
| 277 | theorem relative_deriv (c : Coeff) (y : ℝ) : |
| 278 | deriv (relative c) y = c 0 * deriv (bump 0) y + c 1 * deriv (bump 1) y := by |
| 279 | have h0 := (bump_contDiff 0).differentiable (by simp : (∞ : WithTop ℕ∞) ≠ 0) |
| 280 | have h1 := (bump_contDiff 1).differentiable (by simp : (∞ : WithTop ℕ∞) ≠ 0) |
| 281 | unfold relative |
| 282 | rw [deriv_fun_add (h0.differentiableAt.const_mul _) (h1.differentiableAt.const_mul _), |
| 283 | deriv_const_mul _ h0.differentiableAt, deriv_const_mul _ h1.differentiableAt] |
| 284 | |
| 285 | /-- The fixed finite family controls both the relative perturbation and its first derivative. -/ |
| 286 | theorem relative_first_jet_bound : |
| 287 | ∃ D : ℝ, 0 < D ∧ ∀ (c : Coeff) (y : ℝ), |
| 288 | |relative c y| ≤ D * ‖c‖ ∧ |deriv (relative c) y| ≤ D * ‖c‖ := by |
| 289 | obtain ⟨D0, hD0, hb0⟩ := LocalizedMomentRepair.smooth_compact_derivative_bound |
| 290 | (bump 0) (bump_contDiff 0) (bump_hasCompactSupport 0) 1 |
| 291 | obtain ⟨D1, hD1, hb1⟩ := LocalizedMomentRepair.smooth_compact_derivative_bound |
| 292 | (bump 1) (bump_contDiff 1) (bump_hasCompactSupport 1) 1 |
| 293 | simp only [iteratedDeriv_one] at hb0 hb1 |
| 294 | refine ⟨2 + D0 + D1, by linarith, ?_⟩ |
| 295 | intro c y |
| 296 | have hc0 : |c 0| ≤ ‖c‖ := by simpa only [Real.norm_eq_abs] using norm_le_pi_norm c 0 |
| 297 | have hc1 : |c 1| ≤ ‖c‖ := by simpa only [Real.norm_eq_abs] using norm_le_pi_norm c 1 |
| 298 | have ha0 : |bump 0 y| ≤ 1 := by rw [abs_of_nonneg (bump_nonneg 0 y)]; exact bump_le_one 0 y |
| 299 | have ha1 : |bump 1 y| ≤ 1 := by rw [abs_of_nonneg (bump_nonneg 1 y)]; exact bump_le_one 1 y |
| 300 | constructor |
| 301 | · calc |
| 302 | |relative c y| ≤ |c 0| * |bump 0 y| + |c 1| * |bump 1 y| := by |
| 303 | simpa only [relative, abs_mul] using abs_add_le (c 0 * bump 0 y) (c 1 * bump 1 y) |
| 304 | _ ≤ ‖c‖ * 1 + ‖c‖ * 1 := add_le_add |
| 305 | (mul_le_mul hc0 ha0 (abs_nonneg _) (norm_nonneg _)) |
| 306 | (mul_le_mul hc1 ha1 (abs_nonneg _) (norm_nonneg _)) |
| 307 | _ ≤ (2 + D0 + D1) * ‖c‖ := by nlinarith [norm_nonneg c] |
| 308 | · rw [relative_deriv] |
| 309 | calc |
| 310 | _ ≤ |c 0| * |deriv (bump 0) y| + |c 1| * |deriv (bump 1) y| := by |
| 311 | simpa only [abs_mul] using abs_add_le (c 0 * deriv (bump 0) y) (c 1 * deriv (bump 1) y) |
| 312 | _ ≤ ‖c‖ * D0 + ‖c‖ * D1 := add_le_add |
| 313 | (mul_le_mul hc0 (hb0 y) (abs_nonneg _) (norm_nonneg _)) |
| 314 | (mul_le_mul hc1 (hb1 y) (abs_nonneg _) (norm_nonneg _)) |
| 315 | _ ≤ (2 + D0 + D1) * ‖c‖ := by nlinarith [norm_nonneg c] |
| 316 | |
| 317 | theorem positive_and_slope_of_small (lam : ℝ) (hlam : 0 < lam) (c : Coeff) (y : ℝ) |
| 318 | (h0 : |relative c y| ≤ 1 / 2) (h1 : |deriv (relative c) y| ≤ lam / 4) : |
| 319 | 0 < 1 + relative c y ∧ -lam + deriv (relative c) y / (1 + relative c y) ≤ -lam / 2 := by |
| 320 | have hlo : -(1 / 2 : ℝ) ≤ relative c y := (abs_le.mp h0).1 |
| 321 | have hden : 0 < 1 + relative c y := by linarith |
| 322 | refine ⟨hden, ?_⟩ |
| 323 | have hd : deriv (relative c) y ≤ lam / 4 := (le_abs_self _).trans h1 |
| 324 | have hratio : deriv (relative c) y / (1 + relative c y) ≤ lam / 2 := by |
| 325 | apply (div_le_iff₀ hden).mpr |
| 326 | nlinarith |
| 327 | linarith |
| 328 | |
| 329 | /-- A constructed branch, with exact normalized integrals and quantitative first-jet control. -/ |
| 330 | structure ResetBranch (lam : ℝ) where |
| 331 | coefficients : ℝ → Coeff |
| 332 | radius : ℝ |
| 333 | bound : ℝ |
| 334 | radius_pos : 0 < radius |
| 335 | bound_pos : 0 < bound |
| 336 | smooth : ContDiffOn ℝ ∞ coefficients (Ioo (-radius) radius) |
| 337 | at_zero : coefficients 0 = 0 |
| 338 | angular : ∀ δ ∈ Ioo (-radius) radius, |
| 339 | (∫ y, Real.exp (angularSlope lam * y) * relative (coefficients δ) y) = δ |
| 340 | pressure : ∀ δ ∈ Ioo (-radius) radius, |
| 341 | (∫ y, Real.exp (pressureSlope lam * y) * ((1 + relative (coefficients δ) y) ^ 2 - 1)) = 0 |
| 342 | coefficient_bound : ∀ δ ∈ Ioo (-radius) radius, ‖coefficients δ‖ ≤ bound * |δ| |
| 343 | first_jet_bound : ∀ δ ∈ Ioo (-radius) radius, ∀ y, |
| 344 | |relative (coefficients δ) y| ≤ bound * |δ| ∧ |
| 345 | |deriv (relative (coefficients δ)) y| ≤ bound * |δ| |
| 346 | small_jets : ∀ δ ∈ Ioo (-radius) radius, ∀ y, |
| 347 | |relative (coefficients δ) y| ≤ 1 / 2 ∧ |
| 348 | |deriv (relative (coefficients δ)) y| ≤ lam / 4 |
| 349 | |
| 350 | /-! ## Actual modified angular fields -/ |
| 351 | |
| 352 | def baseE (lam e0 y : ℝ) : ℝ := e0 * Real.exp ((-1 / 2 - lam) * y) |
| 353 | |
| 354 | /-- The first bump is centered at `y0`, and the second at `y0 + 2`. -/ |
| 355 | def modifiedE (lam e0 y0 : ℝ) (c : Coeff) (y : ℝ) : ℝ := |
| 356 | baseE lam e0 y * (1 + relative c (y - y0)) |
| 357 | |
| 358 | theorem baseE_contDiff (lam e0 : ℝ) : ContDiff ℝ ∞ (baseE lam e0) := |
| 359 | contDiff_const.mul (contDiff_const.mul contDiff_id).exp |
| 360 | |
| 361 | theorem baseE_pos (lam e0 y : ℝ) (he0 : 0 < e0) : 0 < baseE lam e0 y := |
| 362 | mul_pos he0 (Real.exp_pos _) |
| 363 | |
| 364 | theorem weighted_translate_integral (s y0 : ℝ) (f : ℝ → ℝ) : |
| 365 | (∫ y, Real.exp (s * y) * f (y - y0)) = |
| 366 | Real.exp (s * y0) * ∫ y, Real.exp (s * y) * f y := by |
| 367 | rw [← integral_add_right_eq_self (fun y => Real.exp (s * y) * f (y - y0)) y0] |
| 368 | have hf : (fun y => Real.exp (s * (y + y0)) * f (y + y0 - y0)) = |
| 369 | (fun y => Real.exp (s * y0) * (Real.exp (s * y) * f y)) := by |
| 370 | funext y |
| 371 | simp only [add_sub_cancel_right, mul_add, Real.exp_add] |
| 372 | ring |
| 373 | rw [hf, integral_const_mul] |
| 374 | |
| 375 | theorem baseE_square (lam e0 y : ℝ) : |
| 376 | (baseE lam e0 y) ^ 2 = e0 ^ 2 * Real.exp (pressureSlope lam * y) := by |
| 377 | unfold baseE |
| 378 | rw [mul_pow, pow_two (Real.exp _), ← Real.exp_add] |
| 379 | congr 2 |
| 380 | unfold pressureSlope |
| 381 | ring |
| 382 | |
| 383 | theorem pressure_integral_formula (lam e0 y0 : ℝ) (c : Coeff) : |
| 384 | (∫ y, (modifiedE lam e0 y0 c y) ^ 2 - (baseE lam e0 y) ^ 2) = |
| 385 | e0 ^ 2 * Real.exp (pressureSlope lam * y0) * |
| 386 | ∫ y, Real.exp (pressureSlope lam * y) * ((1 + relative c y) ^ 2 - 1) := by |
| 387 | have hf : (fun y => (modifiedE lam e0 y0 c y) ^ 2 - (baseE lam e0 y) ^ 2) = |
| 388 | (fun y => e0 ^ 2 * (Real.exp (pressureSlope lam * y) * ((1 + relative c (y - y0)) ^ 2 - 1))) := by |
| 389 | funext y |
| 390 | calc |
| 391 | _ = (baseE lam e0 y) ^ 2 * ((1 + relative c (y - y0)) ^ 2 - 1) := by |
| 392 | unfold modifiedE |
| 393 | ring |
| 394 | _ = _ := by rw [baseE_square]; ring |
| 395 | rw [hf, integral_const_mul, |
| 396 | weighted_translate_integral (pressureSlope lam) y0 (fun y => (1 + relative c y) ^ 2 - 1)] |
| 397 | ring |
| 398 | |
| 399 | theorem sqrt_exp_half (y : ℝ) : Real.sqrt (Real.exp y) = Real.exp (y / 2) := by |
| 400 | apply (Real.sqrt_eq_iff_mul_self_eq_of_pos (Real.exp_pos _)).mpr |
| 401 | rw [← Real.exp_add] |
| 402 | congr 1 |
| 403 | ring |
| 404 | |
| 405 | namespace ResetBranch |
| 406 | |
| 407 | variable {lam : ℝ} (B : ResetBranch lam) |
| 408 | |
| 409 | theorem positive (hlam : 0 < lam) (e0 y0 δ y : ℝ) (he0 : 0 < e0) |
| 410 | (hδ : δ ∈ Ioo (-B.radius) B.radius) : |
| 411 | 0 < modifiedE lam e0 y0 (B.coefficients δ) y := by |
| 412 | apply mul_pos (baseE_pos lam e0 y he0) |
| 413 | exact (positive_and_slope_of_small lam hlam (B.coefficients δ) (y - y0) |
| 414 | (B.small_jets δ hδ (y - y0)).1 (B.small_jets δ hδ (y - y0)).2).1 |
| 415 | |
| 416 | end ResetBranch |
| 417 | |
| 418 | /-! ## Finite-interval moments, including an arbitrary earlier prefix -/ |
| 419 | |
| 420 | /-! ## Smooth dependence on the angular parameter -/ |
| 421 | |
| 422 | theorem relative_joint_contDiff : |
| 423 | ContDiff ℝ ∞ (fun z : Coeff × ℝ => relative z.1 z.2) := by |
| 424 | have h0 : ContDiff ℝ ∞ (fun z : Coeff × ℝ => z.1 0) := |
| 425 | contDiff_pi.mp (contDiff_fst : ContDiff ℝ ∞ (Prod.fst : Coeff × ℝ → Coeff)) 0 |
| 426 | have h1 : ContDiff ℝ ∞ (fun z : Coeff × ℝ => z.1 1) := |
| 427 | contDiff_pi.mp (contDiff_fst : ContDiff ℝ ∞ (Prod.fst : Coeff × ℝ → Coeff)) 1 |
| 428 | exact (h0.mul ((bump_contDiff 0).comp contDiff_snd)).add |
| 429 | (h1.mul ((bump_contDiff 1).comp contDiff_snd)) |
| 430 | |
| 431 | end NavierStokes.AngularMomentReset |