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 Euler.EulerProof |
| 2 | |
| 3 | /-! |
| 4 | # An actual global flow for a bounded, uniformly Lipschitz velocity |
| 5 | |
| 6 | Existence is the proved global Picard theorem in `EulerPacketExistence`. |
| 7 | Uniqueness gives the two-time composition and inverse identities. The |
| 8 | bounded velocity and Grönwall estimate will give joint continuity in both |
| 9 | times and the initial point. |
| 10 | -/ |
| 11 | |
| 12 | noncomputable section |
| 13 | |
| 14 | open Set Function Metric |
| 15 | open scoped Topology NNReal |
| 16 | |
| 17 | namespace EulerBoundedLipschitzFlow |
| 18 | |
| 19 | variable (E : Type*) [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 20 | |
| 21 | structure Data where |
| 22 | velocity : ℝ → E → E |
| 23 | continuous : Continuous (Function.uncurry velocity) |
| 24 | lipschitzConstant : ℝ≥0 |
| 25 | lipschitz : ∀ t, LipschitzWith lipschitzConstant (velocity t) |
| 26 | speedBound : ℝ≥0 |
| 27 | speed : ∀ t x, ‖velocity t x‖ ≤ speedBound |
| 28 | |
| 29 | namespace Data |
| 30 | |
| 31 | variable {E} [CompleteSpace E] (V : Data E) |
| 32 | |
| 33 | theorem curve_exists (s : ℝ) (x : E) : |
| 34 | ∃ α : ℝ → E, α s = x ∧ ∀ t, HasDerivAt α (V.velocity t (α t)) t := by |
| 35 | have hc : Continuous (Function.uncurry (fun (t : ℝ) (y : E) => V.velocity (t+s) y)) := |
| 36 | V.continuous.comp ((continuous_fst.add continuous_const).prodMk continuous_snd) |
| 37 | obtain ⟨α, hα0, hα⟩ := EulerPacketExistence.exists_global_solution hc |
| 38 | (fun t => V.lipschitz (t+s)) x |
| 39 | refine ⟨fun t => α (t-s), by simpa using hα0, ?_⟩ |
| 40 | intro t |
| 41 | have h := (hα (t-s)).scomp t ((hasDerivAt_id t).sub_const s) |
| 42 | simpa only [Function.comp_def, id_eq, sub_add_cancel, one_smul] using h |
| 43 | |
| 44 | def flow (s t : ℝ) (x : E) : E := (V.curve_exists s x).choose t |
| 45 | |
| 46 | @[simp] theorem flow_initial (s : ℝ) (x : E) : V.flow s s x = x := |
| 47 | (V.curve_exists s x).choose_spec.1 |
| 48 | |
| 49 | theorem flow_hasDerivAt (s t : ℝ) (x : E) : |
| 50 | HasDerivAt (fun r => V.flow s r x) (V.velocity t (V.flow s t x)) t := |
| 51 | (V.curve_exists s x).choose_spec.2 t |
| 52 | |
| 53 | theorem flow_continuous_time (s : ℝ) (x : E) : Continuous (fun t => V.flow s t x) := |
| 54 | continuous_iff_continuousAt.mpr (fun t => (V.flow_hasDerivAt s t x).continuousAt) |
| 55 | |
| 56 | theorem flow_unique (s : ℝ) (x : E) (α : ℝ → E) |
| 57 | (hα : ∀ t, HasDerivAt α (V.velocity t (α t)) t) (hαs : α s = x) : |
| 58 | α = fun t => V.flow s t x := by |
| 59 | apply ODE_solution_unique_univ (v := V.velocity) (s := fun _ => Set.univ) |
| 60 | (t₀ := s) (fun t => (V.lipschitz t).lipschitzOnWith) |
| 61 | (fun t => ⟨hα t, Set.mem_univ _⟩) |
| 62 | (fun t => ⟨V.flow_hasDerivAt s t x, Set.mem_univ _⟩) |
| 63 | simpa only [V.flow_initial] using hαs |
| 64 | |
| 65 | theorem flow_cocycle (r s t : ℝ) (x : E) : |
| 66 | V.flow s t (V.flow r s x) = V.flow r t x := by |
| 67 | have h := V.flow_unique s (V.flow r s x) (fun t => V.flow r t x) |
| 68 | (fun t => V.flow_hasDerivAt r t x) rfl |
| 69 | exact (congrFun h t).symm |
| 70 | |
| 71 | @[simp] theorem flow_inverse (s t : ℝ) (x : E) : |
| 72 | V.flow t s (V.flow s t x) = x := by |
| 73 | rw [V.flow_cocycle, V.flow_initial] |
| 74 | |
| 75 | theorem flow_lipschitz_time (s : ℝ) (x : E) : |
| 76 | LipschitzWith V.speedBound (fun t => V.flow s t x) := by |
| 77 | apply lipschitzWith_of_nnnorm_deriv_le |
| 78 | (fun t => (V.flow_hasDerivAt s t x).differentiableAt) |
| 79 | intro t |
| 80 | rw [(V.flow_hasDerivAt s t x).deriv] |
| 81 | exact_mod_cast V.speed t (V.flow s t x) |
| 82 | |
| 83 | omit [CompleteSpace E] in |
| 84 | /-- A two-sided Grönwall estimate for actual global trajectories. -/ |
| 85 | theorem trajectory_distance (α β : ℝ → E) |
| 86 | (hα : ∀ t, HasDerivAt α (V.velocity t (α t)) t) |
| 87 | (hβ : ∀ t, HasDerivAt β (V.velocity t (β t)) t) (a b : ℝ) : |
| 88 | dist (α b) (β b) ≤ dist (α a) (β a) * Real.exp (V.lipschitzConstant * |b-a|) := by |
| 89 | have hαc : Continuous α := continuous_iff_continuousAt.mpr (fun t => (hα t).continuousAt) |
| 90 | have hβc : Continuous β := continuous_iff_continuousAt.mpr (fun t => (hβ t).continuousAt) |
| 91 | by_cases hab : a ≤ b |
| 92 | · have h := dist_le_of_trajectories_ODE V.lipschitz hαc.continuousOn |
| 93 | (fun t _ => (hα t).hasDerivWithinAt) hβc.continuousOn |
| 94 | (fun t _ => (hβ t).hasDerivWithinAt) (le_refl (dist (α a) (β a))) b ⟨hab, le_rfl⟩ |
| 95 | simpa only [abs_of_nonneg (sub_nonneg.mpr hab)] using h |
| 96 | · have hba : b ≤ a := le_of_not_ge hab |
| 97 | have hlip (t : ℝ) : LipschitzWith V.lipschitzConstant |
| 98 | (fun x => -V.velocity (-t) x) := (V.lipschitz (-t)).neg |
| 99 | have hαr (t : ℝ) : |
| 100 | HasDerivAt (fun r => α (-r)) (-V.velocity (-t) (α (-t))) t := by |
| 101 | simpa only [Function.comp_def, neg_smul, one_smul] using |
| 102 | (hα (-t)).scomp t (hasDerivAt_neg t) |
| 103 | have hβr (t : ℝ) : |
| 104 | HasDerivAt (fun r => β (-r)) (-V.velocity (-t) (β (-t))) t := by |
| 105 | simpa only [Function.comp_def, neg_smul, one_smul] using |
| 106 | (hβ (-t)).scomp t (hasDerivAt_neg t) |
| 107 | have h := dist_le_of_trajectories_ODE hlip |
| 108 | (hαc.comp continuous_neg).continuousOn (fun t _ => (hαr t).hasDerivWithinAt) |
| 109 | (hβc.comp continuous_neg).continuousOn (fun t _ => (hβr t).hasDerivWithinAt) |
| 110 | (le_refl (dist (α (-(-a))) (β (-(-a))))) (-b) ⟨by linarith, le_rfl⟩ |
| 111 | have he : -b - (-a) = |b-a| := by |
| 112 | rw [abs_of_nonpos (sub_nonpos.mpr hba)] |
| 113 | ring |
| 114 | simpa only [Function.comp_apply, neg_neg, he] using h |
| 115 | |
| 116 | theorem flow_distance_initial (s t : ℝ) (x y : E) : |
| 117 | dist (V.flow s t x) (V.flow s t y) ≤ |
| 118 | dist x y * Real.exp (V.lipschitzConstant * |t-s|) := by |
| 119 | simpa only [V.flow_initial] using V.trajectory_distance |
| 120 | (fun t => V.flow s t x) (fun t => V.flow s t y) |
| 121 | (fun t => V.flow_hasDerivAt s t x) (fun t => V.flow_hasDerivAt s t y) s t |
| 122 | |
| 123 | end Data |
| 124 | |
| 125 | end EulerBoundedLipschitzFlow |