"""Independent arithmetic checker of certificate.json; no producer import. Python 3.10+, no dependencies. python -B check_certificate.py certificate.json Success stdout is exactly: PASS: K37>=29; all 17 L34 high-component windows fail\n Checks finite arithmetic claims only, not a global upper bound or timing. """ import json, math, sys PRIMES=(2,3,5,7,11,13,17,19,23,29,31,37) Q=(41,43,47,53,59,61,67,71,73) P=math.prod(PRIMES) N=math.prod(p-2 for p in PRIMES if p>2) def admissible(x): return all(x%p!=0 and (x+2)%p!=0 for p in PRIMES) def check(d): assert d['base']==P and d['N']==N and d['L']==34 w=d['witness']; xx=w['slots']; aa={int(q):a for q,a in w['phases'].items()} assert len(xx)==29 and xx==sorted(set(xx)) assert 0<=xx[0]=29; all 17 L34 high-component windows fail')