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.GenericSupportedPolynomial |
| 2 | |
| 3 | noncomputable section |
| 4 | |
| 5 | namespace NavierStokes.GenericDifferentialPolynomial |
| 6 | |
| 7 | open Set Filter |
| 8 | open scoped Topology ContDiff BigOperators |
| 9 | |
| 10 | variable {D ι : Type*} [NormedAddCommGroup D] [NormedSpace ℝ D] |
| 11 | |
| 12 | /-- A single Cartesian field factor. Coordinate vectors give the usual |
| 13 | multi-index derivatives; arbitrary fixed directions are also permitted. -/ |
| 14 | inductive FieldFactor (D ι : Type*) where |
| 15 | | input : ι → FieldFactor D ι |
| 16 | | directional : D → FieldFactor D ι → FieldFactor D ι |
| 17 | |
| 18 | def FieldFactor.expression : FieldFactor D ι → Expression D ι Empty |
| 19 | | .input i => .input i |
| 20 | | .directional v f => .directional v f.expression |
| 21 | |
| 22 | def FieldFactor.eval (f : FieldFactor D ι) (u : ι → D → ℝ) : D → ℝ := |
| 23 | f.expression.eval (fun k => Empty.elim k) u |
| 24 | |
| 25 | theorem FieldFactor.smooth_eval (f : FieldFactor D ι) {U : Set D} |
| 26 | (hU : IsOpen U) {u : ι → D → ℝ} (hu : ∀ i, ContDiffOn ℝ ∞ (u i) U) : |
| 27 | ContDiffOn ℝ ∞ (f.eval u) U := |
| 28 | f.expression.smooth_eval hU (fun k => Empty.elim k) hu |
| 29 | |
| 30 | theorem FieldFactor.congr_germ (f : FieldFactor D ι) {u v : ι → D → ℝ} {x : D} |
| 31 | (h : ∀ i, u i =ᶠ[𝓝 x] v i) : f.eval u =ᶠ[𝓝 x] f.eval v := by |
| 32 | induction f with |
| 33 | | input i => exact h i |
| 34 | | directional w f ih => |
| 35 | exact (ih.fderiv (𝕜 := ℝ)).mono (fun y hy => congrArg (fun L => L w) hy) |
| 36 | |
| 37 | theorem FieldFactor.add_on (f : FieldFactor D ι) {U : Set D} |
| 38 | (hU : IsOpen U) {u v : ι → D → ℝ} |
| 39 | (hu : ∀ i, ContDiffOn ℝ ∞ (u i) U) (hv : ∀ i, ContDiffOn ℝ ∞ (v i) U) : |
| 40 | EqOn (f.eval (fun i x => u i x + v i x)) (fun x => f.eval u x + f.eval v x) U := by |
| 41 | induction f with |
| 42 | | input i => exact fun _ _ => rfl |
| 43 | | directional w f ih => |
| 44 | intro x hx |
| 45 | have he : f.eval (fun i x => u i x + v i x) =ᶠ[𝓝 x] |
| 46 | (fun x => f.eval u x + f.eval v x) := by |
| 47 | filter_upwards [hU.mem_nhds hx] with y hy |
| 48 | exact ih hy |
| 49 | change fderiv ℝ (f.eval (fun i x => u i x + v i x)) x w = |
| 50 | fderiv ℝ (f.eval u) x w + fderiv ℝ (f.eval v) x w |
| 51 | rw [he.fderiv_eq, fderiv_fun_add |
| 52 | (((f.smooth_eval hU hu).contDiffAt (hU.mem_nhds hx)).differentiableAt (by simp)) |
| 53 | (((f.smooth_eval hU hv).contDiffAt (hU.mem_nhds hx)).differentiableAt (by simp))] |
| 54 | rfl |
| 55 | |
| 56 | theorem FieldFactor.zero (f : FieldFactor D ι) : f.eval (fun _ _ => 0) = (fun _ => 0) := by |
| 57 | induction f with |
| 58 | | input i => rfl |
| 59 | | directional w f ih => |
| 60 | change (fun x => fderiv ℝ (f.eval (fun _ _ => 0)) x w) = _ |
| 61 | rw [ih] |
| 62 | simp |
| 63 | |
| 64 | theorem FieldFactor.sum_on (f : FieldFactor D ι) {U : Set D} |
| 65 | (hU : IsOpen U) {σ : Type*} (s : Finset σ) {v : σ → ι → D → ℝ} |
| 66 | (hv : ∀ j i, ContDiffOn ℝ ∞ (v j i) U) : |
| 67 | EqOn (f.eval (fun i x => ∑ j ∈ s, v j i x)) (fun x => ∑ j ∈ s, f.eval (v j) x) U := by |
| 68 | classical |
| 69 | induction s using Finset.induction_on with |
| 70 | | empty => |
| 71 | intro x _ |
| 72 | simpa only [Finset.sum_empty] using congrFun f.zero x |
| 73 | | @insert j s hj ih => |
| 74 | intro x hx |
| 75 | have hadd := f.add_on hU (hv j) (fun i => ContDiffOn.sum (s := s) (fun k _ => hv k i)) hx |
| 76 | simpa only [Finset.sum_insert hj, ih hx] using hadd |
| 77 | |
| 78 | /-- Linearity propagates each field factor's support through the actual |
| 79 | locally finite sum. The neighborhoods for individual increments may differ. -/ |
| 80 | theorem FieldFactor.zero_germ_of_local_sum (f : FieldFactor D ι) |
| 81 | {U : Set D} (hU : IsOpen U) {x : D} (hx : x ∈ U) |
| 82 | {u base : ι → D → ℝ} {inc : ℕ → ι → D → ℝ} |
| 83 | (hb : ∀ i, ContDiffOn ℝ ∞ (base i) U) |
| 84 | (hi : ∀ j i, ContDiffOn ℝ ∞ (inc j i) U) |
| 85 | (hlocal : ∃ N, ∀ i, u i =ᶠ[𝓝 x] (fun y => base i y + ∑ j ∈ Finset.range N, inc j i y)) |
| 86 | (hbase : f.eval base =ᶠ[𝓝 x] (fun _ => 0)) |
| 87 | (hinc : ∀ j, f.eval (inc j) =ᶠ[𝓝 x] (fun _ => 0)) : |
| 88 | f.eval u =ᶠ[𝓝 x] (fun _ => 0) := by |
| 89 | obtain ⟨N, hN⟩ := hlocal |
| 90 | have he := f.congr_germ hN |
| 91 | have hs : ∀ᶠ y in 𝓝 x, ∀ j ∈ Finset.range N, f.eval (inc j) y = 0 := |
| 92 | (Filter.eventually_all_finset (Finset.range N)).mpr (fun j _ => hinc j) |
| 93 | filter_upwards [he, hbase, hs, hU.mem_nhds hx] with y hy hyb hys hyU |
| 94 | rw [hy] |
| 95 | change f.eval (fun i z => base i z + ∑ j ∈ Finset.range N, inc j i z) y = 0 |
| 96 | have ha := f.add_on hU hb (fun i => ContDiffOn.sum (s := Finset.range N) (fun j _ => hi j i)) hyU |
| 97 | calc |
| 98 | _ = f.eval base y + f.eval (fun i z => ∑ j ∈ Finset.range N, inc j i z) y := ha |
| 99 | _ = f.eval base y + ∑ j ∈ Finset.range N, f.eval (inc j) y := |
| 100 | congrArg (fun z => f.eval base y + z) (f.sum_on hU (Finset.range N) hi hyU) |
| 101 | _ = 0 := by rw [hyb, Finset.sum_eq_zero hys, add_zero] |
| 102 | |
| 103 | /-- Each leaf records the support of one differentiated field factor in the |
| 104 | base and every increment. Multiplication constructs arbitrary positive-degree |
| 105 | monomials without requiring undifferentiated components to share the support. -/ |
| 106 | inductive FactorSupportAt (base : ι → D → ℝ) (inc : ℕ → ι → D → ℝ) (x : D) : |
| 107 | Expression D ι Empty → Prop where |
| 108 | | factor (f : FieldFactor D ι) |
| 109 | (base_zero : f.eval base =ᶠ[𝓝 x] (fun _ => 0)) |
| 110 | (increment_zero : ∀ j, f.eval (inc j) =ᶠ[𝓝 x] (fun _ => 0)) : |
| 111 | FactorSupportAt base inc x f.expression |
| 112 | | mul {e f : Expression D ι Empty} : |
| 113 | FactorSupportAt base inc x e → FactorSupportAt base inc x f → |
| 114 | FactorSupportAt base inc x (.mul e f) |
| 115 | |
| 116 | theorem FactorSupportAt.factor_of_tsupport {base : ι → D → ℝ} {inc : ℕ → ι → D → ℝ} |
| 117 | (f : FieldFactor D ι) {S U : Set D} {x : D} (hx : x ∈ U) (hxs : x ∉ S) |
| 118 | (hb : tsupport (f.eval base) ∩ U ⊆ S) |
| 119 | (hi : ∀ j, tsupport (f.eval (inc j)) ∩ U ⊆ S) : |
| 120 | FactorSupportAt base inc x f.expression := by |
| 121 | apply FactorSupportAt.factor f |
| 122 | · exact notMem_tsupport_iff_eventuallyEq.mp (fun h => hxs (hb ⟨h, hx⟩)) |
| 123 | · intro j |
| 124 | exact notMem_tsupport_iff_eventuallyEq.mp (fun h => hxs (hi j ⟨h, hx⟩)) |
| 125 | |
| 126 | theorem FactorSupportAt.zero_germ {U : Set D} (hU : IsOpen U) {x : D} (hx : x ∈ U) |
| 127 | {u base : ι → D → ℝ} {inc : ℕ → ι → D → ℝ} {e : Expression D ι Empty} |
| 128 | (h : FactorSupportAt base inc x e) |
| 129 | (hb : ∀ i, ContDiffOn ℝ ∞ (base i) U) |
| 130 | (hi : ∀ j i, ContDiffOn ℝ ∞ (inc j i) U) |
| 131 | (hlocal : ∃ N, ∀ i, u i =ᶠ[𝓝 x] (fun y => base i y + ∑ j ∈ Finset.range N, inc j i y)) : |
| 132 | e.eval (fun k => Empty.elim k) u =ᶠ[𝓝 x] (fun _ => 0) := by |
| 133 | induction h with |
| 134 | | factor f hbase hinc => exact f.zero_germ_of_local_sum hU hx hb hi hlocal hbase hinc |
| 135 | | mul he hf ihe ihf => |
| 136 | filter_upwards [ihe, ihf] with y hy hz |
| 137 | simp only [Expression.eval, hy, hz, mul_zero] |
| 138 | |
| 139 | end NavierStokes.GenericDifferentialPolynomial |