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.MeanVectorIdentities |
| 2 | |
| 3 | /-! Classical integration by parts and its extension to the actual homogeneous gradient space. -/ |
| 4 | |
| 5 | noncomputable section |
| 6 | |
| 7 | namespace EulerMeanCurlIntegration |
| 8 | |
| 9 | open MeasureTheory InnerProductSpace Laplacian EulerSmoothLimit EulerVectorCalculus |
| 10 | EulerMeanSolenoidal EulerMeanCutoffCurl EulerMeanGradientTest EulerMeanVectorIdentities |
| 11 | EulerMeanCurlTensor |
| 12 | open scoped ContDiff |
| 13 | |
| 14 | def partialTest (f : Test) (i : Fin 3) : Test := |
| 15 | ⟨vectorPartial (f : Space → Space) i, vectorPartial_smooth f f.smooth i, |
| 16 | vectorPartial_compact f f.compact i⟩ |
| 17 | |
| 18 | theorem test_memLp (f : Test) : MemLp (f : Space → Space) 2 volume := |
| 19 | f.smooth.continuous.memLp_of_hasCompactSupport f.compact |
| 20 | |
| 21 | def testValue (f : Test) : L2 := (test_memLp f).toLp (f : Space → Space) |
| 22 | |
| 23 | theorem testValue_ae (f : Test) : testValue f =ᵐ[volume] (f : Space → Space) := |
| 24 | (test_memLp f).coeFn_toLp |
| 25 | |
| 26 | theorem test_inner_integrable (f g : Test) : |
| 27 | Integrable (fun x => ⟪(f : Space → Space) x, (g : Space → Space) x⟫_ℝ) := |
| 28 | (f.smooth.continuous.inner g.smooth.continuous).integrable_of_hasCompactSupport |
| 29 | (f.compact.comp₂_left g.compact (inner_zero_left (0 : Space))) |
| 30 | |
| 31 | theorem test_inner_eq_integral (f g : Test) : |
| 32 | ⟪testValue f, testValue g⟫_ℝ = ∫ x, ⟪(f : Space → Space) x, (g : Space → Space) x⟫_ℝ := by |
| 33 | rw [MeasureTheory.L2.inner_def] |
| 34 | apply integral_congr_ae |
| 35 | filter_upwards [testValue_ae f, testValue_ae g] with x hf hg |
| 36 | rw [hf, hg] |
| 37 | |
| 38 | theorem directional_integration_by_parts (f g : Test) (i : Fin 3) : |
| 39 | (∫ x, ⟪vectorPartial (f : Space → Space) i x, (g : Space → Space) x⟫_ℝ) = |
| 40 | -∫ x, ⟪(f : Space → Space) x, vectorPartial (g : Space → Space) i x⟫_ℝ := by |
| 41 | have h := integral_bilinear_fderiv_right_eq_neg_left_of_integrable |
| 42 | (μ := (volume : Measure Space)) (B := innerSL ℝ) (v := EuclideanSpace.single i 1) |
| 43 | (test_inner_integrable (partialTest f i) g) |
| 44 | (test_inner_integrable f (partialTest g i)) (test_inner_integrable f g) |
| 45 | (fun x _ => (f.smooth.differentiable (by simp)).differentiableAt) |
| 46 | (fun x _ => (g.smooth.differentiable (by simp)).differentiableAt) |
| 47 | change (∫ x, ⟪(f : Space → Space) x, vectorPartial (g : Space → Space) i x⟫_ℝ) = |
| 48 | -∫ x, ⟪vectorPartial (f : Space → Space) i x, (g : Space → Space) x⟫_ℝ at h |
| 49 | linarith |
| 50 | |
| 51 | /-- The actual tensor inner product has the usual distributional Laplacian formula. -/ |
| 52 | theorem testGradient_pairing (f g : Test) : |
| 53 | ⟪EulerMeanGradientTest.testGradient f, EulerMeanGradientTest.testGradient g⟫_ℝ = |
| 54 | -∫ x, ⟪(f : Space → Space) x, Δ (g : Space → Space) x⟫_ℝ := by |
| 55 | rw [PiLp.inner_apply] |
| 56 | calc |
| 57 | _ = ∑ i : Fin 3, ∫ x, |
| 58 | ⟪vectorPartial (f : Space → Space) i x, vectorPartial (g : Space → Space) i x⟫_ℝ := by |
| 59 | apply Finset.sum_congr rfl |
| 60 | intro i _ |
| 61 | rw [testGradient_apply, testGradient_apply, MeasureTheory.L2.inner_def] |
| 62 | apply integral_congr_ae |
| 63 | filter_upwards [derivativeColumn_ae f i, derivativeColumn_ae g i] with x hf hg |
| 64 | rw [hf, hg] |
| 65 | rfl |
| 66 | _ = ∑ i : Fin 3, -∫ x, |
| 67 | ⟪(f : Space → Space) x, vectorPartial (vectorPartial (g : Space → Space) i) i x⟫_ℝ := by |
| 68 | apply Finset.sum_congr rfl |
| 69 | intro i _ |
| 70 | exact directional_integration_by_parts f (partialTest g i) i |
| 71 | _ = _ := by |
| 72 | rw [vector_laplacian_eq_sum (g : Space → Space) g.smooth] |
| 73 | simp_rw [inner_sum] |
| 74 | have hsum := integral_finsetSum Finset.univ |
| 75 | (fun (i : Fin 3) _ => test_inner_integrable f (partialTest (partialTest g i) i)) |
| 76 | change (∫ x, ∑ i : Fin 3, ⟪(f : Space → Space) x, |
| 77 | vectorPartial (vectorPartial (g : Space → Space) i) i x⟫_ℝ) = _ at hsum |
| 78 | rw [hsum] |
| 79 | simp only [Finset.sum_neg_distrib] |
| 80 | rfl |
| 81 | |
| 82 | theorem scalar_partial_ibp (f g : Space → ℝ) (hf : ContDiff ℝ ∞ f) |
| 83 | (hg : ContDiff ℝ ∞ g) (hfc : HasCompactSupport f) (hgc : HasCompactSupport g) |
| 84 | (i : Fin 3) : |
| 85 | (∫ x, partialDerivative f i x * g x) = -∫ x, f x * partialDerivative g i x := by |
| 86 | have h := integral_mul_fderiv_eq_neg_fderiv_mul_of_integrable |
| 87 | (μ := (volume : Measure Space)) (v := EuclideanSpace.single i 1) |
| 88 | (((contDiff_partialDerivative f hf i).continuous.mul hg.continuous).integrable_of_hasCompactSupport |
| 89 | ((hfc.fderiv_apply ℝ (EuclideanSpace.single i 1)).mul_right)) |
| 90 | ((hf.continuous.mul (contDiff_partialDerivative g hg i).continuous).integrable_of_hasCompactSupport |
| 91 | hfc.mul_right) |
| 92 | ((hf.continuous.mul hg.continuous).integrable_of_hasCompactSupport hgc.mul_left) |
| 93 | (fun x _ => (hf.differentiable (by simp)).differentiableAt) |
| 94 | (fun x _ => (hg.differentiable (by simp)).differentiableAt) |
| 95 | change (∫ x, f x * partialDerivative g i x) = -∫ x, partialDerivative f i x * g x at h |
| 96 | linarith |
| 97 | |
| 98 | theorem integral_three_sub (a b c d e f : Space → ℝ) |
| 99 | (ha : Integrable a) (hb : Integrable b) (hc : Integrable c) |
| 100 | (hd : Integrable d) (he : Integrable e) (hf : Integrable f) : |
| 101 | (∫ x, (a x - b x) + (c x - d x) + (e x - f x)) = |
| 102 | ((∫ x, a x) - ∫ x, b x) + ((∫ x, c x) - ∫ x, d x) + |
| 103 | ((∫ x, e x) - ∫ x, f x) := by |
| 104 | have h₁ := integral_add ((ha.sub hb).add (hc.sub hd)) (he.sub hf) |
| 105 | have h₂ := integral_add (ha.sub hb) (hc.sub hd) |
| 106 | simp only [Pi.add_apply, Pi.sub_apply] at h₁ h₂ |
| 107 | rw [h₁, h₂, integral_sub ha hb, integral_sub hc hd, integral_sub he hf] |
| 108 | |
| 109 | /-- The ordinary real curl is formally self-adjoint on compact smooth vector tests. -/ |
| 110 | theorem integral_curl_selfadjoint (f g : Test) : |
| 111 | (∫ x, ⟪vectorCurl (f : Space → Space) x, (g : Space → Space) x⟫_ℝ) = |
| 112 | ∫ x, ⟪(f : Space → Space) x, vectorCurl (g : Space → Space) x⟫_ℝ := by |
| 113 | let fc (a : Fin 3) (x : Space) := (f : Space → Space) x a |
| 114 | let gc (a : Fin 3) (x : Space) := (g : Space → Space) x a |
| 115 | have hfs (a : Fin 3) : ContDiff ℝ ∞ (fc a) := (contDiff_piLp 2).mp f.smooth a |
| 116 | have hgs (a : Fin 3) : ContDiff ℝ ∞ (gc a) := (contDiff_piLp 2).mp g.smooth a |
| 117 | have hfc (a : Fin 3) : HasCompactSupport (fc a) := |
| 118 | f.compact.comp_left (g := fun v : Space => v a) rfl |
| 119 | have hgc (a : Fin 3) : HasCompactSupport (gc a) := |
| 120 | g.compact.comp_left (g := fun v : Space => v a) rfl |
| 121 | have hl (a b i : Fin 3) : Integrable (fun x => partialDerivative (fc a) i x * gc b x) := |
| 122 | ((contDiff_partialDerivative _ (hfs a) i).continuous.mul (hgs b).continuous).integrable_of_hasCompactSupport |
| 123 | ((hfc a).fderiv_apply ℝ (EuclideanSpace.single i 1)).mul_right |
| 124 | have hr (a b i : Fin 3) : Integrable (fun x => fc a x * partialDerivative (gc b) i x) := |
| 125 | ((hfs a).continuous.mul (contDiff_partialDerivative _ (hgs b) i).continuous).integrable_of_hasCompactSupport |
| 126 | (hfc a).mul_right |
| 127 | have hleft (x : Space) : ⟪vectorCurl (f : Space → Space) x, (g : Space → Space) x⟫_ℝ = |
| 128 | (partialDerivative (fc 2) 1 x * gc 0 x - partialDerivative (fc 1) 2 x * gc 0 x) + |
| 129 | (partialDerivative (fc 0) 2 x * gc 1 x - partialDerivative (fc 2) 0 x * gc 1 x) + |
| 130 | (partialDerivative (fc 1) 0 x * gc 2 x - partialDerivative (fc 0) 1 x * gc 2 x) := by |
| 131 | simp only [PiLp.inner_apply, Real.inner_apply, Fin.sum_univ_three, vectorCurl, curl_apply] |
| 132 | change (partialDerivative (fc 2) 1 x - partialDerivative (fc 1) 2 x) * gc 0 x + |
| 133 | (partialDerivative (fc 0) 2 x - partialDerivative (fc 2) 0 x) * gc 1 x + |
| 134 | (partialDerivative (fc 1) 0 x - partialDerivative (fc 0) 1 x) * gc 2 x = _ |
| 135 | ring |
| 136 | have hright (x : Space) : ⟪(f : Space → Space) x, vectorCurl (g : Space → Space) x⟫_ℝ = |
| 137 | (fc 0 x * partialDerivative (gc 2) 1 x - fc 0 x * partialDerivative (gc 1) 2 x) + |
| 138 | (fc 1 x * partialDerivative (gc 0) 2 x - fc 1 x * partialDerivative (gc 2) 0 x) + |
| 139 | (fc 2 x * partialDerivative (gc 1) 0 x - fc 2 x * partialDerivative (gc 0) 1 x) := by |
| 140 | simp only [PiLp.inner_apply, Real.inner_apply, Fin.sum_univ_three, vectorCurl, curl_apply] |
| 141 | change fc 0 x * (partialDerivative (gc 2) 1 x - partialDerivative (gc 1) 2 x) + |
| 142 | fc 1 x * (partialDerivative (gc 0) 2 x - partialDerivative (gc 2) 0 x) + |
| 143 | fc 2 x * (partialDerivative (gc 1) 0 x - partialDerivative (gc 0) 1 x) = _ |
| 144 | ring |
| 145 | simp_rw [hleft, hright] |
| 146 | rw [integral_three_sub _ _ _ _ _ _ (hl 2 0 1) (hl 1 0 2) (hl 0 1 2) |
| 147 | (hl 2 1 0) (hl 1 2 0) (hl 0 2 1), |
| 148 | integral_three_sub _ _ _ _ _ _ (hr 0 2 1) (hr 0 1 2) (hr 1 0 2) |
| 149 | (hr 1 2 0) (hr 2 1 0) (hr 2 0 1)] |
| 150 | simp_rw [scalar_partial_ibp _ _ (hfs _) (hgs _) (hfc _) (hgc _)] |
| 151 | ring |
| 152 | |
| 153 | theorem curlTensor_test_eq (f : Test) : |
| 154 | curlTensor (EulerMeanGradientTest.testGradient f) = testValue (curlTest f) := by |
| 155 | apply Lp.ext |
| 156 | exact (curlTensor_test_ae f).trans (testValue_ae (curlTest f)).symm |
| 157 | |
| 158 | theorem test_gradient_curl_pairing (f g : Test) : |
| 159 | ⟪EulerMeanGradientTest.testGradient f, EulerMeanGradientTest.testGradient (curlTest g)⟫_ℝ = |
| 160 | -⟪curlTensor (EulerMeanGradientTest.testGradient f), testValue (laplacianTest g)⟫_ℝ := by |
| 161 | rw [testGradient_pairing, curlTensor_test_eq, test_inner_eq_integral] |
| 162 | change -(∫ x, ⟪(f : Space → Space) x, Δ (vectorCurl (g : Space → Space)) x⟫_ℝ) = |
| 163 | -∫ x, ⟪vectorCurl (f : Space → Space) x, Δ (g : Space → Space) x⟫_ℝ |
| 164 | rw [laplacian_vectorCurl (g : Space → Space) g.smooth] |
| 165 | exact congrArg Neg.neg (integral_curl_selfadjoint f (laplacianTest g)).symm |
| 166 | |
| 167 | /-- Distributional integration by parts survives passage to the closed homogeneous gradient space. -/ |
| 168 | theorem homogeneous_curl_pairing (u : homogeneousSpace) (g : Test) : |
| 169 | ⟪u, homogeneousGradient (curlTest g)⟫_ℝ = |
| 170 | -⟪curlTensor (u : GradientTensor), testValue (laplacianTest g)⟫_ℝ := by |
| 171 | refine homogeneousGradient_dense.induction_on u ?_ ?_ |
| 172 | · exact isClosed_eq (continuous_id.inner continuous_const) |
| 173 | (((curlTensor.continuous.comp continuous_subtype_val).inner continuous_const).neg) |
| 174 | · intro f |
| 175 | exact test_gradient_curl_pairing f g |
| 176 | |
| 177 | end EulerMeanCurlIntegration |