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 Mathlib.Analysis.Real.Sqrt |
| 2 | import Mathlib.Tactic.FieldSimp |
| 3 | import Mathlib.Tactic.Linarith |
| 4 | import Mathlib.Tactic.Ring |
| 5 | |
| 6 | /-! |
| 7 | # Exact algebra of the stress cone |
| 8 | |
| 9 | This formalizes the square-root criterion and quadratic equivalence in Lemma 3.5 |
| 10 | of the candidate manuscript, together with the normalized |
| 11 | factorization used in equation (11). It does not construct any stress profile. |
| 12 | -/ |
| 13 | |
| 14 | namespace NavierStokes.ConeAlgebra |
| 15 | |
| 16 | /-- The lower root appearing in equation (10). -/ |
| 17 | noncomputable def coneBound (P J : ℝ) : ℝ := |
| 18 | P + J ^ 2 / 4 - |J| * Real.sqrt ((P - 2) / 2 + J ^ 2 / 16) |
| 19 | |
| 20 | /-- The discriminant term in the displayed root formula. -/ |
| 21 | noncomputable def rootTerm (P J : ℝ) : ℝ := |
| 22 | |J| * Real.sqrt ((P - 2) / 2 + J ^ 2 / 16) |
| 23 | |
| 24 | theorem rootTerm_nonneg (P J : ℝ) : 0 ≤ rootTerm P J := by |
| 25 | exact mul_nonneg (abs_nonneg _) (Real.sqrt_nonneg _) |
| 26 | |
| 27 | theorem rootTerm_sq {P J : ℝ} (hP : 2 < P) : |
| 28 | rootTerm P J ^ 2 = J ^ 2 * ((P - 2) / 2 + J ^ 2 / 16) := by |
| 29 | have hrad : 0 ≤ (P - 2) / 2 + J ^ 2 / 16 := by nlinarith [sq_nonneg J] |
| 30 | unfold rootTerm |
| 31 | rw [mul_pow, sq_abs, Real.sq_sqrt hrad] |
| 32 | |
| 33 | theorem square_difference (P J v : ℝ) : |
| 34 | (P + J ^ 2 / 4 - v) ^ 2 - J ^ 2 * ((P - 2) / 2 + J ^ 2 / 16) = |
| 35 | (P - v) ^ 2 - (v - 2) * J ^ 2 / 2 := by |
| 36 | ring |
| 37 | |
| 38 | theorem rootTerm_ge_quarter {P J : ℝ} (hP : 2 < P) : |
| 39 | J ^ 2 / 4 ≤ rootTerm P J := by |
| 40 | have hsq := rootTerm_sq (J := J) hP |
| 41 | have hr := rootTerm_nonneg P J |
| 42 | have hJ := sq_nonneg J |
| 43 | have hprod : 0 ≤ J ^ 2 * (P - 2) := mul_nonneg hJ (by linarith) |
| 44 | nlinarith [sq_nonneg (rootTerm P J - J ^ 2 / 4)] |
| 45 | |
| 46 | theorem coneBound_le_parameter {P J : ℝ} (hP : 2 < P) : coneBound P J ≤ P := by |
| 47 | have h := rootTerm_ge_quarter (J := J) hP |
| 48 | change P + J ^ 2 / 4 - rootTerm P J ≤ P |
| 49 | linarith |
| 50 | |
| 51 | /-- The lower root is strictly above two for every finite J and P > 2. -/ |
| 52 | theorem coneBound_gt_two {P J : ℝ} (hP : 2 < P) : 2 < coneBound P J := by |
| 53 | have hsq := rootTerm_sq (J := J) hP |
| 54 | have hr := rootTerm_nonneg P J |
| 55 | have hid := square_difference P J 2 |
| 56 | have hJ := sq_nonneg J |
| 57 | have hpos : 0 < P + J ^ 2 / 4 - 2 := by linarith |
| 58 | have hlt : rootTerm P J < P + J ^ 2 / 4 - 2 := by |
| 59 | nlinarith [sq_pos_of_pos (show 0 < P - 2 by linarith)] |
| 60 | change 2 < P + J ^ 2 / 4 - rootTerm P J |
| 61 | linarith |
| 62 | |
| 63 | /-- Lemma 3.5: the full square-root criterion is equivalent to the quadratic test. -/ |
| 64 | theorem true_cone_iff {P J v : ℝ} (hv : 2 < v) : |
| 65 | (2 < P ∧ v < coneBound P J) ↔ |
| 66 | (v < P ∧ (v - 2) * J ^ 2 < 2 * (P - v) ^ 2) := by |
| 67 | constructor |
| 68 | · rintro ⟨hP, hcone⟩ |
| 69 | have hvP : v < P := lt_of_lt_of_le hcone (coneBound_le_parameter hP) |
| 70 | refine ⟨hvP, ?_⟩ |
| 71 | have hsq := rootTerm_sq (J := J) hP |
| 72 | have hr := rootTerm_nonneg P J |
| 73 | have hid := square_difference P J v |
| 74 | have hlt : rootTerm P J < P + J ^ 2 / 4 - v := by |
| 75 | change v < P + J ^ 2 / 4 - rootTerm P J at hcone |
| 76 | linarith |
| 77 | have hdiff := mul_pos (sub_pos.mpr hlt) |
| 78 | (show 0 < P + J ^ 2 / 4 - v + rootTerm P J by linarith) |
| 79 | nlinarith |
| 80 | · rintro ⟨hvP, hquad⟩ |
| 81 | have hP : 2 < P := lt_trans hv hvP |
| 82 | refine ⟨hP, ?_⟩ |
| 83 | have hsq := rootTerm_sq (J := J) hP |
| 84 | have hr := rootTerm_nonneg P J |
| 85 | have hid := square_difference P J v |
| 86 | have hpos : 0 < P + J ^ 2 / 4 - v := by nlinarith [sq_nonneg J] |
| 87 | have hlt : rootTerm P J < P + J ^ 2 / 4 - v := by nlinarith |
| 88 | change v < P + J ^ 2 / 4 - rootTerm P J |
| 89 | linarith |
| 90 | |
| 91 | /-- At and below two, P > 2 alone implies the relaxed root inequality. -/ |
| 92 | theorem relaxed_cone_of_le_two {P J v : ℝ} (hP : 2 < P) (hv : v ≤ 2) : |
| 93 | v < coneBound P J := lt_of_le_of_lt hv (coneBound_gt_two hP) |
| 94 | |
| 95 | /-- The exact factorization behind the limiting sufficient criterion (11). -/ |
| 96 | theorem normalized_factorization (a b w : ℝ) (ha : a ≠ 0) : |
| 97 | (a * (1 + (b / a) ^ 2) - 2) * (w + b / a) ^ 2 - |
| 98 | 2 * (1 - b * w / a) ^ 2 = |
| 99 | (1 + (b / a) ^ 2) * ((a - 2) * w ^ 2 + 2 * b * w + b ^ 2 / a - 2) := by |
| 100 | field_simp; ring |
| 101 | |
| 102 | /-- Strict negativity in equation (11) gives strict negativity of its factored test. -/ |
| 103 | theorem normalized_test_negative {a b w : ℝ} (ha : 0 < a) |
| 104 | (hcriterion : 2 * b * w + b ^ 2 / a + (a - 2) * w ^ 2 < 2) : |
| 105 | (a * (1 + (b / a) ^ 2) - 2) * (w + b / a) ^ 2 - |
| 106 | 2 * (1 - b * w / a) ^ 2 < 0 := by |
| 107 | rw [normalized_factorization a b w (ne_of_gt ha)] |
| 108 | exact mul_neg_of_pos_of_neg (by nlinarith [sq_nonneg (b / a)]) (by linarith) |
| 109 | |
| 110 | /-- An explicit finite-amplitude sufficient condition, prior to taking any limit. -/ |
| 111 | theorem finite_amplitude_cone {c j v p : ℝ} (hp : 0 < p) |
| 112 | (hP : 2 < p * c) (hvP : v < p * c) |
| 113 | (hscale : 4 * c * v < p * (2 * c ^ 2 - (v - 2) * j ^ 2)) : |
| 114 | v < coneBound (p * c) (p * j) := by |
| 115 | by_cases hv : 2 < v |
| 116 | · apply ((true_cone_iff hv).mpr ⟨hvP, ?_⟩).2 |
| 117 | have hprod : 0 < p * (p * (2 * c ^ 2 - (v - 2) * j ^ 2) - 4 * c * v) := |
| 118 | mul_pos hp (sub_pos.mpr hscale) |
| 119 | have hid : 2 * (p * c - v) ^ 2 - (v - 2) * (p * j) ^ 2 = |
| 120 | p * (p * (2 * c ^ 2 - (v - 2) * j ^ 2) - 4 * c * v) + 2 * v ^ 2 := by |
| 121 | ring |
| 122 | nlinarith [sq_nonneg v] |
| 123 | · exact relaxed_cone_of_le_two hP (le_of_not_gt hv) |
| 124 | |
| 125 | /-- For fixed normalized parameters, a positive leading coefficient and strict |
| 126 | quadratic margin give the relaxed cone at every sufficiently large amplitude. -/ |
| 127 | theorem sufficiently_large_amplitude_cone {c j v : ℝ} (hc : 0 < c) |
| 128 | (hmargin : (v - 2) * j ^ 2 < 2 * c ^ 2) : |
| 129 | ∃ p₀ : ℝ, ∀ p : ℝ, p₀ < p → |
| 130 | 2 < p * c ∧ v < coneBound (p * c) (p * j) := by |
| 131 | let δ := 2 * c ^ 2 - (v - 2) * j ^ 2 |
| 132 | have hδ : 0 < δ := sub_pos.mpr hmargin |
| 133 | let p₀ := max 0 (max (2 / c) (max (v / c) (4 * c * v / δ))) |
| 134 | refine ⟨p₀, fun p hlarge => ?_⟩ |
| 135 | have h₀ : 0 ≤ p₀ := le_max_left _ _ |
| 136 | have h₂ : 2 / c ≤ p₀ := (le_max_left _ _).trans (le_max_right _ _) |
| 137 | have hᵥ : v / c ≤ p₀ := |
| 138 | ((le_max_left _ _).trans (le_max_right _ _)).trans (le_max_right _ _) |
| 139 | have hδbound : 4 * c * v / δ ≤ p₀ := |
| 140 | ((le_max_right _ _).trans (le_max_right _ _)).trans (le_max_right _ _) |
| 141 | have hP : 2 < p * c := (div_lt_iff₀ hc).mp (lt_of_le_of_lt h₂ hlarge) |
| 142 | refine ⟨hP, finite_amplitude_cone (lt_of_le_of_lt h₀ hlarge) hP ?_ ?_⟩ |
| 143 | · exact (div_lt_iff₀ hc).mp (lt_of_le_of_lt hᵥ hlarge) |
| 144 | · exact (div_lt_iff₀ hδ).mp (lt_of_le_of_lt hδbound hlarge) |
| 145 | |
| 146 | /-- Equation (11) is sufficient at all sufficiently large positive stress |
| 147 | amplitudes for each fixed triple of parameters. -/ |
| 148 | theorem equation_eleven_sufficient {a b w : ℝ} (ha : 0 < a) |
| 149 | (hfirst : 0 < a - b * w) |
| 150 | (hsecond : 2 * b * w + b ^ 2 / a + (a - 2) * w ^ 2 < 2) : |
| 151 | ∃ p₀ : ℝ, ∀ p : ℝ, p₀ < p → |
| 152 | 2 < p * (1 - b * w / a) ∧ a * (1 + (b / a) ^ 2) < |
| 153 | coneBound (p * (1 - b * w / a)) (p * (w + b / a)) := by |
| 154 | apply sufficiently_large_amplitude_cone |
| 155 | · apply sub_pos.mpr |
| 156 | exact (div_lt_one ha).mpr (by linarith) |
| 157 | · have h := normalized_test_negative ha hsecond |
| 158 | linarith |
| 159 | |
| 160 | end NavierStokes.ConeAlgebra |