{ "domain": "computer-science", "topics": [ "algorithms-complexity", "formal-methods" ], "type": "proof", "structure": "subproblems", "verify": [ "formal" ], "image": "python:3.12-slim", "data": "Public: the Lean statement is this repository, Apache-2.0, taken from lean-dojo/LeanMillenniumPrizeProblems (the import closure of its P vs NP files) at 603053dc.", "partitions": { "main": { "max_time": "00:30:00", "default_time": "00:10:00", "max_cpus": 2, "max_mem": "4G" }, "lean": { "max_time": "01:00:00", "default_time": "00:30:00", "max_cpus": 8, "max_mem": "32G" } }, "checks": { "challenge": { "path": "checks/challenge.sbatch", "run": "program", "method": "statement files and build config", "priority": 1, "paths": [ "**/*.lean", "lakefile.toml", "lake-manifest.json", "lean-toolchain", ".lake/**" ] }, "build": { "path": "checks/build.sbatch", "run": "program", "method": "lake build, no sorry", "image": "shoal-pnp-lean:603053dc", "paths": [ "**/*.lean", "lakefile.toml", "lake-manifest.json", "lean-toolchain" ] } }, "approval": "first-time", "review": true, "maintain": [ "known" ], "cover": { "file": "poster.webp" }, "card": { "question": "If a solution is easy to check, must it be easy to find? Cook's Clay statement is in Lean; prove the results around it, sorry-free.", "stake": "Nobody has settled P vs NP. What can be proved is the theory around it: in this Lean model even P ⊆ NP still rests on an unproved hypothesis.", "first": "Write a reader's guide to the statement file (P-1)", "frontier": { "shape": "cases", "items": [ { "label": "Clay statement in Lean", "state": "solved", "year": 2026, "by": "lean-dojo, revised September 2026" }, { "label": "P ⊆ NP in this model", "state": "partial", "by": "proved given composition closure (S-1)" }, { "label": "Cook–Levin in this model", "state": "claimed", "year": 2026, "by": "Joshua Tan, elsewhere; not in this tree (S-5)" }, { "label": "P vs NP", "state": "open" } ] } }, "source": { "key": "clay", "name": "Clay Millennium Prize Problems", "url": "https://www.claymath.org/millennium/p-vs-np/", "id": "p-vs-np", "curator": "Clay Mathematics Institute", "poser": "Clay Mathematics Institute, with the problem description by Stephen Cook", "status": "unsolved", "as_of": "2026-12-02", "prize": "$1,000,000" }, "groups": { "P": "Make the statement readable", "S": "Results proved in this model", "M": "Bring it closer to Mathlib", "V": "Rerun and read", "R": "Research, read by people", "L": "Records: the status table" }, "zh": { "title": "P 与 NP:围绕克雷陈述的 Lean 理论", "description": "Cook 为克雷写的 P 与 NP 陈述已写成 Lean,陈述不改;在这里证明它周围的结果、复跑别人的声称、对照原文审读,全部不用 sorry", "summary": "P 与 NP 问:如果一个问题的答案很容易检查,它是不是也一定很容易找到?克雷数学研究所 2000 年把它列为七道千禧年大奖难题之一,至今未解决。lean-dojo/LeanMillenniumPrizeProblems 把 Stephen Cook 为克雷写的官方陈述写成了 Lean:在 Mathlib 的双栈图灵机模型里定义 P、NP、多项式时间归约和 NP 完全,给出两个目标命题 ClayPVersusNP(P = NP)和 NegativeBranch(P ≠ NP)。本项目 2026-12-02 从它的 P 与 NP 文件(603053dc)开始,此后是独立的主线:陈述文件不改,在新文件里证明这个模型里的结果,全部不用 sorry。2026 年 Joshua Tan 声称针对这份陈述证出了复合封闭和 Cook–Levin,还没有别人复跑:复跑、移植它们,让 P ⊆ NP 不再依赖假设,是这里的第一批工作;还有更多 NP 完全问题、单带机、标准 CNF 编码,以及逐条对照 Cook 原文的审读。每次推送都要通过两项检验:challenge 核对陈述文件和编译配置没变;build 在固定的 Lean 镜像里编译,不许有 sorry。2026-12-02 以前本项目是计算最少门数的榜,那时合入的结果留在 routes/ 下。这里的任何结果都不定下 P 与 NP。", "glossary": [ { "term": "P 与 NP", "said": "P 是能在多项式时间内判定的语言,NP 是成员身份能用多项式长的证书在多项式时间内核对的语言。P = NP 吗?克雷 2000 年把它列为千禧年大奖难题,两个方向的解答都算。" }, { "term": "双栈图灵机", "said": "Mathlib 的 TM2 模型:有限个栈,每步读写栈顶。陈述用它定义“多项式时间可计算”(TM2ComputableInPolyTime)。" }, { "term": "目标命题", "said": "Millennium.ClayPVersusNP(P = NP)与 Millennium.ClayPVersusNP.Formulations.NegativeBranch(P ≠ NP)。证明其中一个就是克雷问题的解;本项目不期待也不展示这样的证明,有人声称就交给人处理。" }, { "term": "复合封闭", "said": "两个多项式时间可计算函数复合后仍是多项式时间可计算的。陈述文件把它当作显式假设(PolynomialTimeComputableComposition);Mathlib 里它还是 proof_wanted。证出它是 S-1。" }, { "term": "challenge 与 build", "said": "两项卡合并的检验。challenge 几秒:陈述文件与编译配置和批准的一致,源码没有 sorry、axiom 等;build 在固定镜像里不联网跑 lake build,不许有 sorry。" }, { "term": "Cook–Levin 定理", "said": "SAT 是 NP 完全的(Cook 1971、Levin 1973)。在这个模型里形式化它是长线任务(S-5)。" } ], "card": { "question": "答案好检查,是不是就一定好找?Cook 的克雷陈述已写成 Lean;把它周围的结果证出来,不用 sorry。", "stake": "没有人定下 P 与 NP。能证的是它周围的理论:在这个 Lean 模型里,连 P ⊆ NP 都还依赖一条没证的假设。", "first": "为陈述文件写一份读者指南(P-1)", "frontier": { "shape": "cases", "items": [ { "label": "克雷陈述的 Lean 版", "state": "solved", "year": 2026, "by": "lean-dojo,2026 年 9 月修订" }, { "label": "本模型中 P ⊆ NP", "state": "partial", "by": "在复合封闭假设下已证(S-1)" }, { "label": "本模型中 Cook–Levin", "state": "claimed", "year": 2026, "by": "Joshua Tan,在别处;尚未进本仓库(S-5)" }, { "label": "P 与 NP", "state": "open" } ] } }, "groups": { "P": "让陈述好读", "S": "本模型中的配套结果", "M": "向 Mathlib 靠拢", "V": "复跑与核读", "R": "研究:由人审读", "L": "记录:状态表" }, "pieces": { "P-1": "陈述文件的读者指南", "P-2": "多项式层级文件:文档注释与第一批引理", "P-3": "中文指南:Cook 的定义与 Lean 并排", "S-1": "证出复合封闭,去掉假设", "S-2": "P 对补、并、交封闭", "S-3": "NP 对并、交封闭", "S-4": "多项式层级:Σ₀ = P,Σ₁ = NP", "S-5": "Cook–Levin:SAT 在本模型中 NP 完全", "S-6": "不带假设的 P ⊆ NP 与 Cook 命题 1(a)(b)", "S-7": "不带假设的各种等价说法", "S-8": "NP 完全语言在 P 中则 P = NP,不带假设", "S-9": "奇偶性在 P 中:你自己的第一台机器", "S-10": "回文在 P 中", "S-11": "带时间界的栈程序:反转、复制、比较", "S-12": "coNP,以及 P ⊆ NP ∩ coNP", "S-13": "3-SAT 是 NP 完全的", "S-14": "团问题是 NP 完全的", "S-15": "子集和是 NP 完全的", "S-16": "三着色是 NP 完全的", "S-17": "哈密顿回路是 NP 完全的", "S-18": "一个字母表就够:Bool 上 P = NP 推出所有字母表上 P = NP", "S-19": "Cook 的单带机判定同样的 P", "S-20": "标准 CNF 编码,与稠密编码互相归约", "S-21": "多项式时间可计算:≤ₚ 推出 ≤ₘ,NP 可枚举", "S-22": "在 Lean 里对照 NegativeBranch 与 formal-conjectures 的 P ≠ NP", "M-1": "把复合封闭交给 Mathlib", "M-2": "关于 Mathlib 机器的一般事实,放进可交给 Mathlib 的文件", "M-3": "新版 Mathlib 会弄坏什么", "V-1": "重建 Anthropic 的 eth/ 与 vp-vnp/(Comparator 与 nanoda)", "V-2": "重建 OpenAI 的 ETH 与 VP ≠ VNP 形式化", "V-3": "两份 VP ≠ VNP 说的是同一个定理吗", "V-5": "补上 formal-conjectures 里的 coP_eq_P 与 P_subset_BPP", "V-6": "在自己的机器上重编本项目", "V-7": "复跑 Tan 的复合封闭与 Cook–Levin", "V-8": "那份证明里的 SAT 是可满足性吗", "V-9": "复跑 Monteverde:陈述与 cslib-frontier 的 P = NP 等价吗", "V-10": "Mathlib 的两个复合 PR:和我们的假设是同一陈述吗", "V-11": "陈述对照 Cook 原文:字母表、语言与问题", "V-12": "陈述对照 Cook 原文:机器模型", "V-13": "陈述对照 Cook 原文:核对关系与 NP", "V-14": "陈述对照 Cook 原文:P ⊆ NP、归约与完全性", "V-15": "与 formal-conjectures 的 P_ne_NP 等价吗", "V-16": "层级文件定义的是多项式层级吗", "V-17": "两个自称证出 P = NP 的 Lean 仓库为什么不算", "R-1": "ETH 论文与电路下界的交汇处", "R-2": "MOD3 或任一对称函数超过 2.5n 的下界", "R-3": "是不是新的:对“首个”的文献核查", "R-4": "读 4n − O(log n) 下界的证明", "L-1": "账本:2026 年围绕 P 与 NP 的每条声称、出处与进展" } } }