from research import *
s=begin(957,'Slack and reduction field','What distinguishes strict clipping from remaining below the capacity?',{},['C953','C955','C956'])
p=json.loads((ROOT/'model/sp_cap_inputs.json').read_text()); c=json.loads((ROOT/'model/sp_capacity_field.json').read_text())['capacities']; out=json.loads((ROOT/'model/sp_cap_prediction.json').read_text())['lifespans']; slack=[a-b for a,b in zip(c,out)]; reduction=[a-b for a,b in zip(p['baseline_lives'],out)]
a=artifact('model/sp_cap_slack.json',json.dumps({'slack':slack,'reduction':reduction},indent=2)+'\n')
finish(s,{'field':a,'slack':slack,'reductions':reduction,'total_reduction':sum(reduction)},'Six lives remain below capacity, with Mahalalel the nearest unchanged row at17. Three positive reductions account for the entire488 pre-Noah difference.','Establish whether the minimum rule has a precise extremal meaning.',{'slack':slack==[377,265,167,72,17,0,420,0,0],'reductions':reduction==[0,0,0,0,0,115,0,249,124],'nonnegative':min(slack+reduction)>=0})
