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

chore(NavierStokes/Coordinate): delete 20 declarations nothing uses #168
Merged
+0 −147 NavierStokes/CoordinateAlgebra.lean View file
| @@ -20,121 +20,12 @@ def D (h : ℝ) : ℝ := 1 / 2 - h | ||
| 20 | 20 | def d (η : ℝ) : ℝ := 1 - η ^ 2 |
| 21 | 21 | def L (h η : ℝ) : ℝ := 1 - 2 * h * η ^ 2 |
| 22 | 22 | |
| 23 | -theorem A_add_D (h : ℝ) : A h + D h = 1 := by | |
| 24 | - unfold A D | |
| 25 | - ring | |
| 26 | - | |
| 27 | -theorem L_sub_two_D (h η : ℝ) : L h η - 2 * D h * η ^ 2 = d η := by | |
| 28 | - unfold L D d | |
| 29 | - ring | |
| 30 | - | |
| 31 | -theorem d_add_two_D (h η : ℝ) : d η + 2 * D h * η ^ 2 = L h η := by | |
| 32 | - unfold L D d | |
| 33 | - ring | |
| 34 | - | |
| 35 | -/-- Eliminating `η` from `z = q^D η` gives the implicit formula for `τ`. -/ | |
| 36 | -theorem forward_coordinate_identity {q : ℝ} (hq : 0 < q) (h η : ℝ) : | |
| 37 | - q * d η = q - (q ^ D h * η) ^ 2 * q ^ (2 * h) := by | |
| 38 | - have hp : (q ^ D h) ^ 2 * q ^ (2 * h) = q := by | |
| 39 | - rw [← Real.rpow_mul_natCast hq.le, ← Real.rpow_add hq] | |
| 40 | - have he : D h * (2 : ℕ) + 2 * h = (1 : ℝ) := by unfold D; ring | |
| 41 | - rw [he, Real.rpow_one] | |
| 42 | - calc | |
| 43 | - q * d η = q - q * η ^ 2 := by unfold d; ring | |
| 44 | - _ = q - ((q ^ D h) ^ 2 * q ^ (2 * h)) * η ^ 2 := by rw [hp] | |
| 45 | - _ = _ := by ring | |
| 46 | - | |
| 47 | -theorem D_pos {h : ℝ} (hh : h < 1 / 2) : 0 < D h := by | |
| 48 | - unfold D | |
| 49 | - linarith | |
| 50 | - | |
| 51 | -theorem d_pos {η : ℝ} (hη : η ^ 2 < 1) : 0 < d η := by | |
| 52 | - unfold d | |
| 53 | - linarith | |
| 54 | - | |
| 55 | 23 | /-- The explicit smallness condition needed for the manuscript's `L > 0`. -/ |
| 56 | 24 | theorem L_pos {h η : ℝ} (hh₀ : 0 ≤ h) (hh : h < 1 / 2) |
| 57 | 25 | (hη : η ^ 2 ≤ 1) : 0 < L h η := by |
| 58 | 26 | unfold L |
| 59 | 27 | nlinarith [mul_nonneg hh₀ (sub_nonneg.mpr hη)] |
| 60 | 28 | |
| 61 | -/-- Determinant of the forward coordinate Jacobian for | |
| 62 | -`τ = q (1-η²)` and `z = q^D η`. The derivative of `q^D` is | |
| 63 | -written as `D * (q^D/q)` on the positive half-line. -/ | |
| 64 | -theorem jacobian_det {q : ℝ} (hq : q ≠ 0) (h η : ℝ) : | |
| 65 | - d η * q ^ D h - (-2 * q * η) * (D h * η * (q ^ D h / q)) = | |
| 66 | - q ^ D h * L h η := by | |
| 67 | - field_simp | |
| 68 | - unfold d D L | |
| 69 | - ring | |
| 70 | - | |
| 71 | -theorem jacobian_det_pos {q h η : ℝ} (hq : 0 < q) | |
| 72 | - (hh₀ : 0 ≤ h) (hh : h < 1 / 2) (hη : η ^ 2 ≤ 1) : | |
| 73 | - 0 < d η * q ^ D h - (-2 * q * η) * (D h * η * (q ^ D h / q)) := by | |
| 74 | - rw [jacobian_det hq.ne'] | |
| 75 | - exact mul_pos (Real.rpow_pos_of_pos hq _) (L_pos hh₀ hh hη) | |
| 76 | - | |
| 77 | -/-- The inverse Jacobian acting on `(τ',z')`, first component. -/ | |
| 78 | -def inverseQ (q h η τ' z' : ℝ) : ℝ := | |
| 79 | - (τ' + 2 * q * η * z' / q ^ D h) / L h η | |
| 80 | - | |
| 81 | -/-- The inverse Jacobian acting on `(τ',z')`, second component. -/ | |
| 82 | -def inverseEta (q h η τ' z' : ℝ) : ℝ := | |
| 83 | - (d η * z' / q ^ D h - D h * η * τ' / q) / L h η | |
| 84 | - | |
| 85 | -theorem inverse_satisfies_tau {q h η : ℝ} (hq : 0 < q) | |
| 86 | - (hL : L h η ≠ 0) (τ' z' : ℝ) : | |
| 87 | - d η * inverseQ q h η τ' z' - | |
| 88 | - 2 * q * η * inverseEta q h η τ' z' = τ' := by | |
| 89 | - have hpow : q ^ D h ≠ 0 := (Real.rpow_pos_of_pos hq _).ne' | |
| 90 | - unfold inverseQ inverseEta | |
| 91 | - field_simp [hq.ne', hpow, hL] | |
| 92 | - unfold d D L | |
| 93 | - ring | |
| 94 | - | |
| 95 | -theorem inverse_satisfies_z {q h η : ℝ} (hq : 0 < q) | |
| 96 | - (hL : L h η ≠ 0) (τ' z' : ℝ) : | |
| 97 | - D h * η * (q ^ D h / q) * inverseQ q h η τ' z' + | |
| 98 | - q ^ D h * inverseEta q h η τ' z' = z' := by | |
| 99 | - have hpow : q ^ D h ≠ 0 := (Real.rpow_pos_of_pos hq _).ne' | |
| 100 | - unfold inverseQ inverseEta | |
| 101 | - field_simp [hq.ne', hpow, hL] | |
| 102 | - unfold d D L | |
| 103 | - ring | |
| 104 | - | |
| 105 | -theorem inverseQ_recover {q h η : ℝ} (hq : 0 < q) (hL : L h η ≠ 0) | |
| 106 | - (q' η' : ℝ) : | |
| 107 | - inverseQ q h η (d η * q' - 2 * q * η * η') | |
| 108 | - (D h * η * (q ^ D h / q) * q' + q ^ D h * η') = q' := by | |
| 109 | - have hpow : q ^ D h ≠ 0 := (Real.rpow_pos_of_pos hq _).ne' | |
| 110 | - unfold inverseQ | |
| 111 | - field_simp | |
| 112 | - unfold d D L | |
| 113 | - ring | |
| 114 | - | |
| 115 | -theorem inverseEta_recover {q h η : ℝ} (hq : 0 < q) (hL : L h η ≠ 0) | |
| 116 | - (q' η' : ℝ) : | |
| 117 | - inverseEta q h η (d η * q' - 2 * q * η * η') | |
| 118 | - (D h * η * (q ^ D h / q) * q' + q ^ D h * η') = η' := by | |
| 119 | - have hpow : q ^ D h ≠ 0 := (Real.rpow_pos_of_pos hq _).ne' | |
| 120 | - unfold inverseEta | |
| 121 | - field_simp | |
| 122 | - unfold d D L | |
| 123 | - ring | |
| 124 | - | |
| 125 | -/-- Uniqueness of the coordinate rates from the two forward differential | |
| 126 | -relations. This is a pointwise algebraic claim, with no inverse-function | |
| 127 | -existence assumption hidden in its statement. -/ | |
| 128 | -theorem rates_unique {q h η q' η' τ' z' : ℝ} (hq : 0 < q) | |
| 129 | - (hL : L h η ≠ 0) (hτ : d η * q' - 2 * q * η * η' = τ') | |
| 130 | - (hz : D h * η * (q ^ D h / q) * q' + q ^ D h * η' = z') : | |
| 131 | - q' = inverseQ q h η τ' z' ∧ η' = inverseEta q h η τ' z' := by | |
| 132 | - constructor | |
| 133 | - · rw [← hτ, ← hz] | |
| 134 | - exact (inverseQ_recover hq hL q' η').symm | |
| 135 | - · rw [← hτ, ← hz] | |
| 136 | - exact (inverseEta_recover hq hL q' η').symm | |
| 137 | - | |
| 138 | 29 | def qTime (h η : ℝ) : ℝ := -1 / L h η |
| 139 | 30 | def etaTime (q h η : ℝ) : ℝ := D h * η / (q * L h η) |
| 140 | 31 | def xTime (q h η X : ℝ) : ℝ := X / (q * L h η) |
| @@ -142,40 +33,12 @@ def qAxial (q h η : ℝ) : ℝ := 2 * η * q / (q ^ D h * L h η) | ||
| 142 | 33 | def etaAxial (q h η : ℝ) : ℝ := d η / (q ^ D h * L h η) |
| 143 | 34 | def xAxial (q h η X : ℝ) : ℝ := -2 * η * X / (q ^ D h * L h η) |
| 144 | 35 | |
| 145 | -theorem time_rates (q h η : ℝ) : | |
| 146 | - inverseQ q h η (-1) 0 = qTime h η ∧ | |
| 147 | - inverseEta q h η (-1) 0 = etaTime q h η := by | |
| 148 | - constructor | |
| 149 | - · simp [inverseQ, qTime] | |
| 150 | - · unfold inverseEta etaTime | |
| 151 | - simp | |
| 152 | - ring | |
| 153 | - | |
| 154 | -theorem axial_rates (q h η : ℝ) : | |
| 155 | - inverseQ q h η 0 1 = qAxial q h η ∧ | |
| 156 | - inverseEta q h η 0 1 = etaAxial q h η := by | |
| 157 | - constructor <;> simp only [inverseQ, inverseEta, qAxial, etaAxial] <;> ring | |
| 158 | - | |
| 159 | 36 | theorem qAxial_rpow {q : ℝ} (hq : 0 < q) (h η : ℝ) : |
| 160 | 37 | qAxial q h η = 2 * η * q ^ (1 - D h) / L h η := by |
| 161 | 38 | rw [Real.rpow_sub hq, Real.rpow_one] |
| 162 | 39 | unfold qAxial |
| 163 | 40 | ring |
| 164 | 41 | |
| 165 | -theorem xTime_from_qTime (q h η X : ℝ) : | |
| 166 | - xTime q h η X = -(X / q) * qTime h η := by | |
| 167 | - unfold xTime qTime | |
| 168 | - ring | |
| 169 | - | |
| 170 | -theorem xAxial_from_qAxial {q : ℝ} (hq : q ≠ 0) (h η X : ℝ) : | |
| 171 | - xAxial q h η X = -(X / q) * qAxial q h η := by | |
| 172 | - by_cases hL : L h η = 0 | |
| 173 | - · simp [xAxial, qAxial, hL] | |
| 174 | - by_cases hp : q ^ D h = 0 | |
| 175 | - · simp [xAxial, qAxial, hp] | |
| 176 | - unfold xAxial qAxial | |
| 177 | - field_simp [hq, hL, hp] | |
| 178 | - | |
| 179 | 42 | /-- The `T_b` coefficient in equation (4), at a profile jet `(F,FX,Fη)`. -/ |
| 180 | 43 | def timeCoeff (b h η X F FX Fη : ℝ) : ℝ := |
| 181 | 44 | (-b * F + D h * η * Fη + X * FX) / L h η |
| @@ -222,16 +85,6 @@ theorem incompressibility_numerator | ||
| 222 | 85 | d η * (Ubarη + X * UbarηX) + 2 * η * X * UX := by ring |
| 223 | 86 | _ = _ := by rw [hU, hUη]; unfold A D; ring |
| 224 | 87 | |
| 225 | -theorem incompressibility_coefficient | |
| 226 | - (h η X U UX Uη Ubar UbarX Ubarη UbarηX : ℝ) | |
| 227 | - (hU : Ubar + X * UbarX = U) (hUη : Ubarη + X * UbarηX = Uη) : | |
| 228 | - (2 * η * U - 2 * D h * η * Ubar - d η * Ubarη + | |
| 229 | - X * (2 * η * UX - 2 * D h * η * UbarX - d η * UbarηX)) / L h η = | |
| 230 | - -axialCoeff (-A h) h η X U UX Uη := by | |
| 231 | - rw [incompressibility_numerator h η X U UX Uη Ubar UbarX Ubarη UbarηX hU hUη] | |
| 232 | - unfold axialCoeff | |
| 233 | - ring | |
| 234 | - | |
| 235 | 88 | end |
| 236 | 89 | |
| 237 | 90 | end NavierStokes.CoordinateAlgebra |
+24 −0 routes/s1-ns-coordinate-1/README.md added View file
| @@ -0,0 +1,24 @@ | ||
| 1 | +--- | |
| 2 | +issue: 10 | |
| 3 | +status: working | |
| 4 | +--- | |
| 5 | +# s1-ns-coordinate-1 | |
| 6 | + | |
| 7 | +One unit of #10 (S-1, "Delete declarations that nothing uses"), family `NavierStokes/Coordinate*`, | |
| 8 | +from Treant's run of 2026-12-03 on `TitiSkywalker/NavierStokesAndEuler`, cut down to this project's | |
| 9 | +rule at main `440c919`. The unit names 21 declarations in `NavierStokes/CoordinateAlgebra.lean` | |
| 10 | +(160 lines). This pull request deletes 20 of them (147 lines); the file is the only one touched and | |
| 11 | +the diff is deletions only. | |
| 12 | + | |
| 13 | +One declaration is left out: `NavierStokes.CoordinateAlgebra.incompressibility_numerator` stays. | |
| 14 | +Its docstring cites "the incompressibility formula (5)" of the paper — the module header says the | |
| 15 | +file checks "equations (3)--(5)" — so it is a paper reference the project's rule keeps. The rest of | |
| 16 | +the declared unit has no docstring that cites the paper. `git grep -n -w` finds no use of any of the | |
| 17 | +20 deleted short names in the tree (`D_pos` and `d_pos` hit only other declarations of the same short | |
| 18 | +name: `NaturalAxisData.D_pos`, `NaturalAxisRange.D_pos`, the `d_pos` field of `TrueConeLoop`'s | |
| 19 | +choices); `incompressibility_numerator` remains, unused. | |
| 20 | + | |
| 21 | +## Next | |
| 22 | + | |
| 23 | +The maintainer's review after `challenge` and `build`. The rest of the `Coordinate*` family and the | |
| 24 | +other units of #10 are separate. | |