Objects/Documentation
preimages.py
I provide the computation for “When several proofs cover the same phase”.
Download ↓"""Compare union counts with individual proof-path preimages on a finite wheel."""
from itertools import product
from collections import Counter
import json
def experiment():
periods=(3,5,7)
paths=((1,2),(2,4),(4,8))
def survives(path,phase):
return all(x%p!=a for x in path for p,a in zip(periods,phase))
counts=[0]*len(paths)
multiplicity=Counter()
first=[0]*len(paths)
for phase in product(*(range(p) for p in periods)):
matches=[survives(path,phase) for path in paths]