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.TimeH1ContinuousDerivative |
| 2 | import Mathlib.Topology.Piecewise |
| 3 | |
| 4 | /-! Genuine first-order evolution paths glue through a matching interior trace. -/ |
| 5 | |
| 6 | noncomputable section |
| 7 | |
| 8 | namespace EulerTimeIntervalGlue |
| 9 | |
| 10 | open Set Filter |
| 11 | open scoped Topology |
| 12 | |
| 13 | variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 14 | |
| 15 | def glue (τ : ℝ) (f g : ℝ → E) (t : ℝ) : E := if t ≤ τ then f t else g t |
| 16 | |
| 17 | omit [NormedAddCommGroup E] [NormedSpace ℝ E] in |
| 18 | theorem glue_left (τ : ℝ) (f g : ℝ → E) (t : ℝ) (ht : t ≤ τ) : glue τ f g t=f t := by |
| 19 | simp only [glue, ht, ite_true] |
| 20 | |
| 21 | omit [NormedAddCommGroup E] [NormedSpace ℝ E] in |
| 22 | theorem glue_right (τ : ℝ) (f g : ℝ → E) (hmatch : f τ=g τ) (t : ℝ) (ht : τ ≤ t) : |
| 23 | glue τ f g t=g t := by |
| 24 | rcases ht.eq_or_lt with h | h |
| 25 | · subst t |
| 26 | simpa only [glue, le_refl, ite_true] using hmatch |
| 27 | · simp only [glue, not_le.mpr h, ite_false] |
| 28 | |
| 29 | omit [NormedSpace ℝ E] in |
| 30 | theorem glue_continuous (τ : ℝ) (f g : ℝ → E) (hmatch : f τ=g τ) |
| 31 | (hf : Continuous f) (hg : Continuous g) : Continuous (glue τ f g) := by |
| 32 | apply Continuous.if_le hf hg continuous_id continuous_const |
| 33 | intro t ht |
| 34 | change t=τ at ht |
| 35 | subst t |
| 36 | exact hmatch |
| 37 | |
| 38 | /-- Matching the value and derivative gives the genuine derivative even at the joining time. -/ |
| 39 | theorem glue_hasDerivWithinAt (S τ : ℝ) (hτ0 : 0 ≤ τ) (hτS : τ ≤ S) |
| 40 | (f g f' g' : ℝ → E) (hmatch : f τ=g τ) (hmatch' : f' τ=g' τ) |
| 41 | (hf : ∀ t ∈ Icc 0 τ, HasDerivWithinAt f (f' t) (Icc 0 τ) t) |
| 42 | (hg : ∀ t ∈ Icc τ S, HasDerivWithinAt g (g' t) (Icc τ S) t) |
| 43 | (t : ℝ) (ht : t ∈ Icc 0 S) : |
| 44 | HasDerivWithinAt (glue τ f g) (glue τ f' g' t) (Icc 0 S) t := by |
| 45 | rcases lt_trichotomy t τ with hlt | heq | hgt |
| 46 | · have hlocal : Icc (0 : ℝ) τ ∈ 𝓝[Icc 0 S] t := by |
| 47 | filter_upwards [mem_nhdsWithin_of_mem_nhds (Iio_mem_nhds hlt), self_mem_nhdsWithin] |
| 48 | with x hx hxs |
| 49 | exact ⟨hxs.1, hx.le⟩ |
| 50 | have he : glue τ f g =ᶠ[𝓝[Icc 0 S] t] f := by |
| 51 | filter_upwards [mem_nhdsWithin_of_mem_nhds (Iio_mem_nhds hlt)] with x hx |
| 52 | exact glue_left τ f g x hx.le |
| 53 | rw [glue_left τ f' g' t hlt.le] |
| 54 | exact ((hf t ⟨ht.1,hlt.le⟩).mono_of_mem_nhdsWithin hlocal).congr_of_eventuallyEq |
| 55 | he (glue_left τ f g t hlt.le) |
| 56 | · subst t |
| 57 | have hl : HasDerivWithinAt (glue τ f g) (f' τ) (Icc 0 τ) τ := |
| 58 | (hf τ ⟨hτ0,le_rfl⟩).congr_of_mem |
| 59 | (fun x hx => glue_left τ f g x hx.2) ⟨hτ0,le_rfl⟩ |
| 60 | have hr : HasDerivWithinAt (glue τ f g) (f' τ) (Icc τ S) τ := by |
| 61 | rw [hmatch'] |
| 62 | exact (hg τ ⟨le_rfl,hτS⟩).congr_of_mem |
| 63 | (fun x hx => glue_right τ f g hmatch x hx.1) ⟨le_rfl,hτS⟩ |
| 64 | have hunion : Icc (0 : ℝ) τ ∪ Icc τ S=Icc 0 S := by |
| 65 | ext x |
| 66 | simp only [mem_union, mem_Icc] |
| 67 | constructor |
| 68 | · rintro (h | h) <;> constructor <;> linarith |
| 69 | · intro h |
| 70 | by_cases hx : x ≤ τ |
| 71 | · exact Or.inl ⟨h.1,hx⟩ |
| 72 | · exact Or.inr ⟨(not_le.mp hx).le,h.2⟩ |
| 73 | rw [glue_left τ f' g' τ le_rfl] |
| 74 | simpa only [hunion] using hl.union hr |
| 75 | · have hlocal : Icc τ S ∈ 𝓝[Icc 0 S] t := by |
| 76 | filter_upwards [mem_nhdsWithin_of_mem_nhds (Ioi_mem_nhds hgt), self_mem_nhdsWithin] |
| 77 | with x hx hxs |
| 78 | exact ⟨hx.le,hxs.2⟩ |
| 79 | have he : glue τ f g =ᶠ[𝓝[Icc 0 S] t] g := by |
| 80 | filter_upwards [mem_nhdsWithin_of_mem_nhds (Ioi_mem_nhds hgt)] with x hx |
| 81 | exact glue_right τ f g hmatch x hx.le |
| 82 | rw [glue_right τ f' g' hmatch' t hgt.le] |
| 83 | exact ((hg t ⟨hgt.le,ht.2⟩).mono_of_mem_nhdsWithin hlocal).congr_of_eventuallyEq |
| 84 | he (glue_right τ f g hmatch t hgt.le) |
| 85 | |
| 86 | /-- For the same first-order equation the derivative matching follows from value matching. -/ |
| 87 | theorem glue_evolution (S τ : ℝ) (hτ0 : 0 ≤ τ) (hτS : τ ≤ S) |
| 88 | (f g : ℝ → E) (rhs : ℝ → E → E) (hmatch : f τ=g τ) |
| 89 | (hf : ∀ t ∈ Icc 0 τ, HasDerivWithinAt f (rhs t (f t)) (Icc 0 τ) t) |
| 90 | (hg : ∀ t ∈ Icc τ S, HasDerivWithinAt g (rhs t (g t)) (Icc τ S) t) |
| 91 | (t : ℝ) (ht : t ∈ Icc 0 S) : |
| 92 | HasDerivWithinAt (glue τ f g) (rhs t (glue τ f g t)) (Icc 0 S) t := by |
| 93 | have h := glue_hasDerivWithinAt S τ hτ0 hτS f g (fun s => rhs s (f s)) |
| 94 | (fun s => rhs s (g s)) hmatch (congrArg (rhs τ) hmatch) hf hg t ht |
| 95 | have he : glue τ (fun s => rhs s (f s)) (fun s => rhs s (g s)) t=rhs t (glue τ f g t) := by |
| 96 | by_cases hx : t ≤ τ <;> simp only [glue, hx, ite_true, ite_false] |
| 97 | exact he ▸ h |
| 98 | |
| 99 | omit [NormedSpace ℝ E] in |
| 100 | /-- Joining the intervals does not change a shared pointwise time-profile bound. -/ |
| 101 | theorem glue_weighted_bound (S τ : ℝ) (f g : ℝ → E) (γ : ℝ → ℝ) (C : ℝ) |
| 102 | (hf : ∀ t ∈ Icc 0 τ, ‖f t‖ ≤ C*γ t) |
| 103 | (hg : ∀ t ∈ Icc τ S, ‖g t‖ ≤ C*γ t) |
| 104 | (t : ℝ) (ht : t ∈ Icc 0 S) : ‖glue τ f g t‖ ≤ C*γ t := by |
| 105 | by_cases h : t ≤ τ |
| 106 | · rw [glue_left τ f g t h] |
| 107 | exact hf t ⟨ht.1,h⟩ |
| 108 | · simp only [glue, h, ite_false] |
| 109 | exact hg t ⟨(not_le.mp h).le,ht.2⟩ |
| 110 | |
| 111 | end EulerTimeIntervalGlue |