from research import *
s=begin(862,'Construct the whole Luke–MT comparison field','Can the highlighted bridges be located within a complete named field?',{},['File43 lines674–696','File51a §3.1 strict regular table'])
p=json.loads((ROOT/'model/NT_inputs.json').read_text())
data=p['derived_candidate_diagnostics']['complete_Luke_to_MT_rounded_bridge']
field=[]
for row in data:
 cells=[c.strip() for c in row['MT_source']['raw'].strip('|').split('|')]
 nt=int(row['NT_source']['raw'].split('|')[1].strip().split('–')[0])
 actual,rounded=int(cells[3]),int(cells[4])
 field.append({'name':row['name'],'NT':nt,'MT_actual':actual,'MT_rounded':rounded,'G':nt-rounded,'MT_residual':rounded-actual})
a=artifact('model/NT_MT_field.json',json.dumps(field,indent=2)+'\n')
finish(s,{'field':a,'ordered_G':[r['G'] for r in field]},'The 22 common names give one complete difference field. The 1150 Adam and 1260 Jared bridges are members of that field, with the strict Actual4112 and Rounded4106 states kept distinct.','Recover all field values from local edge differences and one terminal.',{'coverage':len(field)==22 and field[0]['name']=='Adam' and field[-1]['name']=='Jacob','literal_match':all(r['G']==d['gap_NT_minus_rounded'] for r,d in zip(field,data))})
