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.FDeriv.Extend |
| 2 | import NavierStokes.EndpointExtension |
| 3 | |
| 4 | /-! |
| 5 | # Endpoint regularity from finite limits of successive derivatives |
| 6 | |
| 7 | For a family of curves `f n`, assume that `f (n+1)` is the actual derivative |
| 8 | of `f n` strictly to the left of `a`, and that every `f n` has a finite left |
| 9 | limit `L n`. Assigning these limiting values at `a` produces a curve smooth |
| 10 | on the closed left half-line, whose actual within-derivative jets equal `L`. |
| 11 | |
| 12 | The endpoint derivative step uses Mathlib's mean-value extension theorem. |
| 13 | Closed-side smoothness and compatibility of the limiting jets are proved, |
| 14 | not assumed. Arbitrary right-hand jet realization is a separate problem. |
| 15 | -/ |
| 16 | |
| 17 | noncomputable section |
| 18 | |
| 19 | open Set Filter |
| 20 | open scoped Topology ContDiff |
| 21 | |
| 22 | namespace NavierStokes.EndpointLimits |
| 23 | |
| 24 | /-- Keep the curve on the open left half-line and assign its limiting value |
| 25 | at the endpoint. Values to the right are also set to that constant, but no |
| 26 | smoothness across the endpoint is claimed for this function alone. -/ |
| 27 | def leftExtension {V : Type*} (a : ℝ) (L : V) (f : ℝ → V) (x : ℝ) : V := |
| 28 | if x < a then f x else L |
| 29 | |
| 30 | theorem leftExtension_of_lt {V : Type*} {a x : ℝ} {L : V} {f : ℝ → V} |
| 31 | (hx : x < a) : leftExtension a L f x = f x := by |
| 32 | simp only [leftExtension, ite_eq_left hx] |
| 33 | |
| 34 | @[simp] theorem leftExtension_at {V : Type*} (a : ℝ) (L : V) (f : ℝ → V) : |
| 35 | leftExtension a L f a = L := by |
| 36 | simp only [leftExtension, lt_self_iff_false, ite_false] |
| 37 | |
| 38 | /-- The assigned endpoint value makes the extension continuous from the left. -/ |
| 39 | theorem continuousWithinAt_leftExtension {V : Type*} [TopologicalSpace V] |
| 40 | {a : ℝ} {L : V} {f : ℝ → V} |
| 41 | (hf : Tendsto f (𝓝[<] a) (𝓝 L)) : |
| 42 | ContinuousWithinAt (leftExtension a L f) (Iio a) a := by |
| 43 | change Tendsto (leftExtension a L f) (𝓝[<] a) (𝓝 (leftExtension a L f a)) |
| 44 | rw [leftExtension_at] |
| 45 | apply hf.congr' |
| 46 | filter_upwards [self_mem_nhdsWithin] with x hx |
| 47 | exact (leftExtension_of_lt hx).symm |
| 48 | |
| 49 | section Normed |
| 50 | |
| 51 | variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] |
| 52 | |
| 53 | /-- Altering the endpoint and the right side does not change an interior |
| 54 | left derivative. -/ |
| 55 | theorem hasDerivAt_leftExtension {a x : ℝ} {L v : V} {f : ℝ → V} |
| 56 | (hx : x < a) (hf : HasDerivAt f v x) : |
| 57 | HasDerivAt (leftExtension a L f) v x := by |
| 58 | apply hf.congr_of_eventuallyEq |
| 59 | filter_upwards [Iio_mem_nhds hx] with y hy |
| 60 | exact leftExtension_of_lt hy |
| 61 | |
| 62 | /-- The mean-value theorem identifies the derivative at the endpoint from |
| 63 | the separate limits of the curve and its derivative. -/ |
| 64 | theorem hasDerivWithinAt_leftExtension_endpoint {a : ℝ} {L L' : V} |
| 65 | {f f' : ℝ → V} |
| 66 | (hderiv : ∀ x < a, HasDerivAt f (f' x) x) |
| 67 | (hlim : Tendsto f (𝓝[<] a) (𝓝 L)) |
| 68 | (hlim' : Tendsto f' (𝓝[<] a) (𝓝 L')) : |
| 69 | HasDerivWithinAt (leftExtension a L f) L' (Iic a) a := by |
| 70 | apply hasDerivWithinAt_Iic_of_tendsto_deriv |
| 71 | (s := Iio a) |
| 72 | (fun x hx => (hasDerivAt_leftExtension hx (hderiv x hx)).differentiableAt.differentiableWithinAt) |
| 73 | (continuousWithinAt_leftExtension hlim) self_mem_nhdsWithin |
| 74 | apply hlim'.congr' |
| 75 | filter_upwards [self_mem_nhdsWithin] with x hx |
| 76 | exact (hasDerivAt_leftExtension (L := L) hx (hderiv x hx)).deriv.symm |
| 77 | |
| 78 | /-- Every extended member of a successive-derivative family has the next |
| 79 | extended member as its derivative throughout the closed left half-line. -/ |
| 80 | theorem hasDerivWithinAt_extended_family {a : ℝ} {f : ℕ → ℝ → V} {L : ℕ → V} |
| 81 | (hderiv : ∀ n : ℕ, ∀ x < a, HasDerivAt (f n) (f (n + 1) x) x) |
| 82 | (hlim : ∀ n : ℕ, Tendsto (f n) (𝓝[<] a) (𝓝 (L n))) |
| 83 | (n : ℕ) {x : ℝ} (hx : x ≤ a) : |
| 84 | HasDerivWithinAt (leftExtension a (L n) (f n)) |
| 85 | (leftExtension a (L (n + 1)) (f (n + 1)) x) (Iic a) x := by |
| 86 | rcases lt_or_eq_of_le hx with hlt | heq |
| 87 | · rw [leftExtension_of_lt hlt] |
| 88 | exact (hasDerivAt_leftExtension hlt (hderiv n x hlt)).hasDerivWithinAt |
| 89 | · subst x |
| 90 | rw [leftExtension_at] |
| 91 | exact hasDerivWithinAt_leftExtension_endpoint (hderiv n) (hlim n) (hlim (n + 1)) |
| 92 | |
| 93 | /-- The actual iterated derivatives of the extended original curve agree, |
| 94 | on the full closed half-line, with the given successive-derivative family. -/ |
| 95 | theorem iteratedDerivWithin_leftExtension {a : ℝ} {f : ℕ → ℝ → V} {L : ℕ → V} |
| 96 | (hderiv : ∀ n : ℕ, ∀ x < a, HasDerivAt (f n) (f (n + 1) x) x) |
| 97 | (hlim : ∀ n : ℕ, Tendsto (f n) (𝓝[<] a) (𝓝 (L n))) (n : ℕ) : |
| 98 | EqOn (iteratedDerivWithin n (leftExtension a (L 0) (f 0)) (Iic a)) |
| 99 | (leftExtension a (L n) (f n)) (Iic a) := by |
| 100 | induction n with |
| 101 | | zero => simp only [iteratedDerivWithin_zero, eqOn_refl] |
| 102 | | succ n ih => |
| 103 | intro x hx |
| 104 | rw [iteratedDerivWithin_succ] |
| 105 | calc |
| 106 | derivWithin (iteratedDerivWithin n (leftExtension a (L 0) (f 0)) (Iic a)) |
| 107 | (Iic a) x = derivWithin (leftExtension a (L n) (f n)) (Iic a) x := |
| 108 | derivWithin_congr ih (ih hx) |
| 109 | _ = leftExtension a (L (n + 1)) (f (n + 1)) x := |
| 110 | (hasDerivWithinAt_extended_family hderiv hlim n hx).derivWithin |
| 111 | (uniqueDiffOn_Iic a x hx) |
| 112 | |
| 113 | /-- Finite limits of every successive derivative imply genuine `C∞` |
| 114 | regularity up to the endpoint. Closed-side smoothness is the conclusion. -/ |
| 115 | theorem contDiffOn_leftExtension {a : ℝ} {f : ℕ → ℝ → V} {L : ℕ → V} |
| 116 | (hderiv : ∀ n : ℕ, ∀ x < a, HasDerivAt (f n) (f (n + 1) x) x) |
| 117 | (hlim : ∀ n : ℕ, Tendsto (f n) (𝓝[<] a) (𝓝 (L n))) : |
| 118 | ContDiffOn ℝ ∞ (leftExtension a (L 0) (f 0)) (Iic a) := by |
| 119 | apply contDiffOn_of_differentiableOn_deriv |
| 120 | intro n _ x hx |
| 121 | exact ((hasDerivWithinAt_extended_family hderiv hlim n hx).congr_of_mem |
| 122 | (fun y hy => iteratedDerivWithin_leftExtension hderiv hlim n hy) hx).differentiableWithinAt |
| 123 | |
| 124 | /-- Each member of the successive-derivative family, not only its zeroth |
| 125 | member, extends smoothly to the closed left half-line. -/ |
| 126 | theorem all_leftExtensions_contDiffOn {a : ℝ} {f : ℕ → ℝ → V} {L : ℕ → V} |
| 127 | (hderiv : ∀ n : ℕ, ∀ x < a, HasDerivAt (f n) (f (n + 1) x) x) |
| 128 | (hlim : ∀ n : ℕ, Tendsto (f n) (𝓝[<] a) (𝓝 (L n))) (k : ℕ) : |
| 129 | ContDiffOn ℝ ∞ (leftExtension a (L k) (f k)) (Iic a) := by |
| 130 | have hshift : ∀ n : ℕ, ∀ x < a, |
| 131 | HasDerivAt (f (k + n)) (f (k + (n + 1)) x) x := by |
| 132 | intro n x hx |
| 133 | simpa only [Nat.add_assoc] using hderiv (k + n) x hx |
| 134 | simpa only [Nat.add_zero] using |
| 135 | contDiffOn_leftExtension hshift (fun n => hlim (k + n)) |
| 136 | |
| 137 | /-- The limiting data are exactly the endpoint jets of the constructed |
| 138 | closed-side smooth curve. -/ |
| 139 | theorem endpoint_jets_eq_limits {a : ℝ} {f : ℕ → ℝ → V} {L : ℕ → V} |
| 140 | (hderiv : ∀ n : ℕ, ∀ x < a, HasDerivAt (f n) (f (n + 1) x) x) |
| 141 | (hlim : ∀ n : ℕ, Tendsto (f n) (𝓝[<] a) (𝓝 (L n))) (n : ℕ) : |
| 142 | iteratedDerivWithin n (leftExtension a (L 0) (f 0)) (Iic a) a = L n := by |
| 143 | simpa only [leftExtension_at] using |
| 144 | iteratedDerivWithin_leftExtension hderiv hlim n (le_refl a) |
| 145 | |
| 146 | /-- A constructive existence statement for a smooth left endpoint extension |
| 147 | with exactly the limiting jets. It asserts no extension to an open right side. -/ |
| 148 | theorem exists_smooth_left_extension {a : ℝ} {f : ℕ → ℝ → V} {L : ℕ → V} |
| 149 | (hderiv : ∀ n : ℕ, ∀ x < a, HasDerivAt (f n) (f (n + 1) x) x) |
| 150 | (hlim : ∀ n : ℕ, Tendsto (f n) (𝓝[<] a) (𝓝 (L n))) : |
| 151 | ∃ g : ℝ → V, EqOn g (f 0) (Iio a) ∧ ContDiffOn ℝ ∞ g (Iic a) ∧ |
| 152 | ∀ n : ℕ, iteratedDerivWithin n g (Iic a) a = L n := by |
| 153 | exact ⟨leftExtension a (L 0) (f 0), fun _ hx => leftExtension_of_lt hx, |
| 154 | contDiffOn_leftExtension hderiv hlim, endpoint_jets_eq_limits hderiv hlim⟩ |
| 155 | |
| 156 | /-- Explicit bridge to the gluing theorem. A right branch is a concrete input |
| 157 | with its own smoothness and jet equalities; its existence is not asserted. -/ |
| 158 | theorem contDiff_glue_of_left_limits {a : ℝ} {f : ℕ → ℝ → V} {L : ℕ → V} |
| 159 | {right : ℝ → V} |
| 160 | (hderiv : ∀ n : ℕ, ∀ x < a, HasDerivAt (f n) (f (n + 1) x) x) |
| 161 | (hlim : ∀ n : ℕ, Tendsto (f n) (𝓝[<] a) (𝓝 (L n))) |
| 162 | (hright : ContDiffOn ℝ ∞ right (Ici a)) |
| 163 | (hrightJet : ∀ n : ℕ, iteratedDerivWithin n right (Ici a) a = L n) : |
| 164 | ContDiff ℝ ∞ (EndpointExtension.glue a (leftExtension a (L 0) (f 0)) right) := by |
| 165 | apply EndpointExtension.contDiff_glue (contDiffOn_leftExtension hderiv hlim) hright |
| 166 | intro n |
| 167 | exact (endpoint_jets_eq_limits hderiv hlim n).trans (hrightJet n).symm |
| 168 | |
| 169 | end Normed |
| 170 | |
| 171 | end NavierStokes.EndpointLimits |