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

Merge pull request #720 from s5-euler-weighted-1
Browse filesrefactor(Euler/Weighted): 1 small module folded into the file that imports it (−39.9%, measured)
Checks
build Program · lake build and Comparator
Details
challenge Program · challenge files and build config
Details
+105 −1 Euler/WeightedCylinderEnergy.lean View file
| @@ -1,7 +1,111 @@ | ||
| 1 | -import Euler.WeightedRootLimit | |
| 1 | +import Euler.MetricRootLimit | |
| 2 | 2 | |
| 3 | 3 | /-! Actual Gevrey-weighted cylinder energy with signed radius derivative and no zero-norm differentiation. -/ |
| 4 | 4 | |
| 5 | +/-! ## From `Euler/WeightedRootLimit.lean` | |
| 6 | + | |
| 7 | +The text of `Euler/WeightedRootLimit.lean`, folded into this file, which was its only importer. -/ | |
| 8 | + | |
| 9 | +section | |
| 10 | + | |
| 11 | +/-! Weighted removal of root regularization, preserving the signed derivative of the radius. -/ | |
| 12 | + | |
| 13 | +noncomputable section | |
| 14 | + | |
| 15 | +namespace EulerWeightedRootLimit | |
| 16 | + | |
| 17 | +open MeasureTheory Set Real EulerNoncompactTransport EulerMetricRootLimit | |
| 18 | +open scoped Topology | |
| 19 | + | |
| 20 | +/-- Dominated convergence for the regularized scalar energy integrand on a fixed finite interval. -/ | |
| 21 | +theorem regularized_integral_tendsto (Q A F : ℝ → ℝ) (s t : ℝ) (hst : s ≤ t) | |
| 22 | + (hQ : ContinuousOn Q (Icc s t)) (hQ0 : ∀ u ∈ Icc s t, 0 ≤ Q u) | |
| 23 | + (hA : IntegrableOn A (Icc s t)) (hF : IntegrableOn F (Icc s t)) : | |
| 24 | + Filter.Tendsto (fun n => ∫ u in s..t, (A u * √(Q u + cutoffScale n ^ 2) + F u)) | |
| 25 | + Filter.atTop (𝓝 (∫ u in s..t, (A u * √(Q u) + F u))) := by | |
| 26 | + let μ : Measure ℝ := volume.restrict (Ioc s t) | |
| 27 | + let fn := fun n u => A u * √(Q u + cutoffScale n ^ 2) + F u | |
| 28 | + have hAQ : IntegrableOn (fun u => A u * √(Q u)) (Icc s t) := | |
| 29 | + hA.mul_continuousOn hQ.sqrt isCompact_Icc | |
| 30 | + have hAn : Integrable A μ := hA.mono_set Ioc_subset_Icc_self | |
| 31 | + have hFn : Integrable F μ := hF.mono_set Ioc_subset_Icc_self | |
| 32 | + have hAQn : Integrable (fun u => A u * √(Q u)) μ := hAQ.mono_set Ioc_subset_Icc_self | |
| 33 | + have hmeas (n : ℕ) : AEStronglyMeasurable (fn n) μ := | |
| 34 | + (((hA.mul_continuousOn ((hQ.add continuousOn_const).sqrt) isCompact_Icc).add hF).mono_set Ioc_subset_Icc_self).aestronglyMeasurable | |
| 35 | + have hbound (n : ℕ) : ∀ᵐ u ∂μ, | |
| 36 | + ‖fn n u‖ ≤ ‖A u * √(Q u)‖ + ‖A u‖ + ‖F u‖ := by | |
| 37 | + filter_upwards [ae_restrict_mem measurableSet_Ioc] with u hu | |
| 38 | + have hq := hQ0 u ⟨hu.1.le, hu.2⟩ | |
| 39 | + have hr := (regularized_root_le (Q u) (cutoffScale n) hq (cutoffScale_pos n).le).trans | |
| 40 | + (add_le_add_right (cutoffScale_le_one n) (√(Q u))) | |
| 41 | + calc | |
| 42 | + _ ≤ ‖A u‖ * √(Q u + cutoffScale n ^ 2) + ‖F u‖ := by | |
| 43 | + simpa only [fn, norm_mul, Real.norm_of_nonneg (sqrt_nonneg _)] using | |
| 44 | + norm_add_le (A u * √(Q u + cutoffScale n ^ 2)) (F u) | |
| 45 | + _ ≤ ‖A u‖ * (√(Q u) + 1) + ‖F u‖ := | |
| 46 | + add_le_add_left (mul_le_mul_of_nonneg_left hr (norm_nonneg (A u))) ‖F u‖ | |
| 47 | + _ = _ := by | |
| 48 | + rw [norm_mul, Real.norm_of_nonneg (sqrt_nonneg _)] | |
| 49 | + ring | |
| 50 | + have hlim : ∀ᵐ u ∂μ, Filter.Tendsto (fun n => fn n u) Filter.atTop (𝓝 (A u * √(Q u) + F u)) := | |
| 51 | + Filter.Eventually.of_forall (fun u => | |
| 52 | + ((regularized_root_tendsto (Q u)).const_mul (A u)).add_const (F u)) | |
| 53 | + have hi := tendsto_integral_of_dominated_convergence | |
| 54 | + (fun u => ‖A u * √(Q u)‖ + ‖A u‖ + ‖F u‖) hmeas | |
| 55 | + ((hAQn.norm.add hAn.norm).add hFn.norm) hbound hlim | |
| 56 | + have hii : Filter.Tendsto (fun n => ∫ u in s..t, fn n u) Filter.atTop | |
| 57 | + (𝓝 (∫ u in s..t, (A u * √(Q u) + F u))) := by | |
| 58 | + simpa only [intervalIntegral.integral_of_le hst] using hi | |
| 59 | + exact hii | |
| 60 | + | |
| 61 | +/-- Endpoint weights pass through the same genuine regularization limit. -/ | |
| 62 | +theorem weighted_root_integral_limit (Q A F w : ℝ → ℝ) (s t : ℝ) (hst : s ≤ t) | |
| 63 | + (hQ : ContinuousOn Q (Icc s t)) (hQ0 : ∀ u ∈ Icc s t, 0 ≤ Q u) | |
| 64 | + (hA : IntegrableOn A (Icc s t)) (hF : IntegrableOn F (Icc s t)) | |
| 65 | + (hineq : ∀ δ : ℝ, 0 < δ → w t * √(Q t + δ ^ 2) - w s * √(Q s + δ ^ 2) ≤ | |
| 66 | + ∫ u in s..t, (A u * √(Q u + δ ^ 2) + F u)) : | |
| 67 | + w t * √(Q t) - w s * √(Q s) ≤ ∫ u in s..t, (A u * √(Q u) + F u) := by | |
| 68 | + exact le_of_tendsto_of_tendsto' | |
| 69 | + (((regularized_root_tendsto (Q t)).const_mul (w t)).sub | |
| 70 | + ((regularized_root_tendsto (Q s)).const_mul (w s))) | |
| 71 | + (regularized_integral_tendsto Q A F s t hst hQ hQ0 hA hF) | |
| 72 | + (fun n => hineq (cutoffScale n) (cutoffScale_pos n)) | |
| 73 | + | |
| 74 | +/-- A nonnegative differentiable weight preserves an energy differential bound with its signed derivative. -/ | |
| 75 | +theorem weighted_root_integral_of_deriv_bound (Q a F w w' : ℝ → ℝ) (s t : ℝ) | |
| 76 | + (hst : s ≤ t) (hQ : ContinuousOn Q (Icc s t)) (hQ0 : ∀ u ∈ Icc s t, 0 ≤ Q u) | |
| 77 | + (hwc : ContinuousOn w (Icc s t)) (hw : ∀ u ∈ Ioo s t, 0 ≤ w u) | |
| 78 | + (hwd : ∀ u ∈ Ioo s t, HasDerivAt w (w' u) u) | |
| 79 | + (hregd : ∀ δ : ℝ, 0 < δ → ∀ u ∈ Ioo s t, | |
| 80 | + DifferentiableAt ℝ (fun v => √(Q v + δ ^ 2)) u) | |
| 81 | + (hreg : ∀ δ : ℝ, 0 < δ → ∀ u ∈ Ioo s t, | |
| 82 | + deriv (fun v => √(Q v + δ ^ 2)) u ≤ a u * √(Q u + δ ^ 2) + F u) | |
| 83 | + (hA : IntegrableOn (fun u => w u * a u + w' u) (Icc s t)) | |
| 84 | + (hF : IntegrableOn (fun u => w u * F u) (Icc s t)) : | |
| 85 | + w t * √(Q t) - w s * √(Q s) ≤ | |
| 86 | + ∫ u in s..t, ((w u * a u + w' u) * √(Q u) + w u * F u) := by | |
| 87 | + apply weighted_root_integral_limit Q (fun u => w u * a u + w' u) (fun u => w u * F u) | |
| 88 | + w s t hst hQ hQ0 hA hF | |
| 89 | + intro δ hδ | |
| 90 | + have hrc : ContinuousOn (fun u => √(Q u + δ ^ 2)) (Icc s t) := | |
| 91 | + (hQ.add continuousOn_const).sqrt | |
| 92 | + have hcont := hwc.mul hrc | |
| 93 | + have hφint : IntegrableOn (fun u => (w u * a u + w' u) * √(Q u + δ ^ 2) + w u * F u) | |
| 94 | + (Icc s t) := (hA.mul_continuousOn hrc isCompact_Icc).add hF | |
| 95 | + refine intervalIntegral.sub_le_integral_of_hasDeriv_right_of_le | |
| 96 | + (g' := fun u => deriv (fun v => w v * √(Q v + δ ^ 2)) u) hst hcont ?_ hφint ?_ | |
| 97 | + · intro u hu | |
| 98 | + exact ((hwd u hu).fun_mul (hregd δ hδ u hu).hasDerivAt).differentiableAt.hasDerivAt.hasDerivWithinAt | |
| 99 | + · intro u hu | |
| 100 | + rw [((hwd u hu).fun_mul (hregd δ hδ u hu).hasDerivAt).deriv] | |
| 101 | + have h := mul_le_mul_of_nonneg_left (hreg δ hδ u hu) (hw u hu) | |
| 102 | + linarith | |
| 103 | + | |
| 104 | +end EulerWeightedRootLimit | |
| 105 | +end | |
| 106 | + | |
| 107 | +end | |
| 108 | + | |
| 5 | 109 | noncomputable section |
| 6 | 110 | |
| 7 | 111 | namespace EulerWeightedCylinderEnergy |
+0 −96 Euler/WeightedRootLimit.lean deleted
| @@ -1,96 +0,0 @@ | ||
| 1 | -import Euler.MetricRootLimit | |
| 2 | - | |
| 3 | -/-! Weighted removal of root regularization, preserving the signed derivative of the radius. -/ | |
| 4 | - | |
| 5 | -noncomputable section | |
| 6 | - | |
| 7 | -namespace EulerWeightedRootLimit | |
| 8 | - | |
| 9 | -open MeasureTheory Set Real EulerNoncompactTransport EulerMetricRootLimit | |
| 10 | -open scoped Topology | |
| 11 | - | |
| 12 | -/-- Dominated convergence for the regularized scalar energy integrand on a fixed finite interval. -/ | |
| 13 | -theorem regularized_integral_tendsto (Q A F : ℝ → ℝ) (s t : ℝ) (hst : s ≤ t) | |
| 14 | - (hQ : ContinuousOn Q (Icc s t)) (hQ0 : ∀ u ∈ Icc s t, 0 ≤ Q u) | |
| 15 | - (hA : IntegrableOn A (Icc s t)) (hF : IntegrableOn F (Icc s t)) : | |
| 16 | - Filter.Tendsto (fun n => ∫ u in s..t, (A u * √(Q u + cutoffScale n ^ 2) + F u)) | |
| 17 | - Filter.atTop (𝓝 (∫ u in s..t, (A u * √(Q u) + F u))) := by | |
| 18 | - let μ : Measure ℝ := volume.restrict (Ioc s t) | |
| 19 | - let fn := fun n u => A u * √(Q u + cutoffScale n ^ 2) + F u | |
| 20 | - have hAQ : IntegrableOn (fun u => A u * √(Q u)) (Icc s t) := | |
| 21 | - hA.mul_continuousOn hQ.sqrt isCompact_Icc | |
| 22 | - have hAn : Integrable A μ := hA.mono_set Ioc_subset_Icc_self | |
| 23 | - have hFn : Integrable F μ := hF.mono_set Ioc_subset_Icc_self | |
| 24 | - have hAQn : Integrable (fun u => A u * √(Q u)) μ := hAQ.mono_set Ioc_subset_Icc_self | |
| 25 | - have hmeas (n : ℕ) : AEStronglyMeasurable (fn n) μ := | |
| 26 | - (((hA.mul_continuousOn ((hQ.add continuousOn_const).sqrt) isCompact_Icc).add hF).mono_set Ioc_subset_Icc_self).aestronglyMeasurable | |
| 27 | - have hbound (n : ℕ) : ∀ᵐ u ∂μ, | |
| 28 | - ‖fn n u‖ ≤ ‖A u * √(Q u)‖ + ‖A u‖ + ‖F u‖ := by | |
| 29 | - filter_upwards [ae_restrict_mem measurableSet_Ioc] with u hu | |
| 30 | - have hq := hQ0 u ⟨hu.1.le, hu.2⟩ | |
| 31 | - have hr := (regularized_root_le (Q u) (cutoffScale n) hq (cutoffScale_pos n).le).trans | |
| 32 | - (add_le_add_right (cutoffScale_le_one n) (√(Q u))) | |
| 33 | - calc | |
| 34 | - _ ≤ ‖A u‖ * √(Q u + cutoffScale n ^ 2) + ‖F u‖ := by | |
| 35 | - simpa only [fn, norm_mul, Real.norm_of_nonneg (sqrt_nonneg _)] using | |
| 36 | - norm_add_le (A u * √(Q u + cutoffScale n ^ 2)) (F u) | |
| 37 | - _ ≤ ‖A u‖ * (√(Q u) + 1) + ‖F u‖ := | |
| 38 | - add_le_add_left (mul_le_mul_of_nonneg_left hr (norm_nonneg (A u))) ‖F u‖ | |
| 39 | - _ = _ := by | |
| 40 | - rw [norm_mul, Real.norm_of_nonneg (sqrt_nonneg _)] | |
| 41 | - ring | |
| 42 | - have hlim : ∀ᵐ u ∂μ, Filter.Tendsto (fun n => fn n u) Filter.atTop (𝓝 (A u * √(Q u) + F u)) := | |
| 43 | - Filter.Eventually.of_forall (fun u => | |
| 44 | - ((regularized_root_tendsto (Q u)).const_mul (A u)).add_const (F u)) | |
| 45 | - have hi := tendsto_integral_of_dominated_convergence | |
| 46 | - (fun u => ‖A u * √(Q u)‖ + ‖A u‖ + ‖F u‖) hmeas | |
| 47 | - ((hAQn.norm.add hAn.norm).add hFn.norm) hbound hlim | |
| 48 | - have hii : Filter.Tendsto (fun n => ∫ u in s..t, fn n u) Filter.atTop | |
| 49 | - (𝓝 (∫ u in s..t, (A u * √(Q u) + F u))) := by | |
| 50 | - simpa only [intervalIntegral.integral_of_le hst] using hi | |
| 51 | - exact hii | |
| 52 | - | |
| 53 | -/-- Endpoint weights pass through the same genuine regularization limit. -/ | |
| 54 | -theorem weighted_root_integral_limit (Q A F w : ℝ → ℝ) (s t : ℝ) (hst : s ≤ t) | |
| 55 | - (hQ : ContinuousOn Q (Icc s t)) (hQ0 : ∀ u ∈ Icc s t, 0 ≤ Q u) | |
| 56 | - (hA : IntegrableOn A (Icc s t)) (hF : IntegrableOn F (Icc s t)) | |
| 57 | - (hineq : ∀ δ : ℝ, 0 < δ → w t * √(Q t + δ ^ 2) - w s * √(Q s + δ ^ 2) ≤ | |
| 58 | - ∫ u in s..t, (A u * √(Q u + δ ^ 2) + F u)) : | |
| 59 | - w t * √(Q t) - w s * √(Q s) ≤ ∫ u in s..t, (A u * √(Q u) + F u) := by | |
| 60 | - exact le_of_tendsto_of_tendsto' | |
| 61 | - (((regularized_root_tendsto (Q t)).const_mul (w t)).sub | |
| 62 | - ((regularized_root_tendsto (Q s)).const_mul (w s))) | |
| 63 | - (regularized_integral_tendsto Q A F s t hst hQ hQ0 hA hF) | |
| 64 | - (fun n => hineq (cutoffScale n) (cutoffScale_pos n)) | |
| 65 | - | |
| 66 | -/-- A nonnegative differentiable weight preserves an energy differential bound with its signed derivative. -/ | |
| 67 | -theorem weighted_root_integral_of_deriv_bound (Q a F w w' : ℝ → ℝ) (s t : ℝ) | |
| 68 | - (hst : s ≤ t) (hQ : ContinuousOn Q (Icc s t)) (hQ0 : ∀ u ∈ Icc s t, 0 ≤ Q u) | |
| 69 | - (hwc : ContinuousOn w (Icc s t)) (hw : ∀ u ∈ Ioo s t, 0 ≤ w u) | |
| 70 | - (hwd : ∀ u ∈ Ioo s t, HasDerivAt w (w' u) u) | |
| 71 | - (hregd : ∀ δ : ℝ, 0 < δ → ∀ u ∈ Ioo s t, | |
| 72 | - DifferentiableAt ℝ (fun v => √(Q v + δ ^ 2)) u) | |
| 73 | - (hreg : ∀ δ : ℝ, 0 < δ → ∀ u ∈ Ioo s t, | |
| 74 | - deriv (fun v => √(Q v + δ ^ 2)) u ≤ a u * √(Q u + δ ^ 2) + F u) | |
| 75 | - (hA : IntegrableOn (fun u => w u * a u + w' u) (Icc s t)) | |
| 76 | - (hF : IntegrableOn (fun u => w u * F u) (Icc s t)) : | |
| 77 | - w t * √(Q t) - w s * √(Q s) ≤ | |
| 78 | - ∫ u in s..t, ((w u * a u + w' u) * √(Q u) + w u * F u) := by | |
| 79 | - apply weighted_root_integral_limit Q (fun u => w u * a u + w' u) (fun u => w u * F u) | |
| 80 | - w s t hst hQ hQ0 hA hF | |
| 81 | - intro δ hδ | |
| 82 | - have hrc : ContinuousOn (fun u => √(Q u + δ ^ 2)) (Icc s t) := | |
| 83 | - (hQ.add continuousOn_const).sqrt | |
| 84 | - have hcont := hwc.mul hrc | |
| 85 | - have hφint : IntegrableOn (fun u => (w u * a u + w' u) * √(Q u + δ ^ 2) + w u * F u) | |
| 86 | - (Icc s t) := (hA.mul_continuousOn hrc isCompact_Icc).add hF | |
| 87 | - refine intervalIntegral.sub_le_integral_of_hasDeriv_right_of_le | |
| 88 | - (g' := fun u => deriv (fun v => w v * √(Q v + δ ^ 2)) u) hst hcont ?_ hφint ?_ | |
| 89 | - · intro u hu | |
| 90 | - exact ((hwd u hu).fun_mul (hregd δ hδ u hu).hasDerivAt).differentiableAt.hasDerivAt.hasDerivWithinAt | |
| 91 | - · intro u hu | |
| 92 | - rw [((hwd u hu).fun_mul (hregd δ hδ u hu).hasDerivAt).deriv] | |
| 93 | - have h := mul_le_mul_of_nonneg_left (hreg δ hδ u hu) (hw u hu) | |
| 94 | - linarith | |
| 95 | - | |
| 96 | -end EulerWeightedRootLimit | |
+21 −0 routes/s5-euler-weighted-1/README.md added View file
| @@ -0,0 +1,21 @@ | ||
| 1 | +--- | |
| 2 | +issue: 14 | |
| 3 | +status: working | |
| 4 | +--- | |
| 5 | +# s5-euler-weighted-1 | |
| 6 | + | |
| 7 | +Folds the one small module of the family `Euler/Weighted*` that has a single importer into that importer: | |
| 8 | +`Euler/WeightedRootLimit.lean` (96 lines) goes into `Euler/WeightedCylinderEnergy.lean` (50 lines before, 146 | |
| 9 | +after), text unchanged, under a heading that names where it came from and in a `section` of its own. The file | |
| 10 | +takes over the module's import of `Euler.MetricRootLimit`. This is the "fewer modules" change from Lean Pool's | |
| 11 | +cleaned copy of the proof (Vasily Ilin's pull requests 405 and 570), computed on this tree's own import graph. | |
| 12 | + | |
| 13 | +The fold is made by `fold.py`, brought up to date here together with its plan (`plan.json` in this folder), as in | |
| 14 | +every pull request of the series. Measured: `Euler/WeightedCylinderEnergy.lean` with the module it takes in costs | |
| 15 | +15.48 G instructions before and 9.31 G after (−39.9%); the count is instructions retired by `lean` elaborating the | |
| 16 | +file alone, as `unit.json` and the pull request describe. | |
| 17 | + | |
| 18 | +## Next | |
| 19 | + | |
| 20 | +Push and open the pull request into `main`; the maintainer's verdict on whether this kind of change is wanted | |
| 21 | +decides the rest of the series, one family per pull request. | |
+9 −0 routes/s5-euler-weighted-1/plan.json added View file
| @@ -0,0 +1,9 @@ | ||
| 1 | +{ | |
| 2 | +"imports": "in place", | |
| 3 | +"folds": { | |
| 4 | +"Euler/WeightedCylinderEnergy.lean": [ | |
| 5 | +"Euler/WeightedRootLimit.lean", | |
| 6 | +"Euler/WeightedCylinderEnergy.lean" | |
| 7 | +] | |
| 8 | +} | |
| 9 | +} | |