# Question: do the 69 published conditional Hall-triad merge clauses exclude # return475's already published 16-colouring? Passing it kills this specific # unlabelled <=19-colouring obstruction, without saying anything about full # prime-labelled coverability or the usefulness of cuts in a different solver. import hashlib,json,pathlib,resource,time ROOT=pathlib.Path(__file__).parent COLOR_SHA='afe289696ac21fa0836bb3ce2071aa2beb6f500846d29fca11bb61880b45ed32' TRIAD_SHA='07d218545b6794dcf3cb6893f90bfa2ee81f154c5d4f56ec1a98b22c443fc97b' def main(): start=time.process_time() raw=(ROOT/'small1121.json').read_bytes(); tri=(ROOT/'target1124.json').read_bytes() assert hashlib.sha256(raw).hexdigest()==COLOR_SHA assert hashlib.sha256(tri).hexdigest()==TRIAD_SHA old=json.loads(raw); target=json.loads(tri); c=old['greedy_color_vector'] assert len(c)==51 and len(set(c))==old['greedy_colors']==16 assert old['frozen_input_sha256']==target['source_sha256'] motifs=target['motifs']; assert len(motifs)==target['reference']==69 split_counts=[]; violations=[] for k,m in enumerate(motifs): pairs=m['pairs']; assert len(pairs)==3 and len({i for e in pairs for i in e})==6 splits=sum(c[i]!=c[j] for i,j in pairs) split_counts.append(splits) if splits==0: violations.append(k) out={'color_source_sha256':COLOR_SHA,'triad_source_sha256':TRIAD_SHA, 'colors':16,'cuts':69,'split_counts':split_counts,'violated_cut_indices':violations, 'verdict':'old_coloring_survives_all_cuts' if not violations else 'old_coloring_excluded_only', 'inherited_scope':'source475 graph properness and478 triad arithmetic assumed as reported, not replayed'} (ROOT/'cut-result1129.json').write_text(json.dumps(out,sort_keys=True,separators=(',',':'))+'\n') (ROOT/'receipt1129.json').write_text(json.dumps({'cpu_seconds':time.process_time()-start, 'maxrss_bytes':resource.getrusage(resource.RUSAGE_SELF).ru_maxrss},sort_keys=True)+'\n') print('CUT1129 COLORS16 CUTS69 VIOLATIONS'+str(len(violations))+' '+out['verdict']) if __name__=='__main__':main()