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

Comparing changes
Choose two branches to see what changed, then open a pull request to bring the work across.
Able to merge. These branches can be merged automatically.
A pull request is already open: #162 chore(NavierStokes/Appendix): delete 21 declarations nothing uses
1 commit
+0 −162 NavierStokes/AppendixHeatResults.lean View file
| @@ -12,166 +12,4 @@ namespace NavierStokes.AppendixHeatResults | ||
| 12 | 12 | |
| 13 | 13 | open RadialHeatProfile |
| 14 | 14 | |
| 15 | -/-- The rising factorial used in the manuscript. -/ | |
| 16 | -def rising (b : ℝ) (n : ℕ) : ℝ := ∏ k ∈ Finset.range n, (b + k) | |
| 17 | - | |
| 18 | -theorem rising_zero (b : ℝ) : rising b 0 = 1 := by simp [rising] | |
| 19 | - | |
| 20 | -theorem rising_succ (b : ℝ) (n : ℕ) : | |
| 21 | - rising b (n + 1) = rising b n * (b + n) := by | |
| 22 | - simp [rising, Finset.prod_range_succ] | |
| 23 | - | |
| 24 | -theorem rising_nonneg {b : ℝ} (hb : 0 ≤ b) (n : ℕ) : 0 ≤ rising b n := by | |
| 25 | - apply Finset.prod_nonneg | |
| 26 | - intro k _ | |
| 27 | - positivity | |
| 28 | - | |
| 29 | -theorem rising_pos {b : ℝ} (hb : 0 < b) (n : ℕ) : 0 < rising b n := by | |
| 30 | - apply Finset.prod_pos | |
| 31 | - intro k _ | |
| 32 | - positivity | |
| 33 | - | |
| 34 | -theorem rising_mono {b c : ℝ} (hb : 0 ≤ b) (hbc : b ≤ c) (n : ℕ) : | |
| 35 | - rising b n ≤ rising c n := by | |
| 36 | - apply Finset.prod_le_prod | |
| 37 | - · intro k _; positivity | |
| 38 | - · intro k _; linarith | |
| 39 | - | |
| 40 | -theorem rising_succ_left (b : ℝ) (n : ℕ) : | |
| 41 | - rising b (n + 1) = b * rising (1 + b) n := by | |
| 42 | - induction n with | |
| 43 | - | zero => simp [rising_succ, rising_zero] | |
| 44 | - | succ n ih => | |
| 45 | - rw [rising_succ b (n + 1), ih, rising_succ (1 + b) n] | |
| 46 | - push_cast | |
| 47 | - ring | |
| 48 | - | |
| 49 | -theorem derivativeCoeff_eq_rising (h : ℝ) (n : ℕ) : | |
| 50 | - derivativeCoeff (1 + h) n = (-1 : ℝ) ^ n * rising h n := by | |
| 51 | - induction n with | |
| 52 | - | zero => simp [derivativeCoeff, rising_zero] | |
| 53 | - | succ n ih => rw [derivativeCoeff, ih, rising_succ, pow_succ]; ring | |
| 54 | - | |
| 55 | -theorem gamma_add_nat {a : ℝ} (ha : 0 < a) (n : ℕ) : | |
| 56 | - Real.Gamma (a + n) = Real.Gamma a * rising a n := by | |
| 57 | - induction n with | |
| 58 | - | zero => simp [rising_zero] | |
| 59 | - | succ n ih => | |
| 60 | - rw [Nat.cast_add, Nat.cast_one, ← add_assoc, | |
| 61 | - Real.Gamma_add_one (by positivity : a + (n : ℝ) ≠ 0), ih, rising_succ] | |
| 62 | - ring | |
| 63 | - | |
| 64 | -/-- The displayed endpoint formula holds for actual one-sided derivatives, | |
| 65 | -not merely a recursively specified formal series. -/ | |
| 66 | -theorem endpoint_derivatives {h : ℝ} (hh : 0 < h) (n : ℕ) : | |
| 67 | - iteratedDerivWithin n (profile (1 + h)) (Ici 0) 0 = | |
| 68 | - (-1 : ℝ) ^ n * rising h n * rising (1 + h) n := by | |
| 69 | - rw [iteratedDerivWithin_profile (by linarith : 1 < 1 + h) n le_rfl, | |
| 70 | - profileJet, moment_zero (by linarith : 1 < 1 + h), derivativeCoeff_eq_rising, | |
| 71 | - gamma_add_nat (by linarith : 0 < 1 + h)] | |
| 72 | - have hg := (Real.Gamma_pos_of_pos (by linarith : 0 < 1 + h)).ne' | |
| 73 | - field_simp | |
| 74 | - | |
| 75 | -/-- Every derivative is bounded by the magnitude of its endpoint value. -/ | |
| 76 | -theorem derivative_bound_rising {h z : ℝ} (hh : 0 < h) (hz : 0 ≤ z) (n : ℕ) : | |
| 77 | - |iteratedDerivWithin n (profile (1 + h)) (Ici 0) z| ≤ | |
| 78 | - rising h n * rising (1 + h) n := by | |
| 79 | - have hb := profile_derivative_bound (a := 1 + h) (by linarith) n hz | |
| 80 | - have hg := Real.Gamma_pos_of_pos (by linarith : 0 < 1 + h) | |
| 81 | - rw [derivativeCoeff_eq_rising, gamma_add_nat (by linarith : 0 < 1 + h), | |
| 82 | - abs_mul, abs_mul, abs_pow, abs_neg, abs_one, one_pow, one_mul, | |
| 83 | - abs_of_nonneg (rising_nonneg hh.le n), abs_of_pos (inv_pos.mpr hg)] at hb | |
| 84 | - convert hb using 1 | |
| 85 | - field_simp | |
| 86 | - | |
| 87 | -/-- The positive-order jets are uniformly `O(h)` for bounded positive `h`. | |
| 88 | -The explicit constant is independent of the argument on the whole half-line. -/ | |
| 89 | -theorem uniform_positive_derivative_bound {h h₀ z : ℝ} | |
| 90 | - (hh : 0 < h) (hh₀ : h ≤ h₀) (hz : 0 ≤ z) (n : ℕ) : | |
| 91 | - |iteratedDerivWithin (n + 1) (profile (1 + h)) (Ici 0) z| ≤ | |
| 92 | - (rising (1 + h₀) n * rising (1 + h₀) (n + 1)) * h := by | |
| 93 | - have hb := derivative_bound_rising hh hz (n + 1) | |
| 94 | - rw [rising_succ_left h n] at hb | |
| 95 | - calc | |
| 96 | - _ ≤ (h * rising (1 + h) n) * rising (1 + h) (n + 1) := hb | |
| 97 | - _ ≤ (h * rising (1 + h₀) n) * rising (1 + h₀) (n + 1) := by | |
| 98 | - apply mul_le_mul | |
| 99 | - · exact mul_le_mul_of_nonneg_left (rising_mono (by linarith) (by linarith) n) hh.le | |
| 100 | - · exact rising_mono (by linarith) (by linarith) (n + 1) | |
| 101 | - · exact rising_nonneg (by linarith) _ | |
| 102 | - · exact mul_nonneg hh.le (rising_nonneg (by linarith) _) | |
| 103 | - _ = _ := by ring | |
| 104 | - | |
| 105 | -theorem first_endpoint_jet {h : ℝ} (hh : 0 < h) : | |
| 106 | - profileJet (1 + h) 1 0 = -h * (1 + h) := by | |
| 107 | - rw [← iteratedDerivWithin_profile (by linarith : 1 < 1 + h) 1 le_rfl, | |
| 108 | - endpoint_derivatives hh] | |
| 109 | - simp [rising] | |
| 110 | - | |
| 111 | -/-- An explicit derivative bound on the entire nonnegative half-line. -/ | |
| 112 | -theorem second_jet_bound {h z : ℝ} (hh : 0 < h) (hz : 0 ≤ z) : | |
| 113 | - |profileJet (1 + h) 2 z| ≤ h * (1 + h) ^ 2 * (2 + h) := by | |
| 114 | - have hb := profile_derivative_bound (a := 1 + h) (by linarith) 2 hz | |
| 115 | - rw [iteratedDerivWithin_profile (by linarith : 1 < 1 + h) 2 hz] at hb | |
| 116 | - have hg := Real.Gamma_pos_of_pos (by linarith : 0 < 1 + h) | |
| 117 | - have he : |(Real.Gamma (1 + h))⁻¹ * derivativeCoeff (1 + h) 2| * | |
| 118 | - Real.Gamma (1 + h + (2 : ℕ)) = h * (1 + h) ^ 2 * (2 + h) := by | |
| 119 | - rw [gamma_add_nat (by linarith : 0 < 1 + h)] | |
| 120 | - have hc : derivativeCoeff (1 + h) 2 = h * (1 + h) := by | |
| 121 | - simp [derivativeCoeff]; ring | |
| 122 | - rw [hc, abs_of_pos (by positivity)] | |
| 123 | - simp only [rising, Finset.prod_range_succ, Finset.range_zero, | |
| 124 | - Finset.prod_empty, Nat.cast_zero, Nat.cast_one] | |
| 125 | - field_simp | |
| 126 | - ring | |
| 127 | - exact hb.trans_eq he | |
| 128 | - | |
| 129 | -theorem first_jet_remainder {h z : ℝ} (hh : 0 < h) (hz : 0 ≤ z) : | |
| 130 | - |profileJet (1 + h) 1 z + h * (1 + h)| ≤ | |
| 131 | - h * (1 + h) ^ 2 * (2 + h) * z := by | |
| 132 | - have H := norm_image_sub_le_of_norm_deriv_le_segment' | |
| 133 | - (f := profileJet (1 + h) 1) (f' := profileJet (1 + h) 2) | |
| 134 | - (a := 0) (b := z) (C := h * (1 + h) ^ 2 * (2 + h)) | |
| 135 | - (fun x hx => (profileJet_hasDerivWithinAt (by linarith : 1 < 1 + h) 1 hx.1).mono | |
| 136 | - Icc_subset_Ici_self) | |
| 137 | - (fun x hx => by simpa only [Real.norm_eq_abs] using second_jet_bound hh hx.1) | |
| 138 | - simpa only [Real.norm_eq_abs, first_endpoint_jet hh, neg_mul, sub_neg_eq_add, sub_zero] | |
| 139 | - using H z ⟨hz, le_rfl⟩ | |
| 140 | - | |
| 141 | -/-- The finite Taylor estimate asserted in `heat:small-argument`, with an | |
| 142 | -explicit remainder constant and no analyticity assumption. -/ | |
| 143 | -theorem small_argument_remainder {h z : ℝ} (hh : 0 < h) (hz : 0 ≤ z) : | |
| 144 | - |profile (1 + h) z - 1 + h * (1 + h) * z| ≤ | |
| 145 | - h * (1 + h) ^ 2 * (2 + h) * z ^ 2 := by | |
| 146 | - let B := h * (1 + h) ^ 2 * (2 + h) | |
| 147 | - let g := fun x => profile (1 + h) x - 1 + h * (1 + h) * x | |
| 148 | - have H := norm_image_sub_le_of_norm_deriv_le_segment' | |
| 149 | - (f := g) (f' := fun x => profileJet (1 + h) 1 x + h * (1 + h)) | |
| 150 | - (a := 0) (b := z) (C := B * z) | |
| 151 | - (fun x hx => by | |
| 152 | - convert! | |
| 153 | - (((profile_hasDerivWithinAt (by linarith : 1 < 1 + h) hx.1).sub_const 1).add | |
| 154 | - ((hasDerivWithinAt_id x (Ici 0)).const_mul (h * (1 + h)))).mono | |
| 155 | - (Icc_subset_Ici_self : Icc (0 : ℝ) z ⊆ Ici 0) using 1 | |
| 156 | - simp) | |
| 157 | - (fun x hx => by | |
| 158 | - rw [Real.norm_eq_abs] | |
| 159 | - exact (first_jet_remainder hh hx.1).trans | |
| 160 | - (mul_le_mul_of_nonneg_left hx.2.le (by positivity))) | |
| 161 | - have hh0 : profile (1 + h) 0 = 1 := profile_zero (by linarith) | |
| 162 | - simpa [g, hh0, sub_zero, B, pow_two, mul_assoc] using H z ⟨hz, le_rfl⟩ | |
| 163 | - | |
| 164 | -/-- The constant in the first-order small-argument estimate is uniform when | |
| 165 | -the positive exponent ranges below any fixed upper bound. -/ | |
| 166 | -theorem uniform_small_argument {h h₀ z : ℝ} (hh : 0 < h) (hh₀ : h ≤ h₀) | |
| 167 | - (hz : 0 ≤ z) : | |
| 168 | - |profile (1 + h) z - 1| + |z * derivWithin (profile (1 + h)) (Ici 0) z| ≤ | |
| 169 | - (2 * (1 + h₀)) * h * z := by | |
| 170 | - have H₀ := profile_h_sub_one_bound hh hz | |
| 171 | - have H₁ := profile_first_derivative_bound (a := 1 + h) (by linarith) hz | |
| 172 | - rw [abs_mul, abs_of_nonneg hz] | |
| 173 | - have H₂ := mul_le_mul_of_nonneg_left H₁ hz | |
| 174 | - have H₃ := mul_le_mul_of_nonneg_right hh₀ (mul_nonneg hh.le hz) | |
| 175 | - nlinarith | |
| 176 | - | |
| 177 | 15 | end NavierStokes.AppendixHeatResults |
+0 −76 NavierStokes/AppendixJoiningResults.lean View file
| @@ -12,46 +12,6 @@ open Set | ||
| 12 | 12 | open scoped ContDiff |
| 13 | 13 | open NaturalAxisCoefficients NaturalProfile ProfileHistories ReferenceBounds |
| 14 | 14 | |
| 15 | -/-- The printed axis margin holds on the entire numerical range allowed | |
| 16 | -before the subsequent choices of sufficiently small parameters. -/ | |
| 17 | -theorem axis_initial_margin {h j η : ℝ} | |
| 18 | - (hh0 : 0 ≤ h) (hh : h ≤ 1 / 100) | |
| 19 | - (hj0 : 0 ≤ j) (hj : j ≤ 1 / 20) (hη : η ∈ Icc (-1 : ℝ) 1) : | |
| 20 | - (14 / 5 : ℝ) < -NaturalAxisData.W h j η := by | |
| 21 | - have hD : 0 ≤ NaturalAxisData.D h := by | |
| 22 | - unfold NaturalAxisData.D | |
| 23 | - linarith | |
| 24 | - have hD1 : 2 * NaturalAxisData.D h ≤ 1 := by | |
| 25 | - unfold NaturalAxisData.D | |
| 26 | - linarith | |
| 27 | - have hDj : 0 ≤ 2 * NaturalAxisData.D h * j := by positivity | |
| 28 | - have hDj1 : 2 * NaturalAxisData.D h * j ≤ j := by | |
| 29 | - simpa only [one_mul] using mul_le_mul_of_nonneg_right hD1 hj0 | |
| 30 | - have hlow : -(2 * NaturalAxisData.D h * j) ≤ 2 * NaturalAxisData.D h * j * η := by | |
| 31 | - nlinarith [mul_nonneg hDj (show 0 ≤ η + 1 by linarith [hη.1])] | |
| 32 | - have hhη : h * η ^ 2 ≤ h := by | |
| 33 | - have hs : η ^ 2 ≤ 1 := by nlinarith [hη.1, hη.2] | |
| 34 | - nlinarith [mul_nonneg hh0 (sub_nonneg.mpr hs)] | |
| 35 | - rw [NaturalAxisData.neg_W_formula] | |
| 36 | - nlinarith | |
| 37 | - | |
| 38 | -/-- The apparent quadratic parameter contributions cancel in the complete | |
| 39 | -constant angular source. This keeps its margin on the full printed range. -/ | |
| 40 | -theorem axis_base_source_identity (h j η : ℝ) : | |
| 41 | - -NaturalAxisData.W h j η - h * (1 - 2 * η * NaturalAxisData.U j η) = | |
| 42 | - 3 - h + j * η := by | |
| 43 | - unfold NaturalAxisData.W NaturalAxisData.U NaturalAxisData.d NaturalAxisData.D | |
| 44 | - ring | |
| 45 | - | |
| 46 | -theorem axis_base_source_lower {h j η : ℝ} | |
| 47 | - (hh : h ≤ 1 / 100) (hj0 : 0 ≤ j) (hj : j ≤ 1 / 20) | |
| 48 | - (hη : η ∈ Icc (-1 : ℝ) 1) : | |
| 49 | - (29 / 10 : ℝ) < -NaturalAxisData.W h j η - | |
| 50 | - h * (1 - 2 * η * NaturalAxisData.U j η) := by | |
| 51 | - rw [axis_base_source_identity] | |
| 52 | - have hm := mul_nonneg hj0 (show 0 ≤ η + 1 by linarith [hη.1]) | |
| 53 | - nlinarith | |
| 54 | - | |
| 55 | 15 | /-- The real denominator remains positive on the existing enlarged window |
| 56 | 16 | even under the larger `h ≤ .01` range of the current manuscript. -/ |
| 57 | 17 | theorem axis_L_lower_bound_window {h η : ℝ} (hh0 : 0 ≤ h) (hh : h ≤ 1 / 100) |
| @@ -62,40 +22,4 @@ theorem axis_L_lower_bound_window {h η : ℝ} (hh0 : 0 ≤ h) (hh : h ≤ 1 / 1 | ||
| 62 | 22 | unfold NaturalAxisData.L |
| 63 | 23 | nlinarith |
| 64 | 24 | |
| 65 | -/-- The reference lower bound holds throughout `[100,110]`, including both | |
| 66 | -endpoints, for the very same reference selected by `exists_reference_bounds`. -/ | |
| 67 | -theorem reference_first_gt_three {h j σ Λ C : ℝ} {P0 : ℝ → ℝ} | |
| 68 | - {d : AnalyticInputs h j σ P0} (E : NaturalEntrance.EntranceProfile d Λ C) | |
| 69 | - (hΛ : 0 < Λ) (hsmall : NaturalAxisData.SmallParameters h j) (hσ : 0 < σ) | |
| 70 | - {δ : ℝ} (hδ : 0 < δ) (hδT : 2 * δ < ReferencePath.rampLimit) | |
| 71 | - (hP0 : ContDiff ℝ ∞ P0) | |
| 72 | - (hb : ReferenceBoundsOnHold E.profile hΛ hδ hδT hP0) | |
| 73 | - {X η : ℝ} (hX : X ∈ Icc (100 : ℝ) 110) (hη : η ∈ Icc (-1 : ℝ) 1) : | |
| 74 | - 3 < p1 (referenceProfiles E.profile hΛ hδ hδT hP0) h (X, η) := by | |
| 75 | - let P := referenceProfiles E.profile hΛ hδ hδT hP0 | |
| 76 | - let N := ReferencePath.Input.ofNatural hΛ E.profile.family | |
| 77 | - have hX0 : 0 < X := lt_of_lt_of_le (by norm_num) hX.1 | |
| 78 | - have hL := NaturalAxisData.L_pos hsmall hη | |
| 79 | - have hL1 := NaturalEntrance.L_le_one (NaturalAxisRange.ofSmall hsmall) η | |
| 80 | - have hp := reference_mem E.profile hΛ (p := (X, η)) hX0.le hη | |
| 81 | - have hf : ∀ s ∈ Icc (0 : ℝ) X, 0 < P.f (s, η) := by | |
| 82 | - intro s hs | |
| 83 | - exact N.refF_pos δ (reference_mem E.profile hΛ (p := (s, η)) hs.1 hη) hs.1 | |
| 84 | - have hsource : ∀ s ∈ Icc (0 : ℝ) X, (12 / 5 : ℝ) ≤ sourceQ P h (s, η) := by | |
| 85 | - intro s hs | |
| 86 | - have he := hb.source_lower (s, η) ⟨⟨hs.1, hs.2.trans hX.2⟩, hη⟩ | |
| 87 | - have hn : 0 ≤ (47 / 50 : ℝ) * NaturalAxisData.L h η * Λ * | |
| 88 | - NaturalAxisData.chi h j σ η := by | |
| 89 | - exact mul_nonneg (mul_nonneg (mul_nonneg (by norm_num) hL.le) hΛ.le) | |
| 90 | - (NaturalAxisData.chi_bounds h j hσ η).1 | |
| 91 | - change (47 / 50 : ℝ) * NaturalAxisData.L h η * Λ * | |
| 92 | - NaturalAxisData.chi h j σ η + 12 / 5 < sourceQ P h (s, η) at he | |
| 93 | - linarith | |
| 94 | - have hbound := p1_lower_from_source P hp hX0 h hL (by norm_num : (0 : ℝ) ≤ 12 / 5) | |
| 95 | - hf (reference_antitone E hΛ hδ hδT hP0 hX0.le hη) hsource | |
| 96 | - have hthree : (3 : ℝ) < (12 / 5) * X / (2 * NaturalAxisData.L h η) := by | |
| 97 | - apply (lt_div_iff₀ (mul_pos (by norm_num) hL)).mpr | |
| 98 | - nlinarith [hX.1] | |
| 99 | - exact hthree.trans_le hbound | |
| 100 | - | |
| 101 | 25 | end NavierStokes.AppendixJoiningResults |
+35 −0 routes/s1-ns-appendix-1/README.md added View file
| @@ -0,0 +1,35 @@ | ||
| 1 | +--- | |
| 2 | +issue: 10 | |
| 3 | +status: working | |
| 4 | +--- | |
| 5 | +# s1-ns-appendix-1 | |
| 6 | + | |
| 7 | +One unit of #10 (S-1, "Delete declarations that nothing uses"), wave 1, family `NavierStokes/Appendix*`: | |
| 8 | +delete the 21 declarations the unit lists, 238 lines in `NavierStokes/AppendixHeatResults.lean` | |
| 9 | +(the `rising` factorial and the endpoint-jet and small-argument estimates built on it) and | |
| 10 | +`NavierStokes/AppendixJoiningResults.lean` (the axis margin and base-source bounds and | |
| 11 | +`reference_first_gt_three`). The diff is deletions only; no statement and no proof that stays is | |
| 12 | +changed. | |
| 13 | + | |
| 14 | +How the list was cut. Treant's run of 2026-12-03 (TitiSkywalker/NavierStokesAndEuler, upstream | |
| 15 | +`f9e8bc5`) deleted them as unreachable from the four Comparator theorems. On this main the | |
| 16 | +declaration graph was read again under the project's keep rule | |
| 17 | +(`docs/s1-dead-code/README.md`): they are not reached from `NavierStokes/PaperResults.lean`, | |
| 18 | +`NavierStokes/R3/Theorem.lean` or `NavierStokes/LocalPaperTheorem.lean`, no declaration that | |
| 19 | +stays names them, and no deleted docstring cites a numbered result of the paper | |
| 20 | +(`tools/planner.py:93`: `Lemma`/`Theorem`/`Proposition`/`Corollary`/`Section`/`Equation` with a | |
| 21 | +number, `§` with a number, or `(N.N)`). The only docstring among them that points at the paper is | |
| 22 | +`small_argument_remainder`'s mention of the label `heat:small-argument`; it gives no numbered | |
| 23 | +result, so by that rule it stays on the list. | |
| 24 | + | |
| 25 | +Checked before opening the pull request: `git grep -n -w` over the whole tree for each of the 21 | |
| 26 | +short names (`rising`, `rising_zero`, … , `reference_first_gt_three`) finds nothing — no Lean file, | |
| 27 | +no doc, no route note. `python3 checks/challenge.py .` ends with `ok: 4 challenge files and the | |
| 28 | +build configuration as approved; 2590 Lean files, 616897 lines, toolchain | |
| 29 | +leanprover/lean4:v4.34.0-rc2`. | |
| 30 | + | |
| 31 | +## Next | |
| 32 | + | |
| 33 | +Push and open the pull request (`Part of #10`); the `build` check says whether it compiles. | |
| 34 | +`docs/s1-dead-code/units.md` lists one further `NavierStokes/Appendix*` unit, `s1-ns-appendix-2` | |
| 35 | +(wave 2, one declaration), which this unit does not name and does not touch. | |