#!/usr/bin/env python3 """Job 1008 triage, route 11: reprice and pre-run the counting half of the proposed next experiment. Frozen definition of the admissible slot set (route 5's own support statement, quoted in the route-7/5 record): s in [9409, 13722) with s not = 0, -2 (mod p) for every prime p <= 97. N52 = the retained artifact n52-cnt.json (sha 3f1a311f...), 52 slots, T = 6000. N66 = the first 66 admissible slots, whose first and last are published as 9419 and 13721. What is computed, all counting, no LP, no floats, no census of any published quantity: * the N66 list re-derived from the definition and checked against the retained N52 artifact (the 52 retained slots must be exactly the first 52 derived ones) - a support check, as in route 5's own treatment of the N66 witness; * for the anchor prime 101, the class map b -> K(101,b) at both sources; * whether the recorded binding branch b = 60 (#1228: |resid| = 49, min f = 0.996153) keeps its class under the source shift, and under the restriction map to the common prefix. """ import json import pathlib from collections import Counter HERE = pathlib.Path(__file__).parent SRC = json.loads((HERE / "n52-cnt.json").read_text()) D52 = SRC["slots"] T = SRC["T"] PRIMES = sorted(int(p) for p in SRC["cnt"].keys()) ANCHOR = 101 BIND = 60 # #1228's binding branch at the N52 source def admissible(lo, hi, primes): out = [] for s in range(lo, hi): if all(s % p not in (0, p - 2) for p in primes): out.append(s) return out small = [p for p in (2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97)] D66 = admissible(9409, 13722, small) print("retained N52 artifact: %d slots, %d..%d, T = %d, primes %s" % (len(D52), min(D52), max(D52), T, PRIMES)) print("derived from the frozen definition [9409,13722), s not = 0,-2 mod p for p <= 97:") print(" %d slots, first %d, last %d" % (len(D66), D66[0], D66[-1])) print(" published N66 first/last from the route-5 record: 9419 / 13721") print(" retained N52 slots are exactly the first 52 derived slots: %s" % (D52 == D66[:52])) print(" extra slots N66 \\ N52: %s" % (D66[52:],)) print(" cross-check #379's published min slot margin (35) against the retained array: %d" % min(SRC["slot_margin"])) print() def classes(D, q): """b -> (frozenset of killed slots) and the class partition, for phase prime q.""" return {b: frozenset(s for s in D if (s + b) % q in (0, q - 2)) for b in range(q)} K52, K66 = classes(D52, ANCHOR), classes(D66, ANCHOR) c52, c66 = len(set(K52.values())), len(set(K66.values())) bound52, bound66 = 2 * len(D52) + 1, 2 * len(D66) + 1 print("anchor prime %d, phases 0..%d" % (ANCHOR, ANCHOR - 1)) print(" N52: %d distinct killed-set classes out of %d phases (bound 2|D|+1 = %d); empty phases %d" % (c52, ANCHOR, bound52, sum(1 for b in K52 if not K52[b]))) print(" N66: %d distinct killed-set classes out of %d phases (bound 2|D|+1 = %d); empty phases %d" % (c66, ANCHOR, bound66, sum(1 for b in K66 if not K66[b]))) print(" record's own count at the N52 source (#1228): 27 phases kill no slot, 53 distinct residual subproblems") print(" agreement with the retained-source count under this definition: %s" % (c52 == 53 and sum(1 for b in K52 if not K52[b]) == 27)) print() new = set(D66) - set(D52) grew = [b for b in range(ANCHOR) if K66[b] & new] print("phase-level effect of the source shift N52 -> N66:") print(" phases whose killed set gains an added slot: %d of %d" % (len(grew), ANCHOR)) print(" phases whose killed set is unchanged as a SET: %d" % (ANCHOR - len(grew))) print(" phases whose killed set is unchanged on the common prefix (restriction map): %d" % sum(1 for b in range(ANCHOR) if {s for s in K66[b] if s in set(D52)} == {s for s in K52[b]})) print() # the recorded binding branch print("the recorded binding branch, b = %d (#1228: |resid| = 49, min f = 0.996153, slack -43):" % BIND) print(" N52 killed set K = %s (|K| = %d, residual %d of %d)" % (sorted(K52[BIND]), len(K52[BIND]), len(D52) - len(K52[BIND]), len(D52))) print(" N66 killed set K = %s (|K| = %d, residual %d of %d)" % (sorted(K66[BIND]), len(K66[BIND]), len(D66) - len(K66[BIND]), len(D66))) print(" gains an added slot: %s" % bool(K66[BIND] & new)) restricted_match = [b for b in range(ANCHOR) if {s for s in K66[BIND] if s in set(D52)} == {s for s in K52[b]}] print(" N66's b=%d restricted to the common prefix equals N52's killed set of phases: %s" % (BIND, restricted_match)) print() # how many N52 classes survive as classes of the larger source under the restriction map p52 = {} for b in range(ANCHOR): p52.setdefault(K52[b], []).append(b) survive = sum(1 for k, bs in p52.items() if any({s for s in K66[b] if s in set(D52)} == k for b in bs)) print("N52 classes that reappear at N66 under the restriction map: %d of %d" % (survive, len(p52))) mult52 = sorted(Counter(len(v) for v in p52.values()).items()) mult66 = sorted(Counter(len(v) for v in set(K66.values())).items()) print("class multiplicity at N52 (phases per class): %s" % mult52) print("class multiplicity at N66 (phases per class): %s" % mult66) print() print("READING (counting only): the class count is %d at |D|=52 and %d at |D|=66, both far below" % (c52, c66)) print("2|D|+1 and below q=%d; the 14 added slots touch %d of the 101 phases, so the binding class" % (ANCHOR, len(grew))) print("must be identified by restriction, not by equality of killed sets.")