from research import *
s=begin(892,'Reconstruct all six twelvefold macro heads','Does one source-appointed anchored rule recover the complete head field?',{'multiplier':12},['File63 §§7.7–7.9'])
p=json.loads((ROOT/'model/covenant_inputs.json').read_text())['named_inputs']
out=[]
for r in p['macro_lift_six']:
 c,t=r['source_BC'],r['target_BC'];span=c-t;body=12*span;m=t+body
 assert (span,body,m)==(r['span'],r['unfolded_span'],r['macro_head_BC'])
 out.append({'id':r['id'],'C':c,'R':t,'span':span,'body':body,'M':m,'source_role':r['source_role'],'target_role':r['target_role']})
a=artifact('model/six_macro_heads.json',json.dumps(out,indent=2)+'\n')
finish(s,{'whole_field':a,'heads':[r['M'] for r in out]},'M=R+12(C−R)=12C−11R recovers all six published macro heads. The twelvefold multiplier and endpoint roles are source premises; the head field is their exact consequence.','Derive and test the complete source-pair response field.',{'six':len(out)==6,'sum_coefficients':12-11==1,'literal_outputs':[r['M'] for r in out]==[146006,146066,146836,146833,145601,145571]})
