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.PowerMomentMatrix |
| 2 | import NavierStokes.ParametricRephase |
| 3 | import Mathlib.Analysis.SpecialFunctions.Pow.Deriv |
| 4 | import Mathlib.Analysis.Matrix.Normed |
| 5 | |
| 6 | /-! |
| 7 | # Smooth families of actual power moment matrices |
| 8 | |
| 9 | The integration intervals may move with the parameter. Locally uniform compact |
| 10 | support is derived from their continuous endpoints. Smoothness of the integral |
| 11 | matrix and its actual inverse is then proved from the primitive data, and |
| 12 | compactness bounds every fixed parameter jet of that inverse. |
| 13 | -/ |
| 14 | |
| 15 | noncomputable section |
| 16 | |
| 17 | open Set Filter Function MeasureTheory |
| 18 | open scoped Topology ContDiff Interval BigOperators Matrix.Norms.Elementwise |
| 19 | |
| 20 | namespace NavierStokes.SmoothPowerMomentMatrix |
| 21 | |
| 22 | variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 23 | |
| 24 | /-- A moving compact support can be replaced locally by a fixed finite interval. -/ |
| 25 | theorem integral_contDiffOn_of_moving_support [ProperSpace E] |
| 26 | (U : Set E) (hU : IsOpen U) (F : E × ℝ → ℝ) |
| 27 | (hF : ContDiffOn ℝ ∞ F (U ×ˢ univ)) (l u : E → ℝ) |
| 28 | (hl : ContinuousOn l U) (hu : ContinuousOn u U) |
| 29 | (hs : ∀ p ∈ U, support (fun t => F (p, t)) ⊆ Icc (l p) (u p)) : |
| 30 | ContDiffOn ℝ ∞ (fun p => ∫ t, F (p, t)) U := by |
| 31 | intro p hp |
| 32 | let a := min (l p) (u p) - 1 |
| 33 | let b := max (l p) (u p) + 1 |
| 34 | have ha : a < l p := by dsimp [a]; linarith [min_le_left (l p) (u p)] |
| 35 | have hb : u p < b := by dsimp [b]; linarith [le_max_right (l p) (u p)] |
| 36 | have hab : a ≤ b := by |
| 37 | dsimp [a, b] |
| 38 | linarith [show min (l p) (u p) ≤ max (l p) (u p) from min_le_max] |
| 39 | have hi := ParametricRephase.intervalIntegral_contDiffOn_of_joint F U hU hF a b hab |
| 40 | have heq : (fun q => ∫ t, F (q, t)) =ᶠ[𝓝 p] |
| 41 | (fun q => ∫ t in a..b, F (q, t)) := by |
| 42 | filter_upwards [hU.mem_nhds hp, |
| 43 | (hl.continuousAt (hU.mem_nhds hp)).eventually (lt_mem_nhds ha), |
| 44 | (hu.continuousAt (hU.mem_nhds hp)).eventually (gt_mem_nhds hb)] with q hq hql hqu |
| 45 | symm |
| 46 | apply intervalIntegral.integral_eq_integral_of_support_subset |
| 47 | intro t ht |
| 48 | exact ⟨lt_of_lt_of_le hql (hs q hq ht).1, (hs q hq ht).2.trans hqu.le⟩ |
| 49 | exact ((hi.contDiffAt (hU.mem_nhds hp)).congr_of_eventuallyEq heq).contDiffWithinAt |
| 50 | |
| 51 | /-- Determinants are finite polynomials in their entries. -/ |
| 52 | theorem determinant_contDiffOn {n : ℕ} {U : Set E} |
| 53 | (M : E → Matrix (Fin n) (Fin n) ℝ) |
| 54 | (hM : ContDiffOn ℝ ∞ M U) : ContDiffOn ℝ ∞ (fun p => (M p).det) U := by |
| 55 | classical |
| 56 | simp only [Matrix.det_apply'] |
| 57 | apply ContDiffOn.sum |
| 58 | intro σ _ |
| 59 | apply contDiffOn_const.mul |
| 60 | apply contDiffOn_prod |
| 61 | intro i _ |
| 62 | exact (contDiffOn_pi.mp (contDiffOn_pi.mp hM (σ i)) i) |
| 63 | |
| 64 | /-- The ordinary nonsingular matrix inverse is smooth wherever its determinant |
| 65 | is nonzero. The proof uses the explicit cofactor formula. -/ |
| 66 | theorem inverse_contDiffOn {n : ℕ} {U : Set E} |
| 67 | (M : E → Matrix (Fin n) (Fin n) ℝ) |
| 68 | (hM : ContDiffOn ℝ ∞ M U) (hdet : ∀ p ∈ U, (M p).det ≠ 0) : |
| 69 | ContDiffOn ℝ ∞ (fun p => (M p)⁻¹) U := by |
| 70 | classical |
| 71 | have hd := (determinant_contDiffOn M hM).inv hdet |
| 72 | apply contDiffOn_pi.mpr |
| 73 | intro i |
| 74 | apply contDiffOn_pi.mpr |
| 75 | intro j |
| 76 | simp only [Matrix.inv_def, Ring.inverse_eq_inv, Matrix.smul_apply, smul_eq_mul, |
| 77 | Matrix.adjugate_apply] |
| 78 | apply hd.mul |
| 79 | apply determinant_contDiffOn |
| 80 | apply contDiffOn_pi.mpr |
| 81 | intro k |
| 82 | apply contDiffOn_pi.mpr |
| 83 | intro t |
| 84 | by_cases hkj : k = j |
| 85 | · subst k |
| 86 | simp only [Matrix.updateRow_self] |
| 87 | exact contDiffOn_const |
| 88 | · simpa only [Matrix.updateRow_ne hkj] using |
| 89 | (contDiffOn_pi.mp (contDiffOn_pi.mp hM k) t) |
| 90 | |
| 91 | /-- Primitive smooth data for separated positive bump moments. Endpoint |
| 92 | continuity suffices; in particular smoothly moving intervals are allowed. -/ |
| 93 | structure Family (E : Type*) [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 94 | (n : ℕ) (U : Set E) where |
| 95 | exponent : E → Fin n → ℝ |
| 96 | lower : E → Fin n → ℝ |
| 97 | upper : E → Fin n → ℝ |
| 98 | bump : E → Fin n → ℝ → ℝ |
| 99 | exponent_smooth : ∀ i, ContDiffOn ℝ ∞ (fun p => exponent p i) U |
| 100 | lower_continuous : ∀ j, ContinuousOn (fun p => lower p j) U |
| 101 | upper_continuous : ∀ j, ContinuousOn (fun p => upper p j) U |
| 102 | bump_smooth : ∀ j, ContDiffOn ℝ ∞ (fun z : E × ℝ => bump z.1 j z.2) (U ×ˢ univ) |
| 103 | exponent_injective : ∀ p ∈ U, Injective (exponent p) |
| 104 | lower_pos : ∀ p ∈ U, ∀ j, 0 < lower p j |
| 105 | separated : ∀ p ∈ U, ∀ i j, i < j → upper p i < lower p j |
| 106 | bump_nonnegative : ∀ p ∈ U, ∀ j t, 0 ≤ bump p j t |
| 107 | bump_nonzero : ∀ p ∈ U, ∀ j, ∃ t, bump p j t ≠ 0 |
| 108 | bump_support : ∀ p ∈ U, ∀ j, support (bump p j) ⊆ Icc (lower p j) (upper p j) |
| 109 | |
| 110 | namespace Family |
| 111 | |
| 112 | variable {n : ℕ} {U : Set E} (D : Family E n U) |
| 113 | |
| 114 | /-- Exactly the ordinary integral matrix in `PowerMomentMatrix`. -/ |
| 115 | def matrix (p : E) : Matrix (Fin n) (Fin n) ℝ := |
| 116 | PowerMomentMatrix.bumpMomentMatrix (D.exponent p) (D.bump p) |
| 117 | |
| 118 | /-- Positive support identifies the full-line integral definition with the |
| 119 | literal positive-half-line integral from the manuscript. -/ |
| 120 | theorem matrix_eq_positive_integral (p : E) (hp : p ∈ U) (i j : Fin n) : |
| 121 | D.matrix p i j = ∫ t in Ioi (0 : ℝ), t ^ D.exponent p i * D.bump p j t := by |
| 122 | symm |
| 123 | apply setIntegral_eq_integral_of_forall_compl_eq_zero |
| 124 | intro t ht |
| 125 | have hb : D.bump p j t = 0 := by |
| 126 | by_contra hb |
| 127 | exact ht (lt_of_lt_of_le (D.lower_pos p hp j) (D.bump_support p hp j hb).1) |
| 128 | rw [hb, mul_zero] |
| 129 | |
| 130 | theorem integrand_contDiffOn (hU : IsOpen U) (i j : Fin n) : |
| 131 | ContDiffOn ℝ ∞ (fun z : E × ℝ => z.2 ^ D.exponent z.1 i * D.bump z.1 j z.2) |
| 132 | (U ×ˢ univ) := by |
| 133 | intro z hz |
| 134 | have hopen : IsOpen (U ×ˢ (univ : Set ℝ)) := hU.prod isOpen_univ |
| 135 | have he : ContDiffAt ℝ ∞ (fun z : E × ℝ => D.exponent z.1 i) z := |
| 136 | (D.exponent_smooth i |>.contDiffAt (hU.mem_nhds hz.1)).comp z contDiffAt_fst |
| 137 | by_cases ht : z.2 = 0 |
| 138 | · have hl : ContinuousAt (fun y : E × ℝ => D.lower y.1 j) z := |
| 139 | (D.lower_continuous j |>.continuousAt (hU.mem_nhds hz.1)).comp continuousAt_fst |
| 140 | have hlt : z.2 < D.lower z.1 j := by rw [ht]; exact D.lower_pos z.1 hz.1 j |
| 141 | have heq : (fun y : E × ℝ => y.2 ^ D.exponent y.1 i * D.bump y.1 j y.2) |
| 142 | =ᶠ[𝓝 z] (fun _ => (0 : ℝ)) := by |
| 143 | filter_upwards [hopen.mem_nhds hz, |
| 144 | (continuousAt_snd.eventually_lt hl hlt)] with y hy hyl |
| 145 | have hb : D.bump y.1 j y.2 = 0 := by |
| 146 | by_contra hb |
| 147 | exact (not_le_of_gt hyl) (D.bump_support y.1 hy.1 j hb).1 |
| 148 | rw [hb, mul_zero] |
| 149 | exact (contDiffAt_const.congr_of_eventuallyEq heq).contDiffWithinAt |
| 150 | · exact ((contDiffAt_snd.rpow he ht).mul |
| 151 | (D.bump_smooth j |>.contDiffAt (hopen.mem_nhds hz))).contDiffWithinAt |
| 152 | |
| 153 | theorem matrix_contDiffOn [ProperSpace E] (hU : IsOpen U) : |
| 154 | ContDiffOn ℝ ∞ D.matrix U := by |
| 155 | apply contDiffOn_pi.mpr |
| 156 | intro i |
| 157 | apply contDiffOn_pi.mpr |
| 158 | intro j |
| 159 | apply integral_contDiffOn_of_moving_support U hU _ (D.integrand_contDiffOn hU i j) |
| 160 | (fun p => D.lower p j) (fun p => D.upper p j) |
| 161 | (D.lower_continuous j) (D.upper_continuous j) |
| 162 | intro p hp t ht |
| 163 | apply D.bump_support p hp j |
| 164 | intro hb |
| 165 | exact ht (by dsimp only; rw [hb, mul_zero]) |
| 166 | |
| 167 | theorem matrix_det_ne_zero (p : E) (hp : p ∈ U) : (D.matrix p).det ≠ 0 := by |
| 168 | apply PowerMomentMatrix.bumpMomentMatrix_det_ne_zero |
| 169 | (D.exponent p) (D.lower p) (D.upper p) (D.bump p) |
| 170 | (D.exponent_injective p hp) (D.lower_pos p hp) (D.separated p hp) |
| 171 | · intro j |
| 172 | exact contDiffOn_univ.mp ((D.bump_smooth j).comp |
| 173 | (contDiff_const.prodMk contDiff_id).contDiffOn (fun t _ => ⟨hp, mem_univ t⟩)) |>.continuous |
| 174 | · exact D.bump_nonnegative p hp |
| 175 | · exact D.bump_nonzero p hp |
| 176 | · exact D.bump_support p hp |
| 177 | |
| 178 | theorem matrix_inverse_contDiffOn [ProperSpace E] (hU : IsOpen U) : |
| 179 | ContDiffOn ℝ ∞ (fun p => (D.matrix p)⁻¹) U := |
| 180 | inverse_contDiffOn D.matrix (D.matrix_contDiffOn hU) D.matrix_det_ne_zero |
| 181 | |
| 182 | /-- Every fixed full parameter derivative of the actual inverse matrix is |
| 183 | uniformly bounded on an arbitrary compact subset of the parameter domain. -/ |
| 184 | theorem compact_inverse_jet_bound [ProperSpace E] (hU : IsOpen U) |
| 185 | (K : Set E) (hK : IsCompact K) (hKU : K ⊆ U) (m : ℕ) : |
| 186 | ∃ C ≥ 0, ∀ p ∈ K, |
| 187 | ‖iteratedFDeriv ℝ m (fun q => (D.matrix q)⁻¹) p‖ ≤ C := by |
| 188 | have hj : ContinuousOn (iteratedFDeriv ℝ m (fun q => (D.matrix q)⁻¹)) U := by |
| 189 | intro p hp |
| 190 | exact (((D.matrix_inverse_contDiffOn hU).contDiffAt (hU.mem_nhds hp)).iteratedFDeriv_right |
| 191 | (m := 0) (by simp)).continuousAt.continuousWithinAt |
| 192 | obtain ⟨C, hC⟩ := hK.exists_bound_of_continuousOn (hj.mono hKU) |
| 193 | exact ⟨max C 0, le_max_right _ _, fun p hp => (hC p hp).trans (le_max_left _ _)⟩ |
| 194 | |
| 195 | /-- A common bound also controls the inverse and all jets up to any prescribed |
| 196 | finite order, uniformly over the compact parameter set. -/ |
| 197 | theorem compact_inverse_jets_bound [ProperSpace E] (hU : IsOpen U) |
| 198 | (K : Set E) (hK : IsCompact K) (hKU : K ⊆ U) (m : ℕ) : |
| 199 | ∃ C ≥ 0, ∀ k ≤ m, ∀ p ∈ K, |
| 200 | ‖iteratedFDeriv ℝ k (fun q => (D.matrix q)⁻¹) p‖ ≤ C := by |
| 201 | choose C hC hbound using fun k : Fin (m + 1) => |
| 202 | D.compact_inverse_jet_bound hU K hK hKU k.val |
| 203 | refine ⟨∑ k, C k, Finset.sum_nonneg (fun k _ => hC k), ?_⟩ |
| 204 | intro k hk p hp |
| 205 | exact (hbound ⟨k, by omega⟩ p hp).trans |
| 206 | (Finset.single_le_sum (fun t _ => hC t) |
| 207 | (Finset.mem_univ (⟨k, by omega⟩ : Fin (m + 1)))) |
| 208 | |
| 209 | end Family |
| 210 | end NavierStokes.SmoothPowerMomentMatrix |