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.Calculus.Deriv.MeanValue |
| 2 | import Mathlib.Analysis.SpecialFunctions.ExpDeriv |
| 3 | import Mathlib.Analysis.SpecialFunctions.Pow.Real |
| 4 | import Mathlib.Analysis.SpecialFunctions.Pow.Continuity |
| 5 | import Mathlib.LinearAlgebra.Matrix.NonsingularInverse |
| 6 | import Mathlib.MeasureTheory.Integral.Average |
| 7 | import Mathlib.MeasureTheory.Function.LocallyIntegrable |
| 8 | import Mathlib.MeasureTheory.Measure.Lebesgue.Basic |
| 9 | import Mathlib.Topology.Order.IntermediateValue |
| 10 | import Mathlib.Tactic.Linarith |
| 11 | import Mathlib.Tactic.Ring |
| 12 | |
| 13 | /-! |
| 14 | # Generalized-power evaluation matrices |
| 15 | |
| 16 | Rolle induction proves uniqueness of an exponential sum at as many ordered |
| 17 | nodes as there are distinct real exponents. Taking logarithms gives the |
| 18 | generalized-power evaluation-matrix part of manuscript Lemma 3.6. |
| 19 | -/ |
| 20 | |
| 21 | noncomputable section |
| 22 | |
| 23 | open scoped BigOperators |
| 24 | open MeasureTheory |
| 25 | |
| 26 | namespace NavierStokes.PowerMomentMatrix |
| 27 | |
| 28 | /-- A finite exponential sum with arbitrary real exponents. -/ |
| 29 | def expSum {n : ℕ} (a c : Fin n → ℝ) (t : ℝ) : ℝ := |
| 30 | ∑ j, c j * Real.exp (a j * t) |
| 31 | |
| 32 | theorem expSum_hasDerivAt {n : ℕ} (a c : Fin n → ℝ) (t : ℝ) : |
| 33 | HasDerivAt (expSum a c) (expSum a (fun j => c j * a j) t) t := by |
| 34 | apply HasDerivAt.fun_sum |
| 35 | intro j _ |
| 36 | convert! (((hasDerivAt_id t).const_mul (a j)).exp).const_mul (c j) using 1 |
| 37 | simp only [id_eq] |
| 38 | ring |
| 39 | |
| 40 | /-- Shifting all exponents multiplies the exponential sum by a nonzero factor. -/ |
| 41 | theorem expSum_shift {n : ℕ} (a c : Fin n → ℝ) (s t : ℝ) : |
| 42 | expSum (fun j => a j - s) c t = expSum a c t * Real.exp (-s * t) := by |
| 43 | unfold expSum |
| 44 | rw [Finset.sum_mul] |
| 45 | apply Finset.sum_congr rfl |
| 46 | intro j _ |
| 47 | rw [show (a j - s) * t = a j * t + (-s * t) by ring, Real.exp_add] |
| 48 | ring |
| 49 | |
| 50 | /-- Consecutive equal values yield strictly ordered derivative zeros. -/ |
| 51 | theorem exists_ordered_derivative_zeros {n : ℕ} (f f' : ℝ → ℝ) |
| 52 | (hf : ∀ t, HasDerivAt f (f' t) t) |
| 53 | (x : Fin (n + 1) → ℝ) (hx : StrictMono x) (hz : ∀ j, f (x j) = 0) : |
| 54 | ∃ y : Fin n → ℝ, StrictMono y ∧ |
| 55 | (∀ j, x j.castSucc < y j ∧ y j < x j.succ) ∧ (∀ j, f' (y j) = 0) := by |
| 56 | have hex : ∀ j : Fin n, ∃ t, t ∈ Set.Ioo (x j.castSucc) (x j.succ) ∧ f' t = 0 := by |
| 57 | intro j |
| 58 | apply exists_hasDerivAt_eq_zero (f := f) (f' := f') (hx j.castSucc_lt_succ) |
| 59 | · exact (continuous_iff_continuousAt.mpr fun t => (hf t).continuousAt).continuousOn |
| 60 | · rw [hz, hz] |
| 61 | · intro t _ |
| 62 | exact hf t |
| 63 | choose y hy hzero using hex |
| 64 | refine ⟨y, ?_, hy, hzero⟩ |
| 65 | intro i j hij |
| 66 | exact lt_trans (lt_of_lt_of_le (hy i).2 (hx.monotone (Fin.succ_le_castSucc_iff.mpr hij))) |
| 67 | (hy j).1 |
| 68 | |
| 69 | /-- |
| 70 | An exponential sum with `n` distinct real exponents which vanishes at `n` |
| 71 | strictly ordered nodes has all coefficients zero. This is the full finite |
| 72 | Rolle induction, with no nonsingularity premise. |
| 73 | -/ |
| 74 | theorem expSum_coefficients_zero : |
| 75 | ∀ (n : ℕ) (a c x : Fin n → ℝ), Function.Injective a → StrictMono x → |
| 76 | (∀ j, expSum a c (x j) = 0) → c = 0 := by |
| 77 | intro n |
| 78 | induction n with |
| 79 | | zero => |
| 80 | intro a c x ha hx hz |
| 81 | ext j |
| 82 | exact Fin.elim0 j |
| 83 | | succ n ih => |
| 84 | intro a c x ha hx hz |
| 85 | let a' : Fin n → ℝ := fun j => a j.succ - a 0 |
| 86 | let d : Fin n → ℝ := fun j => c j.succ * (a j.succ - a 0) |
| 87 | let g : ℝ → ℝ := expSum (fun j => a j - a 0) c |
| 88 | have hgzero : ∀ j, g (x j) = 0 := by |
| 89 | intro j |
| 90 | dsimp [g] |
| 91 | rw [expSum_shift, hz, zero_mul] |
| 92 | have hgderiv : ∀ t, HasDerivAt g (expSum a' d t) t := by |
| 93 | intro t |
| 94 | convert! expSum_hasDerivAt (fun j => a j - a 0) c t using 1 |
| 95 | simp [expSum, Fin.sum_univ_succ, a', d] |
| 96 | obtain ⟨y, hy, _, hyzero⟩ := exists_ordered_derivative_zeros g (expSum a' d) |
| 97 | hgderiv x hx hgzero |
| 98 | have ha' : Function.Injective a' := by |
| 99 | intro i j hij |
| 100 | have hij' : a i.succ = a j.succ := by |
| 101 | dsimp [a'] at hij |
| 102 | linarith |
| 103 | exact Fin.succ_inj.mp (ha hij') |
| 104 | have hd : d = 0 := ih a' d y ha' hy hyzero |
| 105 | have htail : ∀ j : Fin n, c j.succ = 0 := by |
| 106 | intro j |
| 107 | have hj := congrFun hd j |
| 108 | change c j.succ * (a j.succ - a 0) = 0 at hj |
| 109 | apply (mul_eq_zero.mp hj).resolve_right |
| 110 | intro heq |
| 111 | have hindex := ha (sub_eq_zero.mp heq) |
| 112 | exact Fin.succ_ne_zero j hindex |
| 113 | have hhead : c 0 = 0 := by |
| 114 | have h := hz 0 |
| 115 | simpa [expSum, Fin.sum_univ_succ, htail, Real.exp_ne_zero] using h |
| 116 | ext j |
| 117 | exact Fin.cases hhead htail j |
| 118 | |
| 119 | /-- The evaluation matrix, with exponents indexing rows and nodes indexing columns. -/ |
| 120 | def expEvaluationMatrix {n : ℕ} (a x : Fin n → ℝ) : Matrix (Fin n) (Fin n) ℝ := |
| 121 | fun i j => Real.exp (a i * x j) |
| 122 | |
| 123 | theorem expEvaluationMatrix_det_ne_zero {n : ℕ} (a x : Fin n → ℝ) |
| 124 | (ha : Function.Injective a) (hx : StrictMono x) : |
| 125 | (expEvaluationMatrix a x).det ≠ 0 := by |
| 126 | apply IsUnit.ne_zero |
| 127 | apply (Matrix.isUnit_iff_isUnit_det _).mp |
| 128 | apply Matrix.vecMul_injective_iff_isUnit.mp |
| 129 | intro c d hcd |
| 130 | dsimp only at hcd |
| 131 | have hzero : (expEvaluationMatrix a x).vecMul (c - d) = 0 := by |
| 132 | rw [Matrix.sub_vecMul, hcd, sub_self] |
| 133 | have hz : ∀ j, expSum a (c - d) (x j) = 0 := by |
| 134 | intro j |
| 135 | exact congrFun hzero j |
| 136 | exact sub_eq_zero.mp (expSum_coefficients_zero n a (c - d) x ha hx hz) |
| 137 | |
| 138 | /-- Real powers; the row exponents are not restricted to natural numbers. -/ |
| 139 | def powerEvaluationMatrix {n : ℕ} (a x : Fin n → ℝ) : Matrix (Fin n) (Fin n) ℝ := |
| 140 | fun i j => (x j) ^ (a i) |
| 141 | |
| 142 | /-- The generalized-power evaluation determinant is nonzero at positive ordered nodes. -/ |
| 143 | theorem powerEvaluationMatrix_det_ne_zero {n : ℕ} (a x : Fin n → ℝ) |
| 144 | (ha : Function.Injective a) (hx : StrictMono x) (hpos : ∀ j, 0 < x j) : |
| 145 | (powerEvaluationMatrix a x).det ≠ 0 := by |
| 146 | have hlog : StrictMono (fun j => Real.log (x j)) := by |
| 147 | intro i j hij |
| 148 | exact Real.log_lt_log (hpos i) (hx hij) |
| 149 | have hmat : powerEvaluationMatrix a x = expEvaluationMatrix a (fun j => Real.log (x j)) := by |
| 150 | ext i j |
| 151 | simp only [powerEvaluationMatrix, expEvaluationMatrix, Real.rpow_def_of_pos (hpos j)] |
| 152 | rw [mul_comm] |
| 153 | rw [hmat] |
| 154 | exact expEvaluationMatrix_det_ne_zero a _ ha hlog |
| 155 | |
| 156 | /-- A continuous function with zero integral against a positive finite measure |
| 157 | of nonzero mass on an interval has a zero in that interval. -/ |
| 158 | theorem exists_zero_of_setIntegral_eq_zero |
| 159 | (μ : Measure ℝ) [IsFiniteMeasure μ] (l u : ℝ) (f : ℝ → ℝ) |
| 160 | (hmass : μ (Set.Icc l u) ≠ 0) (hf : ContinuousOn f (Set.Icc l u)) |
| 161 | (hzero : ∫ t in Set.Icc l u, f t ∂μ = 0) : |
| 162 | ∃ t ∈ Set.Icc l u, f t = 0 := by |
| 163 | have hμ : μ.restrict (Set.Icc l u) ≠ 0 := by |
| 164 | intro h |
| 165 | exact hmass (Measure.restrict_eq_zero.mp h) |
| 166 | have hint : Integrable f (μ.restrict (Set.Icc l u)) := hf.integrableOn_Icc |
| 167 | have hnull : (μ.restrict (Set.Icc l u)) (Set.Icc l u)ᶜ = 0 := by simp |
| 168 | have havg : ⨍ t in Set.Icc l u, f t ∂μ = 0 := by |
| 169 | rw [average_eq, hzero, smul_zero] |
| 170 | obtain ⟨x, hx, hfx⟩ := exists_notMem_null_le_average hμ hint hnull |
| 171 | obtain ⟨y, hy, hfy⟩ := exists_notMem_null_average_le hμ hint hnull |
| 172 | have hx' : x ∈ Set.Icc l u := by simpa using hx |
| 173 | have hy' : y ∈ Set.Icc l u := by simpa using hy |
| 174 | rw [havg] at hfx hfy |
| 175 | exact isPreconnected_Icc.intermediate_value hx' hy' hf ⟨hfx, hfy⟩ |
| 176 | |
| 177 | /-- A finite linear combination of arbitrary real powers. -/ |
| 178 | def powerSum {n : ℕ} (a c : Fin n → ℝ) (t : ℝ) : ℝ := ∑ i, c i * t ^ a i |
| 179 | |
| 180 | theorem continuousOn_powerSum {n : ℕ} (a c : Fin n → ℝ) (l u : ℝ) (hl : 0 < l) : |
| 181 | ContinuousOn (powerSum a c) (Set.Icc l u) := by |
| 182 | apply continuousOn_finsetSum |
| 183 | intro i _ |
| 184 | apply continuousOn_const.mul |
| 185 | apply continuousOn_id.rpow_const |
| 186 | intro t ht |
| 187 | exact Or.inl (ne_of_gt (lt_of_lt_of_le hl ht.1)) |
| 188 | |
| 189 | /-- Columns integrate the real powers over separated intervals against finite |
| 190 | positive measures. Positivity is intrinsic in the type `Measure`. -/ |
| 191 | def intervalMomentMatrix {n : ℕ} (a l u : Fin n → ℝ) (μ : Fin n → Measure ℝ) : |
| 192 | Matrix (Fin n) (Fin n) ℝ := |
| 193 | fun i j => ∫ t in Set.Icc (l j) (u j), t ^ a i ∂μ j |
| 194 | |
| 195 | theorem integral_powerSum {n : ℕ} (a c : Fin n → ℝ) (l u : ℝ) |
| 196 | (μ : Measure ℝ) [IsFiniteMeasure μ] (hl : 0 < l) : |
| 197 | (∫ t in Set.Icc l u, powerSum a c t ∂μ) = |
| 198 | ∑ i, c i * ∫ t in Set.Icc l u, t ^ a i ∂μ := by |
| 199 | unfold powerSum |
| 200 | rw [integral_finsetSum] |
| 201 | · simp only [integral_const_mul] |
| 202 | · intro i _ |
| 203 | apply ContinuousOn.integrableOn_Icc |
| 204 | apply continuousOn_const.mul |
| 205 | apply continuousOn_id.rpow_const |
| 206 | intro t ht |
| 207 | exact Or.inl (ne_of_gt (lt_of_lt_of_le hl ht.1)) |
| 208 | |
| 209 | /-- |
| 210 | The integrated generalized-power matrix is nonsingular for any finite positive |
| 211 | measures with nonzero mass on strictly separated compact positive intervals. |
| 212 | This proves the moment-matrix mechanism without assuming determinant sign or |
| 213 | invertibility. A zero linear combination of columns supplies one function zero |
| 214 | in each interval; the Rolle theorem above then forces all coefficients to vanish. |
| 215 | -/ |
| 216 | theorem intervalMomentMatrix_det_ne_zero {n : ℕ} (a l u : Fin n → ℝ) |
| 217 | (μ : Fin n → Measure ℝ) [∀ j, IsFiniteMeasure (μ j)] |
| 218 | (ha : Function.Injective a) (hl : ∀ j, 0 < l j) |
| 219 | (hsep : ∀ i j, i < j → u i < l j) |
| 220 | (hmass : ∀ j, μ j (Set.Icc (l j) (u j)) ≠ 0) : |
| 221 | (intervalMomentMatrix a l u μ).det ≠ 0 := by |
| 222 | apply IsUnit.ne_zero |
| 223 | apply (Matrix.isUnit_iff_isUnit_det _).mp |
| 224 | apply Matrix.vecMul_injective_iff_isUnit.mp |
| 225 | intro c d hcd |
| 226 | dsimp only at hcd |
| 227 | have hzero : (intervalMomentMatrix a l u μ).vecMul (c - d) = 0 := by |
| 228 | rw [Matrix.sub_vecMul, hcd, sub_self] |
| 229 | have hroots : ∀ j, ∃ t ∈ Set.Icc (l j) (u j), powerSum a (c - d) t = 0 := by |
| 230 | intro j |
| 231 | apply exists_zero_of_setIntegral_eq_zero (μ j) (l j) (u j) _ (hmass j) |
| 232 | (continuousOn_powerSum a (c - d) (l j) (u j) (hl j)) |
| 233 | rw [integral_powerSum a (c - d) (l j) (u j) (μ j) (hl j)] |
| 234 | exact congrFun hzero j |
| 235 | choose x hx hroot using hroots |
| 236 | have hxmono : StrictMono x := by |
| 237 | intro i j hij |
| 238 | exact lt_of_le_of_lt (hx i).2 (lt_of_lt_of_le (hsep i j hij) (hx j).1) |
| 239 | have hxpos : ∀ j, 0 < x j := fun j => lt_of_lt_of_le (hl j) (hx j).1 |
| 240 | have hcoeff : c - d = 0 := by |
| 241 | have hunit : IsUnit (powerEvaluationMatrix a x) := |
| 242 | (Matrix.isUnit_iff_isUnit_det _).mpr (isUnit_iff_ne_zero.mpr |
| 243 | (powerEvaluationMatrix_det_ne_zero a x ha hxmono hxpos)) |
| 244 | apply Matrix.vecMul_injective_iff_isUnit.mpr hunit |
| 245 | dsimp only |
| 246 | rw [Matrix.zero_vecMul] |
| 247 | ext j |
| 248 | exact hroot j |
| 249 | exact sub_eq_zero.mp hcoeff |
| 250 | |
| 251 | /-- The manuscript's matrix of ordinary Lebesgue integrals against bump profiles. -/ |
| 252 | def bumpMomentMatrix {n : ℕ} (a : Fin n → ℝ) (β : Fin n → ℝ → ℝ) : |
| 253 | Matrix (Fin n) (Fin n) ℝ := fun i j => ∫ t, t ^ a i * β j t |
| 254 | |
| 255 | /-- |
| 256 | The ordered bump moment matrix is nonsingular. The bump hypotheses are stated |
| 257 | using explicit separated compact intervals; continuity suffices, so smoothness |
| 258 | is unnecessary. All finite sizes and arbitrary distinct real exponents are |
| 259 | covered. No moment-determinant or inverse estimate is assumed. |
| 260 | -/ |
| 261 | theorem bumpMomentMatrix_det_ne_zero {n : ℕ} (a l u : Fin n → ℝ) |
| 262 | (β : Fin n → ℝ → ℝ) (ha : Function.Injective a) |
| 263 | (hl : ∀ j, 0 < l j) (hsep : ∀ i j, i < j → u i < l j) |
| 264 | (hcont : ∀ j, Continuous (β j)) (hnonneg : ∀ j t, 0 ≤ β j t) |
| 265 | (hnonzero : ∀ j, ∃ t, β j t ≠ 0) |
| 266 | (hsupp : ∀ j, Function.support (β j) ⊆ Set.Icc (l j) (u j)) : |
| 267 | (bumpMomentMatrix a β).det ≠ 0 := by |
| 268 | have hcompact : ∀ j, HasCompactSupport (β j) := fun j => |
| 269 | HasCompactSupport.of_support_subset_isCompact isCompact_Icc (hsupp j) |
| 270 | have hintegrable : ∀ j, Integrable (β j) := fun j => |
| 271 | (hcont j).integrable_of_hasCompactSupport (hcompact j) |
| 272 | have hout : ∀ j t, t ∉ Set.Icc (l j) (u j) → β j t = 0 := by |
| 273 | intro j t ht |
| 274 | by_contra h |
| 275 | exact ht (hsupp j h) |
| 276 | let μ : Fin n → Measure ℝ := fun j => volume.withDensity (fun t => ENNReal.ofReal (β j t)) |
| 277 | let : ∀ j, IsFiniteMeasure (μ j) := fun j => |
| 278 | isFiniteMeasure_withDensity_ofReal (hintegrable j).2 |
| 279 | have hdensity : ∀ j (f : ℝ → ℝ), |
| 280 | (∫ t in Set.Icc (l j) (u j), f t ∂μ j) = |
| 281 | ∫ t in Set.Icc (l j) (u j), β j t * f t := by |
| 282 | intro j f |
| 283 | dsimp [μ] |
| 284 | rw [setIntegral_withDensity_eq_setIntegral_toReal_smul |
| 285 | (hcont j).measurable.ennreal_ofReal |
| 286 | (Filter.Eventually.of_forall fun t => ENNReal.ofReal_lt_top) f measurableSet_Icc] |
| 287 | simp only [ENNReal.toReal_ofReal (hnonneg j _), smul_eq_mul] |
| 288 | have hmass : ∀ j, μ j (Set.Icc (l j) (u j)) ≠ 0 := by |
| 289 | intro j hzero |
| 290 | have hr : (μ j).restrict (Set.Icc (l j) (u j)) = 0 := |
| 291 | Measure.restrict_eq_zero.mpr hzero |
| 292 | have heq := hdensity j (fun _ => (1 : ℝ)) |
| 293 | rw [hr, integral_zero_measure] at heq |
| 294 | simp only [mul_one] at heq |
| 295 | rw [setIntegral_eq_integral_of_forall_compl_eq_zero (hout j)] at heq |
| 296 | obtain ⟨t, ht⟩ := hnonzero j |
| 297 | have hpos : 0 < ∫ t, β j t := (hcont j).integral_pos_of_hasCompactSupport_nonneg_nonzero |
| 298 | (hcompact j) (hnonneg j) ht |
| 299 | linarith |
| 300 | have hmatrix : bumpMomentMatrix a β = intervalMomentMatrix a l u μ := by |
| 301 | ext i j |
| 302 | change (∫ t, t ^ a i * β j t) = ∫ t in Set.Icc (l j) (u j), t ^ a i ∂μ j |
| 303 | rw [hdensity] |
| 304 | rw [setIntegral_eq_integral_of_forall_compl_eq_zero (fun t ht => by rw [hout j t ht, zero_mul])] |
| 305 | congr 1 |
| 306 | ext t |
| 307 | exact mul_comm _ _ |
| 308 | rw [hmatrix] |
| 309 | exact intervalMomentMatrix_det_ne_zero a l u μ ha hl hsep hmass |
| 310 | |
| 311 | end NavierStokes.PowerMomentMatrix |