from research import *
s=begin(1353,'Verify Key volume and prefix claims','Does the manuscript distinguish rational path conversion from integer completion?',{},['draft/06b_Keys.md','model/main_inverse_table_check.json'])
rows=json.loads((ROOT/'model/main_inverse_table_check.json').read_text())['rows']; prefixes=[]
for row in rows:
 vals=[sum(row['image'][:i]) for i in range(1,len(row['image']))]
 prefixes.append({'path':row['path'],'proper_prefixes':vals,'residues_mod23':[x%23 for x in vals]})
volumes=[{'factor':str(k),'year_measure':d,'year_count':str(F(14720)*k),'volume':str(F(14720)*k*d)} for k,d in [(E,336),(P,360),(J,364)]]
a=artifact('model/main_Key_claim_check.json',json.dumps({'prefixes':prefixes,'volumes':volumes},indent=2)+'\n')
finish(s,{'check':a},'The three calibrated measures give one exact modeled volume, and every proper inverse prefix stays off the integer Priestly grid. These are compatible statements because the uniform path is rational.','Verify the Covenant table against its generated path.',{'common_volume':{x['volume'] for x in volumes}=={'5376000'},'proper_nonzero':all(all(r!=0 for r in x['residues_mod23']) for x in prefixes),'whole_integer':14720*E==16000})
