from research import *
s=begin(557,'Derive Joseph overlap geometry','Why do all six paired states share27|83|27?',{'trunk':137,'collateral':110},['File61 §11; File62 §§5–6'])
g=[137-110,2*110-137,137-110];commute=[]
for p in [F(0),F(7,2)]:
 for d in [0,7,14]:
  L=1933+p;K=1796+p;v=[L-d,K+110-d,L-110-d,K-d]
  commute.append([v[i]-v[i+1] for i in range(3)]==g)
finish(s,{'partition':g,'overlap':83,'translation_commutes_with_collateral_construction':commute},'The27|83|27 geometry follows from lengths137 and110. Translation commutes with fixed-offset collateral construction, so twelve intervals reduce to one shape in six placements.','Compare the moving collateral lives with fixed regular Joseph.',{'shape':g==[27,83,27],'all_states':all(commute)})
