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.MeanValue |
| 2 | import Mathlib.Analysis.Normed.Group.Bounded |
| 3 | import Mathlib.Topology.Instances.ENNReal.Lemmas |
| 4 | import Mathlib.Tactic.FieldSimp |
| 5 | import Mathlib.Tactic.Linarith |
| 6 | import Mathlib.Tactic.Positivity |
| 7 | |
| 8 | /-! Short-time confinement uses a velocity bound only inside the trapping ball. -/ |
| 9 | |
| 10 | noncomputable section |
| 11 | |
| 12 | namespace EulerComparatorLocalFlow |
| 13 | |
| 14 | open Set |
| 15 | |
| 16 | variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 17 | |
| 18 | /-- The mean-value bound up to both endpoints, with derivatives required only in the interior. -/ |
| 19 | theorem norm_sub_le_mul_of_hasDerivAt_Ioo (X X' : ℝ → E) {T M : ℝ} |
| 20 | (hT : 0 < T) (hM : 0 ≤ M) (hX : ContinuousOn X (Icc 0 T)) |
| 21 | (hderiv : ∀ s ∈ Ioo 0 T, HasDerivAt X (X' s) s) |
| 22 | (hbound : ∀ s ∈ Ioo 0 T, ‖X' s‖ ≤ M) : |
| 23 | ‖X T - X 0‖ ≤ M * T := by |
| 24 | have hlip : LipschitzOnWith ⟨M, hM⟩ X (Ioo 0 T) := |
| 25 | (convex_Ioo (0 : ℝ) T).lipschitzOnWith_of_nnnorm_hasDerivWithin_le |
| 26 | (fun s hs => (hderiv s hs).hasDerivWithinAt) (fun s hs => hbound s hs) |
| 27 | have hcl : closure (Ioo (0 : ℝ) T) = Icc 0 T := closure_Ioo hT.ne |
| 28 | have hlipclosed : LipschitzOnWith ⟨M, hM⟩ X (Icc 0 T) := by |
| 29 | rw [← hcl] |
| 30 | exact LipschitzOnWith.closure (by simpa only [hcl] using hX) hlip |
| 31 | have h := lipschitzOnWith_iff_dist_le_mul.mp hlipclosed |
| 32 | T (right_mem_Icc.mpr hT.le) 0 (left_mem_Icc.mpr hT.le) |
| 33 | change dist (X T) (X 0) ≤ M * dist T 0 at h |
| 34 | simpa only [dist_eq_norm, sub_zero, Real.norm_eq_abs, abs_of_pos hT] using h |
| 35 | |
| 36 | /-- A trajectory cannot first leave the ball before the local speed budget is exhausted. |
| 37 | No bound on the velocity outside `‖x‖ ≤ B` is used. -/ |
| 38 | theorem norm_lt_of_local_speed_bound (X : ℝ → E) (V : ℝ → E → E) |
| 39 | {δ A B M : ℝ} (hM : 0 ≤ M) (hAB : A < B) (hsmall : δ * M < B - A) |
| 40 | (hX : ContinuousOn X (Icc 0 δ)) |
| 41 | (hderiv : ∀ s ∈ Ioo 0 δ, HasDerivAt X (V s (X s)) s) |
| 42 | (hinitial : ‖X 0‖ ≤ A) |
| 43 | (hbound : ∀ s ∈ Icc 0 δ, ∀ x : E, ‖x‖ ≤ B → ‖V s x‖ ≤ M) : |
| 44 | ∀ t ∈ Icc 0 δ, ‖X t‖ < B := by |
| 45 | intro t ht |
| 46 | by_contra hnot |
| 47 | let S : Set ℝ := {s ∈ Icc 0 δ | B ≤ ‖X s‖} |
| 48 | have hSc : IsCompact S := |
| 49 | isCompact_Icc.of_isClosed_subset |
| 50 | (isClosed_Icc.isClosed_le continuousOn_const hX.norm) (fun _ h => h.1) |
| 51 | have hSn : S.Nonempty := ⟨t, ht, le_of_not_gt hnot⟩ |
| 52 | obtain ⟨s, hs⟩ := hSc.exists_isLeast hSn |
| 53 | have hsI : s ∈ Icc 0 δ := hs.1.1 |
| 54 | have hsbound : B ≤ ‖X s‖ := hs.1.2 |
| 55 | have hspos : 0 < s := by |
| 56 | have hsne : s ≠ 0 := by |
| 57 | intro h |
| 58 | rw [h] at hsbound |
| 59 | exact (not_le_of_gt hAB) (hsbound.trans hinitial) |
| 60 | exact lt_of_le_of_ne hsI.1 hsne.symm |
| 61 | have hinside : ∀ r ∈ Ioo 0 s, ‖X r‖ < B := by |
| 62 | intro r hr |
| 63 | by_contra hn |
| 64 | have hrS : r ∈ S := ⟨⟨hr.1.le, hr.2.le.trans hsI.2⟩, le_of_not_gt hn⟩ |
| 65 | exact (not_le_of_gt hr.2) (hs.2 hrS) |
| 66 | have hdisplacement : ‖X s - X 0‖ ≤ M * s := |
| 67 | norm_sub_le_mul_of_hasDerivAt_Ioo X (fun r => V r (X r)) hspos hM |
| 68 | (hX.mono (fun _ hr => ⟨hr.1, hr.2.trans hsI.2⟩)) |
| 69 | (fun r hr => hderiv r ⟨hr.1, hr.2.trans_le hsI.2⟩) |
| 70 | (fun r hr => hbound r ⟨hr.1.le, hr.2.le.trans hsI.2⟩ (X r) (hinside r hr).le) |
| 71 | have hnorm : ‖X s‖ ≤ M * s + A := by |
| 72 | calc |
| 73 | ‖X s‖ = ‖(X s - X 0) + X 0‖ := by rw [sub_add_cancel] |
| 74 | _ ≤ ‖X s - X 0‖ + ‖X 0‖ := norm_add_le _ _ |
| 75 | _ ≤ M * s + A := add_le_add hdisplacement hinitial |
| 76 | have hbudget : M * s ≤ M * δ := mul_le_mul_of_nonneg_left hsI.2 hM |
| 77 | nlinarith |
| 78 | |
| 79 | omit [NormedSpace ℝ E] in |
| 80 | /-- Compactness supplies a common speed bound and positive time budget on a fixed ball. -/ |
| 81 | theorem exists_local_speed_budget [ProperSpace E] (u : ℝ → E → E) {A B : ℝ} |
| 82 | (hAB : A < B) |
| 83 | (hu : ContinuousOn (Function.uncurry u) |
| 84 | (Icc (0 : ℝ) 1 ×ˢ Metric.closedBall (0 : E) B)) : |
| 85 | ∃ δ M : ℝ, 0 < δ ∧ δ ≤ 1 ∧ 0 < M ∧ δ * M < B - A ∧ |
| 86 | ∀ s ∈ Icc 0 δ, ∀ x : E, ‖x‖ ≤ B → ‖u s x‖ ≤ M := by |
| 87 | obtain ⟨C, hC⟩ := |
| 88 | (isCompact_Icc.prod (isCompact_closedBall (0 : E) B)).exists_bound_of_continuousOn hu |
| 89 | let M : ℝ := max C 0 + 1 |
| 90 | have hM : 0 < M := by dsimp [M]; positivity |
| 91 | let δ : ℝ := min 1 ((B - A) / (2 * M)) |
| 92 | have hδ : 0 < δ := lt_min zero_lt_one (div_pos (sub_pos.mpr hAB) (by positivity)) |
| 93 | have hδone : δ ≤ 1 := min_le_left _ _ |
| 94 | have hsmall : δ * M < B - A := by |
| 95 | have hb : δ * M ≤ (B - A) / 2 := by |
| 96 | calc |
| 97 | δ * M ≤ ((B - A) / (2 * M)) * M := |
| 98 | mul_le_mul_of_nonneg_right (min_le_right _ _) hM.le |
| 99 | _ = (B - A) / 2 := by field_simp |
| 100 | linarith |
| 101 | refine ⟨δ, M, hδ, hδone, hM, hsmall, ?_⟩ |
| 102 | intro s hs x hx |
| 103 | have hxball : x ∈ Metric.closedBall (0 : E) B := by |
| 104 | simpa only [Metric.mem_closedBall, dist_zero_right] using hx |
| 105 | have hc := hC (s, x) ⟨⟨hs.1, hs.2.trans hδone⟩, hxball⟩ |
| 106 | have hCM : C ≤ M := (le_max_left C 0).trans (by dsimp [M]; linarith) |
| 107 | exact hc.trans hCM |
| 108 | |
| 109 | end EulerComparatorLocalFlow |