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.ParametricFlatFactor |
| 2 | import Mathlib.Analysis.Calculus.BumpFunction.FiniteDimension |
| 3 | |
| 4 | /-! The flat primitive lemma with coefficients specified only near a compact |
| 5 | parameter rectangle. The factor includes the manuscript's explicit `1/2`. -/ |
| 6 | |
| 7 | noncomputable section |
| 8 | |
| 9 | open Set Filter MeasureTheory |
| 10 | open scoped Topology ContDiff |
| 11 | |
| 12 | namespace NavierStokes.FlatPrimitivePaper |
| 13 | |
| 14 | variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 15 | [FiniteDimensional ℝ E] |
| 16 | |
| 17 | /-- Local smooth coefficient data near a compact set can be extended for |
| 18 | use under the transformed integral. No bound outside that neighborhood is |
| 19 | required. -/ |
| 20 | theorem smooth_extension_on_compact {K U : Set E} (hK : IsCompact K) |
| 21 | (hU : IsOpen U) (hKU : K ⊆ U) {b : E → ℝ} |
| 22 | (hb : ContDiffOn ℝ ∞ b U) : |
| 23 | ∃ b' : E → ℝ, ContDiff ℝ ∞ b' ∧ EqOn b' b K := by |
| 24 | obtain ⟨V, hV, hKV, hVU⟩ := hK.exists_isOpen_closure_subset (hU.mem_nhdsSet.mpr hKU) |
| 25 | obtain ⟨f, hfV, hf, hf01⟩ := hV.exists_contDiff_support_eq (n := ⊤) |
| 26 | obtain ⟨g, hgK, hg, hg01⟩ := hK.isClosed.isOpen_compl.exists_contDiff_support_eq (n := ⊤) |
| 27 | have hsum (x : E) : 0 < f x + g x := by |
| 28 | have hf0 := (hf01 (mem_range_self x)).1 |
| 29 | have hg0 := (hg01 (mem_range_self x)).1 |
| 30 | by_cases hx : x ∈ K |
| 31 | · have hfx : f x ≠ 0 := by |
| 32 | change x ∈ Function.support f |
| 33 | rw [hfV] |
| 34 | exact hKV hx |
| 35 | exact add_pos_of_pos_of_nonneg (lt_of_le_of_ne hf0 hfx.symm) hg0 |
| 36 | · have hgx : g x ≠ 0 := by |
| 37 | change x ∈ Function.support g |
| 38 | rw [hgK] |
| 39 | exact hx |
| 40 | exact add_pos_of_nonneg_of_pos hf0 (lt_of_le_of_ne hg0 hgx.symm) |
| 41 | let χ : E → ℝ := fun x => f x / (f x + g x) |
| 42 | have hχ : ContDiff ℝ ∞ χ := hf.div (hf.add hg) (fun x => (hsum x).ne') |
| 43 | have hχK : EqOn χ 1 K := by |
| 44 | intro x hx |
| 45 | have hgx : g x = 0 := by |
| 46 | apply Function.notMem_support.mp |
| 47 | rw [hgK] |
| 48 | exact not_not.mpr hx |
| 49 | dsimp [χ] |
| 50 | rw [hgx, add_zero, div_self (by simpa [hgx] using (hsum x).ne')] |
| 51 | have hχU : tsupport χ ⊆ U := by |
| 52 | apply Subset.trans (closure_mono (t := V) ?_) hVU |
| 53 | intro x hx |
| 54 | by_contra hxV |
| 55 | have hfx : f x = 0 := Function.notMem_support.mp (by simpa [hfV] using hxV) |
| 56 | exact hx (by simp [χ, hfx]) |
| 57 | refine ⟨fun x => χ x * b x, ?_, ?_⟩ |
| 58 | · apply contDiff_iff_contDiffAt.mpr |
| 59 | intro x |
| 60 | by_cases hx : x ∈ U |
| 61 | · exact hχ.contDiffAt.mul (hb.contDiffAt (hU.mem_nhds hx)) |
| 62 | · have hz : χ =ᶠ[𝓝 x] 0 := |
| 63 | notMem_tsupport_iff_eventuallyEq.mp (fun hx' => hx (hχU hx')) |
| 64 | apply contDiffAt_const.congr_of_eventuallyEq |
| 65 | filter_upwards [hz] with y hy |
| 66 | change χ y * b y = 0 |
| 67 | change χ y = 0 at hy |
| 68 | rw [hy, zero_mul] |
| 69 | · intro x hx |
| 70 | change χ x * b x = b x |
| 71 | rw [hχK hx] |
| 72 | exact one_mul _ |
| 73 | |
| 74 | end NavierStokes.FlatPrimitivePaper |