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.H3Comparison |
| 2 | import NavierStokes.R3.SchwartzCompactApproximation |
| 3 | import Mathlib.Analysis.Distribution.TemperedDistribution |
| 4 | import Mathlib.Analysis.Calculus.LineDeriv.IntegrationByParts |
| 5 | import Mathlib.Analysis.Calculus.FDeriv.Symmetric |
| 6 | |
| 7 | /-! Weak derivatives of L² fields and the curl of an arbitrary C¹ pressure |
| 8 | gradient. The pressure itself need not be integrable at infinity. -/ |
| 9 | |
| 10 | noncomputable section |
| 11 | |
| 12 | open Set Filter MeasureTheory LineDeriv |
| 13 | open scoped ContDiff Topology BigOperators SchwartzMap LineDeriv |
| 14 | |
| 15 | namespace NavierStokesR3.H3PressureDistribution |
| 16 | |
| 17 | open NavierStokes.ProblemStatement |
| 18 | open NavierStokes.PeriodicIntegration (spatialPartial) |
| 19 | open NavierStokes.PeriodicUniqueness (spatial_partial_contDiff) |
| 20 | open H3Comparison |
| 21 | |
| 22 | abbrev ComplexTest := SchwartzMap Space ℂ |
| 23 | abbrev ComplexL2 := Lp ℂ 2 (volume : Measure Space) |
| 24 | abbrev ComplexDistribution := TemperedDistribution Space ℂ |
| 25 | |
| 26 | def distribution (f : ComplexL2) : ComplexDistribution := Lp.toTemperedDistribution f |
| 27 | |
| 28 | theorem partial_continuous {f : Space → ℂ} (hf : ContDiff ℝ 1 f) (i : Fin 3) : |
| 29 | Continuous (spatialPartial i f) := |
| 30 | (hf.continuous_fderiv (by norm_num)).clm_apply continuous_const |
| 31 | |
| 32 | /-- Compact support is required only of the first factor. -/ |
| 33 | theorem compact_integration_by_parts {f g : Space → ℂ} |
| 34 | (hf : ContDiff ℝ 1 f) (hg : ContDiff ℝ 1 g) |
| 35 | (hcf : HasCompactSupport f) (i : Fin 3) : |
| 36 | (∫ x, f x * spatialPartial i g x) = -(∫ x, spatialPartial i f x * g x) := by |
| 37 | apply integral_mul_fderiv_eq_neg_fderiv_mul_of_integrable |
| 38 | · exact ((partial_continuous hf i).mul hg.continuous).integrable_of_hasCompactSupport |
| 39 | (hcf.fderiv_apply ℝ (coordinateVector i)).mul_right |
| 40 | · exact (hf.continuous.mul (partial_continuous hg i)).integrable_of_hasCompactSupport |
| 41 | hcf.mul_right |
| 42 | · exact (hf.continuous.mul hg.continuous).integrable_of_hasCompactSupport hcf.mul_right |
| 43 | · intro x _; exact hf.differentiable (by norm_num) x |
| 44 | · intro x _; exact hg.differentiable (by norm_num) x |
| 45 | |
| 46 | theorem partial_partial_eq {f : Space → ℂ} (hf : ContDiff ℝ ∞ f) |
| 47 | (i j : Fin 3) (x : Space) : |
| 48 | spatialPartial i (spatialPartial j f) x = |
| 49 | fderiv ℝ (fderiv ℝ f) x (coordinateVector i) (coordinateVector j) := by |
| 50 | have hdf := (hf.fderiv_right (m := 1) (by simp)).differentiable (by norm_num) x |
| 51 | change fderiv ℝ (fun y => fderiv ℝ f y (coordinateVector j)) x (coordinateVector i) = _ |
| 52 | rw [fderiv_clm_apply hdf (differentiableAt_const (coordinateVector j))] |
| 53 | simp |
| 54 | |
| 55 | theorem partial_commute {f : Space → ℂ} (hf : ContDiff ℝ ∞ f) |
| 56 | (i j : Fin 3) : spatialPartial i (spatialPartial j f) = spatialPartial j (spatialPartial i f) := by |
| 57 | funext x |
| 58 | rw [partial_partial_eq hf, partial_partial_eq hf] |
| 59 | exact (hf.contDiffAt.isSymmSndFDerivAt (by simp)).eq _ _ |
| 60 | |
| 61 | /-- Integration by parts twice puts all second derivatives on the compact |
| 62 | test. Thus only one pressure derivative is used. -/ |
| 63 | theorem gradient_compact_test_commute {p ψ : Space → ℂ} |
| 64 | (hp : ContDiff ℝ 1 p) (hψ : ContDiff ℝ ∞ ψ) (hcψ : HasCompactSupport ψ) |
| 65 | (i j : Fin 3) : |
| 66 | (∫ x, spatialPartial i ψ x * spatialPartial j p x) = |
| 67 | ∫ x, spatialPartial j ψ x * spatialPartial i p x := by |
| 68 | calc |
| 69 | _ = -(∫ x, spatialPartial j (spatialPartial i ψ) x * p x) := |
| 70 | compact_integration_by_parts ((spatial_partial_contDiff hψ i).of_le (by simp)) hp |
| 71 | (hcψ.fderiv_apply ℝ (coordinateVector i)) j |
| 72 | _ = -(∫ x, spatialPartial i (spatialPartial j ψ) x * p x) := by |
| 73 | rw [partial_commute hψ j i] |
| 74 | _ = _ := (compact_integration_by_parts ((spatial_partial_contDiff hψ j).of_le (by simp)) hp |
| 75 | (hcψ.fderiv_apply ℝ (coordinateVector j)) i).symm |
| 76 | |
| 77 | /-- Formula for a distributional derivative, using any L² representative. -/ |
| 78 | theorem derivative_toLp_apply {f : Space → ℂ} (hf : MemLp f 2 volume) |
| 79 | (i : Fin 3) (ψ : ComplexTest) : |
| 80 | (∂_{coordinateVector i} (distribution (hf.toLp f))) ψ = |
| 81 | -(∫ x, spatialPartial i (ψ : Space → ℂ) x * f x) := by |
| 82 | rw [TemperedDistribution.lineDerivOp_apply_apply, distribution, Lp.toTemperedDistribution_apply] |
| 83 | calc |
| 84 | (∫ x : Space, (-∂_{coordinateVector i} ψ) x • (hf.toLp f) x) = |
| 85 | ∫ x : Space, -(spatialPartial i (ψ : Space → ℂ) x * f x) := by |
| 86 | apply integral_congr_ae |
| 87 | filter_upwards [hf.coeFn_toLp] with x hx |
| 88 | rw [hx] |
| 89 | simp only [neg_apply, SchwartzMap.lineDerivOp_apply_eq_fderiv, |
| 90 | smul_eq_mul, neg_mul, spatialPartial] |
| 91 | _ = _ := integral_neg _ |
| 92 | |
| 93 | /-- For a smooth compact function, the weak derivative is the ordinary one. -/ |
| 94 | theorem derivative_toLp_of_compact {f : Space → ℂ} (hf : ContDiff ℝ ∞ f) |
| 95 | (hcf : HasCompactSupport f) (i : Fin 3) : |
| 96 | ∂_{coordinateVector i} (distribution ((smooth_compact_memLp hf hcf).toLp f)) = |
| 97 | distribution ((smooth_compact_memLp (spatial_partial_contDiff hf i) |
| 98 | (hcf.fderiv_apply ℝ (coordinateVector i))).toLp (spatialPartial i f)) := by |
| 99 | ext ψ |
| 100 | rw [derivative_toLp_apply, distribution, Lp.toTemperedDistribution_apply] |
| 101 | have he := compact_integration_by_parts (hf.of_le (by simp)) |
| 102 | ((ψ.smooth ⊤).of_le (by simp)) hcf i |
| 103 | have hswap : (∫ x, spatialPartial i (ψ : Space → ℂ) x * f x) = |
| 104 | -(∫ x, (ψ : Space → ℂ) x * spatialPartial i f x) := by |
| 105 | simpa only [mul_comm] using he |
| 106 | rw [hswap, neg_neg] |
| 107 | apply integral_congr_ae |
| 108 | filter_upwards [(smooth_compact_memLp (spatial_partial_contDiff hf i) |
| 109 | (hcf.fderiv_apply ℝ (coordinateVector i))).coeFn_toLp] with x hx |
| 110 | exact congrArg (fun z : ℂ => ψ x * z) hx.symm |
| 111 | |
| 112 | /-- Passing the actual smooth approximation through continuous distributional |
| 113 | differentiation identifies the ordinary weak derivative. -/ |
| 114 | theorem H1Approximation.derivative_distribution {f : Space → ℂ} |
| 115 | {df : Fin 3 → Space → ℂ} (h : H1Approximation f df) (i : Fin 3) : |
| 116 | ∂_{coordinateVector i} (distribution (h.memLp.toLp f)) = |
| 117 | distribution ((h.derivative_memLp i).toLp (df i)) := by |
| 118 | let T : ComplexL2 →L[ℂ] ComplexDistribution := Lp.toTemperedDistributionCLM ℂ volume 2 |
| 119 | have hl := ((lineDerivOpCLM ℂ ComplexDistribution (coordinateVector i)).continuous.comp |
| 120 | T.continuous).tendsto _ |>.comp h.tendsto |
| 121 | have hr := T.continuous.tendsto _ |>.comp (h.derivative_tendsto i) |
| 122 | have he (n : ℕ) : |
| 123 | ∂_{coordinateVector i} (T ((h.approx_memLp n).toLp (h.approx n))) = |
| 124 | T ((h.derivative_approx_memLp n i).toLp (spatialPartial i (h.approx n))) := |
| 125 | derivative_toLp_of_compact (h.smooth n) (h.compact n) i |
| 126 | exact tendsto_nhds_unique (hl.congr (fun n => he n)) hr |
| 127 | |
| 128 | /-- A C¹ pressure with square-integrable gradient has zero distributional |
| 129 | curl. No global bound, normalization, or integrability of the pressure is |
| 130 | assumed. -/ |
| 131 | theorem gradient_curl_free {p : Space → ℂ} (hp : ContDiff ℝ 1 p) |
| 132 | (hg : ∀ i, MemLp (spatialPartial i p) 2 volume) (i j : Fin 3) : |
| 133 | ∂_{coordinateVector i} (distribution ((hg j).toLp (spatialPartial j p))) = |
| 134 | ∂_{coordinateVector j} (distribution ((hg i).toLp (spatialPartial i p))) := by |
| 135 | apply sub_eq_zero.mp |
| 136 | ext ψ |
| 137 | apply SchwartzCompactApproximation.continuous_zero_of_compactSupport |
| 138 | (F := fun φ => |
| 139 | ((∂_{coordinateVector i} (distribution ((hg j).toLp (spatialPartial j p)))) - |
| 140 | (∂_{coordinateVector j} (distribution ((hg i).toLp (spatialPartial i p))))) φ) |
| 141 | · exact ContinuousLinearMap.continuous _ |
| 142 | · intro φ hcφ |
| 143 | change (∂_{coordinateVector i} (distribution ((hg j).toLp (spatialPartial j p)))) φ - |
| 144 | (∂_{coordinateVector j} (distribution ((hg i).toLp (spatialPartial i p)))) φ = 0 |
| 145 | rw [derivative_toLp_apply, derivative_toLp_apply, |
| 146 | gradient_compact_test_commute hp (φ.smooth ⊤) hcφ i j, sub_self] |
| 147 | |
| 148 | end NavierStokesR3.H3PressureDistribution |