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.SmoothMomentRepair |
| 2 | import Mathlib.Analysis.Calculus.ImplicitContDiff |
| 3 | |
| 4 | /-! Smoothness of a continuous quadratic correction branch, including on |
| 5 | closed parameter sets. The implicit function theorem is applied in the |
| 6 | universal coefficient space, so no extension of the parameter data is needed. -/ |
| 7 | |
| 8 | noncomputable section |
| 9 | |
| 10 | open Set Filter Function |
| 11 | open scoped Topology ContDiff |
| 12 | |
| 13 | namespace NavierStokes.SmoothQuadraticBranch |
| 14 | |
| 15 | variable {P D E : Type*} |
| 16 | [NormedAddCommGroup P] [NormedSpace ℝ P] |
| 17 | [NormedAddCommGroup D] [NormedSpace ℝ D] |
| 18 | [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 19 | |
| 20 | /-- A continuous solution of a regular implicit equation inherits all the |
| 21 | within-parameter derivatives of its data. -/ |
| 22 | theorem continuous_branch_contDiffOn [CompleteSpace D] [CompleteSpace E] |
| 23 | {S : Set P} (F : D × E → E) |
| 24 | (hF : ContDiff ℝ ∞ F) (data : P → D) (c : P → E) |
| 25 | (hdata : ContDiffOn ℝ ∞ data S) (hc : ContinuousOn c S) |
| 26 | (heq : ∀ p ∈ S, F (data p, c p) = 0) |
| 27 | (hinv : ∀ p ∈ S, |
| 28 | (fderiv ℝ F (data p, c p) ∘L ContinuousLinearMap.inr ℝ D E).IsInvertible) : |
| 29 | ContDiffOn ℝ ∞ c S := by |
| 30 | intro p hp |
| 31 | have hFp := hF.contDiffAt (x := (data p, c p)) |
| 32 | have hn : (∞ : ℕ∞ω) ≠ 0 := by simp |
| 33 | let g : D → E := hFp.implicitFunction hn (hinv p hp) |
| 34 | have hg : ContDiffAt ℝ ∞ g (data p) := |
| 35 | hFp.contDiffAt_implicitFunction hn (hinv p hp) |
| 36 | have ht : Tendsto (fun x => (data x, c x)) (𝓝[S] p) (𝓝 (data p, c p)) := |
| 37 | (hdata p hp).continuousWithinAt.prodMk (hc p hp) |
| 38 | have hloc := ht.eventually (hFp.eventually_apply_eq_iff_implicitFunction hn (hinv p hp)) |
| 39 | have hagree : c =ᶠ[𝓝[S] p] (fun x => g (data x)) := by |
| 40 | filter_upwards [hloc, self_mem_nhdsWithin] with x hx hxs |
| 41 | exact (hx.mp ((heq x hxs).trans (heq p hp).symm)).symm |
| 42 | exact (hg.comp_contDiffWithinAt p (hdata p hp)).congr_of_eventuallyEq_of_mem hagree hp |
| 43 | |
| 44 | open SmoothMomentRepair |
| 45 | |
| 46 | /-- The universal quadratic residual in coefficients, debt, and correction. -/ |
| 47 | def residual (z : RepairData E × E) : E := |
| 48 | z.1.1.1 z.2 + z.1.1.2 z.2 z.2 - z.1.2 |
| 49 | |
| 50 | theorem residual_contDiff : ContDiff ℝ ∞ (residual : RepairData E × E → E) := |
| 51 | ((contDiff_fst.fst.fst.clm_apply contDiff_snd).add |
| 52 | ((contDiff_fst.fst.snd.clm_apply contDiff_snd).clm_apply contDiff_snd)).sub |
| 53 | contDiff_fst.snd |
| 54 | |
| 55 | /-- Its correction derivative is the actual linearized moment operator. -/ |
| 56 | theorem residual_partial (z : RepairData E) (c : E) : |
| 57 | fderiv ℝ residual (z, c) ∘L ContinuousLinearMap.inr ℝ (RepairData E) E = |
| 58 | z.1.1 + z.1.2 c + z.1.2.flip c := by |
| 59 | have hres := (residual_contDiff.differentiable (by simp) (z, c)).hasFDerivAt |
| 60 | have hslice := hres.comp c (hasFDerivAt_prodMk_right z c) |
| 61 | have hquad := (z.1.2.hasFDerivAt (x := c)).clm_apply (hasFDerivAt_id c) |
| 62 | have hpoly := ((z.1.1.hasFDerivAt (x := c)).add hquad).sub_const z.2 |
| 63 | have heq := hslice.unique hpoly |
| 64 | simpa [residual, ContinuousLinearMap.comp_id, add_assoc] using heq |
| 65 | |
| 66 | /-- Smooth coefficient and debt families give a smooth continuous solution |
| 67 | branch whenever the actual correction linearization is invertible. -/ |
| 68 | theorem continuous_quadratic_branch_contDiffOn [CompleteSpace E] {S : Set P} |
| 69 | (B : P → E →L[ℝ] E) (A : P → E →L[ℝ] E →L[ℝ] E) (d c : P → E) |
| 70 | (hB : ContDiffOn ℝ ∞ B S) (hA : ContDiffOn ℝ ∞ A S) |
| 71 | (hd : ContDiffOn ℝ ∞ d S) (hc : ContinuousOn c S) |
| 72 | (heq : ∀ p ∈ S, B p (c p) + A p (c p) (c p) = d p) |
| 73 | (hinv : ∀ p ∈ S, (B p + A p (c p) + (A p).flip (c p)).IsInvertible) : |
| 74 | ContDiffOn ℝ ∞ c S := by |
| 75 | apply continuous_branch_contDiffOn residual residual_contDiff |
| 76 | (fun p => ((B p, A p), d p)) c ((hB.prodMk hA).prodMk hd) hc |
| 77 | · intro p hp |
| 78 | exact sub_eq_zero.mpr (heq p hp) |
| 79 | · intro p hp |
| 80 | rw [residual_partial] |
| 81 | exact hinv p hp |
| 82 | |
| 83 | end NavierStokes.SmoothQuadraticBranch |