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.ConeAlgebra |
| 2 | import Mathlib.Topology.Order.Compact |
| 3 | import Mathlib.Topology.MetricSpace.Thickening |
| 4 | |
| 5 | /-! |
| 6 | # Compact-family uniformity and stability of the stress cone |
| 7 | |
| 8 | The input functions are actual continuous functions on a compact parameter |
| 9 | set. Uniform margins, a single amplitude threshold, and a common perturbation |
| 10 | radius are conclusions of the theorems, not assumptions. |
| 11 | -/ |
| 12 | |
| 13 | noncomputable section |
| 14 | |
| 15 | open Set |
| 16 | open NavierStokes.ConeAlgebra |
| 17 | |
| 18 | namespace NavierStokes.UniformCone |
| 19 | |
| 20 | variable {X : Type*} [TopologicalSpace X] |
| 21 | |
| 22 | private theorem continuousOn_max {K : Set X} {f g : X → ℝ} |
| 23 | (hf : ContinuousOn f K) (hg : ContinuousOn g K) : |
| 24 | ContinuousOn (fun x => max (f x) (g x)) K := |
| 25 | continuous_max.comp_continuousOn (hf.prodMk hg) |
| 26 | |
| 27 | /-- The positive minimum of a continuous positive function on a compact set. |
| 28 | This also covers the empty parameter set. -/ |
| 29 | theorem positive_uniform_margin {K : Set X} (hK : IsCompact K) |
| 30 | {g : X → ℝ} (hg : ContinuousOn g K) (hpos : ∀ x ∈ K, 0 < g x) : |
| 31 | ∃ ε : ℝ, 0 < ε ∧ ∀ x ∈ K, ε ≤ g x := |
| 32 | hK.exists_forall_le' hg hpos |
| 33 | |
| 34 | /-- All three strict source inequalities in (11) have a common positive |
| 35 | margin on a continuous compact parameter family. -/ |
| 36 | theorem compact_source_margins {K : Set X} (hK : IsCompact K) |
| 37 | {a b w : X → ℝ} (ha : ContinuousOn a K) (hb : ContinuousOn b K) |
| 38 | (hw : ContinuousOn w K) (hapos : ∀ x ∈ K, 0 < a x) |
| 39 | (hfirst : ∀ x ∈ K, 0 < a x - b x * w x) |
| 40 | (hsecond : ∀ x ∈ K, |
| 41 | 2 * b x * w x + b x ^ 2 / a x + (a x - 2) * w x ^ 2 < 2) : |
| 42 | ∃ ε : ℝ, 0 < ε ∧ ∀ x ∈ K, |
| 43 | ε ≤ a x ∧ ε ≤ a x - b x * w x ∧ |
| 44 | ε ≤ 2 - (2 * b x * w x + b x ^ 2 / a x + (a x - 2) * w x ^ 2) := by |
| 45 | have hane : ∀ x ∈ K, a x ≠ 0 := fun x hx => ne_of_gt (hapos x hx) |
| 46 | have hsecond_cont : ContinuousOn |
| 47 | (fun x => 2 - (2 * b x * w x + b x ^ 2 / a x + (a x - 2) * w x ^ 2)) K := |
| 48 | continuousOn_const.sub |
| 49 | ((((continuousOn_const.mul hb).mul hw).add ((hb.pow 2).div ha hane)).add |
| 50 | ((ha.sub continuousOn_const).mul (hw.pow 2))) |
| 51 | obtain ⟨εa, hεa, hbounda⟩ := positive_uniform_margin hK ha hapos |
| 52 | obtain ⟨εf, hεf, hboundf⟩ := |
| 53 | positive_uniform_margin hK (ha.sub (hb.mul hw)) hfirst |
| 54 | obtain ⟨εs, hεs, hbounds⟩ := |
| 55 | positive_uniform_margin hK hsecond_cont (fun x hx => sub_pos.mpr (hsecond x hx)) |
| 56 | refine ⟨min εa (min εf εs), lt_min hεa (lt_min hεf hεs), fun x hx => ?_⟩ |
| 57 | exact ⟨(min_le_left _ _).trans (hbounda x hx), |
| 58 | ((min_le_right _ _).trans (min_le_left _ _)).trans (hboundf x hx), |
| 59 | ((min_le_right _ _).trans (min_le_right _ _)).trans (hbounds x hx)⟩ |
| 60 | |
| 61 | /-- Compact normalized data give one amplitude threshold for the entire family. -/ |
| 62 | theorem compact_normalized_cone {K : Set X} (hK : IsCompact K) |
| 63 | {c j v : X → ℝ} (hc : ContinuousOn c K) (hj : ContinuousOn j K) |
| 64 | (hv : ContinuousOn v K) (hcpos : ∀ x ∈ K, 0 < c x) |
| 65 | (hmargin : ∀ x ∈ K, (v x - 2) * j x ^ 2 < 2 * c x ^ 2) : |
| 66 | ∃ ε p₀ : ℝ, 0 < ε ∧ 0 ≤ p₀ ∧ |
| 67 | (∀ x ∈ K, ε ≤ c x ∧ ε ≤ 2 * c x ^ 2 - (v x - 2) * j x ^ 2) ∧ |
| 68 | ∀ p : ℝ, p₀ < p → ∀ x ∈ K, |
| 69 | 2 < p * c x ∧ v x < coneBound (p * c x) (p * j x) := by |
| 70 | let d : X → ℝ := fun x => 2 * c x ^ 2 - (v x - 2) * j x ^ 2 |
| 71 | have hd : ContinuousOn d K := |
| 72 | (continuousOn_const.mul (hc.pow 2)).sub ((hv.sub continuousOn_const).mul (hj.pow 2)) |
| 73 | have hdpos : ∀ x ∈ K, 0 < d x := fun x hx => sub_pos.mpr (hmargin x hx) |
| 74 | obtain ⟨εc, hεc, hεcbound⟩ := positive_uniform_margin hK hc hcpos |
| 75 | obtain ⟨εd, hεd, hεdbound⟩ := positive_uniform_margin hK hd hdpos |
| 76 | let threshold : X → ℝ := fun x => |
| 77 | max 0 (max (2 / c x) (max (v x / c x) (4 * c x * v x / d x))) |
| 78 | have ht : ContinuousOn threshold K := by |
| 79 | apply continuousOn_max continuousOn_const |
| 80 | apply continuousOn_max |
| 81 | · exact continuousOn_const.div hc (fun x hx => ne_of_gt (hcpos x hx)) |
| 82 | · apply continuousOn_max |
| 83 | · exact hv.div hc (fun x hx => ne_of_gt (hcpos x hx)) |
| 84 | · exact ((continuousOn_const.mul hc).mul hv).div hd |
| 85 | (fun x hx => ne_of_gt (hdpos x hx)) |
| 86 | obtain ⟨B, hB⟩ := (hK.image_of_continuousOn ht).bddAbove |
| 87 | refine ⟨min εc εd, max 0 B, lt_min hεc hεd, le_max_left _ _, ?_, ?_⟩ |
| 88 | · intro x hx |
| 89 | exact ⟨(min_le_left _ _).trans (hεcbound x hx), |
| 90 | (min_le_right _ _).trans (hεdbound x hx)⟩ |
| 91 | · intro p hp x hx |
| 92 | have htx : threshold x < p := |
| 93 | lt_of_le_of_lt ((hB (mem_image_of_mem threshold hx)).trans (le_max_right _ _)) hp |
| 94 | have h₀ : 0 ≤ threshold x := le_max_left _ _ |
| 95 | have h₂ : 2 / c x ≤ threshold x := |
| 96 | (le_max_left _ _).trans (le_max_right _ _) |
| 97 | have hᵥ : v x / c x ≤ threshold x := |
| 98 | ((le_max_left _ _).trans (le_max_right _ _)).trans (le_max_right _ _) |
| 99 | have hdscale : 4 * c x * v x / d x ≤ threshold x := |
| 100 | ((le_max_right _ _).trans (le_max_right _ _)).trans (le_max_right _ _) |
| 101 | have hP : 2 < p * c x := (div_lt_iff₀ (hcpos x hx)).mp (lt_of_le_of_lt h₂ htx) |
| 102 | refine ⟨hP, finite_amplitude_cone (lt_of_le_of_lt h₀ htx) hP ?_ ?_⟩ |
| 103 | · exact (div_lt_iff₀ (hcpos x hx)).mp (lt_of_le_of_lt hᵥ htx) |
| 104 | · exact (div_lt_iff₀ (hdpos x hx)).mp (lt_of_le_of_lt hdscale htx) |
| 105 | |
| 106 | /-- The eventual relaxed-cone inequalities have uniform positive additive |
| 107 | gaps, independent both of the parameter and of the large amplitude. -/ |
| 108 | theorem compact_normalized_cone_gap {K : Set X} (hK : IsCompact K) |
| 109 | {c j v : X → ℝ} (hc : ContinuousOn c K) (hj : ContinuousOn j K) |
| 110 | (hv : ContinuousOn v K) (hcpos : ∀ x ∈ K, 0 < c x) |
| 111 | (hmargin : ∀ x ∈ K, (v x - 2) * j x ^ 2 < 2 * c x ^ 2) : |
| 112 | ∃ η p₀ : ℝ, 0 < η ∧ 0 ≤ p₀ ∧ ∀ p : ℝ, p₀ < p → ∀ x ∈ K, |
| 113 | 2 + η < p * c x ∧ v x + η < coneBound (p * c x) (p * j x) := by |
| 114 | obtain ⟨ε, _, hε, _, hbounds, _⟩ := compact_normalized_cone hK hc hj hv hcpos hmargin |
| 115 | obtain ⟨B, hB⟩ := (hK.image_of_continuousOn (hj.pow 2)).bddAbove |
| 116 | let M : ℝ := max 0 B + 1 |
| 117 | have hM : 0 < M := by dsimp [M]; linarith [le_max_left (0 : ℝ) B] |
| 118 | let η : ℝ := ε / (2 * M) |
| 119 | have hη : 0 < η := div_pos hε (mul_pos (by norm_num) hM) |
| 120 | have hηM : η * M = ε / 2 := by |
| 121 | dsimp [η] |
| 122 | field_simp [ne_of_gt hM] |
| 123 | have hshift : ∀ x ∈ K, (v x + η - 2) * j x ^ 2 < 2 * c x ^ 2 := by |
| 124 | intro x hx |
| 125 | have hjM : j x ^ 2 ≤ M := by |
| 126 | calc |
| 127 | j x ^ 2 ≤ B := hB (mem_image_of_mem (fun y => j y ^ 2) hx) |
| 128 | _ ≤ max 0 B := le_max_right _ _ |
| 129 | _ ≤ M := by dsimp [M]; linarith |
| 130 | have hηj : η * j x ^ 2 ≤ ε / 2 := |
| 131 | (mul_le_mul_of_nonneg_left hjM hη.le).trans_eq hηM |
| 132 | have hd := (hbounds x hx).2 |
| 133 | nlinarith |
| 134 | obtain ⟨_, p₁, _, hp₁, _, hlarge⟩ := compact_normalized_cone hK hc hj |
| 135 | (hv.add continuousOn_const) hcpos hshift |
| 136 | refine ⟨η, max p₁ ((2 + η) / ε), hη, |
| 137 | hp₁.trans (le_max_left _ _), fun p hp x hx => ?_⟩ |
| 138 | have hpold : p₁ < p := lt_of_le_of_lt (le_max_left _ _) hp |
| 139 | have hpzero : 0 < p := lt_of_le_of_lt hp₁ hpold |
| 140 | have hpε : 2 + η < p * ε := |
| 141 | (div_lt_iff₀ hε).mp (lt_of_le_of_lt (le_max_right _ _) hp) |
| 142 | refine ⟨lt_of_lt_of_le hpε (mul_le_mul_of_nonneg_left (hbounds x hx).1 hpzero.le), ?_⟩ |
| 143 | exact (hlarge p hpold x hx).2 |
| 144 | |
| 145 | /-- The manuscript's strict source criterion (11), uniformly on any compact |
| 146 | parameter family. The conclusion supplies uniform normalized margins and a |
| 147 | single threshold for all stress amplitudes above it. -/ |
| 148 | theorem compact_equation_eleven {K : Set X} (hK : IsCompact K) |
| 149 | {a b w : X → ℝ} (ha : ContinuousOn a K) (hb : ContinuousOn b K) |
| 150 | (hw : ContinuousOn w K) (hapos : ∀ x ∈ K, 0 < a x) |
| 151 | (hfirst : ∀ x ∈ K, 0 < a x - b x * w x) |
| 152 | (hsecond : ∀ x ∈ K, |
| 153 | 2 * b x * w x + b x ^ 2 / a x + (a x - 2) * w x ^ 2 < 2) : |
| 154 | ∃ ε p₀ : ℝ, 0 < ε ∧ 0 ≤ p₀ ∧ |
| 155 | (∀ x ∈ K, ε ≤ 1 - b x * w x / a x ∧ |
| 156 | ε ≤ 2 * (1 - b x * w x / a x) ^ 2 - |
| 157 | (a x * (1 + (b x / a x) ^ 2) - 2) * (w x + b x / a x) ^ 2) ∧ |
| 158 | ∀ p : ℝ, p₀ < p → ∀ x ∈ K, |
| 159 | 2 < p * (1 - b x * w x / a x) ∧ |
| 160 | a x * (1 + (b x / a x) ^ 2) < |
| 161 | coneBound (p * (1 - b x * w x / a x)) (p * (w x + b x / a x)) := by |
| 162 | have hane : ∀ x ∈ K, a x ≠ 0 := fun x hx => ne_of_gt (hapos x hx) |
| 163 | apply compact_normalized_cone hK |
| 164 | · exact continuousOn_const.sub ((hb.mul hw).div ha hane) |
| 165 | · exact hw.add (hb.div ha hane) |
| 166 | · exact ha.mul (continuousOn_const.add ((hb.div ha hane).pow 2)) |
| 167 | · intro x hx |
| 168 | apply sub_pos.mpr |
| 169 | exact (div_lt_one (hapos x hx)).mpr (by linarith [hfirst x hx]) |
| 170 | · intro x hx |
| 171 | have h := normalized_test_negative (hapos x hx) (hsecond x hx) |
| 172 | linarith |
| 173 | |
| 174 | /-- Equation (11), with a common positive additive gap in both relaxed-cone |
| 175 | inequalities for every parameter and every sufficiently large amplitude. -/ |
| 176 | theorem compact_equation_eleven_gap {K : Set X} (hK : IsCompact K) |
| 177 | {a b w : X → ℝ} (ha : ContinuousOn a K) (hb : ContinuousOn b K) |
| 178 | (hw : ContinuousOn w K) (hapos : ∀ x ∈ K, 0 < a x) |
| 179 | (hfirst : ∀ x ∈ K, 0 < a x - b x * w x) |
| 180 | (hsecond : ∀ x ∈ K, |
| 181 | 2 * b x * w x + b x ^ 2 / a x + (a x - 2) * w x ^ 2 < 2) : |
| 182 | ∃ η p₀ : ℝ, 0 < η ∧ 0 ≤ p₀ ∧ ∀ p : ℝ, p₀ < p → ∀ x ∈ K, |
| 183 | 2 + η < p * (1 - b x * w x / a x) ∧ |
| 184 | a x * (1 + (b x / a x) ^ 2) + η < |
| 185 | coneBound (p * (1 - b x * w x / a x)) (p * (w x + b x / a x)) := by |
| 186 | have hane : ∀ x ∈ K, a x ≠ 0 := fun x hx => ne_of_gt (hapos x hx) |
| 187 | apply compact_normalized_cone_gap hK |
| 188 | · exact continuousOn_const.sub ((hb.mul hw).div ha hane) |
| 189 | · exact hw.add (hb.div ha hane) |
| 190 | · exact ha.mul (continuousOn_const.add ((hb.div ha hane).pow 2)) |
| 191 | · intro x hx |
| 192 | apply sub_pos.mpr |
| 193 | exact (div_lt_one (hapos x hx)).mpr (by linarith [hfirst x hx]) |
| 194 | · intro x hx |
| 195 | have h := normalized_test_negative (hapos x hx) (hsecond x hx) |
| 196 | linarith |
| 197 | |
| 198 | /-- Coordinates `(P,J,v)` for a stress cone datum, with the product metric. -/ |
| 199 | abbrev ConeDatum := ℝ × ℝ × ℝ |
| 200 | |
| 201 | /-- The exact open true cone, retaining the square-root inequality. -/ |
| 202 | def trueCone : Set ConeDatum := |
| 203 | {z | 2 < z.2.2 ∧ 2 < z.1 ∧ z.2.2 < coneBound z.1 z.2.1} |
| 204 | |
| 205 | theorem continuous_coneBound : Continuous (fun z : ConeDatum => coneBound z.1 z.2.1) := by |
| 206 | unfold coneBound |
| 207 | exact (continuous_fst.add ((continuous_fst.comp continuous_snd).pow 2 |>.div_const 4)).sub |
| 208 | (((continuous_fst.comp continuous_snd).abs).mul |
| 209 | (((continuous_fst.sub continuous_const).div_const 2).add |
| 210 | ((continuous_fst.comp continuous_snd).pow 2 |>.div_const 16)).sqrt) |
| 211 | |
| 212 | theorem isOpen_trueCone : IsOpen trueCone := by |
| 213 | exact (isOpen_lt continuous_const (continuous_snd.comp continuous_snd)).inter |
| 214 | ((isOpen_lt continuous_const continuous_fst).inter |
| 215 | (isOpen_lt (continuous_snd.comp continuous_snd) continuous_coneBound)) |
| 216 | |
| 217 | /-- A continuous compact family inside the true cone stays a uniformly |
| 218 | positive distance from each of its three defining scalar boundaries. -/ |
| 219 | theorem compact_trueCone_margins {K : Set X} (hK : IsCompact K) |
| 220 | {P J v : X → ℝ} (hP : ContinuousOn P K) (hJ : ContinuousOn J K) |
| 221 | (hv : ContinuousOn v K) |
| 222 | (hcone : ∀ x ∈ K, 2 < v x ∧ 2 < P x ∧ v x < coneBound (P x) (J x)) : |
| 223 | ∃ ε : ℝ, 0 < ε ∧ ∀ x ∈ K, |
| 224 | ε ≤ v x - 2 ∧ ε ≤ P x - 2 ∧ ε ≤ coneBound (P x) (J x) - v x := by |
| 225 | have hbound : ContinuousOn (fun x => coneBound (P x) (J x)) K := |
| 226 | continuous_coneBound.comp_continuousOn (hP.prodMk (hJ.prodMk hv)) |
| 227 | obtain ⟨εv, hεv, hboundv⟩ := positive_uniform_margin hK (hv.sub continuousOn_const) |
| 228 | (fun x hx => sub_pos.mpr (hcone x hx).1) |
| 229 | obtain ⟨εP, hεP, hboundP⟩ := positive_uniform_margin hK (hP.sub continuousOn_const) |
| 230 | (fun x hx => sub_pos.mpr (hcone x hx).2.1) |
| 231 | obtain ⟨εU, hεU, hboundU⟩ := positive_uniform_margin hK (hbound.sub hv) |
| 232 | (fun x hx => sub_pos.mpr (hcone x hx).2.2) |
| 233 | refine ⟨min εv (min εP εU), lt_min hεv (lt_min hεP hεU), fun x hx => ?_⟩ |
| 234 | exact ⟨(min_le_left _ _).trans (hboundv x hx), |
| 235 | ((min_le_right _ _).trans (min_le_left _ _)).trans (hboundP x hx), |
| 236 | ((min_le_right _ _).trans (min_le_right _ _)).trans (hboundU x hx)⟩ |
| 237 | |
| 238 | /-- Every compact subset of the true cone has one positive metric |
| 239 | perturbation tolerance, including perturbations outside the original image. -/ |
| 240 | theorem compact_trueCone_stable {S : Set ConeDatum} (hS : IsCompact S) |
| 241 | (hcone : S ⊆ trueCone) : |
| 242 | ∃ ρ : ℝ, 0 < ρ ∧ ∀ z ∈ S, ∀ z' : ConeDatum, |
| 243 | dist z' z ≤ ρ → z' ∈ trueCone := by |
| 244 | obtain ⟨ρ, hρ, hsub⟩ := hS.exists_cthickening_subset_open isOpen_trueCone hcone |
| 245 | exact ⟨ρ, hρ, fun z hz z' hdist => |
| 246 | hsub (Metric.mem_cthickening_of_dist_le z' z ρ S hz hdist)⟩ |
| 247 | |
| 248 | /-- A continuous compact family in the true cone has uniform perturbation |
| 249 | tolerance. The competing datum need not depend continuously on the parameter. -/ |
| 250 | theorem compact_family_trueCone_stable {K : Set X} (hK : IsCompact K) |
| 251 | {P J v : X → ℝ} (hP : ContinuousOn P K) (hJ : ContinuousOn J K) |
| 252 | (hv : ContinuousOn v K) |
| 253 | (hcone : ∀ x ∈ K, 2 < v x ∧ 2 < P x ∧ v x < coneBound (P x) (J x)) : |
| 254 | ∃ ρ : ℝ, 0 < ρ ∧ ∀ x ∈ K, ∀ P' J' v' : ℝ, |
| 255 | dist (P', J', v') (P x, J x, v x) ≤ ρ → |
| 256 | 2 < v' ∧ 2 < P' ∧ v' < coneBound P' J' := by |
| 257 | let f : X → ConeDatum := fun x => (P x, J x, v x) |
| 258 | have hf : ContinuousOn f K := hP.prodMk (hJ.prodMk hv) |
| 259 | have himage : f '' K ⊆ trueCone := by |
| 260 | rintro z ⟨x, hx, rfl⟩ |
| 261 | exact hcone x hx |
| 262 | obtain ⟨ρ, hρ, hstable⟩ := compact_trueCone_stable (hK.image_of_continuousOn hf) himage |
| 263 | exact ⟨ρ, hρ, fun x hx P' J' v' hdist => |
| 264 | hstable (f x) (mem_image_of_mem f hx) (P', J', v') hdist⟩ |
| 265 | |
| 266 | /-- Coordinatewise perturbations of a compact true-cone family preserve |
| 267 | the exact quadratic criterion as well as the lower bound `v > 2`. -/ |
| 268 | theorem compact_family_quadratic_stable {K : Set X} (hK : IsCompact K) |
| 269 | {P J v : X → ℝ} (hP : ContinuousOn P K) (hJ : ContinuousOn J K) |
| 270 | (hv : ContinuousOn v K) |
| 271 | (hcone : ∀ x ∈ K, 2 < v x ∧ 2 < P x ∧ v x < coneBound (P x) (J x)) : |
| 272 | ∃ ρ : ℝ, 0 < ρ ∧ ∀ x ∈ K, ∀ P' J' v' : ℝ, |
| 273 | |P' - P x| ≤ ρ → |J' - J x| ≤ ρ → |v' - v x| ≤ ρ → |
| 274 | 2 < v' ∧ v' < P' ∧ (v' - 2) * J' ^ 2 < 2 * (P' - v') ^ 2 := by |
| 275 | obtain ⟨ρ, hρ, hstable⟩ := compact_family_trueCone_stable hK hP hJ hv hcone |
| 276 | refine ⟨ρ, hρ, fun x hx P' J' v' hP' hJ' hv' => ?_⟩ |
| 277 | have hdist : dist (P', J', v') (P x, J x, v x) ≤ ρ := by |
| 278 | simpa only [Prod.dist_eq, Real.dist_eq] using max_le hP' (max_le hJ' hv') |
| 279 | obtain ⟨hv₂, hP₂, hroot⟩ := hstable x hx P' J' v' hdist |
| 280 | exact ⟨hv₂, (true_cone_iff hv₂).mp ⟨hP₂, hroot⟩⟩ |
| 281 | |
| 282 | end NavierStokes.UniformCone |