from research import *
from math import lcm
spans={'Jared':8372,'Noah_G1':8970,'Flood_G2':9568,'Creation':7912}
s=begin(501,'The three-Key integral domain','Why does the middle member admit all three integral calendar outputs?',spans,['File52c §3.15','C500'])
common=lcm(E.denominator,P.denominator,J.denominator)
r={k:{'E':E*n,'P':P*n,'J':J*n,'all_integral':all((q*n).denominator==1 for q in [E,P,J])} for k,n in spans.items()}
finish(s,{'common_input_lattice':common,'rows':r,'JNF_mod3_coefficients':[14%3,15%3,16%3]},
 'The common integral span domain is897Z, since897=lcm(23,69,299). For598m, E and J are integral for all integer m; P additionally needs3|m. Of14,15,16 only Noah’s15 qualifies. This explains the three-Key middle role from the existing progression.',
 'Use those outputs to derive the shared2926 endpoint and assess which placement assumptions remain.',{'lattice':common==897,'middle_only':[r[k]['all_integral'] for k in spans]==[False,True,False,False]})
