Yang–Mills: the 2026 Lean construction, rerun and read; the mass gap still open
OpenAI's 2026 Lean construction of 4D Yang–Mills as the expert group keeps it: settle what it proves, rerun it, read it; uniqueness and the mass gap are open, and Clay's problem unsolved

| 1 | import YM.Next.EXTRACTION.Tails |
| 2 | import YM.Org.Theatre |
| 3 | import YM.Work.B04 |
| 4 | import YM.Work.B06 |
| 5 | |
| 6 | /-! |
| 7 | # Cost compiler: numerical tools |
| 8 | |
| 9 | Not a schedule theorem for all of E. |
| 10 | |
| 11 | Arguments to our costs on an edge of the schedule are in the order |
| 12 | **input, output** `(j,i)`; these are *smoothing stages*, not step |
| 13 | numbers. They can be equal! Costs at dummy stages (e.g., j<4) use the |
| 14 | same types. Prefix operations here are always **finite**. The inputs to |
| 15 | them must already be known; these are not fixed-point lemmas for mutually |
| 16 | dependent quotations. |
| 17 | -/ |
| 18 | |
| 19 | set_option autoImplicit false |
| 20 | noncomputable section |
| 21 | namespace YM.Push.PriceCompiler |
| 22 | |
| 23 | open Filter Function Lattice RG RG.Supply Wilson |
| 24 | open scoped Topology Matrix.Norms.Frobenius BigOperators |
| 25 | |
| 26 | /-- Possible stage edge, arguments (finer, coarser). Includes loops. -/ |
| 27 | def StepStages (j i : ℕ) : Prop := i ≤ j ∧ j ≤ i+1 |
| 28 | |
| 29 | lemma stepStages_source {j i : ℕ} (h : StepStages j i) : j = i ∨ j = i+1 := by |
| 30 | unfold StepStages at h |
| 31 | omega |
| 32 | |
| 33 | lemma stepStages_target {j i : ℕ} (h : StepStages j i) : i = j ∨ i = j-1 := by |
| 34 | unfold StepStages at h |
| 35 | omega |
| 36 | |
| 37 | lemma stages_same (j : ℕ) : StepStages j j := ⟨le_rfl, Nat.le_succ _⟩ |
| 38 | |
| 39 | lemma stages_down (j : ℕ) : StepStages j (j-1) := by |
| 40 | unfold StepStages |
| 41 | omega |
| 42 | |
| 43 | section Max |
| 44 | variable {ι α : Type*} [LinearOrder α] |
| 45 | |
| 46 | /-- Common charge for both possible transitions FROM j. -/ |
| 47 | def fromMax (u : ℕ → ℕ → α) (j : ℕ) : α := max (u j j) (u j (j-1)) |
| 48 | /-- Common upper limit for a positive width/lower-bound constant, |
| 49 | computed from quotes for transitions FROM j (take min). -/ |
| 50 | def fromMin (u : ℕ → ℕ → α) (j : ℕ) : α := min (u j j) (u j (j-1)) |
| 51 | /-- Charge for both possible transitions ENDING AT i. -/ |
| 52 | def intoMax (u : ℕ → ℕ → α) (i : ℕ) : α := max (u i i) (u (i+1) i) |
| 53 | /-- Width for both possible transitions ENDING AT i. -/ |
| 54 | def intoMin (u : ℕ → ℕ → α) (i : ℕ) : α := min (u i i) (u (i+1) i) |
| 55 | |
| 56 | lemma le_fromMax (u : ℕ → ℕ → α) {i j : ℕ} (h : StepStages j i) : u j i ≤ fromMax u j := by |
| 57 | rcases stepStages_target h with h|h |
| 58 | · rw [h]; exact le_max_left .. |
| 59 | rw [h]; exact le_max_right .. |
| 60 | |
| 61 | lemma fromMin_le (u : ℕ → ℕ → α) {i j : ℕ} (h : StepStages j i) : fromMin u j ≤ u j i := by |
| 62 | rcases stepStages_target h with h|h |
| 63 | · rw [h]; exact min_le_left .. |
| 64 | rw [h]; exact min_le_right .. |
| 65 | |
| 66 | lemma le_intoMax (u : ℕ → ℕ → α) {i j : ℕ} (h : StepStages j i) : u j i ≤ intoMax u i := by |
| 67 | rcases stepStages_source h with h|h |
| 68 | · rw [h]; exact le_max_left .. |
| 69 | rw [h]; exact le_max_right .. |
| 70 | |
| 71 | lemma intoMin_le (u : ℕ → ℕ → α) {i j : ℕ} (h : StepStages j i) : intoMin u i ≤ u j i := by |
| 72 | rcases stepStages_source h with h|h |
| 73 | · rw [h]; exact min_le_left .. |
| 74 | rw [h]; exact min_le_right .. |
| 75 | |
| 76 | /-- Finite prefix upper envelope. -/ |
| 77 | def prefixHi (f : ℕ → α) (i : ℕ) := (Finset.range (i+1)).sup' (by simp) f |
| 78 | /-- Finite prefix lower envelope. -/ |
| 79 | def prefixLo (f : ℕ → α) (i : ℕ) := (Finset.range (i+1)).inf' (by simp) f |
| 80 | |
| 81 | lemma prefixHi_le {f : ℕ → α} {i : ℕ} {a : α} (h : ∀ j ≤ i, f j ≤ a) : prefixHi f i ≤ a := |
| 82 | Finset.sup'_le _ _ fun j hj => h j (Nat.lt_succ_iff.mp (Finset.mem_range.mp hj)) |
| 83 | |
| 84 | lemma le_prefixLo {f : ℕ → α} {i : ℕ} {a : α} (h : ∀ j ≤ i, a ≤ f j) : a ≤ prefixLo f i := |
| 85 | Finset.le_inf' _ _ fun j hj => h j (Nat.lt_succ_iff.mp (Finset.mem_range.mp hj)) |
| 86 | |
| 87 | lemma le_prefixHi (f : ℕ → α) {i j : ℕ} (h : j ≤ i) : f j ≤ prefixHi f i := |
| 88 | Finset.le_sup' _ (Finset.mem_range.mpr (Nat.lt_succ_iff.mpr h)) |
| 89 | |
| 90 | lemma prefixLo_le (f : ℕ → α) {i j : ℕ} (h : j ≤ i) : prefixLo f i ≤ f j := |
| 91 | Finset.inf'_le _ (Finset.mem_range.mpr (Nat.lt_succ_iff.mpr h)) |
| 92 | |
| 93 | lemma lt_prefixLo {f : ℕ → α} {i : ℕ} {a : α} (h : ∀ j ≤ i, a < f j) : a < prefixLo f i := by |
| 94 | unfold prefixLo |
| 95 | rw [Finset.lt_inf'_iff] |
| 96 | exact fun j hj => h j (Nat.lt_succ_iff.mp (Finset.mem_range.mp hj)) |
| 97 | |
| 98 | lemma prefixHi_mono (f : ℕ → α) : Monotone (prefixHi f) := fun _ _ hij => |
| 99 | prefixHi_le fun _ hk => le_prefixHi f (hk.trans hij) |
| 100 | |
| 101 | lemma prefixLo_anti (f : ℕ → α) : Antitone (prefixLo f) := fun _ _ hij => |
| 102 | le_prefixLo fun _ hk => prefixLo_le f (hk.trans hij) |
| 103 | |
| 104 | |
| 105 | |
| 106 | |
| 107 | |
| 108 | /-- Eventually requirements can always be bought as *monotone* |
| 109 | entrance/floor thresholds, using initial lower requests. No monotonicity |
| 110 | of the tested predicate required. Use for α=ℕ pre-L, or α=ℝ post-L. -/ |
| 111 | theorem collect_upper (u : ℕ → α) (T : ℕ → α → Prop) (h : ∀ i, ∀ᶠ x in atTop, T i x) : |
| 112 | ∃ m : ℕ → α, Monotone m ∧ u ≤ m ∧ ∀ i x, m i ≤ x → T i x := by |
| 113 | have : Nonempty α := ⟨u 0⟩ |
| 114 | classical |
| 115 | choose b hb using fun i => eventually_atTop.mp (h i) |
| 116 | let f (i : ℕ) := max (b i) (u i) |
| 117 | exact ⟨prefixHi f, prefixHi_mono _, fun _ => le_trans (le_max_right ..) (le_prefixHi f le_rfl), |
| 118 | fun i x hx => hb i x (le_trans (le_trans (le_max_left ..) (le_prefixHi f le_rfl)) hx)⟩ |
| 119 | |
| 120 | |
| 121 | end Max |
| 122 | |
| 123 | section Edge |
| 124 | variable {α : Type*} |
| 125 | /-- Collect the two eventual transition tests at one stage; also works at 0. -/ |
| 126 | theorem eventually_transitions (j : ℕ) (f : Filter α) (T : ℕ → α → Prop) |
| 127 | (h : ∀ i, StepStages j i → ∀ᶠ x in f, T i x) : ∀ᶠ x in f, ∀ i, StepStages j i → T i x := by |
| 128 | filter_upwards [h j (stages_same _), h (j-1) (stages_down _)] with x hx he i hi |
| 129 | rcases stepStages_target hi with H|H |
| 130 | · rwa [H] |
| 131 | rwa [H] |
| 132 | end Edge |
| 133 | |
| 134 | /-- Convenient upper envelope. Raw amount lower requests need not be positive. -/ |
| 135 | def payHi (f : ℕ → ℝ) := prefixHi (fun i => max (1:ℝ) (f i)) |
| 136 | lemma payHi_mono (f : ℕ → ℝ) : Monotone (payHi f) := prefixHi_mono _ |
| 137 | lemma payHi_one (f : ℕ → ℝ) (i : ℕ) : 1 ≤ payHi f i := |
| 138 | le_trans (le_max_left ..) (le_prefixHi (fun i => max (1:ℝ) (f i)) le_rfl) |
| 139 | lemma payHi_pos (f : ℕ → ℝ) (i : ℕ) : 0 < payHi f i := lt_of_lt_of_le zero_lt_one (payHi_one ..) |
| 140 | lemma le_payHi (f : ℕ → ℝ) : f ≤ payHi f := fun _ => |
| 141 | le_trans (le_max_right ..) (le_prefixHi (fun i => max (1:ℝ) (f i)) le_rfl) |
| 142 | |
| 143 | def rateLo (f : ℕ → ℝ) := prefixLo (fun i => min (1:ℝ) (f i)) |
| 144 | lemma rateLo_anti (f : ℕ → ℝ) : Antitone (rateLo f) := prefixLo_anti _ |
| 145 | lemma rateLo_pos {f : ℕ → ℝ} (h : ∀ i, 0 < f i) (i : ℕ) : 0 < rateLo f i := |
| 146 | lt_prefixLo fun j _ => lt_min zero_lt_one (h j) |
| 147 | lemma rateLo_one (f : ℕ → ℝ) (i : ℕ) : rateLo f i ≤ 1 := |
| 148 | le_trans (prefixLo_le (fun i => min (1:ℝ) (f i)) le_rfl) (min_le_left ..) |
| 149 | lemma rateLo_le (f : ℕ → ℝ) : rateLo f ≤ f := fun _ => |
| 150 | le_trans (prefixLo_le (fun i => min (1:ℝ) (f i)) le_rfl) (min_le_right ..) |
| 151 | |
| 152 | section Clock |
| 153 | variable {G : Gauge} |
| 154 | |
| 155 | lemma step_paid (a : Levels G) (m : ℕ) : StepStages (a.clock.J (m+1)) (a.clock.J m) := |
| 156 | ⟨a.fits.mono (Nat.le_succ _), a.fits.stepSlow _⟩ |
| 157 | |
| 158 | lemma first_le {p : Sheet G} {D : Rolls p} {T : Protection D} {W : Delays T} {Y : Bar W} {I : Wait Y} |
| 159 | {a : Levels G} (h : Paid I a) (m : ℕ) : p.first ≤ a.clock.J m := |
| 160 | le_trans h.firstZero.symm.le (a.fits.mono (Nat.zero_le m)) |
| 161 | |
| 162 | lemma block_eq {p : Sheet G} {D : Rolls p} {T : Protection D} {W : Delays T} {Y : Bar W} {I : Wait Y} |
| 163 | {a : Levels G} (h : Paid I a) (m : ℕ) : a.S.block m = D.L (a.clock.J (m+1)) := |
| 164 | (a.fits.sameFactor m).symm.trans (congr_fun h.lengths _) |
| 165 | |
| 166 | lemma params_eq {p : Sheet G} {D : Rolls p} {T : Protection D} {W : Delays T} {Y : Bar W} {I : Wait Y} |
| 167 | {a : Levels G} (h : Paid I a) (m : ℕ) : a.params m = p.profile (a.clock.J m) := |
| 168 | congr_fun h.stage _ |
| 169 | |
| 170 | lemma side_ge_shell {p : Sheet G} {D : Rolls p} {T : Protection D} {W : Delays T} {Y : Bar W} {I : Wait Y} |
| 171 | {a : Levels G} (h : Paid I a) (m i : ℕ) : W.shells (a.clock.J (m+1)) ≤ (a.S.side m i).val := by |
| 172 | refine le_trans ?_ (h.volume m i) |
| 173 | refine Nat.le_mul_of_pos_right _ (pow_pos ?_ _) |
| 174 | omega |
| 175 | |
| 176 | lemma beta_eq {p : Sheet G} {D : Rolls p} {T : Protection D} {W : Delays T} {Y : Bar W} {I : Wait Y} |
| 177 | {a : Levels G} (h : Paid I a) (m : ℕ) : a.clock.hatBeta (m+1) = |
| 178 | Pressure.betaF G (a.clock.hatBeta m) (D.L (a.clock.J (m+1))) := by |
| 179 | unfold Calendar.hatBeta Pressure.betaF |
| 180 | rw [Schedule.scale_succ, ← block_eq h m] |
| 181 | change a.clock.bar + G.slopeConstant * (a.S.scale m + Real.log (a.S.block m).val) = _ |
| 182 | ring |
| 183 | end Clock |
| 184 | |
| 185 | section Budget |
| 186 | variable {ι : Type*} |
| 187 | |
| 188 | lemma sumBudget_mono {f g : ι → ℝ} {a b : ℝ} (h : SumBudget f a) (hz : ∀ i, 0 ≤ g i) |
| 189 | (hg : g ≤ f) (ha : a ≤ b) : SumBudget g b := by |
| 190 | have ht := h.2.1.of_nonneg_of_le hz hg |
| 191 | exact ⟨hz, ht, (ht.tsum_le_tsum hg h.2.1).trans (h.2.2.trans ha)⟩ |
| 192 | end Budget |
| 193 | end YM.Push.PriceCompiler |