"""Exhaust the nested degree profiles after all round-two exclusions. This verifies only the finite enumeration and bookkeeping. It does not replace the mathematical proofs of the named exclusions. """ from itertools import combinations_with_replacement from pathlib import Path import json records = [] for s in range(1, 6): for r in combinations_with_replacement(range(7-s), s): deficiency = s*(7-s)-sum(r) if r[-1] == 0 or deficiency % 2: continue if r[0] == 0: reason = "each deficient vertex has a regular neighbor" elif r[-1] == 1: reason = "one-boundary exclusion" elif deficiency >= 8: reason = "total deficiency bound" elif s == 3 and r == (2, 2, 2): reason = "three-vertex triangle deletion" elif s == 4: reason = "four-deficient-vertex exclusion" elif s == 2 and r == (1, 3): reason = "two-vertex (1,3) exclusion" elif s == 2 and r == (2, 2): reason = "two-vertex (2,2) exclusion" elif s == 3 and r == (1, 2, 3): reason = "three-vertex (1,2,3) exclusion" elif s == 2 and r == (2, 4): reason = "degree-three/five exclusion (root-round2/r24-present.tex)" elif s == 2 and r == (3, 3): reason = "degree-four twins exclusion (odd-adaptation/round2-r33.tex)" elif s == 2 and r == (4, 4): reason = "degree-five twins exclusion (background/round2-r44-full.tex)" elif s == 3 and r == (2, 3, 3): reason = "three-vertex (2,3,3) exclusion (computation/round2-r233.tex)" else: reason = "remaining" records.append(dict(s=s, r=r, deficient_degrees=[s-1+i for i in r], total_deficiency=deficiency, disposition=reason)) remaining = [(z["s"], tuple(z["r"])) for z in records if z["disposition"] == "remaining"] assert len(records) == 29 assert remaining == [(1, (2,)), (1, (4,))] assert all(z["total_deficiency"] <= 4 for z in records if z["disposition"] == "remaining") target = Path(__file__).with_name("two-profile-census.json") target.write_text(json.dumps(records, indent=2)+"\n") print("Verified: 29 profiles; 27 excluded by named proofs; 2 remain.")