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.WeakTimeContinuity |
| 2 | import Euler.CurlTimeDerivative |
| 3 | import Euler.CompactPressurePairing |
| 4 | import Euler.LpSmoothField |
| 5 | import Mathlib.Analysis.Calculus.ParametricIntegral |
| 6 | import Mathlib.Analysis.InnerProductSpace.Calculus |
| 7 | |
| 8 | /-! |
| 9 | # The Euler equation tested against compact vector fields |
| 10 | |
| 11 | Differentiation under the compact spatial integral uses joint smoothness on |
| 12 | positive times. It does not assume an `L²` time derivative or any pressure |
| 13 | decay. |
| 14 | -/ |
| 15 | |
| 16 | noncomputable section |
| 17 | |
| 18 | open Set Filter MeasureTheory EulerSmoothLimit |
| 19 | open scoped ContDiff Topology |
| 20 | |
| 21 | namespace Euler.EulerExistenceAndSmoothnessR3 |
| 22 | |
| 23 | local notation "ℝ³" => EuclideanSpace ℝ (Fin 3) |
| 24 | |
| 25 | variable {u₀ : ℝ³ → ℝ³} {v : ℝ³ → ℝ → ℝ³} {p : ℝ³ → ℝ → ℝ} |
| 26 | (h : EulerExistenceAndSmoothnessR3 u₀ v p) |
| 27 | |
| 28 | include h |
| 29 | |
| 30 | /-- The pointwise Euler equation differentiates every compactly supported |
| 31 | continuous vector test pairing. Pressure is retained in this first identity. -/ |
| 32 | theorem velocity_test_pairing_hasDerivAt |
| 33 | (φ : ℝ³ → ℝ³) (hφ : Continuous φ) (hφc : HasCompactSupport φ) |
| 34 | (t₀ : ℝ) (ht₀ : 0 < t₀) : |
| 35 | HasDerivAt (fun t : ℝ => ∫ x : ℝ³, inner ℝ (φ x) (v x t)) |
| 36 | (∫ x : ℝ³, inner ℝ (φ x) |
| 37 | (-fderiv ℝ (v · t₀) x (v x t₀) - gradient (p · t₀) x)) t₀ := by |
| 38 | let u : ℝ × ℝ³ → ℝ³ := fun z => v z.2 z.1 |
| 39 | let Ω : Set (ℝ × ℝ³) := Ioi 0 ×ˢ univ |
| 40 | have hΩ : IsOpen Ω := isOpen_Ioi.prod isOpen_univ |
| 41 | have hu : ContDiffOn ℝ ∞ u Ω := |
| 42 | h.velocity_smooth.comp (contDiff_snd.prodMk contDiff_fst).contDiffOn |
| 43 | (fun z hz => ⟨mem_univ _, (show 0 < z.1 from hz.1).le⟩) |
| 44 | let C : ℝ → ℝ³ → ℝ³ := fun r x => fderiv ℝ u (r, x) (1, 0) |
| 45 | have hC : ContinuousOn (Function.uncurry C) Ω := |
| 46 | (hu.continuousOn_fderiv_of_isOpen hΩ (by simp)).clm_apply continuousOn_const |
| 47 | have hderiv (r : ℝ) (hr : 0 < r) (x : ℝ³) : |
| 48 | HasDerivAt (fun s => v x s) (C r x) r := by |
| 49 | have hud := (hu.differentiableOn (by simp) (r, x) ⟨hr, mem_univ x⟩).differentiableAt |
| 50 | (hΩ.mem_nhds ⟨hr, mem_univ x⟩) |
| 51 | simpa only [u, C, Function.comp_def, id_eq] using hud.hasFDerivAt.comp_hasDerivAt r |
| 52 | ((hasDerivAt_id r).prodMk (hasDerivAt_const r x)) |
| 53 | let J : Set ℝ := Icc (t₀ / 2) (t₀ + 1) |
| 54 | have hJ : J ∈ 𝓝 t₀ := Icc_mem_nhds (by linarith) (by linarith) |
| 55 | have hJpos : ∀ r ∈ J, 0 < r := by intro r hr; dsimp [J] at hr; linarith [hr.1] |
| 56 | let F : ℝ → ℝ³ → ℝ := fun r x => inner ℝ (φ x) (v x r) |
| 57 | let G : ℝ → ℝ³ → ℝ := fun r x => inner ℝ (φ x) (C r x) |
| 58 | have hG : ContinuousOn (Function.uncurry G) (J ×ˢ tsupport φ) := by |
| 59 | apply (hφ.comp continuous_snd).continuousOn.inner |
| 60 | exact hC.mono (fun z hz => ⟨hJpos z.1 hz.1, mem_univ _⟩) |
| 61 | obtain ⟨M, hM⟩ := (isCompact_Icc.prod hφc).exists_bound_of_continuousOn hG |
| 62 | have hFcont (r : ℝ) (hr : 0 < r) : Continuous (F r) := |
| 63 | hφ.inner (h.velocity_contDiff r hr.le).continuous |
| 64 | have hGcont : Continuous (G t₀) := by |
| 65 | apply hφ.inner |
| 66 | exact hC.comp_continuous (continuous_const.prodMk continuous_id) |
| 67 | (fun x => ⟨ht₀, mem_univ x⟩) |
| 68 | have hdiff := hasDerivAt_integral_of_dominated_loc_of_deriv_le |
| 69 | (μ := volume.restrict (tsupport φ)) (F := F) (F' := G) |
| 70 | (bound := fun _ => M) hJ |
| 71 | (by |
| 72 | filter_upwards [Ioi_mem_nhds ht₀] with r hr |
| 73 | exact (hFcont r hr).aestronglyMeasurable) |
| 74 | ((hFcont t₀ ht₀).continuousOn.integrableOn_compact hφc) |
| 75 | hGcont.aestronglyMeasurable |
| 76 | (by |
| 77 | filter_upwards [ae_restrict_mem hφc.measurableSet] with x hx |
| 78 | intro r hr |
| 79 | exact hM (r, x) ⟨hr, hx⟩) |
| 80 | (integrableOn_const hφc.measure_ne_top) |
| 81 | (Eventually.of_forall (fun x r hr => by |
| 82 | simpa only [F, G, inner_zero_left, add_zero] using |
| 83 | (hasDerivAt_const r (φ x)).inner ℝ (hderiv r (hJpos r hr) x))) |
| 84 | have hFwhole : (fun r => ∫ x in tsupport φ, F r x) = fun r => ∫ x, F r x := by |
| 85 | funext r |
| 86 | apply setIntegral_eq_integral_of_forall_compl_eq_zero |
| 87 | intro x hx |
| 88 | simp only [F, image_eq_zero_of_notMem_tsupport hx, inner_zero_left] |
| 89 | have hGwhole : (∫ x in tsupport φ, G t₀ x) = ∫ x, G t₀ x := by |
| 90 | apply setIntegral_eq_integral_of_forall_compl_eq_zero |
| 91 | intro x hx |
| 92 | simp only [G, image_eq_zero_of_notMem_tsupport hx, inner_zero_left] |
| 93 | have hCeq (x : ℝ³) : C t₀ x = |
| 94 | -fderiv ℝ (v · t₀) x (v x t₀) - gradient (p · t₀) x := |
| 95 | (hderiv t₀ ht₀ x).unique (h.pointwise_euler x t₀ ht₀) |
| 96 | have hd := hdiff.2 |
| 97 | rw [hFwhole, hGwhole] at hd |
| 98 | simpa only [F, G, hCeq] using hd |
| 99 | |
| 100 | /-- Pressure disappears from the test-pairing derivative when the compact |
| 101 | smooth vector test is divergence-free. -/ |
| 102 | theorem velocity_solenoidal_test_pairing_hasDerivAt |
| 103 | (φ : ℝ³ → ℝ³) (hφ : ContDiff ℝ ∞ φ) (hφc : HasCompactSupport φ) |
| 104 | (hdiv : ∀ x, EulerSmoothLimit.divergence φ x = 0) |
| 105 | (t₀ : ℝ) (ht₀ : 0 < t₀) : |
| 106 | HasDerivAt (fun t : ℝ => ∫ x : ℝ³, inner ℝ (φ x) (v x t)) |
| 107 | (-(∫ x : ℝ³, inner ℝ (φ x) (fderiv ℝ (v · t₀) x (v x t₀)))) t₀ := by |
| 108 | have hv := h.velocity_contDiff t₀ ht₀.le |
| 109 | have hp := h.pressure_contDiff t₀ ht₀.le |
| 110 | have hi (b : ℝ³ → ℝ³) (hb : Continuous b) : |
| 111 | Integrable (fun x => inner ℝ (φ x) (b x)) := by |
| 112 | apply (hφ.continuous.inner hb).integrable_of_hasCompactSupport |
| 113 | exact HasCompactSupport.intro hφc (fun x hx => by |
| 114 | simp only [image_eq_zero_of_notMem_tsupport hx, inner_zero_left]) |
| 115 | have ha := hi (fun x => fderiv ℝ (v · t₀) x (v x t₀)) |
| 116 | ((hv.fderiv_right (m := ∞) (by simp)).continuous.clm_apply hv.continuous) |
| 117 | have hg := hi (gradient (p · t₀)) (EulerMeanSolenoidal.contDiff_gradient hp).continuous |
| 118 | have hc := EulerComparatorPressure.compact_solenoidal_pressure_pairing_zero |
| 119 | φ hφ hφc hdiv (p · t₀) hp |
| 120 | have heq : (∫ x : ℝ³, inner ℝ (φ x) |
| 121 | (-fderiv ℝ (v · t₀) x (v x t₀) - gradient (p · t₀) x)) = |
| 122 | -(∫ x : ℝ³, inner ℝ (φ x) (fderiv ℝ (v · t₀) x (v x t₀))) := by |
| 123 | simp only [inner_sub_right, inner_neg_right] |
| 124 | have han : Integrable (fun x => -inner ℝ (φ x) |
| 125 | (fderiv ℝ (v · t₀) x (v x t₀))) := by |
| 126 | simpa only [neg_one_mul] using ha.const_mul (-1) |
| 127 | rw [integral_sub han hg, integral_neg, hc, sub_zero] |
| 128 | have hd := h.velocity_test_pairing_hasDerivAt φ hφ.continuous hφc t₀ ht₀ |
| 129 | rwa [heq] at hd |
| 130 | |
| 131 | end Euler.EulerExistenceAndSmoothnessR3 |
| 132 | |
| 133 | namespace Euler.ComparatorBridge |
| 134 | |
| 135 | open EulerLpTranslation EulerMeanSolenoidal |
| 136 | |
| 137 | /-- Replacing the Comparator velocity by any pointwise equal smooth `L²` |
| 138 | representatives preserves the tested time equation, including its clamped |
| 139 | interval parameterization. No time regularity of the representatives is assumed. -/ |
| 140 | theorem comparator_clamped_compact_pairing_hasDerivAt |
| 141 | {u₀ : Space → Space} {v : Space → ℝ → Space} {p : Space → ℝ → ℝ} |
| 142 | (h : EulerExistenceAndSmoothnessR3 u₀ v p) {T : ℝ} (hT : 0 < T) |
| 143 | (A : Icc (0 : ℝ) T → SmoothL2Field Space) |
| 144 | (hA : ∀ s, (A s).field = (v · s)) |
| 145 | (g : L2) (φ : Space → Space) |
| 146 | (hφ : ContDiff ℝ ∞ φ) (hφc : HasCompactSupport φ) |
| 147 | (hφdiv : ∀ x, EulerSmoothLimit.divergence φ x = 0) |
| 148 | (hg : (g : Space → Space) =ᵐ[volume] φ) |
| 149 | (t : ℝ) (ht : t ∈ Ioo 0 T) : |
| 150 | HasDerivAt (fun r => inner ℝ g (A (projIcc 0 T hT.le r)).toLp) |
| 151 | (-(∫ x, inner ℝ (φ x) (fderiv ℝ (v · t) x (v x t)))) t := by |
| 152 | have hd := h.velocity_solenoidal_test_pairing_hasDerivAt φ hφ hφc hφdiv t ht.1 |
| 153 | apply hd.congr_of_eventuallyEq |
| 154 | filter_upwards [Ioo_mem_nhds ht.1 ht.2] with r hr |
| 155 | rw [projIcc_of_mem hT.le ⟨hr.1.le, hr.2.le⟩, MeasureTheory.L2.inner_def] |
| 156 | apply integral_congr_ae |
| 157 | filter_upwards [hg, (A ⟨r, hr.1.le, hr.2.le⟩).toLp_ae] with x hgx hAx |
| 158 | rw [hgx, hAx, hA] |
| 159 | |
| 160 | end Euler.ComparatorBridge |