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 |
| 2 | import Lean |
| 3 | import Lean.Replay |
| 4 | |
| 5 | /-! Recheck the project declarations reachable from the advertised theorem terms in a |
| 6 | kernel environment which initially contains only the pinned external libraries. -/ |
| 7 | set_option autoImplicit false |
| 8 | |
| 9 | namespace IndependentAudit |
| 10 | open Lean Elab Command |
| 11 | |
| 12 | private def projectModule (m : Name) : Bool := |
| 13 | Name.isPrefixOf `YM m |
| 14 | |
| 15 | private def standardAxioms : List Name := [`propext, `Classical.choice, `Quot.sound] |
| 16 | |
| 17 | def replayProofs (roots : Array Name) : CommandElabM Unit := do |
| 18 | let env := (← getEnv).setExporting false |
| 19 | let mut seen : NameSet := {} |
| 20 | let mut boundary : NameSet := {} |
| 21 | let mut project : Std.HashMap Name ConstantInfo := {} |
| 22 | let mut pending := roots |
| 23 | for n in roots do |
| 24 | let some (.thmInfo _) := env.checked.get.find? n | throwError "Expected a theorem: {n}" |
| 25 | let axioms ← collectAxioms n |
| 26 | unless axioms.all standardAxioms.contains do |
| 27 | throwError "Unexpected endpoint axiom at {n}: {axioms}" |
| 28 | logInfo m!"ENDPOINT_AXIOMS {n} {axioms}" |
| 29 | while !pending.isEmpty do |
| 30 | let n := pending.back! |
| 31 | pending := pending.pop |
| 32 | if seen.contains n then continue |
| 33 | seen := seen.insert n |
| 34 | let some ci := env.checked.get.find? n | throwError "Missing declaration {n}" |
| 35 | let some idx := env.getModuleIdxFor? n | throwError "Missing source owner for {n}" |
| 36 | if !projectModule env.header.modules[idx.toNat]!.module then |
| 37 | let axioms ← collectAxioms n |
| 38 | unless axioms.all standardAxioms.contains do |
| 39 | throwError "Unexpected axiom at external boundary {n}: {axioms}" |
| 40 | boundary := boundary.insert n |
| 41 | continue |
| 42 | if ci.isUnsafe || ci.isPartial then throwError "Unsafe or partial project dependency {n}" |
| 43 | if ci matches .axiomInfo _ then throwError "Project axiom {n}" |
| 44 | project := project.insert n ci |
| 45 | pending := pending ++ ci.getUsedConstantsAsSet.toArray |
| 46 | if let .inductInfo i := ci then pending := pending ++ i.all.toArray |
| 47 | let externals := env.header.modules.filterMap fun m => |
| 48 | if projectModule m.module then none else some ({module := m.module} : Import) |
| 49 | let base ← liftIO <| importModules externals {} |
| 50 | for m in base.header.modules do |
| 51 | if projectModule m.module then throwError "Project module in replay base: {m.module}" |
| 52 | for n in roots do |
| 53 | if (base.checked.get.find? n).isSome then throwError "Endpoint already in replay base: {n}" |
| 54 | let mut replay := project |
| 55 | let mut aliases := #[] |
| 56 | for (n, ci) in project do |
| 57 | if let some imported := base.checked.get.find? n then |
| 58 | let .thmInfo original := imported | throwError "Non-theorem in replay base at {n}" |
| 59 | let .thmInfo localProof := ci | throwError "Non-theorem project collision at {n}" |
| 60 | unless localProof.levelParams == original.levelParams && localProof.type == original.type && |
| 61 | localProof.all == original.all do throwError "Duplicate theorem statement differs at {n}" |
| 62 | let axioms ← withEnv base <| collectAxioms n |
| 63 | unless axioms.all standardAxioms.contains do |
| 64 | throwError "Unexpected axiom in external duplicate theorem {n}: {axioms}" |
| 65 | let fresh := Name.str n "_boundedProofReplay" |
| 66 | if (env.checked.get.find? fresh).isSome || (base.checked.get.find? fresh).isSome || |
| 67 | replay.contains fresh then throwError "Duplicate audit name already exists: {fresh}" |
| 68 | replay := replay.insert fresh (.thmInfo {localProof with name := fresh, all := [fresh]}) |
| 69 | aliases := aliases.push fresh |
| 70 | logInfo m!"DUPLICATE_THEOREM {n} axioms={axioms} checkedAs={fresh} type={localProof.type}" |
| 71 | for n in boundary do |
| 72 | unless (base.checked.get.find? n).isSome do throwError "Missing pinned external dependency: {n}" |
| 73 | logInfo m!"REPLAY_START project={project.size} external={boundary.size}" |
| 74 | liftIO <| IO.eprintln s!"Entering kernel replay with {project.size} project declarations and {aliases.size} checked duplicate aliases" |
| 75 | let checked ← liftIO <| base.replay replay |
| 76 | for n in roots ++ aliases do |
| 77 | let some (.thmInfo verified) := checked.checked.get.find? n | throwError "Failed to replay {n}" |
| 78 | let some (.thmInfo submitted) := replay[n]? | throwError "Missing submitted proof for {n}" |
| 79 | unless verified.levelParams == submitted.levelParams && verified.type == submitted.type && |
| 80 | verified.value == submitted.value do throwError "Kernel proof differs from submission at {n}" |
| 81 | logInfo m!"REPLAY_PASS project={project.size} external={boundary.size} endpoints={roots.size} duplicateAliases={aliases.size}" |
| 82 | |
| 83 | end IndependentAudit |
| 84 | |
| 85 | run_cmd do |
| 86 | let manifest ← IO.FS.readFile "verification/headlines.txt" |
| 87 | let roots := (manifest.splitOn "\n").map (fun s => s.trimAscii.toString) |>.filter (· != "") |>.map String.toName |
| 88 | if roots.isEmpty || roots.eraseDups.length != roots.length then throwError "Empty or duplicate headline" |
| 89 | IndependentAudit.replayProofs roots.toArray |