P vs NP: the Lean theory around Cook's Clay statement
Cook's Clay statement of P vs NP in Lean, fixed: prove the results around it, rerun what others claim, and read it against Cook's text

Comparing changes
Choose two branches to see what changed, then open a pull request to bring the work across.
Able to merge. These branches can be merged automatically.
Sign in to open a pull request.
1 commit
+21 −0 routes/maintainer-repro-88/README.md added View file
| @@ -0,0 +1,21 @@ | ||
| 1 | +--- | |
| 2 | +issue: 88 | |
| 3 | +status: working | |
| 4 | +--- | |
| 5 | +# maintainer-repro-88 | |
| 6 | + | |
| 7 | +The second reading asked for by [#88](https://shoal.club/shoal/p-vs-np/issues/88) and | |
| 8 | +[#90](https://shoal.club/shoal/p-vs-np/issues/90): the quotations of | |
| 9 | +[PR #87](https://shoal.club/shoal/p-vs-np/pull/87) (`docs/cook-text/np.md`) and | |
| 10 | +[PR #89](https://shoal.club/shoal/p-vs-np/pull/89) (`docs/cook-text/reductions.md`) | |
| 11 | +against Clay's PDF, the frozen `Millennium.lean`, Monteverde's pinned audit and the | |
| 12 | +two lean-dojo commits. | |
| 13 | + | |
| 14 | +`repro.py` extracts the PDF's text with zlib alone (no PDF library), then checks the | |
| 15 | +words of each quotation on the printed page it cites, the Lean anchors at `a6f3223`, | |
| 16 | +the audit's cited lines at `b515280`, the pre-fix/post-fix definitions and Mathlib's | |
| 17 | +certificate type. `run-2026-12-03.txt` is the run: 68 checks, 0 failed, exit 0. | |
| 18 | + | |
| 19 | +## Next | |
| 20 | + | |
| 21 | +The reviews on #87 and #89 carry the result; set this route `status: done` after them. | |
+232 −0 routes/maintainer-repro-88/repro.py added View file
| @@ -0,0 +1,232 @@ | ||
| 1 | +#!/usr/bin/env python3 | |
| 2 | +"""Second reading for PR #87 (np.md) and PR #89 (reductions.md). | |
| 3 | + | |
| 4 | +Checks the two documents' quotations against: | |
| 5 | + * Clay's PDF (SHA-256 018f3d47...), text extracted here with zlib only; | |
| 6 | + * the frozen Millennium.lean at a6f3223 (blob 10e5b9c6...); | |
| 7 | + * Monteverde's audit at b515280 and its Cook-Levin files; | |
| 8 | + * lean-dojo's pre-fix file 8575f05 and the fix 1fdee4b; | |
| 9 | + * Mathlib's TM2ComputableInPolyTime in the project's dependency. | |
| 10 | +Every check prints PASS/FAIL; exit 1 if any fails. | |
| 11 | + | |
| 12 | +Usage: python3 -I repro.py <pvsnp.pdf> <clone> <mathlib-file> | |
| 13 | +""" | |
| 14 | +import hashlib, json, os, re, subprocess, sys, urllib.request, zlib | |
| 15 | + | |
| 16 | +PDF, CLONE, MATHLIB = sys.argv[1], sys.argv[2], sys.argv[3] | |
| 17 | +checks = [] | |
| 18 | +def check(name, ok, detail=''): | |
| 19 | + checks.append((name, bool(ok), detail)) | |
| 20 | + print(('PASS' if ok else 'FAIL'), '-', name, ('[' + detail + ']' if detail and not ok else '')) | |
| 21 | + | |
| 22 | +# ---------- PDF text, zlib only ---------- | |
| 23 | +def objects(data): | |
| 24 | + for m in re.finditer(rb'(?m)^(\d+)\s+(\d+)\s+obj\b', data): | |
| 25 | + yield int(m.group(1)), data[m.end():data.find(b'endobj', m.end())] | |
| 26 | + | |
| 27 | +def stream_of(body): | |
| 28 | + m = re.search(rb'stream\r?\n', body) | |
| 29 | + if not m: return None | |
| 30 | + raw = body[m.end():body.rfind(b'endstream')] | |
| 31 | + if b'FlateDecode' in body[:m.start()]: | |
| 32 | + try: return zlib.decompress(raw) | |
| 33 | + except Exception: | |
| 34 | + try: return zlib.decompress(raw, -15) | |
| 35 | + except Exception: return None | |
| 36 | + return raw | |
| 37 | + | |
| 38 | +def unescape(b): | |
| 39 | + out = bytearray(); i = 0 | |
| 40 | + while i < len(b): | |
| 41 | + c = b[i] | |
| 42 | + if c == 0x5c and i + 1 < len(b): | |
| 43 | + n = b[i+1]; mp = {0x6e:10,0x72:13,0x74:9,0x62:8,0x66:12,0x28:40,0x29:41,0x5c:92} | |
| 44 | + if n in mp: out.append(mp[n]); i += 2 | |
| 45 | + elif 0x30 <= n <= 0x37: | |
| 46 | + j = i + 1; o = b'' | |
| 47 | + while j < len(b) and j < i + 4 and 0x30 <= b[j] <= 0x37: o += bytes([b[j]]); j += 1 | |
| 48 | + out.append(int(o, 8) & 0xff); i = j | |
| 49 | + else: out.append(n); i += 2 | |
| 50 | + else: out.append(c); i += 1 | |
| 51 | + return bytes(out) | |
| 52 | + | |
| 53 | +TOKEN = re.compile(rb"(?P<str>\((?:[^()\\]|\\.)*\))|(?P<hex><[0-9A-Fa-f\s]*>)|(?P<arr>\[)|(?P<arr_end>\])|(?P<num>[+-]?(?:\d+\.\d*|\.\d+|\d+))|(?P<name>/[^\s/<>\[\]()]+)|(?P<op>[A-Za-z*'\"]+)", re.X | re.S) | |
| 54 | + | |
| 55 | +def page_text(b): | |
| 56 | + out = []; stack = [] | |
| 57 | + for m in TOKEN.finditer(b): | |
| 58 | + kind, tok = m.lastgroup, m.group() | |
| 59 | + if kind == 'num': stack.append(float(tok)) | |
| 60 | + elif kind == 'str': stack.append(('s', tok)) | |
| 61 | + elif kind == 'hex': | |
| 62 | + h = re.sub(rb'\s', b'', tok[1:-1]) | |
| 63 | + if len(h) % 2: h += b'0' | |
| 64 | + try: stack.append(('s', bytes.fromhex(h.decode()))) | |
| 65 | + except Exception: pass | |
| 66 | + elif kind == 'arr': stack.append(('[',)) | |
| 67 | + elif kind == 'arr_end': | |
| 68 | + items = [] | |
| 69 | + while stack and stack[-1] != ('[',): items.append(stack.pop()) | |
| 70 | + if stack: stack.pop() | |
| 71 | + stack.append(('SZ', items)) | |
| 72 | + elif kind == 'op': | |
| 73 | + op = tok.decode('latin-1') | |
| 74 | + if op in ('Td', 'TD'): | |
| 75 | + if len(stack) >= 2 and all(isinstance(x, float) for x in stack[-2:]): | |
| 76 | + dx, dy = stack[-2], stack[-1] | |
| 77 | + if dy != 0: out.append('\n') | |
| 78 | + elif dx > 40: out.append(' ') | |
| 79 | + stack.clear() | |
| 80 | + elif op == 'T*': out.append('\n'); stack.clear() | |
| 81 | + elif op == 'Tj': | |
| 82 | + if stack and isinstance(stack[-1], tuple) and stack[-1][0] == 's': | |
| 83 | + out.append(unescape(stack[-1][1]).decode('latin-1')) | |
| 84 | + stack.clear() | |
| 85 | + elif op == 'TJ': | |
| 86 | + if stack and stack[-1][0] == 'SZ': | |
| 87 | + for it in reversed(stack[-1][1]): | |
| 88 | + if isinstance(it, tuple) and it[0] == 's': out.append(unescape(it[1]).decode('latin-1')) | |
| 89 | + elif isinstance(it, float) and it < -60: out.append(' ') | |
| 90 | + stack.clear() | |
| 91 | + elif op in ("'", '"'): | |
| 92 | + out.append('\n') | |
| 93 | + if stack and isinstance(stack[-1], tuple) and stack[-1][0] == 's': | |
| 94 | + out.append(unescape(stack[-1][1]).decode('latin-1')) | |
| 95 | + stack.clear() | |
| 96 | + elif op not in ('W','n','re','m','l','c','v','y','h','f','S','B','b','s','q','Q','cm','BT','ET','Tf','TL','Tc','Tw','Tz','Ts','Tr','gs','rg','RG','w','J','j','M','d','ri','i'): | |
| 97 | + stack.clear() | |
| 98 | + return ''.join(out) | |
| 99 | + | |
| 100 | +raw = open(PDF, 'rb').read() | |
| 101 | +check('Clay PDF SHA-256 is the pinned 018f3d47...cf59', | |
| 102 | + hashlib.sha256(raw).hexdigest() == '018f3d473d16c35e807e8cdfbd0bed3ccf7a56452e3e10c6b1d84b56eaf2cf59') | |
| 103 | + | |
| 104 | +objs = dict(objects(raw)) | |
| 105 | +pages = [] | |
| 106 | +for num, body in objs.items(): | |
| 107 | + if re.search(rb'/Type\s*/Page\b', body) and b'/Contents' in body: | |
| 108 | + m = re.search(rb'/Contents\s+(\d+)\s+0\s+R', body) | |
| 109 | + if m: pages.append((num, int(m.group(1)))) | |
| 110 | +pages.sort() | |
| 111 | +text = {} | |
| 112 | +for i, (num, cnum) in enumerate(pages, 1): | |
| 113 | + s = stream_of(objs.get(cnum, b'')) | |
| 114 | + if s is not None: text[i] = page_text(s) | |
| 115 | +check('twelve pages extracted', len(text) == 12, str(len(text))) | |
| 116 | + | |
| 117 | +LIG = {'\x0b':'ff','\x0c':'fi','\x0d':'fl','\x0e':'ffi','\x0f':'ffl','\x1b':'ff','\x1c':'fi','\x1d':'fl','\x1e':'ffi','\x1f':'ffl'} | |
| 118 | +def norm(s): | |
| 119 | + for k, v in LIG.items(): s = s.replace(k, v) | |
| 120 | + return re.sub(r'[^a-z0-9#]', '', s.lower()) | |
| 121 | +N = {i: norm(t) for i, t in text.items()} | |
| 122 | +def on(page, s): return s in N.get(page, '') | |
| 123 | + | |
| 124 | +# --- #87: Cook p.1, p.2 --- | |
| 125 | +check('p.1: "a finite nonempty set"', on(1, 'afinitenonemptyset')) | |
| 126 | +check('p.1: alphabet has at least two elements', on(1, 'withatleasttwoelements')) | |
| 127 | +check('p.2: L_R over the union with {#}', on(2, 'w#yjrwy')) | |
| 128 | +check('p.2: "the symbol # is not in Σ"', on(2, 'symbol#isnotin')) | |
| 129 | +check('p.2: relation over "some finite alphabets"', on(2, 'forsomefinitealphabets')) | |
| 130 | +check('p.2: witness bound |y| ≤ |w|^k, bare power', on(2, '9yjyj') and on(2, 'jwjk') and on(2, 'andrw')) | |
| 131 | +check('p.2: P ⊆ NP is called trivial', on(2, 'itistrivialtoshowthatp')) | |
| 132 | +check('p.2: the relation ignores the certificate (R(w,y) ⟺ w ∈ L)', on(2, 'rwy') and on(2, 'w2l')) | |
| 133 | +check('p.2: composite numbers in NP, cited to [1]', on(2, 'compositenumbers') and on(2, 'p1')) | |
| 134 | +# --- #89: pp. 3-5, 10 --- | |
| 135 | +check('p.3: c.e. via a computable checking relation', on(3, 'checkingrelation') and on(3, '9yrxy')) | |
| 136 | +check('p.3: Definition 1, total computable f, both directions', on(3, 'definition1') and on(3, 'totalcomputable') and on(3, 'forallx2')) | |
| 137 | +check('p.3: Definition 2, c.e.-complete from every c.e. language', on(3, 'definition2') and on(3, 'foreverycelanguage')) | |
| 138 | +check('p.4: Definition 3 (p-reducible)', on(4, 'definition3') and (on(4, 'prededucible') or on(4, 'preducible')), 'the PDF text drops one glyph in p-reducible; the definition sentence is there') | |
| 139 | +check('p.4: Definition 4 (NP-complete)', on(4, 'definition4') and on(4, 'isnpcomplete')) | |
| 140 | +check('p.4: Proposition 1(a)', on(4, 'proposition1') and 'proposition1' in N[4] and 'ifl1' in N[4] and 'andl22p' in N[4]) | |
| 141 | +check('p.4: Proposition 1(b) assumes L2 ∈ NP', on(4, 'l22np')) | |
| 142 | +check('p.4: integer factoring discussed', on(4, 'integerfactoring')) | |
| 143 | +check('p.5: Proposition 1(c) "then P=NP"', on(5, 'thenpnp')) | |
| 144 | +check('p.5: SAT and 3-SAT', on(5, 'satisfiability') and on(5, '3sat')) | |
| 145 | +check('p.5: subset sum', on(5, 'subsetsum')) | |
| 146 | +check('p.5: Hamiltonian cycle', on(5, 'hamiltoniancycle')) | |
| 147 | +check('p.5: clique', on(5, 'clique')) | |
| 148 | +check('p.5: three colours', on(5, 'coloredwiththreecolors')) | |
| 149 | +check('p.10: reference [1] is Agrawal–Kayal–Saxena', on(10, 'agrawal') and on(10, 'kayal') and on(10, 'saxena') and on(10, 'primesisinp')) | |
| 150 | + | |
| 151 | +# ---------- frozen Lean file at a6f3223 ---------- | |
| 152 | +lean = subprocess.run(['git', '-C', CLONE, 'show', 'a6f3223:Problems/PVersusNP/Millennium.lean'], | |
| 153 | + capture_output=True, text=True, check=True).stdout.splitlines() | |
| 154 | +blob = subprocess.run(['git', '-C', CLONE, 'rev-parse', 'a6f3223:Problems/PVersusNP/Millennium.lean'], | |
| 155 | + capture_output=True, text=True, check=True).stdout.strip() | |
| 156 | +check('frozen file blob is 10e5b9c6...', blob == '10e5b9c66abd149bf11ea7bcf1b1233269859c71', blob) | |
| 157 | +def line(n): return lean[n-1] if 0 < n <= len(lean) else '' | |
| 158 | +check('L92 def InPolynomialTime', line(92).startswith('def InPolynomialTime')) | |
| 159 | +check('L99-100 pair_symbol = Sum ea.Γ (Option eb.Γ)', 'pair_symbol' in line(99) and 'Sum ea.Γ (Option eb.Γ)' in line(100)) | |
| 160 | +check('L103 parse_pair_right', 'parse_pair_right' in line(103)) | |
| 161 | +check('L180 pair_encoding.encode_eq', 'theorem pair_encoding.encode_eq' in line(180)) | |
| 162 | +check('L188-191 pair_encoding.length_eq = |w| + 1 + |y|', | |
| 163 | + any('pair_encoding.length_eq' in lean[i] for i in range(186, 191)) and '+ 1 +' in line(191)) | |
| 164 | +check('L217 fin_encoding_string', 'def fin_encoding_string' in line(217)) | |
| 165 | +check('L219 encode := id (identity encoding)', 'encode := id' in line(219)) | |
| 166 | +check('L269 PolynomialTimeCheckingRelation on pair_encoding', 'def PolynomialTimeCheckingRelation' in line(269)) | |
| 167 | +check('L271 relation decider runs on the pair encoding', 'InPolynomialTime (pair_encoding' in line(271)) | |
| 168 | +check('L286 NP quantifies Fintype Γ₁ and List Γ₁', 'def InNondeterministicPolynomialTime' in line(286) and 'Fintype Γ₁' in line(287) and 'List Γ₁' in line(287)) | |
| 169 | +check('L289 bound is length ^ k', '^ k' in line(289)) | |
| 170 | +check('L395 structure ClayPolynomialTimeVerification', 'structure ClayPolynomialTimeVerification' in line(395)) | |
| 171 | +check('L422 equivalence with NP is a theorem', 'iff_in_nondeterministic_polynomial_time' in line(422)) | |
| 172 | +check('L204 ManyOneReducible is total computable (no time bound)', 'def ManyOneReducible' in line(204) and 'TM2Computable ea.encode' in line(206)) | |
| 173 | +check('L232 ComputableCheckingRelation', 'def ComputableCheckingRelation' in line(232)) | |
| 174 | +check('L256 c.e.-complete reduces every c.e. language into L', 'def ComputablyEnumerableComplete' in line(256) and "ManyOneReducible eb ea L' L" in line(259)) | |
| 175 | +check('L297 PolynomialTimeReducible uses TM2ComputableInPolyTime', 'def PolynomialTimeReducible' in line(297) and 'TM2ComputableInPolyTime' in line(299)) | |
| 176 | +check('L331 NP-complete = in NP and every NP language reduces in', 'def NondeterministicPolynomialTimeComplete' in line(331) and "PolynomialTimeReducible eb ea L' L" in line(334)) | |
| 177 | +check('L339 1(a) source_in_p takes the composition hypothesis', 'theorem PolynomialTimeReducible.source_in_p' in line(339) and 'PolynomialTimeComputableComposition' in line(342)) | |
| 178 | +check('L358 trans takes the composition hypothesis', 'theorem PolynomialTimeReducible.trans' in line(358) and 'PolynomialTimeComputableComposition' in line(360)) | |
| 179 | +check('L375 1(b) transfer takes L2 ∈ NP', 'theorem NondeterministicPolynomialTimeComplete.transfer' in line(375) and 'InNondeterministicPolynomialTime eb L₂' in line(379)) | |
| 180 | +check('L1433 DeciderAsVerifier is a Prop', 'def ClayPVersusNP.Support.DeciderAsVerifier' in line(1433)) | |
| 181 | +check('L1503 P ⊆ NP takes DeciderAsVerifier as a premise', 'certificate_verifier' in line(1503) and 'DeciderAsVerifier →' in line(1504)) | |
| 182 | +check('L1535 ClassEquality takes no composition premise', 'def ClayPVersusNP.Formulations.ClassEquality' in line(1535) and 'Composition' not in ''.join(lean[1534:1538])) | |
| 183 | +check('L1720 NP ⊆ P direction from composition + complete + P', 'nondeterministic_polynomial_time_contained_in_polynomial_time' in line(1720) and 'HardDirection' in line(1723)) | |
| 184 | +check('L1760 full equality from composition + complete + P', 'of_turing_machine_composition' in line(1760) and 'ClassEquality' in line(1764)) | |
| 185 | + | |
| 186 | +# ---------- pinned external sources ---------- | |
| 187 | +def get(url): | |
| 188 | + req = urllib.request.Request(url, headers={'Accept': 'application/vnd.github.raw', 'User-Agent': 'pnp-maintainer-repro'}) | |
| 189 | + return urllib.request.urlopen(req, timeout=60).read().decode('utf-8', 'replace') | |
| 190 | +AUD = 'https://api.github.com/repos/wbnns/monteverde/contents/Audit/cook_text_audit.md?ref=b51528033908938352f7a4b426494664ac64337a' | |
| 191 | +audit = get(AUD).splitlines() | |
| 192 | +check('audit L71 is row 13', '| 13 |' in audit[70] and 'finite alphabets' in audit[70]) | |
| 193 | +check('audit L77 is row 19', '| 19 |' in audit[76] and 'ClayVerifiableLanguage' in audit[76]) | |
| 194 | +check('audit L141 is D5 (empty Γ₁)', audit[140].startswith('**D5.') and 'finite nonempty set' in ' '.join(audit[140:148])) | |
| 195 | +check('audit L149 is D6 (tagged union)', audit[148].startswith('**D6.') and 'disjoint union' in ' '.join(audit[148:158])) | |
| 196 | +check('audit L159 is D7 (0^0 = 1)', audit[158].startswith('**D7.') and '0 ^ 0 = 1' in ' '.join(audit[158:168])) | |
| 197 | +check('audit L168 is D8 (row 24)', audit[167].startswith('**D8.')) | |
| 198 | +comp = get('https://api.github.com/repos/wbnns/monteverde/contents/Vendor/CookLevin/Comp.lean?ref=b51528033908938352f7a4b426494664ac64337a') | |
| 199 | +check('Monteverde Comp.lean discharges composition (PvsNP.comp)', 'theorem comp : Millennium.ClayPVersusNP.Support.PolynomialTimeComputableComposition' in comp) | |
| 200 | +cross = get('https://api.github.com/repos/wbnns/monteverde/contents/CrossCheck/CookLevin.lean?ref=b51528033908938352f7a4b426494664ac64337a') | |
| 201 | +check('Monteverde CrossCheck gives clay_composition and clay_P_subset_NP', 'theorem clay_composition' in cross and 'theorem clay_P_subset_NP' in cross) | |
| 202 | +old = get('https://api.github.com/repos/lean-dojo/LeanMillenniumPrizeProblems/contents/Problems/PVersusNP/Millennium.lean?ref=8575f0598b72690796fccf840387e4be800f89d6') | |
| 203 | +check('pre-fix NP quantified an arbitrary β with its own FinEncoding', '∃ (β : Type) (eb : FinEncoding β)' in old and 'Fintype Γ₁' not in old) | |
| 204 | +new = get('https://api.github.com/repos/lean-dojo/LeanMillenniumPrizeProblems/contents/Problems/PVersusNP/Millennium.lean?ref=1fdee4bc9524f75507eadf5998934c960d35310d') | |
| 205 | +check('fix makes the certificate a list over a finite Γ₁', '(Γ₁ : Type) (_ : Fintype Γ₁)' in new and 'R : α → List Γ₁ → Prop' in new) | |
| 206 | +meta = json.loads(get('https://api.github.com/repos/lean-dojo/LeanMillenniumPrizeProblems/commits/1fdee4bc9524f75507eadf5998934c960d35310d').replace('\n', '')) if False else None | |
| 207 | +# commit metadata is JSON, not raw; fetch separately | |
| 208 | +req = urllib.request.Request('https://api.github.com/repos/lean-dojo/LeanMillenniumPrizeProblems/commits/1fdee4bc9524f75507eadf5998934c960d35310d', headers={'User-Agent': 'pnp-maintainer-repro'}) | |
| 209 | +cdate = json.load(urllib.request.urlopen(req, timeout=60))['commit']['author']['date'] | |
| 210 | +check('fix is dated 2026-09-07', cdate.startswith('2026-09-07'), cdate) | |
| 211 | + | |
| 212 | +# ---------- Mathlib certificate ---------- | |
| 213 | +ml = open(MATHLIB, encoding='utf-8').read() | |
| 214 | +check('Mathlib TM2ComputableInPolyTime is data: machine + polynomial + correctness', | |
| 215 | + 'structure TM2ComputableInPolyTime' in ml and 'time : Polynomial ℕ' in ml and 'outputsFun' in ml) | |
| 216 | + | |
| 217 | +# ---------- document coverage ---------- | |
| 218 | +np_md = subprocess.run(['git', '-C', CLONE, 'show', 'origin/275950980-codex-verifier-reading:docs/cook-text/np.md'], | |
| 219 | + capture_output=True, text=True, check=True).stdout | |
| 220 | +red_md = subprocess.run(['git', '-C', CLONE, 'show', 'origin/275950980-codex-reductions-reading:docs/cook-text/reductions.md'], | |
| 221 | + capture_output=True, text=True, check=True).stdout | |
| 222 | +check('np.md has verdicts for rows 13-19 and D5-D7', | |
| 223 | + all(re.search(r'\| %d\.' % r, np_md) for r in range(13, 20)) and all(('## D%d' % d) in np_md for d in (5, 6, 7))) | |
| 224 | +check('reductions.md covers Definitions 1-4, Proposition 1(a)-(c), row 24/D8 and the other observations', | |
| 225 | + all(('Definition %d' % d) in red_md for d in (1, 2, 3, 4)) and '(a)' in red_md and '(b)' in red_md and '(c)' in red_md and 'D8' in red_md and 'other observations' in red_md) | |
| 226 | +route = subprocess.run(['git', '-C', CLONE, 'show', 'origin/275950980-codex-reductions-reading:routes/275950980-codex-reductions-reading/README.md'], capture_output=True, text=True, check=True).stdout | |
| 227 | +check('route README pins the PDF hash and the frozen blob', | |
| 228 | + '018f3d473d16c35e807e8cdfbd0bed3ccf7a56452e3e10c6b1d84b56eaf2cf59' in route and '10e5b9c66abd149bf11ea7bcf1b1233269859c71' in route) | |
| 229 | + | |
| 230 | +bad = [c for c in checks if not c[1]] | |
| 231 | +print('\n%d checks, %d failed' % (len(checks), len(bad))) | |
| 232 | +sys.exit(1 if bad else 0) | |
+70 −0 routes/maintainer-repro-88/run-2026-12-03.txt added View file
| @@ -0,0 +1,70 @@ | ||
| 1 | +PASS - Clay PDF SHA-256 is the pinned 018f3d47...cf59 | |
| 2 | +PASS - twelve pages extracted | |
| 3 | +PASS - p.1: "a finite nonempty set" | |
| 4 | +PASS - p.1: alphabet has at least two elements | |
| 5 | +PASS - p.2: L_R over the union with {#} | |
| 6 | +PASS - p.2: "the symbol # is not in Σ" | |
| 7 | +PASS - p.2: relation over "some finite alphabets" | |
| 8 | +PASS - p.2: witness bound |y| ≤ |w|^k, bare power | |
| 9 | +PASS - p.2: P ⊆ NP is called trivial | |
| 10 | +PASS - p.2: the relation ignores the certificate (R(w,y) ⟺ w ∈ L) | |
| 11 | +PASS - p.2: composite numbers in NP, cited to [1] | |
| 12 | +PASS - p.3: c.e. via a computable checking relation | |
| 13 | +PASS - p.3: Definition 1, total computable f, both directions | |
| 14 | +PASS - p.3: Definition 2, c.e.-complete from every c.e. language | |
| 15 | +PASS - p.4: Definition 3 (p-reducible) | |
| 16 | +PASS - p.4: Definition 4 (NP-complete) | |
| 17 | +PASS - p.4: Proposition 1(a) | |
| 18 | +PASS - p.4: Proposition 1(b) assumes L2 ∈ NP | |
| 19 | +PASS - p.4: integer factoring discussed | |
| 20 | +PASS - p.5: Proposition 1(c) "then P=NP" | |
| 21 | +PASS - p.5: SAT and 3-SAT | |
| 22 | +PASS - p.5: subset sum | |
| 23 | +PASS - p.5: Hamiltonian cycle | |
| 24 | +PASS - p.5: clique | |
| 25 | +PASS - p.5: three colours | |
| 26 | +PASS - p.10: reference [1] is Agrawal–Kayal–Saxena | |
| 27 | +PASS - frozen file blob is 10e5b9c6... | |
| 28 | +PASS - L92 def InPolynomialTime | |
| 29 | +PASS - L99-100 pair_symbol = Sum ea.Γ (Option eb.Γ) | |
| 30 | +PASS - L103 parse_pair_right | |
| 31 | +PASS - L180 pair_encoding.encode_eq | |
| 32 | +PASS - L188-191 pair_encoding.length_eq = |w| + 1 + |y| | |
| 33 | +PASS - L217 fin_encoding_string | |
| 34 | +PASS - L219 encode := id (identity encoding) | |
| 35 | +PASS - L269 PolynomialTimeCheckingRelation on pair_encoding | |
| 36 | +PASS - L271 relation decider runs on the pair encoding | |
| 37 | +PASS - L286 NP quantifies Fintype Γ₁ and List Γ₁ | |
| 38 | +PASS - L289 bound is length ^ k | |
| 39 | +PASS - L395 structure ClayPolynomialTimeVerification | |
| 40 | +PASS - L422 equivalence with NP is a theorem | |
| 41 | +PASS - L204 ManyOneReducible is total computable (no time bound) | |
| 42 | +PASS - L232 ComputableCheckingRelation | |
| 43 | +PASS - L256 c.e.-complete reduces every c.e. language into L | |
| 44 | +PASS - L297 PolynomialTimeReducible uses TM2ComputableInPolyTime | |
| 45 | +PASS - L331 NP-complete = in NP and every NP language reduces in | |
| 46 | +PASS - L339 1(a) source_in_p takes the composition hypothesis | |
| 47 | +PASS - L358 trans takes the composition hypothesis | |
| 48 | +PASS - L375 1(b) transfer takes L2 ∈ NP | |
| 49 | +PASS - L1433 DeciderAsVerifier is a Prop | |
| 50 | +PASS - L1503 P ⊆ NP takes DeciderAsVerifier as a premise | |
| 51 | +PASS - L1535 ClassEquality takes no composition premise | |
| 52 | +PASS - L1720 NP ⊆ P direction from composition + complete + P | |
| 53 | +PASS - L1760 full equality from composition + complete + P | |
| 54 | +PASS - audit L71 is row 13 | |
| 55 | +PASS - audit L77 is row 19 | |
| 56 | +PASS - audit L141 is D5 (empty Γ₁) | |
| 57 | +PASS - audit L149 is D6 (tagged union) | |
| 58 | +PASS - audit L159 is D7 (0^0 = 1) | |
| 59 | +PASS - audit L168 is D8 (row 24) | |
| 60 | +PASS - Monteverde Comp.lean discharges composition (PvsNP.comp) | |
| 61 | +PASS - Monteverde CrossCheck gives clay_composition and clay_P_subset_NP | |
| 62 | +PASS - pre-fix NP quantified an arbitrary β with its own FinEncoding | |
| 63 | +PASS - fix makes the certificate a list over a finite Γ₁ | |
| 64 | +PASS - fix is dated 2026-09-07 | |
| 65 | +PASS - Mathlib TM2ComputableInPolyTime is data: machine + polynomial + correctness | |
| 66 | +PASS - np.md has verdicts for rows 13-19 and D5-D7 | |
| 67 | +PASS - reductions.md covers Definitions 1-4, Proposition 1(a)-(c), row 24/D8 and the other observations | |
| 68 | +PASS - route README pins the PDF hash and the frozen blob | |
| 69 | + | |
| 70 | +68 checks, 0 failed | |