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.MeanSolenoidalSpace |
| 2 | import Mathlib.Analysis.Distribution.AEEqOfIntegralContDiff |
| 3 | |
| 4 | /-! The ordinary closed L² gradient space has zero distributional curl. |
| 5 | For smooth representatives this gives actual pointwise symmetry of the derivative. -/ |
| 6 | |
| 7 | noncomputable section |
| 8 | |
| 9 | namespace EulerMeanPressure |
| 10 | |
| 11 | open MeasureTheory InnerProductSpace EulerSmoothLimit EulerVectorCalculus EulerMeanSolenoidal |
| 12 | open scoped ContDiff |
| 13 | |
| 14 | theorem scalar_test_ibp (f ψ : Space → ℝ) (hf : ContDiff ℝ ∞ f) |
| 15 | (hψ : ContDiff ℝ ∞ ψ) (hc : HasCompactSupport ψ) (i : Fin 3) : |
| 16 | (∫ x, partialDerivative f i x * ψ x) = -∫ x, f x * partialDerivative ψ i x := by |
| 17 | have hi₁ : Integrable (fun x => partialDerivative f i x * ψ x) := |
| 18 | ((contDiff_partialDerivative f hf i).continuous.mul hψ.continuous).integrable_of_hasCompactSupport |
| 19 | hc.mul_left |
| 20 | have hi₂ : Integrable (fun x => f x * partialDerivative ψ i x) := |
| 21 | (hf.continuous.mul (contDiff_partialDerivative ψ hψ i).continuous).integrable_of_hasCompactSupport |
| 22 | (hc.fderiv_apply ℝ (EuclideanSpace.single i 1)).mul_left |
| 23 | have hi₀ : Integrable (fun x => f x * ψ x) := |
| 24 | (hf.continuous.mul hψ.continuous).integrable_of_hasCompactSupport hc.mul_left |
| 25 | have h := integral_mul_fderiv_eq_neg_fderiv_mul_of_integrable |
| 26 | (μ := (volume : Measure Space)) (v := EuclideanSpace.single i 1) hi₁ hi₂ hi₀ |
| 27 | (fun x _ => (hf.differentiable (by simp)).differentiableAt) |
| 28 | (fun x _ => (hψ.differentiable (by simp)).differentiableAt) |
| 29 | change (∫ x, f x * partialDerivative ψ i x) = |
| 30 | -∫ x, partialDerivative f i x * ψ x at h |
| 31 | linarith |
| 32 | |
| 33 | def skewTest (i j : Fin 3) (ψ : Space → ℝ) (x : Space) : Space := |
| 34 | partialDerivative ψ j x • EuclideanSpace.single i 1 - |
| 35 | partialDerivative ψ i x • EuclideanSpace.single j 1 |
| 36 | |
| 37 | theorem skewTest_smooth (i j : Fin 3) (ψ : Space → ℝ) (hψ : ContDiff ℝ ∞ ψ) : |
| 38 | ContDiff ℝ ∞ (skewTest i j ψ) := |
| 39 | ((contDiff_partialDerivative ψ hψ j).smul contDiff_const).sub |
| 40 | ((contDiff_partialDerivative ψ hψ i).smul contDiff_const) |
| 41 | |
| 42 | theorem skewTest_compact (i j : Fin 3) (ψ : Space → ℝ) (hc : HasCompactSupport ψ) : |
| 43 | HasCompactSupport (skewTest i j ψ) := by |
| 44 | apply HasCompactSupport.intro hc |
| 45 | intro x hx |
| 46 | simp only [skewTest, partialDerivative, fderiv_of_notMem_tsupport ℝ hx, |
| 47 | zero_apply, zero_smul, sub_self] |
| 48 | |
| 49 | theorem skewTest_inner (i j : Fin 3) (ψ : Space → ℝ) (x v : Space) : |
| 50 | ⟪v, skewTest i j ψ x⟫_ℝ = v i * partialDerivative ψ j x - v j * partialDerivative ψ i x := by |
| 51 | simp only [skewTest, inner_sub_right, inner_smul_right, |
| 52 | EuclideanSpace.inner_single_right, RCLike.conj_to_real, one_mul] |
| 53 | ring |
| 54 | |
| 55 | theorem gradient_coordinate (φ : Space → ℝ) (x : Space) (i : Fin 3) : |
| 56 | gradient φ x i = partialDerivative φ i x := by |
| 57 | simpa only [EuclideanSpace.inner_single_right, one_mul, RCLike.conj_to_real, partialDerivative] |
| 58 | using (inner_gradient_left (f := φ) (x := x) (y := EuclideanSpace.single i 1)) |
| 59 | |
| 60 | theorem gradient_skewTest_integral (i j : Fin 3) (φ ψ : Space → ℝ) |
| 61 | (hφ : ContDiff ℝ ∞ φ) (hψ : ContDiff ℝ ∞ ψ) (hc : HasCompactSupport ψ) : |
| 62 | (∫ x, ⟪gradient φ x, skewTest i j ψ x⟫_ℝ) = 0 := by |
| 63 | have hi (a b : Fin 3) : Integrable (fun x => partialDerivative φ a x * partialDerivative ψ b x) := |
| 64 | ((contDiff_partialDerivative φ hφ a).continuous.mul |
| 65 | (contDiff_partialDerivative ψ hψ b).continuous).integrable_of_hasCompactSupport |
| 66 | (hc.fderiv_apply ℝ (EuclideanSpace.single b 1)).mul_left |
| 67 | simp_rw [skewTest_inner, gradient_coordinate] |
| 68 | rw [integral_sub (hi i j) (hi j i), |
| 69 | scalar_test_ibp φ (partialDerivative ψ j) hφ (contDiff_partialDerivative ψ hψ j) |
| 70 | (hc.fderiv_apply ℝ (EuclideanSpace.single j 1)) i, |
| 71 | scalar_test_ibp φ (partialDerivative ψ i) hφ (contDiff_partialDerivative ψ hψ i) |
| 72 | (hc.fderiv_apply ℝ (EuclideanSpace.single i 1)) j] |
| 73 | simp_rw [partialDerivative_comm ψ (hψ.of_le (by simp)) j i] |
| 74 | exact sub_self _ |
| 75 | |
| 76 | def skewTestLp (i j : Fin 3) (ψ : Space → ℝ) (hψ : ContDiff ℝ ∞ ψ) |
| 77 | (hc : HasCompactSupport ψ) : L2 := |
| 78 | ((skewTest_smooth i j ψ hψ).continuous.memLp_of_hasCompactSupport |
| 79 | (skewTest_compact i j ψ hc)).toLp (skewTest i j ψ) |
| 80 | |
| 81 | theorem skewTestLp_ae (i j : Fin 3) (ψ : Space → ℝ) (hψ : ContDiff ℝ ∞ ψ) |
| 82 | (hc : HasCompactSupport ψ) : skewTestLp i j ψ hψ hc =ᵐ[volume] skewTest i j ψ := |
| 83 | MemLp.coeFn_toLp _ |
| 84 | |
| 85 | theorem skewTestLp_solenoidal (i j : Fin 3) (ψ : Space → ℝ) |
| 86 | (hψ : ContDiff ℝ ∞ ψ) (hc : HasCompactSupport ψ) : |
| 87 | skewTestLp i j ψ hψ hc ∈ solenoidalSpace := by |
| 88 | apply (mem_solenoidal_iff _).2 |
| 89 | intro φ _ hφ |
| 90 | calc |
| 91 | (∫ x, ⟪gradient φ x, skewTestLp i j ψ hψ hc x⟫_ℝ) = |
| 92 | ∫ x, ⟪gradient φ x, skewTest i j ψ x⟫_ℝ := by |
| 93 | apply integral_congr_ae |
| 94 | filter_upwards [skewTestLp_ae i j ψ hψ hc] with x hx |
| 95 | rw [hx] |
| 96 | _ = 0 := gradient_skewTest_integral i j φ ψ hφ hψ hc |
| 97 | |
| 98 | theorem gradientSpace_weak_curl_zero (p : L2) (hp : p ∈ gradientSpace) |
| 99 | (i j : Fin 3) (ψ : Space → ℝ) (hψ : ContDiff ℝ ∞ ψ) (hc : HasCompactSupport ψ) : |
| 100 | (∫ x, p x i * partialDerivative ψ j x - p x j * partialDerivative ψ i x) = 0 := by |
| 101 | have h := pressure_pairing_zero hp (skewTestLp_solenoidal i j ψ hψ hc) |
| 102 | rw [MeasureTheory.L2.inner_def] at h |
| 103 | rw [← h] |
| 104 | apply integral_congr_ae |
| 105 | filter_upwards [skewTestLp_ae i j ψ hψ hc] with x hx |
| 106 | rw [hx, skewTest_inner] |
| 107 | |
| 108 | /-- The distributional statement becomes the actual classical closedness identity. -/ |
| 109 | theorem gradientSpace_classical_curl_zero (p : L2) (hp : p ∈ gradientSpace) |
| 110 | (g : Space → Space) (hrep : p =ᵐ[volume] g) (hg : ContDiff ℝ ∞ g) : |
| 111 | ∀ x i j, (fderiv ℝ g x (EuclideanSpace.single i 1)) j = |
| 112 | (fderiv ℝ g x (EuclideanSpace.single j 1)) i := by |
| 113 | intro x i j |
| 114 | let gi : Space → ℝ := fun y => g y i |
| 115 | let gj : Space → ℝ := fun y => g y j |
| 116 | have hgi : ContDiff ℝ ∞ gi := (EuclideanSpace.proj i : Space →L[ℝ] ℝ).contDiff.comp hg |
| 117 | have hgj : ContDiff ℝ ∞ gj := (EuclideanSpace.proj j : Space →L[ℝ] ℝ).contDiff.comp hg |
| 118 | let q : Space → ℝ := fun y => partialDerivative gi j y - partialDerivative gj i y |
| 119 | have hqa := contDiff_partialDerivative gi hgi j |
| 120 | have hqb := contDiff_partialDerivative gj hgj i |
| 121 | have hq : ContDiff ℝ ∞ q := hqa.sub hqb |
| 122 | have hz : q =ᵐ[volume] 0 := ae_eq_zero_of_integral_contDiff_smul_eq_zero |
| 123 | hq.continuous.locallyIntegrable (fun ψ hψ hc => by |
| 124 | have hw := gradientSpace_weak_curl_zero p hp i j ψ hψ hc |
| 125 | have hw' : (∫ y, gi y * partialDerivative ψ j y - gj y * partialDerivative ψ i y) = 0 := by |
| 126 | rw [← hw] |
| 127 | apply integral_congr_ae |
| 128 | filter_upwards [hrep] with y hy |
| 129 | rw [hy] |
| 130 | have hIa : Integrable (fun y => gi y * partialDerivative ψ j y) := |
| 131 | (hgi.continuous.mul (contDiff_partialDerivative ψ hψ j).continuous).integrable_of_hasCompactSupport |
| 132 | (hc.fderiv_apply ℝ (EuclideanSpace.single j 1)).mul_left |
| 133 | have hIb : Integrable (fun y => gj y * partialDerivative ψ i y) := |
| 134 | (hgj.continuous.mul (contDiff_partialDerivative ψ hψ i).continuous).integrable_of_hasCompactSupport |
| 135 | (hc.fderiv_apply ℝ (EuclideanSpace.single i 1)).mul_left |
| 136 | have hJa : Integrable (fun y => partialDerivative gi j y * ψ y) := |
| 137 | (hqa.continuous.mul hψ.continuous).integrable_of_hasCompactSupport hc.mul_left |
| 138 | have hJb : Integrable (fun y => partialDerivative gj i y * ψ y) := |
| 139 | (hqb.continuous.mul hψ.continuous).integrable_of_hasCompactSupport hc.mul_left |
| 140 | rw [integral_sub hIa hIb] at hw' |
| 141 | have ha := scalar_test_ibp gi ψ hgi hψ hc j |
| 142 | have hb := scalar_test_ibp gj ψ hgj hψ hc i |
| 143 | change (∫ y, ψ y * (partialDerivative gi j y - partialDerivative gj i y)) = 0 |
| 144 | simp_rw [mul_comm (ψ _), sub_mul] |
| 145 | rw [integral_sub hJa hJb] |
| 146 | linarith) |
| 147 | have hzero := congrFun (MeasureTheory.Measure.eq_of_ae_eq hz hq.continuous continuous_const) x |
| 148 | change partialDerivative gi j x - partialDerivative gj i x = 0 at hzero |
| 149 | dsimp [partialDerivative, gi, gj] at hzero |
| 150 | rw [fderiv_coordinate g x (hg.differentiable (by simp)).differentiableAt, |
| 151 | fderiv_coordinate g x (hg.differentiable (by simp)).differentiableAt] at hzero |
| 152 | exact (sub_eq_zero.mp hzero).symm |
| 153 | |
| 154 | end EulerMeanPressure |