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.CompactEnergy |
| 2 | import NavierStokes.R3.ComparisonSetup |
| 3 | import NavierStokes.R3.LocalizedLaplacian |
| 4 | import NavierStokes.R3.LocalizedTransport |
| 5 | |
| 6 | /-! |
| 7 | # The compactly weighted difference-energy identity on R³ |
| 8 | |
| 9 | The cutoff alone has compact support. Both velocities and both pressures may |
| 10 | be arbitrary smooth fields on the time slab. Every integral below is an |
| 11 | ordinary Lebesgue volume integral on Euclidean three-space. |
| 12 | -/ |
| 13 | |
| 14 | |
| 15 | noncomputable section |
| 16 | |
| 17 | open Set Filter MeasureTheory |
| 18 | open scoped Topology BigOperators ContDiff InnerProductSpace |
| 19 | |
| 20 | namespace NavierStokesR3.LocalizedDifferenceEnergy |
| 21 | |
| 22 | open NavierStokes.ProblemStatement |
| 23 | open NavierStokes.PeriodicIntegration (spatialPartial) |
| 24 | open NavierStokes.PeriodicUniqueness |
| 25 | open Comparison (weightedEnergy weightedEnergyRate weightedDissipation gradientSq) |
| 26 | |
| 27 | private theorem nat_le_infty (n : ℕ) : (n : WithTop ℕ∞) ≤ ∞ := |
| 28 | (ENat.natCast_lt_of_coe_top_le_withTop le_rfl n).le |
| 29 | |
| 30 | private theorem infty_add_one_le : (∞ : WithTop ℕ∞) + 1 ≤ ∞ := by |
| 31 | simpa only [ENat.coe_top_add_one] using (le_rfl : (∞ : WithTop ℕ∞) ≤ ∞) |
| 32 | |
| 33 | /-- A continuous factor needs no decay when multiplied by the compact cutoff. -/ |
| 34 | theorem integrable_cutoff_mul {χ f : Space → ℝ} |
| 35 | (hχ : Continuous χ) (hcχ : HasCompactSupport χ) (hf : Continuous f) : |
| 36 | Integrable (fun x => χ x * f x) := |
| 37 | (hχ.mul hf).integrable_of_hasCompactSupport hcχ.mul_right |
| 38 | |
| 39 | theorem integrable_weighted_energy {χ : Space → ℝ} {w : VelocityField} {t : ℝ} |
| 40 | (hχ : Continuous χ) (hcχ : HasCompactSupport χ) |
| 41 | (hw : Continuous (fun x : Space => w (t, x))) : |
| 42 | Integrable (fun x : Space => χ x * ‖w (t, x)‖ ^ 2) := |
| 43 | integrable_cutoff_mul hχ hcχ (hw.norm.pow 2) |
| 44 | |
| 45 | theorem integrable_weighted_dissipation {χ : Space → ℝ} {w : VelocityField} {t : ℝ} |
| 46 | (hχ : Continuous χ) (hcχ : HasCompactSupport χ) |
| 47 | (hw : ContDiff ℝ ∞ (fun x : Space => w (t, x))) : |
| 48 | Integrable (fun x : Space => χ x * gradientSq (fun y => w (t, y)) x) := by |
| 49 | apply integrable_cutoff_mul hχ hcχ |
| 50 | exact continuous_finsetSum _ (fun i _ => (spatial_partial_contDiff hw i).continuous.norm.pow 2) |
| 51 | |
| 52 | theorem weightedEnergy_nonneg {χ : Space → ℝ} (hχ : ∀ x, 0 ≤ χ x) |
| 53 | (w : VelocityField) (t : ℝ) : 0 ≤ weightedEnergy χ w t := |
| 54 | integral_nonneg (fun x => mul_nonneg (hχ x) (sq_nonneg _)) |
| 55 | |
| 56 | theorem weightedDissipation_nonneg {χ : Space → ℝ} (hχ : ∀ x, 0 ≤ χ x) |
| 57 | (w : VelocityField) (t : ℝ) : 0 ≤ weightedDissipation χ w t := |
| 58 | integral_nonneg (fun x => mul_nonneg (hχ x) |
| 59 | (Finset.sum_nonneg (fun _ _ => sq_nonneg _))) |
| 60 | |
| 61 | /-- Energy is continuous on the closed slab, including its initial time. -/ |
| 62 | theorem weightedEnergy_continuousOn {a b : ℝ} {χ : Space → ℝ} {w : VelocityField} |
| 63 | (hχ : Continuous χ) (hcχ : HasCompactSupport χ) |
| 64 | (hw : ContDiffOn ℝ ∞ w (Comparison.slab a b)) : |
| 65 | ContinuousOn (weightedEnergy χ w) (Icc a b) := by |
| 66 | have hF : ContinuousOn (fun z : SpaceTime => χ z.2 * ‖w z‖ ^ 2) |
| 67 | (Icc a b ×ˢ univ) := |
| 68 | (hχ.comp continuous_snd).continuousOn.mul (hw.continuousOn.norm.pow 2) |
| 69 | apply CompactTimeIntegral.continuousOn_integral hcχ hF |
| 70 | intro t ht x hx |
| 71 | rw [image_eq_zero_of_notMem_tsupport hx, zero_mul] |
| 72 | |
| 73 | /-- Joint smoothness and the cutoff justify differentiation under the integral. -/ |
| 74 | theorem weightedEnergy_hasDerivAt {a b t : ℝ} {χ : Space → ℝ} {w : VelocityField} |
| 75 | (hχ : ContDiff ℝ ∞ χ) (hcχ : HasCompactSupport χ) |
| 76 | (hw : ContDiffOn ℝ ∞ w (Comparison.slab a b)) (ht : t ∈ Ioo a b) : |
| 77 | HasDerivAt (weightedEnergy χ w) (weightedEnergyRate χ w t) t := by |
| 78 | have hF : ContDiffOn ℝ 1 (fun z : SpaceTime => χ z.2 * ‖w z‖ ^ 2) |
| 79 | (Icc a b ×ˢ univ) := |
| 80 | (((hχ.comp contDiff_snd).contDiffOn).mul (hw.norm_sq ℝ)).of_le (nat_le_infty 1) |
| 81 | refine CompactTimeIntegral.hasDerivAt_integral_of_contDiffOn_of_hasDerivAt hcχ hF ?_ ht ?_ |
| 82 | · intro r hr x hx |
| 83 | rw [image_eq_zero_of_notMem_tsupport hx, zero_mul] |
| 84 | · intro x |
| 85 | exact (energy_density_derivative (time_differentiable_at_interior hw ht x)).const_mul (χ x) |
| 86 | |
| 87 | /-- The weighted energy integrand remains integrable after time differentiation. -/ |
| 88 | theorem integrable_weighted_energy_rate {a b t : ℝ} {χ : Space → ℝ} {w : VelocityField} |
| 89 | (hχ : Continuous χ) (hcχ : HasCompactSupport χ) |
| 90 | (hw : ContDiffOn ℝ ∞ w (Comparison.slab a b)) (ht : t ∈ Ioo a b) : |
| 91 | Integrable (fun x : Space => χ x * (2 * ⟪w (t, x), temporalDerivative w t x⟫_ℝ)) := by |
| 92 | have htime : ContinuousOn |
| 93 | (fun z : SpaceTime => deriv (fun r => w (r, z.2)) z.1) (Ioo a b ×ˢ univ) := |
| 94 | CompactTimeIntegral.continuousOn_timeDeriv_of_contDiffOn (hw.of_le (nat_le_infty 1)) |
| 95 | have htime' : Continuous (temporalDerivative w t) := by |
| 96 | simpa only [temporalDerivative, deriv] using! CompactTimeIntegral.continuous_slice htime ht |
| 97 | exact integrable_cutoff_mul hχ hcχ |
| 98 | (continuous_const.mul ((spatial_smooth hw (Ioo_subset_Icc_self ht)).continuous.inner htime')) |
| 99 | |
| 100 | /-- The localized balance follows from equality of the actual Navier--Stokes |
| 101 | residuals. No integrability or support condition is imposed on either velocity. -/ |
| 102 | theorem difference_energy_balance {χ : Space → ℝ} {u v : VelocityField} |
| 103 | {p q : PressureField} {t : ℝ} |
| 104 | (hχ : ContDiff ℝ ∞ χ) (hcχ : HasCompactSupport χ) |
| 105 | (hu : ContDiff ℝ ∞ (fun x : Space => u (t, x))) |
| 106 | (hv : ContDiff ℝ ∞ (fun x : Space => v (t, x))) |
| 107 | (hp : ContDiff ℝ ∞ (fun x : Space => p (t, x))) |
| 108 | (hq : ContDiff ℝ ∞ (fun x : Space => q (t, x))) |
| 109 | (htu : ∀ x : Space, DifferentiableAt ℝ (fun r => u (r, x)) t) |
| 110 | (htv : ∀ x : Space, DifferentiableAt ℝ (fun r => v (r, x)) t) |
| 111 | (hdivu : ∀ x : Space, spatialDivergence u t x = 0) |
| 112 | (hdivv : ∀ x : Space, spatialDivergence v t x = 0) |
| 113 | (hNS : ∀ x : Space, ProblemStatement.navierStokesResidual 1 u p t x = |
| 114 | ProblemStatement.navierStokesResidual 1 v q t x) : |
| 115 | (1 / 2 : ℝ) * weightedEnergyRate χ (u - v) t + weightedDissipation χ (u - v) t = |
| 116 | -(∫ x : Space, χ x * ⟪(u - v) (t, x), spatialDerivative u t x ((u - v) (t, x))⟫_ℝ) + |
| 117 | (1 / 2 : ℝ) * (∫ x : Space, ‖(u - v) (t, x)‖ ^ 2 * |
| 118 | ∑ i : Fin 3, spatialPartial i (spatialPartial i χ) x) + |
| 119 | (1 / 2 : ℝ) * (∫ x : Space, ‖(u - v) (t, x)‖ ^ 2 * |
| 120 | fderiv ℝ χ x (v (t, x))) + |
| 121 | ∫ x : Space, (p - q) (t, x) * fderiv ℝ χ x ((u - v) (t, x)) := by |
| 122 | have hw : ContDiff ℝ ∞ (fun x : Space => (u - v) (t, x)) := hu.sub hv |
| 123 | have hπ : ContDiff ℝ ∞ (fun x : Space => (p - q) (t, x)) := hp.sub hq |
| 124 | have hdivw : ∀ x : Space, spatialDivergence (u - v) t x = 0 := by |
| 125 | intro x |
| 126 | rw [spatialDivergence_sub hu hv, hdivu x, hdivv x, sub_self] |
| 127 | have hiL : Integrable (fun x : Space => |
| 128 | χ x * ⟪(u - v) (t, x), spatialLaplacian (u - v) t x⟫_ℝ) := |
| 129 | integrable_cutoff_mul hχ.continuous hcχ (hw.inner ℝ (spatialLaplacian_contDiff hw)).continuous |
| 130 | have hiC : Integrable (fun x : Space => |
| 131 | χ x * ⟪(u - v) (t, x), spatialDerivative u t x ((u - v) (t, x))⟫_ℝ) := |
| 132 | integrable_cutoff_mul hχ.continuous hcχ |
| 133 | (hw.inner ℝ ((hu.fderiv_right infty_add_one_le).clm_apply hw)).continuous |
| 134 | have hiT : Integrable (fun x : Space => |
| 135 | χ x * ⟪(u - v) (t, x), spatialDerivative (u - v) t x (v (t, x))⟫_ℝ) := |
| 136 | integrable_cutoff_mul hχ.continuous hcχ |
| 137 | (hw.inner ℝ ((hw.fderiv_right infty_add_one_le).clm_apply hv)).continuous |
| 138 | have hiP : Integrable (fun x : Space => |
| 139 | χ x * ⟪(u - v) (t, x), pressureGradient (p - q) t x⟫_ℝ) := |
| 140 | integrable_cutoff_mul hχ.continuous hcχ (hw.inner ℝ (pressureGradient_contDiff hπ)).continuous |
| 141 | have hiLC : Integrable (fun x : Space => |
| 142 | χ x * ⟪(u - v) (t, x), spatialLaplacian (u - v) t x⟫_ℝ - |
| 143 | χ x * ⟪(u - v) (t, x), spatialDerivative u t x ((u - v) (t, x))⟫_ℝ) := |
| 144 | hiL.sub hiC |
| 145 | have hiLCT : Integrable (fun x : Space => |
| 146 | χ x * ⟪(u - v) (t, x), spatialLaplacian (u - v) t x⟫_ℝ - |
| 147 | χ x * ⟪(u - v) (t, x), spatialDerivative u t x ((u - v) (t, x))⟫_ℝ - |
| 148 | χ x * ⟪(u - v) (t, x), spatialDerivative (u - v) t x (v (t, x))⟫_ℝ) := |
| 149 | hiLC.sub hiT |
| 150 | have hEq : (fun x : Space => χ x * |
| 151 | (2 * ⟪(u - v) (t, x), temporalDerivative (u - v) t x⟫_ℝ)) = |
| 152 | (fun x : Space => 2 * ( |
| 153 | χ x * ⟪(u - v) (t, x), spatialLaplacian (u - v) t x⟫_ℝ - |
| 154 | χ x * ⟪(u - v) (t, x), spatialDerivative u t x ((u - v) (t, x))⟫_ℝ - |
| 155 | χ x * ⟪(u - v) (t, x), spatialDerivative (u - v) t x (v (t, x))⟫_ℝ - |
| 156 | χ x * ⟪(u - v) (t, x), pressureGradient (p - q) t x⟫_ℝ)) := by |
| 157 | funext x |
| 158 | rw [difference_equation hu hv hp hq (htu x) (htv x) (by simpa using hNS x)] |
| 159 | simp only [inner_sub_right] |
| 160 | ring |
| 161 | have hRate : weightedEnergyRate χ (u - v) t = 2 * ( |
| 162 | (∫ x : Space, χ x * ⟪(u - v) (t, x), spatialLaplacian (u - v) t x⟫_ℝ) - |
| 163 | (∫ x : Space, χ x * ⟪(u - v) (t, x), spatialDerivative u t x ((u - v) (t, x))⟫_ℝ) - |
| 164 | (∫ x : Space, χ x * ⟪(u - v) (t, x), spatialDerivative (u - v) t x (v (t, x))⟫_ℝ) - |
| 165 | ∫ x : Space, χ x * ⟪(u - v) (t, x), pressureGradient (p - q) t x⟫_ℝ) := by |
| 166 | unfold weightedEnergyRate |
| 167 | rw [hEq, integral_const_mul, integral_sub hiLCT hiP, |
| 168 | integral_sub hiLC hiT, integral_sub hiL hiC] |
| 169 | have hL := integral_weighted_spatialLaplacian hχ hw hcχ |
| 170 | have hT := integral_weighted_transport hχ hw hv hcχ hdivv |
| 171 | have hP : (∫ x : Space, χ x * |
| 172 | ⟪(u - v) (t, x), pressureGradient (p - q) t x⟫_ℝ) = |
| 173 | -(∫ x : Space, (p - q) (t, x) * fderiv ℝ χ x ((u - v) (t, x))) := by |
| 174 | simp_rw [inner_pressureGradient] |
| 175 | exact integral_weighted_pressure hχ hπ hw hcχ hdivw |
| 176 | change (∫ x : Space, χ x * |
| 177 | ⟪(u - v) (t, x), spatialLaplacian (u - v) t x⟫_ℝ) = |
| 178 | -weightedDissipation χ (u - v) t + |
| 179 | (1 / 2 : ℝ) * (∫ x : Space, ‖(u - v) (t, x)‖ ^ 2 * |
| 180 | ∑ i : Fin 3, spatialPartial i (spatialPartial i χ) x) at hL |
| 181 | change (∫ x : Space, χ x * |
| 182 | ⟪(u - v) (t, x), spatialDerivative (u - v) t x (v (t, x))⟫_ℝ) = |
| 183 | -(1 / 2 : ℝ) * (∫ x : Space, ‖(u - v) (t, x)‖ ^ 2 * |
| 184 | fderiv ℝ χ x (v (t, x))) at hT |
| 185 | rw [hL, hT, hP] at hRate |
| 186 | rw [hRate] |
| 187 | ring |
| 188 | |
| 189 | /-- The balance with its time derivative justified on the interior of a closed |
| 190 | slab. The only support hypothesis is on the scalar cutoff. -/ |
| 191 | theorem hasDerivAt_difference_energy_balance {a b t : ℝ} {χ : Space → ℝ} |
| 192 | {u v : VelocityField} {p q : PressureField} |
| 193 | (hχ : ContDiff ℝ ∞ χ) (hcχ : HasCompactSupport χ) |
| 194 | (hu : ContDiffOn ℝ ∞ u (Comparison.slab a b)) |
| 195 | (hv : ContDiffOn ℝ ∞ v (Comparison.slab a b)) |
| 196 | (hp : ContDiffOn ℝ ∞ p (Comparison.slab a b)) |
| 197 | (hq : ContDiffOn ℝ ∞ q (Comparison.slab a b)) (ht : t ∈ Ioo a b) |
| 198 | (hdivu : ∀ x : Space, spatialDivergence u t x = 0) |
| 199 | (hdivv : ∀ x : Space, spatialDivergence v t x = 0) |
| 200 | (hNS : ∀ x : Space, ProblemStatement.navierStokesResidual 1 u p t x = |
| 201 | ProblemStatement.navierStokesResidual 1 v q t x) : |
| 202 | HasDerivAt (weightedEnergy χ (u - v)) |
| 203 | (-2 * weightedDissipation χ (u - v) t - |
| 204 | 2 * (∫ x : Space, χ x * |
| 205 | ⟪(u - v) (t, x), spatialDerivative u t x ((u - v) (t, x))⟫_ℝ) + |
| 206 | (∫ x : Space, ‖(u - v) (t, x)‖ ^ 2 * |
| 207 | ∑ i : Fin 3, spatialPartial i (spatialPartial i χ) x) + |
| 208 | (∫ x : Space, ‖(u - v) (t, x)‖ ^ 2 * fderiv ℝ χ x (v (t, x))) + |
| 209 | 2 * ∫ x : Space, (p - q) (t, x) * fderiv ℝ χ x ((u - v) (t, x))) t := by |
| 210 | have hd : HasDerivAt (weightedEnergy χ (u - v)) |
| 211 | (weightedEnergyRate χ (u - v) t) t := |
| 212 | weightedEnergy_hasDerivAt hχ hcχ (hu.sub hv) ht |
| 213 | have hb := difference_energy_balance hχ hcχ |
| 214 | (spatial_smooth hu (Ioo_subset_Icc_self ht)) (spatial_smooth hv (Ioo_subset_Icc_self ht)) |
| 215 | (spatial_smooth hp (Ioo_subset_Icc_self ht)) (spatial_smooth hq (Ioo_subset_Icc_self ht)) |
| 216 | (time_differentiable_at_interior hu ht) (time_differentiable_at_interior hv ht) |
| 217 | hdivu hdivv hNS |
| 218 | convert! hd using 1 |
| 219 | linarith |
| 220 | |
| 221 | end NavierStokesR3.LocalizedDifferenceEnergy |