from research import *
s=begin(558,'Generate the fixed-Joseph comparison family','Can one flank-transfer formula reproduce all nine comparison states?',{'regular_Joseph':[1915,1805],'phases':[0,3,F(7,2)],'clutch':[0,7,14]},['File62 §§6.1–6.4'])
t=json.loads((ROOT/'prep/file61_62_tables.json').read_text())['joseph_partition_family'];out=[]
for r in t:
 p={'Moses_Nisan':F(0),'Aaron_Tishri_exact':F(7,2),'Aaron_whole_year_display':F(3)}[r['phase_state']];d=r['clutch'];v=[18+p-d,9-p+d,F(83)]
 assert v==[F(r[k]) for k in ['forward_flank','backward_flank','overlap']];out.append(v)
finish(s,{'partitions':out,'formula':['18+p−d','9−p+d','83']},'The clutch transfers duration between two flanks while preserving their27 total and the83 overlap. All nine states follow without moving regular Joseph1915–1805.','Test whether the reported cyclic symmetry acts on dates or on duration components.',{'nine':len(out)==9,'totals':all(sum(v)==110 and v[0]+v[1]==27 for v in out)})
