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.PacketSourceScaleActual |
| 2 | |
| 3 | /-! Reconstruct the numerical source guards from a supplied common |
| 4 | finite cost budget, without making a second choice of the starting stage. -/ |
| 5 | |
| 6 | noncomputable section |
| 7 | |
| 8 | namespace EulerPacketSourceScaleChoice |
| 9 | |
| 10 | open Real EulerScale EulerPacketSourceScales EulerPacketSourceTime |
| 11 | EulerPacketSourceScaleBounds EulerPacketSourceScaleSequence EulerPacketSourceScaleActual |
| 12 | |
| 13 | theorem uniformBounds_of_costs (J : ℕ) (hJ : 3 ≤ J) (C c δ : ℝ) |
| 14 | (hC : 1 ≤ C) (hc : 0 ≤ c) (hδ : 0 ≤ δ) (A : ℕ) |
| 15 | (x : ℕ → ℝ) (hx1 : ∀ n, 1 ≤ x n) |
| 16 | (hsmall : ∀ i : SourceCost, |
| 17 | SmallSeries ((sourceCostSpec C c hC A i).cost J x) (δ/3)) : |
| 18 | UniformBounds J C c A x δ := by |
| 19 | have hJ1 : 1 ≤ J := by omega |
| 20 | have hxp : ∀ n, 0 ≤ x n := fun n => zero_le_one.trans (hx1 n) |
| 21 | let f := fun i : SourceCost => (sourceCostSpec C c hC A i).cost J x |
| 22 | have hweak (i : SourceCost) : SmallSeries (f i) δ := |
| 23 | (hsmall i).weaken (by linarith only [hδ]) |
| 24 | have hsum : SmallSeries (fun n => f .shear n+f .prior n+f .neighbor n) δ := by |
| 25 | have hs := ((hsmall .shear).summable.add (hsmall .prior).summable).add (hsmall .neighbor).summable |
| 26 | refine ⟨fun n => add_nonneg (add_nonneg ((hsmall .shear).nonneg n) |
| 27 | ((hsmall .prior).nonneg n)) ((hsmall .neighbor).nonneg n), hs, ?_⟩ |
| 28 | rw [Summable.tsum_add ((hsmall .shear).summable.add (hsmall .prior).summable) |
| 29 | (hsmall .neighbor).summable, |
| 30 | Summable.tsum_add (hsmall .shear).summable (hsmall .prior).summable] |
| 31 | linarith only [(hsmall .shear).total_le,(hsmall .prior).total_le,(hsmall .neighbor).total_le] |
| 32 | refine ⟨hsum.mono ?_ ?_, ?_, (hweak .width).mono ?_ ?_, |
| 33 | (hweak .parent).mono ?_ ?_,(hweak .good).mono ?_ ?_⟩ |
| 34 | · intro n |
| 35 | have hθ : 0 ≤ sourceTheta J C x n := zero_le_one.trans (sourceTheta_bounds hJ1 hC hx1 n).1 |
| 36 | unfold coefficientCost sourceCoefficientError sourceEpsilon sourceOlderGradient sourcePriorError sourceNeighborError |
| 37 | positivity |
| 38 | · intro n |
| 39 | exact sourceCoefficientError_bound J hJ C c hC hc A x hx1 n |
| 40 | · intro a ha ha₂ |
| 41 | apply (hweak .extra).mono |
| 42 | · intro n |
| 43 | have hθ : 0 ≤ sourceTheta J C x n := zero_le_one.trans (sourceTheta_bounds hJ1 hC hx1 n).1 |
| 44 | unfold extraTimeCost sourceNextTimeWidth |
| 45 | positivity |
| 46 | · intro n |
| 47 | exact sourceExtraTime_bound J hJ1 C hC A x hx1 n (a n) (ha n) (ha₂ n) |
| 48 | · intro n |
| 49 | unfold sourceTimeRatio |
| 50 | positivity |
| 51 | · intro n |
| 52 | exact sourceTimeRatio_bound J hJ1 x n |
| 53 | · intro n |
| 54 | unfold parentSquareRatio |
| 55 | positivity |
| 56 | · intro n |
| 57 | exact (sourceParentSquareRatio_eq J x n).le |
| 58 | · intro n |
| 59 | unfold goodCost |
| 60 | positivity |
| 61 | · intro n |
| 62 | exact sourceGoodCost_bound J hJ x n (hxp n) |
| 63 | |
| 64 | theorem actualBounds_of_uniform (J D : ℕ) (hJ : 3 ≤ J) (C c X δ : ℝ) |
| 65 | (hC : 1 ≤ C) (hc : 0 ≤ c) (hX : 1 ≤ X) (hδ : 0 ≤ δ) |
| 66 | (hbaseH : X^1000 ≤ exp (X/((J-1 : ℕ) : ℝ)^7)) |
| 67 | (hbaseK : X^D ≤ exp (X/((J-1 : ℕ) : ℝ)^4)) |
| 68 | (hbase : baseErrorCost J D C X ≤ δ/2) |
| 69 | (hn : UniformBounds J C c 60 (scaleSequence J X) (δ/32)) : |
| 70 | ActualBounds J D C c X δ := by |
| 71 | have hXp : 0 < X := zero_lt_one.trans_le hX |
| 72 | have hw : δ/32 ≤ δ := by linarith only [hδ] |
| 73 | refine ⟨⟨hn.coefficient.weaken hw,fun a ha ha₂ => (hn.extraTime a ha ha₂).weaken hw, |
| 74 | hn.width.weaken hw,hn.parent.weaken hw,hn.good.weaken hw⟩,hbaseH,hbaseK,?_⟩ |
| 75 | intro a ha ha₂ |
| 76 | let f : ℕ → ℝ := fun n => 16*coefficientCost J C c 60 (scaleSequence J X) n |
| 77 | let z : ℕ → ℝ := fun n => if n=0 then baseErrorCost J D C X else 0 |
| 78 | have hf : SmallSeries f (δ/2) := by |
| 79 | refine ⟨fun n => mul_nonneg (by norm_num) (hn.coefficient.nonneg n), |
| 80 | hn.coefficient.summable.mul_left 16,?_⟩ |
| 81 | change (∑' n,16*coefficientCost J C c 60 (scaleSequence J X) n) ≤ δ/2 |
| 82 | rw [tsum_mul_left] |
| 83 | nlinarith only [hn.coefficient.total_le] |
| 84 | have hz : SmallSeries z (δ/2) := by |
| 85 | refine ⟨?_,(hasSum_ite_eq 0 (baseErrorCost J D C X)).summable,?_⟩ |
| 86 | · intro n |
| 87 | exact ite_nonneg (baseErrorCost_nonneg J D C X (zero_le_one.trans hC) hXp.le) le_rfl |
| 88 | · change (∑' n : ℕ,if n=0 then baseErrorCost J D C X else 0) ≤ δ/2 |
| 89 | rw [tsum_ite_eq] |
| 90 | exact hbase |
| 91 | have hsum : SmallSeries (fun n => f n+z n) δ := by |
| 92 | refine ⟨fun n => add_nonneg (hf.nonneg n) (hz.nonneg n),hf.summable.add hz.summable,?_⟩ |
| 93 | rw [hf.summable.tsum_add hz.summable] |
| 94 | linarith only [hf.total_le,hz.total_le] |
| 95 | apply hsum.mono |
| 96 | · intro n |
| 97 | unfold geometryErrorCost |
| 98 | exact mul_nonneg (geometryError_nonneg J D C c X a n (zero_le_one.trans hC) hXp) |
| 99 | (pow_nonneg (by unfold sourceTheta; positivity) 60) |
| 100 | · intro n |
| 101 | exact geometryErrorCost_bound J D hJ C c X hC hX hc a ha ha₂ hbaseH hbaseK n |
| 102 | |
| 103 | end EulerPacketSourceScaleChoice |