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.Ac.Nodes |
| 2 | import YM.RG.Activities |
| 3 | |
| 4 | set_option warningAsError false |
| 5 | |
| 6 | /-! |
| 7 | # Back and forth on the complete declared footprints |
| 8 | |
| 9 | This file is structural. |
| 10 | |
| 11 | Give it actual tested output |
| 12 | supports, NOT numerical function supports. |
| 13 | |
| 14 | Think one address for each compulsory packet (covers |
| 15 | all its seed halos), one for each optional *variant* (retains the parent physical address), one |
| 16 | for each selected K (support incl projections and queried flag reads). |
| 17 | |
| 18 | Work on subsets (Γ copies |
| 19 | for log handled later, don't run these lemmas on a flattened multiset!). |
| 20 | |
| 21 | Assembly sees negative and |
| 22 | dormant answers too; use `Retained` even on the eligibility tests themselves. |
| 23 | |
| 24 | No claims here of |
| 25 | achieving the `Retained` or partition/protector hypotheses nor that records meeting these graph |
| 26 | conditions give good prices under the measure. |
| 27 | -/ |
| 28 | |
| 29 | set_option autoImplicit false |
| 30 | noncomputable section |
| 31 | namespace YM.SectorNext.Reconnect |
| 32 | |
| 33 | open Lattice Filter Function RG |
| 34 | |
| 35 | variable {c : Side} {ι : Type*} [DecidableEq ι] |
| 36 | |
| 37 | namespace Words |
| 38 | |
| 39 | /-- Occupied complete footprint of a selection of addresses. -/ |
| 40 | abbrev region (X : ι → Support c) (s : Finset ι) : Support c := s.biUnion X |
| 41 | /-- Not indexed by the supports but by address sets — many component data may be on the same halo. -/ |
| 42 | def Apart (X : ι → Support c) (b : Finset (Finset ι)) : Prop := |
| 43 | (b : Set (Finset ι)).PairwiseDisjoint (region X) |
| 44 | |
| 45 | def Pieces (X : ι → Support c) (b : Finset (Finset ι)) : Prop := |
| 46 | Apart X b ∧ ∀ p∈b, Ac.Spark X p |
| 47 | |
| 48 | lemma partition (X : ι → Support c) (s : Finset ι) : Pieces X (Ac.Parts X s) := |
| 49 | ⟨Ac.separate .., fun _ h => (Ac.lives X s h).2⟩ |
| 50 | |
| 51 | /-- Genuine equivalence of layouts, not of their nonzero terms only. -/ |
| 52 | def assemble (X : ι → Support c) : {b // Pieces X b} ≃ Finset ι where |
| 53 | toFun b := b.val.biUnion id |
| 54 | invFun s := ⟨Ac.Parts X s, partition X s⟩ |
| 55 | left_inv := by |
| 56 | rintro ⟨b,hb⟩; exact Subtype.ext (Ac.separates X b hb.2 hb.1) |
| 57 | right_inv := Ac.reconstruct X |
| 58 | |
| 59 | omit [DecidableEq ι] in |
| 60 | lemma region_sub {X : ι → Support c} {p s : Finset ι} (h : p ⊆ s) : region X p ⊆ region X s := by |
| 61 | intro x hx; obtain ⟨i,hi,he⟩ := Finset.mem_biUnion.mp hx |
| 62 | exact Finset.mem_biUnion.mpr ⟨i,h hi,he⟩ |
| 63 | |
| 64 | lemma owner {X : ι → Support c} {p s : Finset ι} (hp : p ∈ Ac.Parts X s) |
| 65 | {i j} (hi : i ∈ p) (hj : j∈s) (h : ¬Disjoint (X i) (X j)) : j∈p := by |
| 66 | have hconn : Ac.chain X s i j := .single ⟨(Ac.lives X s hp).1 hi,hj,Finset.not_disjoint_iff.mp h⟩ |
| 67 | rw [← Ac.contains X hp _ hi] |
| 68 | exact (Ac.bright X i j).mpr ⟨hj,hconn⟩ |
| 69 | |
| 70 | lemma owner' {X : ι → Support c} {p s : Finset ι} (hp : p∈Ac.Parts X s) |
| 71 | {j} (hj : j∈s) (h : ¬Disjoint (region X p) (X j)) : j∈p := by |
| 72 | obtain ⟨x,hx,hy⟩ := Finset.not_disjoint_iff.mp h |
| 73 | obtain ⟨i,hi,hi'⟩ := Finset.mem_biUnion.mp hx |
| 74 | exact owner hp hi hj (Finset.not_disjoint_iff.mpr ⟨x,hi',hy⟩) |
| 75 | |
| 76 | omit [DecidableEq ι] in |
| 77 | lemma no_duplicate (X : ι → Support c) (hX : ∀ i,(X i).Nonempty) {b : Finset (Finset ι)} |
| 78 | (h : Apart X b) : (b : Set (Finset ι)).PairwiseDisjoint id := by |
| 79 | intro p hp q hq hn |
| 80 | refine Finset.disjoint_left.mpr ?_ |
| 81 | intro i hi hj |
| 82 | obtain ⟨x,hx⟩:=hX i |
| 83 | exact Finset.disjoint_left.mp (h hp hq hn) |
| 84 | (Finset.mem_biUnion.mpr ⟨i,hi,hx⟩) (Finset.mem_biUnion.mpr ⟨i,hj,hx⟩) |
| 85 | |
| 86 | lemma after_union (D : ι → Support c) (b : Finset (Finset ι)) : |
| 87 | region D (b.biUnion id) = b.biUnion (region D) := by |
| 88 | ext |
| 89 | simp only [region, Finset.mem_biUnion, id_eq] |
| 90 | constructor |
| 91 | · rintro ⟨i,⟨p,hp,hi⟩,hv⟩; exact ⟨p,hp,i,hi,hv⟩ |
| 92 | · rintro ⟨p,hp,i,hi,hv⟩; exact ⟨i,⟨p,hp,hi⟩,hv⟩ |
| 93 | |
| 94 | lemma parts_union (X : ι → Support c) (D : ι → Support c) (s : Finset ι) : |
| 95 | (Ac.Parts X s).biUnion (region D) = region D s := by |
| 96 | rw [← after_union, Ac.reconstruct] |
| 97 | |
| 98 | omit [DecidableEq ι] in |
| 99 | lemma region_inventory {X D : ι → Support c} (hD : ∀ i,D i ⊆ X i) (p : Finset ι) : |
| 100 | region D p ⊆ region X p := by |
| 101 | intro i hi |
| 102 | obtain ⟨j,hj,hv⟩:=Finset.mem_biUnion.mp hi |
| 103 | exact Finset.mem_biUnion.mpr ⟨j,hj,hD j hv⟩ |
| 104 | |
| 105 | omit [DecidableEq ι] in |
| 106 | /-- The one-time final flag test can be inserted on assembled gas families even at unforced |
| 107 | components: coverage and *support* disjointness, not merely disjoint inventories. -/ |
| 108 | lemma readable {X D : ι → Support c} (hD : ∀ i,D i⊆X i) {b : Finset (Finset ι)} |
| 109 | (h : Apart X b) {S : Support c} (he : b.biUnion (region D) = S) (p : Finset ι) (hp : p∈b) : |
| 110 | region X p ∩ S = region D p := by |
| 111 | ext x |
| 112 | rw [← he,Finset.mem_inter] |
| 113 | constructor |
| 114 | · rintro ⟨hx,ht⟩; obtain ⟨q,hq,hy⟩:=Finset.mem_biUnion.mp ht |
| 115 | by_cases H : p=q |
| 116 | · exact H.symm ▸ hy |
| 117 | · exact (Finset.disjoint_left.mp (h hp hq H) hx (region_inventory hD q hy)).elim |
| 118 | intro hx |
| 119 | exact ⟨region_inventory hD p hx, Finset.mem_biUnion.mpr ⟨_,hp,hx⟩⟩ |
| 120 | |
| 121 | lemma read_partition {X D : ι → Support c} (hD : ∀ i,D i ⊆ X i) {S : Support c} {s : Finset ι} |
| 122 | (he : region D s = S) (p : Finset ι) (hp : p∈Ac.Parts X s) : region X p ∩ S = region D p := |
| 123 | readable hD (partition X s).1 ((parts_union X D s).trans he) p hp |
| 124 | |
| 125 | /-! ## Local table lookups -/ |
| 126 | |
| 127 | /-- Locality of an address/table rule in the *choices*, including off branches. `Y i` is all |
| 128 | queried positions at address i, `X` the complete dependency support of every possible address |
| 129 | including addresses changing those answers. Can usually take Y = X. -/ |
| 130 | def Within {α : Sort*} (X : ι → Support c) (Y : Support c) (F : Finset ι → α) := |
| 131 | ∀ s b, (∀ j, ¬Disjoint Y (X j) → (j ∈ s ↔ j∈ b)) → F s = F b |
| 132 | |
| 133 | def Retained {α : Sort*} (X : ι → Support c) (F : ι → Finset ι → α) := ∀ i,Within X (X i) (F i) |
| 134 | |
| 135 | lemma unchanged {X : ι → Support c} {p s : Finset ι} (hp : p ∈ Ac.Parts X s) {α : Sort*} |
| 136 | {Y : Support c} {F : Finset ι → α} (hF : Within X Y F) (hY : Y ⊆ region X p) : F s = F p := by |
| 137 | apply hF; intro j hj |
| 138 | exact ⟨fun he => owner' hp he (fun hv => hj (Finset.disjoint_of_subset_left hY hv)), fun hh => (Ac.lives X s hp).1 hh⟩ |
| 139 | |
| 140 | lemma restrict_table {X : ι → Support c} {p s : Finset ι} (hp : p ∈ Ac.Parts X s) {α : Sort*} |
| 141 | {F : ι → Finset ι → α} (hF : Retained X F) {i : ι} (hi : i∈p) : F i s = F i p := |
| 142 | unchanged hp (hF i) (fun _ he => Finset.mem_biUnion.mpr ⟨i,hi,he⟩) |
| 143 | |
| 144 | /-- Form a selection lookup table by recording every selected address hitting queried |
| 145 | positions (a test using only a subset of the committed footprints also works). In particular |
| 146 | this needn't index over global *candidate* configurations of table contents. -/ |
| 147 | def lookup (X : ι → Support c) (Y : Support c) (s : Finset ι) := s.filter fun i => |
| 148 | decide (¬ Disjoint Y (X i)) |
| 149 | |
| 150 | omit [DecidableEq ι] in |
| 151 | lemma via_table (X : ι → Support c) (Y : Support c) : Within X Y (lookup X Y) := by |
| 152 | intro s b he; ext; simp only [lookup,Finset.mem_filter, decide_eq_true_eq]; exact and_congr_left (he _) |
| 153 | |
| 154 | /-- Check a (possibly many-answer) address table with a function using the literal selected |
| 155 | list at positions it can query. Include negative answers. -/ |
| 156 | def permits (E : ι → Finset ι → Prop) (s : Finset ι) := ∀ i∈s,E i s |
| 157 | |
| 158 | lemma eligible_parts {E : ι → Finset ι → Prop} {X : ι → Support c} (h : Retained X E) (s : Finset ι) : |
| 159 | permits E s ↔ ∀ p∈Ac.Parts X s, permits E p := by |
| 160 | constructor |
| 161 | · intro hp p hh i hi |
| 162 | exact (restrict_table hh h hi) ▸ hp i ((Ac.lives X s hh).1 hi) |
| 163 | intro hh i hi |
| 164 | let p := Ac.burst X s i |
| 165 | have hp : p ∈ Ac.Parts X s := Finset.mem_image_of_mem _ hi |
| 166 | have ht : i ∈ p := (Ac.bright X _ _).mpr ⟨hi,.refl⟩ |
| 167 | rw [restrict_table hp h ht] |
| 168 | exact hh _ hp i ht |
| 169 | |
| 170 | omit [DecidableEq ι] in |
| 171 | /-- Example of proving Retained from complete-support data: enforcing parent-address |
| 172 | exclusions once, e.g. alternative marks at an optional h (all variants read at least one of |
| 173 | the same physical sites regardless of whether their numerical coefficient is used) or packet |
| 174 | conflict or old K-overlap prohibition. -/ |
| 175 | lemma ret_excludes {X : ι → Support c} (banned : ι → ι → Prop) (h : ∀ i j,banned i j → |
| 176 | ¬Disjoint (X i) (X j)) : Retained X (fun i s => ∀ j∈s, i ≠ j → ¬banned i j) := by |
| 177 | intro i s b he |
| 178 | refine propext ⟨fun H j hj hn hv => H j ((he j (h _ _ hv)).2 hj) hn hv, |
| 179 | fun H j hj hn hv => H j ((he j (h _ _ hv)).1 hj) hn hv⟩ |
| 180 | |
| 181 | omit [DecidableEq ι] in |
| 182 | /-- Similarly *requiring* an incidence for each selected address, without choosing a unique |
| 183 | paying seed. -/ |
| 184 | lemma ret_needs {X : ι → Support c} (needs : ι → ι → Prop) (h : ∀ i j,needs i j → |
| 185 | ¬Disjoint (X i) (X j)) : Retained X (fun i s => ∃ j∈s,needs i j) := by |
| 186 | intro i s b he |
| 187 | refine propext ?_; constructor |
| 188 | · rintro ⟨j,hj,H⟩; exact ⟨j,(he _ (h _ _ H)).1 hj,H⟩ |
| 189 | · rintro ⟨j,hj,H⟩; exact ⟨j,(he _ (h _ _ H)).2 hj,H⟩ |
| 190 | |
| 191 | omit [DecidableEq ι] in |
| 192 | lemma ret_all {δ : Sort*} {X : ι → Support c} {E : δ → ι → Finset ι → Prop} |
| 193 | (h : ∀ d,Retained X (E d)) : Retained X (fun i s => ∀ d,E d i s) := by |
| 194 | intro i s b he |
| 195 | refine propext (forall_congr' (fun d => ?_)) |
| 196 | rw [h d i s b he] |
| 197 | |
| 198 | /-! ## Conditional exact merging on infinite series -/ |
| 199 | |
| 200 | variable {W : Type*} [AddCommMonoid W] [TopologicalSpace W] |
| 201 | |
| 202 | lemma reindex {X : ι → Support c} {g : Finset ι → W} {f : Finset (Finset ι) → W} {a : W} |
| 203 | (hz : ∀ b, ¬Pieces X b → f b = 0) (he : ∀ s,f (Ac.Parts X s) = g s) : |
| 204 | HasSum g a ↔ HasSum f a := by |
| 205 | have hX (s : Finset ι) : f ((assemble X).symm s).val = g s := he s |
| 206 | have hR : HasSum g a ↔ HasSum (f ∘ (Subtype.val : {b : Finset (Finset ι) // Pieces X b} → _)) a := by |
| 207 | rw [← (assemble X).symm.hasSum_iff]; simp only [Function.comp_def, hX] |
| 208 | refine hR.trans ?_ |
| 209 | convert! hasSum_subtype_iff_of_support_subset (s := {b | Pieces X b}) (f := f) ?_ using 1 |
| 210 | intro b hb; exact of_not_not (fun hn => hb (hz b hn)) |
| 211 | |
| 212 | section gas |
| 213 | |
| 214 | open scoped Classical |
| 215 | |
| 216 | /-- gas already including final-read indicator. Spark eligibility (distinct placements, |
| 217 | incidences with compulsory packets etc) also inside coefficient. Local coefficient `u` used |
| 218 | before these final tests. Invalid/nonconnected components can stay on alphabet as zeros. -/ |
| 219 | def clause (E : ι → Finset ι → Prop) (X D : ι → Support c) (S : Support c) |
| 220 | (u : Finset ι → ℝ) (p : Finset ι) := if permits E p ∧ region X p ∩ S = region D p then u p else 0 |
| 221 | |
| 222 | def openOccurrence (X D : ι → Support c) (S : Support c) (u : Finset ι → ℝ) (b : Finset (Finset ι)) := |
| 223 | if Pieces X b ∧ b.biUnion (region D) = S then ∏ i∈b,u i else 0 |
| 224 | |
| 225 | /-- Reconstruction of all layouts. Input G from actual terms of an expanded formula or their |
| 226 | integrals; need only on-sector factorizability, don't infer it from this graph. Every appearance |
| 227 | of E, D must be from ONE list of addresses. -/ |
| 228 | theorem layout_sum {E : ι → Finset ι → Prop} {X D : ι → Support c} (hE : Retained X E) |
| 229 | (hD : ∀ i,D i ⊆ X i) (S : Support c) (G u : Finset ι → ℝ) |
| 230 | (he : ∀ s, permits E s → region D s = S → G s = ∏ i∈Ac.Parts X s, u i) (b : ℝ) : |
| 231 | HasSum (fun s => if permits E s ∧ region D s = S then G s else 0) b ↔ |
| 232 | HasSum (openOccurrence X D S (clause E X D S u)) b := by |
| 233 | apply reindex (X:=X) (fun b hb => by simp [openOccurrence,hb]); intro s |
| 234 | have ht := parts_union X D s |
| 235 | by_cases hn : region D s = S |
| 236 | · simp only [openOccurrence, partition,ht,hn, ↓reduceIte, and_true] |
| 237 | by_cases hm : permits E s |
| 238 | · rw [if_pos hm,he _ hm hn] |
| 239 | refine Finset.prod_congr rfl fun i hi => ?_ |
| 240 | exact if_pos ⟨(eligible_parts hE s).1 hm _ hi, read_partition hD hn _ hi⟩ |
| 241 | rw [if_neg hm] |
| 242 | rw [eligible_parts hE] at hm |
| 243 | push Not at hm |
| 244 | obtain ⟨p,hp,hq⟩:=hm |
| 245 | apply Finset.prod_eq_zero hp |
| 246 | simp [clause,hq] |
| 247 | simp [openOccurrence,ht,hn] |
| 248 | end gas |
| 249 | end Words |
| 250 | end YM.SectorNext.Reconnect |