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.R3.ConservativeDifference |
| 2 | import Mathlib.MeasureTheory.Integral.IntervalIntegral.FundThmCalculus |
| 3 | |
| 4 | /-! |
| 5 | # Compact time tests of the conservative pressure identity |
| 6 | |
| 7 | The temporal test has topological support inside the open time interval. The |
| 8 | spatial test is smooth and compactly supported. Consequently all pairings are |
| 9 | ordinary Lebesgue integrals even when the pressure grows at spatial infinity. |
| 10 | -/ |
| 11 | |
| 12 | |
| 13 | noncomputable section |
| 14 | |
| 15 | open Set Filter MeasureTheory |
| 16 | open scoped Topology BigOperators ContDiff |
| 17 | |
| 18 | namespace NavierStokesR3.PressureTemporalIdentity |
| 19 | |
| 20 | open NavierStokes.ProblemStatement |
| 21 | open NavierStokes.PeriodicIntegration (spatialPartial) |
| 22 | open NavierStokes.PeriodicUniqueness |
| 23 | open ConservativeDifference |
| 24 | open Comparison (tensorDiff) |
| 25 | |
| 26 | private theorem nat_le_infty (n : ℕ) : (n : WithTop ℕ∞) ≤ ∞ := |
| 27 | (ENat.natCast_lt_of_coe_top_le_withTop le_rfl n).le |
| 28 | |
| 29 | private theorem infty_add_one_le : (∞ : WithTop ℕ∞) + 1 ≤ ∞ := by |
| 30 | simpa only [ENat.coe_top_add_one] using (le_rfl : (∞ : WithTop ℕ∞) ≤ ∞) |
| 31 | |
| 32 | /-- A time cutoff supported in an open set turns a continuous function on |
| 33 | that set into a globally continuous product, regardless of its values outside. -/ |
| 34 | theorem continuous_cutoff_mul {a F : ℝ → ℝ} {s : Set ℝ} |
| 35 | (ha : Continuous a) (hF : ContinuousOn F s) (hs : IsOpen s) |
| 36 | (hsupp : tsupport a ⊆ s) : Continuous (fun t => a t * F t) := by |
| 37 | rw [continuous_iff_continuousAt] |
| 38 | intro t |
| 39 | by_cases ht : t ∈ tsupport a |
| 40 | · exact ha.continuousAt.mul ((hF t (hsupp ht)).continuousAt (hs.mem_nhds (hsupp ht))) |
| 41 | · apply (continuousAt_const : ContinuousAt (fun _ : ℝ => (0 : ℝ)) t).congr_of_eventuallyEq |
| 42 | filter_upwards [(isClosed_tsupport a).isOpen_compl.mem_nhds ht] with r hr |
| 43 | rw [image_eq_zero_of_notMem_tsupport hr, zero_mul] |
| 44 | |
| 45 | theorem component_test_continuousOn {T : ℝ} {w : VelocityField} {ψ : Space → ℝ} |
| 46 | (hw : ContinuousOn w (Comparison.slab 0 T)) |
| 47 | (hψ : Continuous ψ) (hcψ : HasCompactSupport ψ) (k : Fin 3) : |
| 48 | ContinuousOn (fun t => ∫ x, w (t, x) k * ψ x) (Icc 0 T) := by |
| 49 | have hF : ContinuousOn (fun z : SpaceTime => w z k * ψ z.2) (Icc 0 T ×ˢ univ) := |
| 50 | ((EuclideanSpace.proj k : Space →L[ℝ] ℝ).continuous.comp_continuousOn hw).mul |
| 51 | (hψ.comp continuous_snd).continuousOn |
| 52 | apply CompactTimeIntegral.continuousOn_integral hcψ hF |
| 53 | intro t ht x hx |
| 54 | rw [image_eq_zero_of_notMem_tsupport hx, mul_zero] |
| 55 | |
| 56 | theorem component_time_test_continuousOn {T : ℝ} {w : VelocityField} {ψ : Space → ℝ} |
| 57 | (hw : ContDiffOn ℝ ∞ w (Comparison.slab 0 T)) |
| 58 | (hψ : Continuous ψ) (hcψ : HasCompactSupport ψ) (k : Fin 3) : |
| 59 | ContinuousOn (fun t => ∫ x, temporalDerivative w t x k * ψ x) (Ioo 0 T) := by |
| 60 | have htime : ContinuousOn (fun z : SpaceTime => temporalDerivative w z.1 z.2) |
| 61 | (Ioo 0 T ×ˢ univ) := by |
| 62 | simpa only [temporalDerivative, deriv] using |
| 63 | CompactTimeIntegral.continuousOn_timeDeriv_of_contDiffOn (hw.of_le (nat_le_infty 1)) |
| 64 | have hF : ContinuousOn (fun z : SpaceTime => temporalDerivative w z.1 z.2 k * ψ z.2) |
| 65 | (Ioo 0 T ×ˢ univ) := |
| 66 | ((EuclideanSpace.proj k : Space →L[ℝ] ℝ).continuous.comp_continuousOn htime).mul |
| 67 | (hψ.comp continuous_snd).continuousOn |
| 68 | apply CompactTimeIntegral.continuousOn_integral hcψ hF |
| 69 | intro t ht x hx |
| 70 | rw [image_eq_zero_of_notMem_tsupport hx, mul_zero] |
| 71 | |
| 72 | theorem tensor_test_continuousOn {T : ℝ} {u v : VelocityField} {ψ : Space → ℝ} |
| 73 | (hu : ContinuousOn u (Comparison.slab 0 T)) |
| 74 | (hv : ContinuousOn v (Comparison.slab 0 T)) |
| 75 | (hψ : Continuous ψ) (hcψ : HasCompactSupport ψ) (i j : Fin 3) : |
| 76 | ContinuousOn (fun t => ∫ x, tensorDiff u v t i j x * ψ x) (Icc 0 T) := by |
| 77 | have hucomp (k : Fin 3) : ContinuousOn (fun z : SpaceTime => u z k) (Comparison.slab 0 T) := |
| 78 | (EuclideanSpace.proj k : Space →L[ℝ] ℝ).continuous.comp_continuousOn hu |
| 79 | have hvcomp (k : Fin 3) : ContinuousOn (fun z : SpaceTime => v z k) (Comparison.slab 0 T) := |
| 80 | (EuclideanSpace.proj k : Space →L[ℝ] ℝ).continuous.comp_continuousOn hv |
| 81 | have hF : ContinuousOn (fun z : SpaceTime => tensorDiff u v z.1 i j z.2 * ψ z.2) |
| 82 | (Icc 0 T ×ˢ univ) := |
| 83 | (((hucomp i).mul (hucomp j)).sub ((hvcomp i).mul (hvcomp j))).mul |
| 84 | (hψ.comp continuous_snd).continuousOn |
| 85 | apply CompactTimeIntegral.continuousOn_integral hcψ hF |
| 86 | intro t ht x hx |
| 87 | rw [image_eq_zero_of_notMem_tsupport hx, mul_zero] |
| 88 | |
| 89 | /-- Integration by parts with a temporal test supported away from both |
| 90 | endpoints. Only the cutoff-weighted derivative needs to be integrable. -/ |
| 91 | theorem compact_time_integration_by_parts {T : ℝ} {a F D : ℝ → ℝ} |
| 92 | (hT : 0 < T) (ha : ContDiff ℝ ∞ a) (hsupp : tsupport a ⊆ Ioo 0 T) |
| 93 | (hF : ContinuousOn F (Icc 0 T)) (hD : ContinuousOn D (Ioo 0 T)) |
| 94 | (hderiv : ∀ t ∈ Ioo 0 T, HasDerivAt F (D t) t) : |
| 95 | (∫ t in (0 : ℝ)..T, a t * D t) = -(∫ t in (0 : ℝ)..T, deriv a t * F t) := by |
| 96 | have hda : Continuous (deriv a) := by |
| 97 | change Continuous (fun t => fderiv ℝ a t 1) |
| 98 | exact ((ha.fderiv_right infty_add_one_le).clm_apply contDiff_const).continuous |
| 99 | have hi₁ : IntervalIntegrable (fun t => deriv a t * F t) volume 0 T := |
| 100 | ContinuousOn.intervalIntegrable_of_Icc hT.le (hda.continuousOn.mul hF) |
| 101 | have hi₂ : IntervalIntegrable (fun t => a t * D t) volume 0 T := |
| 102 | (continuous_cutoff_mul ha.continuous hD isOpen_Ioo hsupp).intervalIntegrable _ _ |
| 103 | have hisum : IntervalIntegrable (fun t => deriv a t * F t + a t * D t) volume 0 T := |
| 104 | hi₁.add hi₂ |
| 105 | have hprod : ∀ t ∈ Ioo 0 T, |
| 106 | HasDerivAt (fun r => a r * F r) (deriv a t * F t + a t * D t) t := by |
| 107 | intro t ht |
| 108 | exact ((ha.differentiable (by simp) t).hasDerivAt).mul (hderiv t ht) |
| 109 | have hFTC := intervalIntegral.integral_eq_sub_of_hasDerivAt_of_le hT.le |
| 110 | (ha.continuous.continuousOn.mul hF) hprod hisum |
| 111 | have ha0 : a 0 = 0 := image_eq_zero_of_notMem_tsupport (by |
| 112 | intro h |
| 113 | exact (lt_irrefl 0) (hsupp h).1) |
| 114 | have haT : a T = 0 := image_eq_zero_of_notMem_tsupport (by |
| 115 | intro h |
| 116 | exact (lt_irrefl T) (hsupp h).2) |
| 117 | rw [intervalIntegral.integral_add hi₁ hi₂, Pi.mul_apply, Pi.mul_apply, ha0, haT, zero_mul, zero_mul, sub_self] at hFTC |
| 118 | linarith |
| 119 | |
| 120 | /-- The compact pressure-gradient identity integrated against a time test. |
| 121 | Both derivatives of the velocity have transferred to the two test functions. -/ |
| 122 | theorem pressure_time_identity_interval {T : ℝ} {u v : VelocityField} |
| 123 | {p q : PressureField} {a : ℝ → ℝ} {ψ : Space → ℝ} |
| 124 | (hT : 0 < T) |
| 125 | (hu : ContDiffOn ℝ ∞ u (Comparison.slab 0 T)) |
| 126 | (hv : ContDiffOn ℝ ∞ v (Comparison.slab 0 T)) |
| 127 | (hp : ContDiffOn ℝ ∞ p (Comparison.slab 0 T)) |
| 128 | (hq : ContDiffOn ℝ ∞ q (Comparison.slab 0 T)) |
| 129 | (hdivu : ∀ t ∈ Ioo 0 T, ∀ x, spatialDivergence u t x = 0) |
| 130 | (hdivv : ∀ t ∈ Ioo 0 T, ∀ x, spatialDivergence v t x = 0) |
| 131 | (hNS : ∀ t ∈ Ioo 0 T, ∀ x, |
| 132 | navierStokesResidual u p t x = navierStokesResidual v q t x) |
| 133 | (ha : ContDiff ℝ ∞ a) (hsupp : tsupport a ⊆ Ioo 0 T) |
| 134 | (hψ : ContDiff ℝ ∞ ψ) (hcψ : HasCompactSupport ψ) (k : Fin 3) : |
| 135 | (∫ t in (0 : ℝ)..T, a t * |
| 136 | (∫ x, spatialPartial k (fun y => (p - q) (t, y)) x * ψ x)) = |
| 137 | (∫ t in (0 : ℝ)..T, a t * (∫ x, (u - v) (t, x) k * scalarLaplacian ψ x)) + |
| 138 | (∫ t in (0 : ℝ)..T, deriv a t * (∫ x, (u - v) (t, x) k * ψ x)) + |
| 139 | (∫ t in (0 : ℝ)..T, a t * |
| 140 | (∑ i : Fin 3, ∫ x, tensorDiff u v t k i x * spatialPartial i ψ x)) := by |
| 141 | let W : ℝ → ℝ := fun t => ∫ x, (u - v) (t, x) k * ψ x |
| 142 | let D : ℝ → ℝ := fun t => ∫ x, temporalDerivative (u - v) t x k * ψ x |
| 143 | let L : ℝ → ℝ := fun t => ∫ x, (u - v) (t, x) k * scalarLaplacian ψ x |
| 144 | let G : ℝ → ℝ := fun t => ∑ i : Fin 3, |
| 145 | ∫ x, tensorDiff u v t k i x * spatialPartial i ψ x |
| 146 | let P : ℝ → ℝ := fun t => ∫ x, spatialPartial k (fun y => (p - q) (t, y)) x * ψ x |
| 147 | have hW : ContinuousOn W (Icc 0 T) := |
| 148 | component_test_continuousOn (hu.sub hv).continuousOn hψ.continuous hcψ k |
| 149 | have hD : ContinuousOn D (Ioo 0 T) := |
| 150 | component_time_test_continuousOn (hu.sub hv) hψ.continuous hcψ k |
| 151 | have hL : ContinuousOn L (Icc 0 T) := |
| 152 | component_test_continuousOn (hu.sub hv).continuousOn |
| 153 | (scalarLaplacian_contDiff hψ).continuous (compact_scalarLaplacian hcψ) k |
| 154 | have hG : ContinuousOn G (Icc 0 T) := |
| 155 | continuousOn_finsetSum _ (fun i _ => tensor_test_continuousOn hu.continuousOn hv.continuousOn |
| 156 | (spatial_partial_contDiff hψ i).continuous (CompactEnergy.compact_partial hcψ i) k i) |
| 157 | have hparts : (∫ t in (0 : ℝ)..T, a t * D t) = |
| 158 | -(∫ t in (0 : ℝ)..T, deriv a t * W t) := |
| 159 | compact_time_integration_by_parts hT ha hsupp hW hD |
| 160 | (fun t ht => component_test_hasDerivAt (hu.sub hv) ht hψ hcψ k) |
| 161 | have hiL : IntervalIntegrable (fun t => a t * L t) volume 0 T := |
| 162 | ContinuousOn.intervalIntegrable_of_Icc hT.le (ha.continuous.continuousOn.mul hL) |
| 163 | have hiD : IntervalIntegrable (fun t => a t * D t) volume 0 T := |
| 164 | (continuous_cutoff_mul ha.continuous hD isOpen_Ioo hsupp).intervalIntegrable _ _ |
| 165 | have hiG : IntervalIntegrable (fun t => a t * G t) volume 0 T := |
| 166 | ContinuousOn.intervalIntegrable_of_Icc hT.le (ha.continuous.continuousOn.mul hG) |
| 167 | have hiLD : IntervalIntegrable (fun t => a t * L t - a t * D t) volume 0 T := hiL.sub hiD |
| 168 | have hpoint : (fun t => a t * P t) = (fun t => a t * L t - a t * D t + a t * G t) := by |
| 169 | funext t |
| 170 | by_cases ht : t ∈ Ioo 0 T |
| 171 | · have h := weak_pressure_gradient_on_slab hu hv hp hq ht (hdivu t ht) (hdivv t ht) |
| 172 | (hNS t ht) hψ hcψ k |
| 173 | change P t = L t - D t + G t at h |
| 174 | rw [h] |
| 175 | ring |
| 176 | · have hat : a t = 0 := image_eq_zero_of_notMem_tsupport (fun h => ht (hsupp h)) |
| 177 | simp only [hat, zero_mul, sub_zero, add_zero] |
| 178 | change (∫ t in (0 : ℝ)..T, a t * P t) = |
| 179 | (∫ t in (0 : ℝ)..T, a t * L t) + (∫ t in (0 : ℝ)..T, deriv a t * W t) + |
| 180 | (∫ t in (0 : ℝ)..T, a t * G t) |
| 181 | rw [hpoint, intervalIntegral.integral_add hiLD hiG, intervalIntegral.integral_sub hiL hiD, |
| 182 | hparts] |
| 183 | ring |
| 184 | |
| 185 | /-- The same identity as an ordinary set integral over the closed time |
| 186 | interval, convenient for subsequent Fubini and norm estimates. -/ |
| 187 | theorem pressure_time_identity {T : ℝ} {u v : VelocityField} |
| 188 | {p q : PressureField} {a : ℝ → ℝ} {ψ : Space → ℝ} |
| 189 | (hT : 0 < T) |
| 190 | (hu : ContDiffOn ℝ ∞ u (Comparison.slab 0 T)) |
| 191 | (hv : ContDiffOn ℝ ∞ v (Comparison.slab 0 T)) |
| 192 | (hp : ContDiffOn ℝ ∞ p (Comparison.slab 0 T)) |
| 193 | (hq : ContDiffOn ℝ ∞ q (Comparison.slab 0 T)) |
| 194 | (hdivu : ∀ t ∈ Ioo 0 T, ∀ x, spatialDivergence u t x = 0) |
| 195 | (hdivv : ∀ t ∈ Ioo 0 T, ∀ x, spatialDivergence v t x = 0) |
| 196 | (hNS : ∀ t ∈ Ioo 0 T, ∀ x, |
| 197 | navierStokesResidual u p t x = navierStokesResidual v q t x) |
| 198 | (ha : ContDiff ℝ ∞ a) (hsupp : tsupport a ⊆ Ioo 0 T) |
| 199 | (hψ : ContDiff ℝ ∞ ψ) (hcψ : HasCompactSupport ψ) (k : Fin 3) : |
| 200 | (∫ t in Icc (0 : ℝ) T, a t * |
| 201 | (∫ x, spatialPartial k (fun y => (p - q) (t, y)) x * ψ x)) = |
| 202 | (∫ t in Icc (0 : ℝ) T, a t * (∫ x, (u - v) (t, x) k * scalarLaplacian ψ x)) + |
| 203 | (∫ t in Icc (0 : ℝ) T, deriv a t * (∫ x, (u - v) (t, x) k * ψ x)) + |
| 204 | (∫ t in Icc (0 : ℝ) T, a t * |
| 205 | (∑ i : Fin 3, ∫ x, tensorDiff u v t k i x * spatialPartial i ψ x)) := by |
| 206 | have h := pressure_time_identity_interval hT hu hv hp hq hdivu hdivv hNS ha hsupp hψ hcψ k |
| 207 | simpa only [intervalIntegral.integral_of_le hT.le, ← integral_Icc_eq_integral_Ioc] using h |
| 208 | |
| 209 | end NavierStokesR3.PressureTemporalIdentity |