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 Mathlib.Analysis.SpecialFunctions.SmoothTransition |
| 2 | import Mathlib.Analysis.Calculus.IteratedDeriv.Defs |
| 3 | import Mathlib.Tactic.FieldSimp |
| 4 | import Mathlib.Tactic.Linarith |
| 5 | import Mathlib.Tactic.Ring |
| 6 | |
| 7 | /-! |
| 8 | # A concrete smooth exponential-flat edge |
| 9 | |
| 10 | For `c > 0`, this file constructs the actual function `exp (-c / x^2)` on |
| 11 | `x > 0`, extended by zero on `x ≤ 0`. The proof works with polynomial multiples |
| 12 | in `x⁻¹`, an explicit family closed under differentiation. It establishes |
| 13 | smoothness, vanishing derivatives, and smooth inverse-power quotients. |
| 14 | |
| 15 | These facts concern this scalar edge function, not the manuscript's stress |
| 16 | factorization, PDE estimates, or asserted smooth force extension. |
| 17 | -/ |
| 18 | |
| 19 | noncomputable section |
| 20 | |
| 21 | open Filter Topology Polynomial |
| 22 | |
| 23 | namespace NavierStokes.FlatCutoff |
| 24 | |
| 25 | /-- The one-sided Gaussian-flat edge used as a scalar model in Section 4.6. -/ |
| 26 | def edge (c x : ℝ) : ℝ := |
| 27 | if x ≤ 0 then 0 else Real.exp (-c / x ^ 2) |
| 28 | |
| 29 | theorem edge_of_nonpos (c : ℝ) {x : ℝ} (hx : x ≤ 0) : edge c x = 0 := by |
| 30 | simp [edge, hx] |
| 31 | |
| 32 | @[simp] theorem edge_zero (c : ℝ) : edge c 0 = 0 := edge_of_nonpos c le_rfl |
| 33 | |
| 34 | theorem edge_of_pos (c : ℝ) {x : ℝ} (hx : 0 < x) : |
| 35 | edge c x = Real.exp (-c / x ^ 2) := by |
| 36 | simp [edge, not_le_of_gt hx] |
| 37 | |
| 38 | theorem edge_nonneg (c x : ℝ) : 0 ≤ edge c x := by |
| 39 | by_cases hx : x ≤ 0 |
| 40 | · simp [edge, hx] |
| 41 | · rw [edge, ite_eq_right hx] |
| 42 | exact (Real.exp_pos _).le |
| 43 | |
| 44 | theorem edge_pos (c : ℝ) {x : ℝ} (hx : 0 < x) : 0 < edge c x := by |
| 45 | rw [edge_of_pos c hx] |
| 46 | exact Real.exp_pos _ |
| 47 | |
| 48 | /-- Near zero, the square-inverse exponential is bounded by Mathlib's |
| 49 | already-constructed smooth inverse exponential. -/ |
| 50 | theorem edge_le_glue {c x : ℝ} (hxc : x ≤ c) : |
| 51 | edge c x ≤ expNegInvGlue x := by |
| 52 | by_cases hx : x ≤ 0 |
| 53 | · rw [edge_of_nonpos c hx, expNegInvGlue.zero_of_nonpos hx] |
| 54 | · have hx' : 0 < x := lt_of_not_ge hx |
| 55 | rw [edge_of_pos c hx'] |
| 56 | simp only [expNegInvGlue, ite_eq_right hx] |
| 57 | apply Real.exp_le_exp.mpr |
| 58 | have hi : x⁻¹ ≤ c / x ^ 2 := by |
| 59 | apply (le_div_iff₀ (sq_pos_of_pos hx')).2 |
| 60 | calc |
| 61 | x⁻¹ * x ^ 2 = x := by field_simp |
| 62 | _ ≤ c := hxc |
| 63 | simpa only [neg_div] using neg_le_neg hi |
| 64 | |
| 65 | /-- A family containing the edge and every inverse-power weighted edge. -/ |
| 66 | def polynomialEdge (c : ℝ) (p : ℝ[X]) (x : ℝ) : ℝ := |
| 67 | p.eval x⁻¹ * edge c x |
| 68 | |
| 69 | @[simp] theorem polynomialEdge_zero (c : ℝ) (p : ℝ[X]) : |
| 70 | polynomialEdge c p 0 = 0 := by simp [polynomialEdge] |
| 71 | |
| 72 | /-- Every polynomial in the inverse coordinate is defeated by this actual |
| 73 | edge exponential. The limit is two-sided and includes the zero extension. -/ |
| 74 | theorem polynomialEdge_tendsto_zero {c : ℝ} (hc : 0 < c) (p : ℝ[X]) : |
| 75 | Tendsto (polynomialEdge c p) (𝓝 0) (𝓝 0) := by |
| 76 | apply squeeze_zero_norm' |
| 77 | (a := fun x : ℝ => ‖p.eval x⁻¹ * expNegInvGlue x‖) |
| 78 | · filter_upwards [gt_mem_nhds hc] with x hxc |
| 79 | simp only [polynomialEdge, norm_mul, Real.norm_eq_abs, |
| 80 | abs_of_nonneg (edge_nonneg c x), abs_of_nonneg (expNegInvGlue.nonneg x)] |
| 81 | exact mul_le_mul_of_nonneg_left (edge_le_glue hxc.le) (abs_nonneg _) |
| 82 | · simpa only [norm_zero] using (expNegInvGlue.tendsto_polynomial_inv_mul_zero p).norm |
| 83 | |
| 84 | /-- The polynomial transformation induced by differentiating an inverse |
| 85 | polynomial times the edge: `2 c X³ p - X² p'`. -/ |
| 86 | def derivativePolynomial (c : ℝ) (p : ℝ[X]) : ℝ[X] := |
| 87 | C (2 * c) * X ^ 3 * p - X ^ 2 * p.derivative |
| 88 | |
| 89 | theorem polynomialEdge_hasDerivAt {c : ℝ} (hc : 0 < c) (p : ℝ[X]) (x : ℝ) : |
| 90 | HasDerivAt (polynomialEdge c p) |
| 91 | (polynomialEdge c (derivativePolynomial c p) x) x := by |
| 92 | rcases lt_trichotomy x 0 with hx | rfl | hx |
| 93 | · rw [polynomialEdge, edge_of_nonpos c hx.le, mul_zero] |
| 94 | refine (hasDerivAt_const x 0).congr_of_eventuallyEq ?_ |
| 95 | filter_upwards [gt_mem_nhds hx] with y hy |
| 96 | simp [polynomialEdge, edge_of_nonpos c hy.le] |
| 97 | · rw [polynomialEdge_zero, hasDerivAt_iff_tendsto_slope] |
| 98 | refine ((polynomialEdge_tendsto_zero hc (p * X)).mono_left inf_le_left).congr ?_ |
| 99 | intro x |
| 100 | simp [slope_def_field, polynomialEdge, div_eq_mul_inv, mul_right_comm] |
| 101 | · have hinv : HasDerivAt (fun y : ℝ => y⁻¹) (-(x ^ 2)⁻¹) x := |
| 102 | hasDerivAt_inv hx.ne' |
| 103 | have hpoly := (p.hasDerivAt x⁻¹).comp x hinv |
| 104 | have hexp := (((hinv.pow 2).const_mul (-c)).exp) |
| 105 | have hprod := hpoly.mul hexp |
| 106 | convert! hprod.congr_of_eventuallyEq ?_ using 1 |
| 107 | · simp [polynomialEdge, derivativePolynomial, edge_of_pos c hx, inv_pow, |
| 108 | div_eq_mul_inv] |
| 109 | ring |
| 110 | · filter_upwards [lt_mem_nhds hx] with y hy |
| 111 | simp [polynomialEdge, edge_of_pos c hy, div_eq_mul_inv, inv_pow] |
| 112 | |
| 113 | theorem polynomialEdge_differentiable {c : ℝ} (hc : 0 < c) (p : ℝ[X]) : |
| 114 | Differentiable ℝ (polynomialEdge c p) := |
| 115 | fun x => (polynomialEdge_hasDerivAt hc p x).differentiableAt |
| 116 | |
| 117 | /-- The full inverse-polynomial family is smooth, including at the edge. -/ |
| 118 | theorem polynomialEdge_contDiff {c : ℝ} (hc : 0 < c) (p : ℝ[X]) {n : ℕ∞} : |
| 119 | ContDiff ℝ n (polynomialEdge c p) := by |
| 120 | apply contDiff_all_iff_nat.2 (fun m => ?_) n |
| 121 | induction m generalizing p with |
| 122 | | zero => exact contDiff_zero.2 (polynomialEdge_differentiable hc p).continuous |
| 123 | | succ m ih => |
| 124 | rw [show ((m + 1 : ℕ) : WithTop ℕ∞) = m + 1 from rfl] |
| 125 | refine contDiff_succ_iff_deriv.2 ⟨polynomialEdge_differentiable hc p, by simp, ?_⟩ |
| 126 | convert! ih (derivativePolynomial c p) using 2 |
| 127 | funext x |
| 128 | exact (polynomialEdge_hasDerivAt hc p x).deriv |
| 129 | |
| 130 | /-- The concrete one-sided exponential edge is `C^∞`. -/ |
| 131 | theorem edge_contDiff {c : ℝ} (hc : 0 < c) {n : ℕ∞} : ContDiff ℝ n (edge c) := by |
| 132 | convert! polynomialEdge_contDiff hc (1 : ℝ[X]) (n := n) using 1 |
| 133 | funext x |
| 134 | simp [polynomialEdge] |
| 135 | |
| 136 | /-- The explicit derivative polynomial after `m` differentiations. -/ |
| 137 | def jetPolynomial (c : ℝ) (p : ℝ[X]) : ℕ → ℝ[X] |
| 138 | | 0 => p |
| 139 | | m + 1 => derivativePolynomial c (jetPolynomial c p m) |
| 140 | |
| 141 | theorem iteratedDeriv_polynomialEdge {c : ℝ} (hc : 0 < c) (p : ℝ[X]) (m : ℕ) : |
| 142 | iteratedDeriv m (polynomialEdge c p) = polynomialEdge c (jetPolynomial c p m) := by |
| 143 | induction m with |
| 144 | | zero => simp [jetPolynomial] |
| 145 | | succ m ih => |
| 146 | rw [iteratedDeriv_succ, ih] |
| 147 | funext x |
| 148 | exact (polynomialEdge_hasDerivAt hc (jetPolynomial c p m) x).deriv |
| 149 | |
| 150 | @[simp] theorem polynomialEdge_one (c : ℝ) : polynomialEdge c 1 = edge c := by |
| 151 | funext x |
| 152 | simp [polynomialEdge] |
| 153 | |
| 154 | /-- Every actual derivative vanishes at the joining point. -/ |
| 155 | theorem iteratedDeriv_edge_zero {c : ℝ} (hc : 0 < c) (m : ℕ) : |
| 156 | iteratedDeriv m (edge c) 0 = 0 := by |
| 157 | rw [← polynomialEdge_one c, iteratedDeriv_polynomialEdge hc 1 m] |
| 158 | exact polynomialEdge_zero c _ |
| 159 | |
| 160 | /-- Division by an arbitrary natural power stays inside the smooth family. -/ |
| 161 | theorem polynomialEdge_div_pow (c : ℝ) (p : ℝ[X]) (loss : ℕ) : |
| 162 | (fun x => polynomialEdge c p x / x ^ loss) = polynomialEdge c (p * X ^ loss) := by |
| 163 | funext x |
| 164 | simp [polynomialEdge, div_eq_mul_inv, inv_pow, mul_assoc, mul_comm] |
| 165 | |
| 166 | /-- The total quotient, with value zero at the origin, is genuinely smooth. -/ |
| 167 | theorem edge_div_pow_contDiff {c : ℝ} (hc : 0 < c) (loss : ℕ) {n : ℕ∞} : |
| 168 | ContDiff ℝ n (fun x => edge c x / x ^ loss) := by |
| 169 | rw [← polynomialEdge_one c, polynomialEdge_div_pow] |
| 170 | exact polynomialEdge_contDiff hc _ |
| 171 | |
| 172 | /-- Every inverse-power weighted derivative of the edge is smooth. -/ |
| 173 | theorem weighted_iteratedDeriv_contDiff {c : ℝ} (hc : 0 < c) |
| 174 | (m loss : ℕ) {n : ℕ∞} : |
| 175 | ContDiff ℝ n (fun x => iteratedDeriv m (edge c) x / x ^ loss) := by |
| 176 | rw [← polynomialEdge_one c, iteratedDeriv_polynomialEdge hc 1 m, |
| 177 | polynomialEdge_div_pow] |
| 178 | exact polynomialEdge_contDiff hc _ |
| 179 | |
| 180 | /-- Every derivative decays faster than every inverse power can grow. This |
| 181 | is a limit for the constructed function, with no assumed flatness predicate. -/ |
| 182 | theorem weighted_iteratedDeriv_tendsto_zero {c : ℝ} (hc : 0 < c) (m loss : ℕ) : |
| 183 | Tendsto (fun x => iteratedDeriv m (edge c) x / x ^ loss) (𝓝 0) (𝓝 0) := by |
| 184 | rw [← polynomialEdge_one c, iteratedDeriv_polynomialEdge hc 1 m, |
| 185 | polynomialEdge_div_pow] |
| 186 | exact polynomialEdge_tendsto_zero hc _ |
| 187 | |
| 188 | /-- Exponential flat factors can also be divided when a positive exponential |
| 189 | margin remains. This identity includes the common zero region. -/ |
| 190 | theorem edge_div_edge (c d : ℝ) : |
| 191 | (fun x => edge c x / edge d x) = edge (c - d) := by |
| 192 | funext x |
| 193 | by_cases hx : x ≤ 0 |
| 194 | · simp [edge, hx] |
| 195 | · simp only [edge, ite_eq_right hx, ← Real.exp_sub] |
| 196 | congr 1 |
| 197 | ring |
| 198 | |
| 199 | theorem edge_quotient_contDiff {c d : ℝ} (hdc : d < c) {n : ℕ∞} : |
| 200 | ContDiff ℝ n (fun x => edge c x / edge d x) := by |
| 201 | rw [edge_div_edge] |
| 202 | exact edge_contDiff (sub_pos.mpr hdc) |
| 203 | |
| 204 | end NavierStokes.FlatCutoff |