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.TangentODE |
| 2 | import NavierStokes.GaussianEnvelope |
| 3 | import Mathlib.Analysis.InnerProductSpace.PiL2 |
| 4 | import Mathlib.Topology.Order.IntermediateValue |
| 5 | import Mathlib.Tactic.FinCases |
| 6 | |
| 7 | /-! |
| 8 | # The actual growing mode stays in a narrow cone |
| 9 | |
| 10 | The invariant region is proved using a quadratic boundary function, without |
| 11 | dividing by the growing coordinate or assuming its positivity along the solution. |
| 12 | -/ |
| 13 | |
| 14 | namespace NavierStokes.GrowingMode |
| 15 | |
| 16 | open Set Filter |
| 17 | open scoped Topology |
| 18 | |
| 19 | abbrev State := EuclideanSpace ℝ (Fin 2) |
| 20 | |
| 21 | /-- The actual two-mode coefficient, including four independent error entries. -/ |
| 22 | noncomputable def modalOperator (lam damping e11 e12 e21 e22 : ℝ) : State →L[ℝ] State := |
| 23 | LinearMap.toContinuousLinearMap { |
| 24 | toFun := fun z => !₂[(lam - damping + e11) * z 0 + e12 * z 1, |
| 25 | e21 * z 0 + (-lam - damping + e22) * z 1] |
| 26 | map_add' := by |
| 27 | intro x y |
| 28 | ext i |
| 29 | fin_cases i <;> simp <;> ring |
| 30 | map_smul' := by |
| 31 | intro c x |
| 32 | ext i |
| 33 | fin_cases i <;> simp <;> ring } |
| 34 | |
| 35 | @[simp] theorem modalOperator_zero (lam damping e11 e12 e21 e22 : ℝ) (z : State) : |
| 36 | modalOperator lam damping e11 e12 e21 e22 z 0 = |
| 37 | (lam - damping + e11) * z 0 + e12 * z 1 := rfl |
| 38 | |
| 39 | @[simp] theorem modalOperator_one (lam damping e11 e12 e21 e22 : ℝ) (z : State) : |
| 40 | modalOperator lam damping e11 e12 e21 e22 z 1 = |
| 41 | e21 * z 0 + (-lam - damping + e22) * z 1 := rfl |
| 42 | |
| 43 | /-- A nonzero solution of a continuous homogeneous linear equation cannot hit zero. |
| 44 | This uses backwards uniqueness, not a positivity assumption on any coordinate. -/ |
| 45 | theorem linear_solution_ne_zero |
| 46 | {H : Type*} [NormedAddCommGroup H] [NormedSpace ℝ H] |
| 47 | {a b : ℝ} (hab : a ≤ b) (A : ℝ → H →L[ℝ] H) |
| 48 | (hA : ContinuousOn A (Icc a b)) {z : ℝ → H} |
| 49 | (hz : ∀ t ∈ Icc a b, HasDerivAt z (A t (z t)) t) (hinit : z a ≠ 0) : |
| 50 | ∀ t ∈ Icc a b, z t ≠ 0 := by |
| 51 | obtain ⟨L, hL⟩ := TangentODE.linear_uniform_lipschitz hab A (fun _ => (0 : H)) hA |
| 52 | intro t ht hzt |
| 53 | have hsub : Icc a t ⊆ Icc a b := Icc_subset_Icc_right ht.2 |
| 54 | have huniq : EqOn z (fun _ => (0 : H)) (Icc a t) := by |
| 55 | apply ODE_solution_unique_of_mem_Icc_left |
| 56 | (v := fun s x => A s x) (s := fun _ => Set.univ) (K := L) |
| 57 | · intro s hs |
| 58 | simpa only [add_zero] using (hL s (hsub (Ioc_subset_Icc_self hs))).lipschitzOnWith |
| 59 | · exact fun s hs => (hz s (hsub hs)).continuousAt.continuousWithinAt |
| 60 | · exact fun s hs => (hz s (hsub (Ioc_subset_Icc_self hs))).hasDerivWithinAt |
| 61 | · exact fun _ _ => Set.mem_univ _ |
| 62 | · exact continuousOn_const |
| 63 | · intro s _ |
| 64 | simpa only [map_zero] using (hasDerivAt_const s (0 : H)).hasDerivWithinAt |
| 65 | · exact fun _ _ => Set.mem_univ _ |
| 66 | · exact hzt |
| 67 | exact hinit (huniq ⟨le_rfl, ht.1⟩) |
| 68 | |
| 69 | /-- The inward algebra at the upper edge of the cone. -/ |
| 70 | theorem upper_edge_factor_negative |
| 71 | {lam lamMin eps r e11 e12 e21 e22 : ℝ} |
| 72 | (hr : 0 < r) (hlam : lamMin ≤ lam) |
| 73 | (he11 : |e11| ≤ eps) (he12 : |e12| ≤ eps) |
| 74 | (he21 : |e21| ≤ eps) (he22 : |e22| ≤ eps) |
| 75 | (hgap : eps * (1 + r) ^ 2 < 2 * lamMin * r) : |
| 76 | e21 + r * (e22 - e11) - r ^ 2 * e12 - 2 * lam * r < 0 := by |
| 77 | have hlin : r * (e22 - e11) ≤ r * (2 * eps) := |
| 78 | mul_le_mul_of_nonneg_left (by linarith [(abs_le.mp he11).1, (abs_le.mp he22).2]) hr.le |
| 79 | have hquad : -(r ^ 2 * e12) ≤ r ^ 2 * eps := by |
| 80 | have h := mul_le_mul_of_nonneg_left (abs_le.mp he12).1 (sq_nonneg r) |
| 81 | nlinarith |
| 82 | have hrate : lamMin * r ≤ lam * r := mul_le_mul_of_nonneg_right hlam hr.le |
| 83 | nlinarith [(abs_le.mp he21).2] |
| 84 | |
| 85 | /-- The inward algebra at the lower edge follows by reversing the off-diagonal signs. -/ |
| 86 | theorem lower_edge_factor_negative |
| 87 | {lam lamMin eps r e11 e12 e21 e22 : ℝ} |
| 88 | (hr : 0 < r) (hlam : lamMin ≤ lam) |
| 89 | (he11 : |e11| ≤ eps) (he12 : |e12| ≤ eps) |
| 90 | (he21 : |e21| ≤ eps) (he22 : |e22| ≤ eps) |
| 91 | (hgap : eps * (1 + r) ^ 2 < 2 * lamMin * r) : |
| 92 | -e21 + r * (e22 - e11) + r ^ 2 * e12 - 2 * lam * r < 0 := by |
| 93 | have h := upper_edge_factor_negative (e12 := -e12) (e21 := -e21) |
| 94 | hr hlam he11 (by simpa only [abs_neg] using he12) |
| 95 | (by simpa only [abs_neg] using he21) he22 hgap |
| 96 | nlinarith |
| 97 | |
| 98 | /-- The quadratic cone boundary has strictly negative derivative at every |
| 99 | nonzero boundary point. Scalar damping cancels from this computation. -/ |
| 100 | theorem cone_boundary_derivative_negative |
| 101 | {p q lam damping lamMin eps r e11 e12 e21 e22 : ℝ} |
| 102 | (hr : 0 < r) (hp : p ≠ 0) (hboundary : q ^ 2 = r ^ 2 * p ^ 2) |
| 103 | (hlam : lamMin ≤ lam) |
| 104 | (he11 : |e11| ≤ eps) (he12 : |e12| ≤ eps) |
| 105 | (he21 : |e21| ≤ eps) (he22 : |e22| ≤ eps) |
| 106 | (hgap : eps * (1 + r) ^ 2 < 2 * lamMin * r) : |
| 107 | 2 * q * (e21 * p + (-lam - damping + e22) * q) - |
| 108 | r ^ 2 * (2 * p * ((lam - damping + e11) * p + e12 * q)) < 0 := by |
| 109 | have hsq : q ^ 2 = (r * p) ^ 2 := by nlinarith [hboundary] |
| 110 | have hpos : 0 < 2 * r * p ^ 2 := mul_pos (by linarith) (sq_pos_of_ne_zero hp) |
| 111 | rcases sq_eq_sq_iff_eq_or_eq_neg.mp hsq with hq | hq |
| 112 | · rw [hq] |
| 113 | have h := mul_neg_of_pos_of_neg hpos |
| 114 | (upper_edge_factor_negative hr hlam he11 he12 he21 he22 hgap) |
| 115 | nlinarith [h] |
| 116 | · rw [hq] |
| 117 | have h := mul_neg_of_pos_of_neg hpos |
| 118 | (lower_edge_factor_negative hr hlam he11 he12 he21 he22 hgap) |
| 119 | nlinarith [h] |
| 120 | |
| 121 | theorem hasDerivAt_coordinate {z : ℝ → State} {z' : State} {t : ℝ} |
| 122 | (hz : HasDerivAt z z' t) (i : Fin 2) : |
| 123 | HasDerivAt (fun s => z s i) (z' i) t := by |
| 124 | exact (PiLp.proj 2 (fun _ : Fin 2 => ℝ) i).hasFDerivAt.comp_hasDerivAt t hz |
| 125 | |
| 126 | /-- The actual homogeneous solution stays in the growing cone, and the growing |
| 127 | coordinate is strictly positive. Positivity and nonvanishing are conclusions. -/ |
| 128 | theorem positive_invariant_cone |
| 129 | {a b r eps lamMin : ℝ} (hab : a ≤ b) (hr : 0 < r) |
| 130 | (hgap : eps * (1 + r) ^ 2 < 2 * lamMin * r) |
| 131 | (lam damping e11 e12 e21 e22 : ℝ → ℝ) {z : ℝ → State} |
| 132 | (hA : ContinuousOn (fun t => |
| 133 | modalOperator (lam t) (damping t) (e11 t) (e12 t) (e21 t) (e22 t)) (Icc a b)) |
| 134 | (hode : ∀ t ∈ Icc a b, HasDerivAt z |
| 135 | (modalOperator (lam t) (damping t) (e11 t) (e12 t) (e21 t) (e22 t) (z t)) t) |
| 136 | (hlam : ∀ t ∈ Icc a b, lamMin ≤ lam t) |
| 137 | (herr : ∀ t ∈ Icc a b, |
| 138 | |e11 t| ≤ eps ∧ |e12 t| ≤ eps ∧ |e21 t| ≤ eps ∧ |e22 t| ≤ eps) |
| 139 | (hplus : 0 < z a 0) (hminus : z a 1 = 0) : |
| 140 | ∀ t ∈ Icc a b, 0 < z t 0 ∧ |z t 1| ≤ r * z t 0 := by |
| 141 | have hinit : z a ≠ 0 := by |
| 142 | intro h |
| 143 | have : z a 0 = 0 := by simp only [h, PiLp.zero_apply] |
| 144 | linarith |
| 145 | have hnonzero := linear_solution_ne_zero hab _ hA hode hinit |
| 146 | have hp (t : ℝ) (ht : t ∈ Icc a b) : HasDerivAt (fun s => z s 0) |
| 147 | ((lam t - damping t + e11 t) * z t 0 + e12 t * z t 1) t := |
| 148 | hasDerivAt_coordinate (hode t ht) 0 |
| 149 | have hq (t : ℝ) (ht : t ∈ Icc a b) : HasDerivAt (fun s => z s 1) |
| 150 | (e21 t * z t 0 + (-lam t - damping t + e22 t) * z t 1) t := |
| 151 | hasDerivAt_coordinate (hode t ht) 1 |
| 152 | let barrier : ℝ → ℝ := fun t => (z t 1) ^ 2 - r ^ 2 * (z t 0) ^ 2 |
| 153 | let barrier' : ℝ → ℝ := fun t => |
| 154 | 2 * z t 1 * (e21 t * z t 0 + (-lam t - damping t + e22 t) * z t 1) - |
| 155 | r ^ 2 * (2 * z t 0 * ((lam t - damping t + e11 t) * z t 0 + e12 t * z t 1)) |
| 156 | have hd (t : ℝ) (ht : t ∈ Icc a b) : HasDerivAt barrier (barrier' t) t := by |
| 157 | convert! ((hq t ht).pow 2).sub (((hp t ht).pow 2).const_mul (r ^ 2)) using 1 |
| 158 | simp [barrier'] |
| 159 | have hbarrier : ∀ t ∈ Icc a b, barrier t ≤ 0 := by |
| 160 | apply image_le_of_deriv_right_lt_deriv_boundary' |
| 161 | (fun t ht => (hd t ht).continuousAt.continuousWithinAt) |
| 162 | (fun t ht => (hd t (Ico_subset_Icc_self ht)).hasDerivWithinAt) |
| 163 | (B := fun _ => (0 : ℝ)) (B' := fun _ => (0 : ℝ)) |
| 164 | · dsimp [barrier] |
| 165 | rw [hminus] |
| 166 | nlinarith [mul_nonneg (sq_nonneg r) (sq_nonneg (z a 0))] |
| 167 | · exact continuousOn_const |
| 168 | · exact fun t _ => (hasDerivAt_const t (0 : ℝ)).hasDerivWithinAt |
| 169 | · intro t ht heq |
| 170 | have htc := Ico_subset_Icc_self ht |
| 171 | have hsq : (z t 1) ^ 2 = r ^ 2 * (z t 0) ^ 2 := by |
| 172 | dsimp [barrier] at heq |
| 173 | linarith |
| 174 | have hpn : z t 0 ≠ 0 := by |
| 175 | intro hpzero |
| 176 | have hqzero : z t 1 = 0 := by |
| 177 | apply sq_eq_zero_iff.mp |
| 178 | simpa only [hpzero, zero_pow (by decide : 2 ≠ 0), mul_zero] using hsq |
| 179 | apply hnonzero t htc |
| 180 | ext i |
| 181 | fin_cases i <;> simp [hpzero, hqzero] |
| 182 | rcases herr t htc with ⟨h11, h12, h21, h22⟩ |
| 183 | exact cone_boundary_derivative_negative hr hpn hsq (hlam t htc) |
| 184 | h11 h12 h21 h22 hgap |
| 185 | have hpne : ∀ t ∈ Icc a b, z t 0 ≠ 0 := by |
| 186 | intro t ht hpzero |
| 187 | have hqsq : (z t 1) ^ 2 ≤ 0 := by simpa [barrier, hpzero] using hbarrier t ht |
| 188 | have hqzero : z t 1 = 0 := sq_eq_zero_iff.mp (le_antisymm hqsq (sq_nonneg _)) |
| 189 | apply hnonzero t ht |
| 190 | ext i |
| 191 | fin_cases i <;> simp [hpzero, hqzero] |
| 192 | have hpcont : ContinuousOn (fun t => z t 0) (Icc a b) := |
| 193 | fun t ht => (hp t ht).continuousAt.continuousWithinAt |
| 194 | intro t ht |
| 195 | have hppos : 0 < z t 0 := by |
| 196 | by_contra! hnpos |
| 197 | have hsub : Icc a t ⊆ Icc a b := Icc_subset_Icc_right ht.2 |
| 198 | obtain ⟨s, hs, hszero⟩ := |
| 199 | intermediate_value_Icc' ht.1 (hpcont.mono hsub) ⟨hnpos, hplus.le⟩ |
| 200 | exact hpne s (hsub hs) hszero |
| 201 | refine ⟨hppos, abs_le_of_sq_le_sq ?_ (mul_nonneg hr.le hppos.le)⟩ |
| 202 | have hb := hbarrier t ht |
| 203 | dsimp [barrier] at hb |
| 204 | nlinarith |
| 205 | |
| 206 | /-- A fixed constant for the manuscript's `O(1/S)` cone width. The added one |
| 207 | allows the same statement when the perturbation bound is zero. -/ |
| 208 | noncomputable def coneConstant (lamMin C : ℝ) : ℝ := 4 * (C + 1) / lamMin |
| 209 | |
| 210 | /-- An explicit sufficient meaning of "sufficiently large S". -/ |
| 211 | theorem scaled_cone_conditions {lamMin C S : ℝ} |
| 212 | (hlamMin : 0 < lamMin) (hC : 0 ≤ C) (hS : 0 < S) |
| 213 | (hlarge : 2 * coneConstant lamMin C ≤ S) : |
| 214 | 0 < coneConstant lamMin C / S ∧ |
| 215 | coneConstant lamMin C / S ≤ 1 / 2 ∧ |
| 216 | (C / S) * (1 + coneConstant lamMin C / S) ^ 2 < |
| 217 | 2 * lamMin * (coneConstant lamMin C / S) := by |
| 218 | have hK : 0 < coneConstant lamMin C := |
| 219 | div_pos (mul_pos (by norm_num) (by linarith)) hlamMin |
| 220 | have hr : 0 < coneConstant lamMin C / S := div_pos hK hS |
| 221 | have hrhalf : coneConstant lamMin C / S ≤ 1 / 2 := by |
| 222 | apply (div_le_iff₀ hS).mpr |
| 223 | linarith |
| 224 | have hquadratic : (1 + coneConstant lamMin C / S) ^ 2 ≤ 4 := by |
| 225 | nlinarith |
| 226 | have hbound : (C / S) * (1 + coneConstant lamMin C / S) ^ 2 ≤ 4 * (C / S) := by |
| 227 | simpa only [mul_comm] using |
| 228 | mul_le_mul_of_nonneg_left hquadratic (div_nonneg hC hS.le) |
| 229 | have hscale : lamMin * (coneConstant lamMin C / S) = 4 * (C + 1) / S := by |
| 230 | unfold coneConstant |
| 231 | field_simp |
| 232 | have hstrict : 4 * (C / S) < lamMin * (coneConstant lamMin C / S) := by |
| 233 | rw [hscale] |
| 234 | have h := (div_lt_div_iff_of_pos_right hS).mpr (show 4 * C < 4 * (C + 1) by linarith) |
| 235 | convert! h using 1 |
| 236 | ring |
| 237 | refine ⟨hr, hrhalf, ?_⟩ |
| 238 | nlinarith [mul_pos hlamMin hr] |
| 239 | |
| 240 | /-- The fixed-width result in the exact `K/S` form used in (28). -/ |
| 241 | theorem scaled_positive_invariant_cone |
| 242 | {a b S C lamMin : ℝ} (hab : a ≤ b) |
| 243 | (hlamMin : 0 < lamMin) (hC : 0 ≤ C) (hS : 0 < S) |
| 244 | (hlarge : 2 * coneConstant lamMin C ≤ S) |
| 245 | (lam damping e11 e12 e21 e22 : ℝ → ℝ) {z : ℝ → State} |
| 246 | (hA : ContinuousOn (fun t => |
| 247 | modalOperator (lam t) (damping t) (e11 t) (e12 t) (e21 t) (e22 t)) (Icc a b)) |
| 248 | (hode : ∀ t ∈ Icc a b, HasDerivAt z |
| 249 | (modalOperator (lam t) (damping t) (e11 t) (e12 t) (e21 t) (e22 t) (z t)) t) |
| 250 | (hlam : ∀ t ∈ Icc a b, lamMin ≤ lam t) |
| 251 | (herr : ∀ t ∈ Icc a b, |
| 252 | |e11 t| ≤ C / S ∧ |e12 t| ≤ C / S ∧ |e21 t| ≤ C / S ∧ |e22 t| ≤ C / S) |
| 253 | (hplus : 0 < z a 0) (hminus : z a 1 = 0) : |
| 254 | ∀ t ∈ Icc a b, 0 < z t 0 ∧ |z t 1| ≤ (coneConstant lamMin C / S) * z t 0 := by |
| 255 | obtain ⟨hr, _, hgap⟩ := scaled_cone_conditions hlamMin hC hS hlarge |
| 256 | exact positive_invariant_cone hab hr hgap lam damping e11 e12 e21 e22 |
| 257 | hA hode hlam herr hplus hminus |
| 258 | |
| 259 | /-- Derivative of the scalar integrating factor used for both sides of the comparison. -/ |
| 260 | theorem hasDerivAt_weighted_scalar |
| 261 | {p P : ℝ → ℝ} {p' rate μ a t : ℝ} |
| 262 | (hp : HasDerivAt p p' t) (hP : HasDerivAt P (rate * P t) t) (hPne : P t ≠ 0) : |
| 263 | HasDerivAt (fun s => Real.exp (μ * (s - a)) * p s / P s) |
| 264 | (Real.exp (μ * (t - a)) / P t * (p' + (μ - rate) * p t)) t := by |
| 265 | have he : HasDerivAt (fun s : ℝ => Real.exp (μ * (s - a))) |
| 266 | (Real.exp (μ * (t - a)) * μ) t := by |
| 267 | simpa only [id, mul_one] using (((hasDerivAt_id t).sub_const a).const_mul μ).exp |
| 268 | convert! (he.fun_mul hp).fun_div hP hPne using 1 |
| 269 | field_simp; ring |
| 270 | |
| 271 | /-- A scalar positive envelope comparison from an actual relative derivative bound. |
| 272 | No lower bound on the unknown scalar solution is assumed. -/ |
| 273 | theorem scalar_envelope_comparison |
| 274 | {a b μ : ℝ} {p p' P rate : ℝ → ℝ} (hab : a ≤ b) |
| 275 | (hPpos : ∀ t ∈ Icc a b, 0 < P t) |
| 276 | (hP : ∀ t ∈ Icc a b, HasDerivAt P (rate t * P t) t) |
| 277 | (hp : ∀ t ∈ Icc a b, HasDerivAt p (p' t) t) |
| 278 | (herror : ∀ t ∈ Icc a b, |p' t - rate t * p t| ≤ μ * p t) : |
| 279 | ∀ t ∈ Icc a b, |
| 280 | Real.exp (-μ * (t - a)) * (p a / P a) * P t ≤ p t ∧ |
| 281 | p t ≤ Real.exp (μ * (t - a)) * (p a / P a) * P t := by |
| 282 | let W : ℝ → ℝ → ℝ := fun m s => Real.exp (m * (s - a)) * p s / P s |
| 283 | let W' : ℝ → ℝ → ℝ := fun m s => |
| 284 | Real.exp (m * (s - a)) / P s * (p' s + (m - rate s) * p s) |
| 285 | have hd (m t : ℝ) (ht : t ∈ Icc a b) : HasDerivAt (W m) (W' m t) t := |
| 286 | hasDerivAt_weighted_scalar (hp t ht) (hP t ht) (ne_of_gt (hPpos t ht)) |
| 287 | have hmono : MonotoneOn (W μ) (Icc a b) := by |
| 288 | apply monotoneOn_of_hasDerivWithinAt_nonneg (convex_Icc a b) |
| 289 | (fun t ht => (hd μ t ht).continuousAt.continuousWithinAt) |
| 290 | (fun t ht => (hd μ t (interior_subset ht)).hasDerivWithinAt) |
| 291 | intro t ht |
| 292 | dsimp [W'] |
| 293 | apply mul_nonneg (div_nonneg (Real.exp_pos _).le (hPpos t (interior_subset ht)).le) |
| 294 | linarith [(abs_le.mp (herror t (interior_subset ht))).1] |
| 295 | have hanti : AntitoneOn (W (-μ)) (Icc a b) := by |
| 296 | apply antitoneOn_of_hasDerivWithinAt_nonpos (convex_Icc a b) |
| 297 | (fun t ht => (hd (-μ) t ht).continuousAt.continuousWithinAt) |
| 298 | (fun t ht => (hd (-μ) t (interior_subset ht)).hasDerivWithinAt) |
| 299 | intro t ht |
| 300 | dsimp [W'] |
| 301 | apply mul_nonpos_of_nonneg_of_nonpos |
| 302 | (div_nonneg (Real.exp_pos _).le (hPpos t (interior_subset ht)).le) |
| 303 | linarith [(abs_le.mp (herror t (interior_subset ht))).2] |
| 304 | intro t ht |
| 305 | have hlo := hmono ⟨le_rfl, hab⟩ ht ht.1 |
| 306 | have hhi := hanti ⟨le_rfl, hab⟩ ht ht.1 |
| 307 | dsimp [W] at hlo hhi |
| 308 | simp only [sub_self, mul_zero, Real.exp_zero, one_mul] at hlo hhi |
| 309 | constructor |
| 310 | · have h := (le_div_iff₀ (hPpos t ht)).mp hlo |
| 311 | have hmul := mul_le_mul_of_nonneg_left h (Real.exp_pos (-μ * (t - a))).le |
| 312 | have he : Real.exp (-μ * (t - a)) * Real.exp (μ * (t - a)) = 1 := by |
| 313 | rw [← Real.exp_add] |
| 314 | simp |
| 315 | calc |
| 316 | Real.exp (-μ * (t - a)) * (p a / P a) * P t = |
| 317 | Real.exp (-μ * (t - a)) * (p a / P a * P t) := by ring |
| 318 | _ ≤ Real.exp (-μ * (t - a)) * (Real.exp (μ * (t - a)) * p t) := hmul |
| 319 | _ = p t := by rw [← mul_assoc, he, one_mul] |
| 320 | · have h := (div_le_iff₀ (hPpos t ht)).mp hhi |
| 321 | have hmul := mul_le_mul_of_nonneg_left h (Real.exp_pos (μ * (t - a))).le |
| 322 | have he : Real.exp (μ * (t - a)) * Real.exp (-μ * (t - a)) = 1 := by |
| 323 | rw [← Real.exp_add] |
| 324 | simp |
| 325 | calc |
| 326 | p t = Real.exp (μ * (t - a)) * (Real.exp (-μ * (t - a)) * p t) := by |
| 327 | rw [← mul_assoc, he, one_mul] |
| 328 | _ ≤ Real.exp (μ * (t - a)) * (p a / P a * P t) := hmul |
| 329 | _ = Real.exp (μ * (t - a)) * (p a / P a) * P t := by ring |
| 330 | |
| 331 | /-- Inside the proved cone, the growing coordinate has a multiplicative |
| 332 | derivative error. This is the only estimate used for its lower envelope. -/ |
| 333 | theorem relative_error_of_cone |
| 334 | {p q lam damping referenceDamping e11 e12 eps δ r : ℝ} |
| 335 | (hp : 0 < p) (heps : 0 ≤ eps) (hcone : |q| ≤ r * p) |
| 336 | (h11 : |e11| ≤ eps) (h12 : |e12| ≤ eps) |
| 337 | (hd : |damping - referenceDamping| ≤ δ) : |
| 338 | |(lam - damping + e11) * p + e12 * q - (lam - referenceDamping) * p| ≤ |
| 339 | (δ + eps * (1 + r)) * p := by |
| 340 | have hd' : |referenceDamping - damping| ≤ δ := by |
| 341 | simpa only [abs_sub_comm] using hd |
| 342 | have hfirst : |(referenceDamping - damping + e11) * p| ≤ (δ + eps) * p := by |
| 343 | rw [abs_mul, abs_of_pos hp] |
| 344 | apply mul_le_mul_of_nonneg_right _ hp.le |
| 345 | exact (abs_add_le _ _).trans (add_le_add hd' h11) |
| 346 | have hsecond : |e12 * q| ≤ eps * (r * p) := by |
| 347 | rw [abs_mul] |
| 348 | exact (mul_le_mul_of_nonneg_right h12 (abs_nonneg q)).trans |
| 349 | (mul_le_mul_of_nonneg_left hcone heps) |
| 350 | calc |
| 351 | |(lam - damping + e11) * p + e12 * q - (lam - referenceDamping) * p| = |
| 352 | |(referenceDamping - damping + e11) * p + e12 * q| := by |
| 353 | congr 1 |
| 354 | ring |
| 355 | _ ≤ |(referenceDamping - damping + e11) * p| + |e12 * q| := abs_add_le _ _ |
| 356 | _ ≤ (δ + eps) * p + eps * (r * p) := add_le_add hfirst hsecond |
| 357 | _ = (δ + eps * (1 + r)) * p := by ring |
| 358 | |
| 359 | /-- Positivity, the `K/S` cone, and two-sided bounds by a supplied reference |
| 360 | envelope on a slot of length at most `L*S`. None of these conclusions is assumed. |
| 361 | |
| 362 | For the manuscript normalization `z a 0 = P a`, the ratio of initial values is one. |
| 363 | The comparison constants are `exp(±(D+2*C)*L)`, independent of the scale `S`. |
| 364 | -/ |
| 365 | theorem scaled_growing_mode_bounds |
| 366 | {a b S C D L lamMin : ℝ} (hab : a ≤ b) |
| 367 | (hlamMin : 0 < lamMin) (hC : 0 ≤ C) (hD : 0 ≤ D) (hS : 0 < S) |
| 368 | (hlarge : 2 * coneConstant lamMin C ≤ S) (hslot : b - a ≤ L * S) |
| 369 | (lam damping referenceDamping e11 e12 e21 e22 P : ℝ → ℝ) {z : ℝ → State} |
| 370 | (hA : ContinuousOn (fun t => |
| 371 | modalOperator (lam t) (damping t) (e11 t) (e12 t) (e21 t) (e22 t)) (Icc a b)) |
| 372 | (hode : ∀ t ∈ Icc a b, HasDerivAt z |
| 373 | (modalOperator (lam t) (damping t) (e11 t) (e12 t) (e21 t) (e22 t) (z t)) t) |
| 374 | (hlam : ∀ t ∈ Icc a b, lamMin ≤ lam t) |
| 375 | (herr : ∀ t ∈ Icc a b, |
| 376 | |e11 t| ≤ C / S ∧ |e12 t| ≤ C / S ∧ |e21 t| ≤ C / S ∧ |e22 t| ≤ C / S) |
| 377 | (hdamping : ∀ t ∈ Icc a b, |damping t - referenceDamping t| ≤ D / S) |
| 378 | (hPpos : ∀ t ∈ Icc a b, 0 < P t) |
| 379 | (hP : ∀ t ∈ Icc a b, HasDerivAt P ((lam t - referenceDamping t) * P t) t) |
| 380 | (hplus : 0 < z a 0) (hminus : z a 1 = 0) : |
| 381 | ∀ t ∈ Icc a b, |
| 382 | 0 < z t 0 ∧ |z t 1| ≤ (coneConstant lamMin C / S) * z t 0 ∧ |
| 383 | Real.exp (-(D + 2 * C) * L) * (z a 0 / P a) * P t ≤ z t 0 ∧ |
| 384 | z t 0 ≤ Real.exp ((D + 2 * C) * L) * (z a 0 / P a) * P t := by |
| 385 | have hcone := scaled_positive_invariant_cone hab hlamMin hC hS hlarge |
| 386 | lam damping e11 e12 e21 e22 hA hode hlam herr hplus hminus |
| 387 | have hrhalf := (scaled_cone_conditions hlamMin hC hS hlarge).2.1 |
| 388 | have hmu : D / S + (C / S) * (1 + coneConstant lamMin C / S) ≤ (D + 2 * C) / S := by |
| 389 | have hmul : (C / S) * (coneConstant lamMin C / S) ≤ C / S := by |
| 390 | have h := mul_le_mul_of_nonneg_left (show coneConstant lamMin C / S ≤ 1 by linarith) |
| 391 | (div_nonneg hC hS.le) |
| 392 | simpa only [mul_one] using h |
| 393 | calc |
| 394 | D / S + (C / S) * (1 + coneConstant lamMin C / S) ≤ D / S + 2 * (C / S) := by |
| 395 | nlinarith |
| 396 | _ = (D + 2 * C) / S := by ring |
| 397 | let p' : ℝ → ℝ := fun t => (lam t - damping t + e11 t) * z t 0 + e12 t * z t 1 |
| 398 | have hp (t : ℝ) (ht : t ∈ Icc a b) : HasDerivAt (fun s => z s 0) (p' t) t := |
| 399 | hasDerivAt_coordinate (hode t ht) 0 |
| 400 | have he (t : ℝ) (ht : t ∈ Icc a b) : |
| 401 | |p' t - (lam t - referenceDamping t) * z t 0| ≤ ((D + 2 * C) / S) * z t 0 := by |
| 402 | rcases herr t ht with ⟨h11, h12, _, _⟩ |
| 403 | have h := relative_error_of_cone (lam := lam t) (hcone t ht).1 (div_nonneg hC hS.le) |
| 404 | (hcone t ht).2 h11 h12 (hdamping t ht) |
| 405 | exact h.trans (mul_le_mul_of_nonneg_right hmu (hcone t ht).1.le) |
| 406 | have hcomparison := scalar_envelope_comparison hab hPpos hP hp he |
| 407 | have hmu0 : 0 ≤ (D + 2 * C) / S := div_nonneg (by linarith) hS.le |
| 408 | intro t ht |
| 409 | have hexponent : ((D + 2 * C) / S) * (t - a) ≤ (D + 2 * C) * L := by |
| 410 | calc |
| 411 | ((D + 2 * C) / S) * (t - a) ≤ ((D + 2 * C) / S) * (L * S) := |
| 412 | mul_le_mul_of_nonneg_left ((sub_le_sub_right ht.2 a).trans hslot) hmu0 |
| 413 | _ = (D + 2 * C) * L := by |
| 414 | field_simp |
| 415 | have hlo : Real.exp (-(D + 2 * C) * L) ≤ |
| 416 | Real.exp (-((D + 2 * C) / S) * (t - a)) := by |
| 417 | apply Real.exp_le_exp.mpr |
| 418 | nlinarith |
| 419 | have hhi : Real.exp (((D + 2 * C) / S) * (t - a)) ≤ |
| 420 | Real.exp ((D + 2 * C) * L) := Real.exp_le_exp.mpr hexponent |
| 421 | have hratio : 0 ≤ z a 0 / P a := div_nonneg hplus.le (hPpos a ⟨le_rfl, hab⟩).le |
| 422 | refine ⟨(hcone t ht).1, (hcone t ht).2, ?_, ?_⟩ |
| 423 | · exact (mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_right hlo hratio) |
| 424 | (hPpos t ht).le).trans (hcomparison t ht).1 |
| 425 | · exact (hcomparison t ht).2.trans |
| 426 | (mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_right hhi hratio) (hPpos t ht).le) |
| 427 | |
| 428 | /-- Returning from the modal cone to `x=p+q`, `y=h*(p-q)` gives both the |
| 429 | positive radial amplitude and the ratio error used in equation (28). -/ |
| 430 | theorem original_coordinate_bounds {p q h r : ℝ} |
| 431 | (hp : 0 < p) (hr : 0 ≤ r) (hrhalf : r ≤ 1 / 2) (hcone : |q| ≤ r * p) : |
| 432 | p / 2 ≤ p + q ∧ p + q ≤ 3 * p / 2 ∧ |
| 433 | |h * (p - q) / (p + q) - h| ≤ 4 * |h| * r := by |
| 434 | have hq := abs_le.mp hcone |
| 435 | have hrp : r * p ≤ p / 2 := by nlinarith |
| 436 | have hxlower : p / 2 ≤ p + q := by linarith |
| 437 | have hxupper : p + q ≤ 3 * p / 2 := by linarith |
| 438 | have hxpos : 0 < p + q := by linarith |
| 439 | refine ⟨hxlower, hxupper, ?_⟩ |
| 440 | have heq : h * (p - q) / (p + q) - h = (-2 * h * q) / (p + q) := by |
| 441 | field_simp; ring |
| 442 | rw [heq, abs_div, abs_of_pos hxpos] |
| 443 | apply (div_le_iff₀ hxpos).mpr |
| 444 | have hnum : 2 * |h| * |q| ≤ 2 * |h| * (r * p) := |
| 445 | mul_le_mul_of_nonneg_left hcone (mul_nonneg (by norm_num) (abs_nonneg h)) |
| 446 | have hden : 4 * |h| * r * (p / 2) ≤ 4 * |h| * r * (p + q) := |
| 447 | mul_le_mul_of_nonneg_left hxlower (by positivity) |
| 448 | simp only [abs_mul, abs_neg] |
| 449 | rw [abs_of_pos (show (0 : ℝ) < 2 by norm_num)] |
| 450 | nlinarith |
| 451 | |
| 452 | end NavierStokes.GrowingMode |