from research import *
s=begin(1145,'Test the information carried by loss placement','Can an unchanged total350 produce a different complete lifespan field?',{},['C1144','Strategy §6'])
mt=[130,105,90,70,65,162,65,187,182];L=[930,912,905,910,895,962,365,969,777]
source=[0,0,0,0,0,100,0,120,130];moved=[0,0,0,0,0,120,0,100,130]
def run(d):
 b=[x-y for x,y in zip(mt,d)];caps=[601+sum(b[i:]) for i in range(9)];return {'ages':b,'caps':caps,'lives':[min(l,c) for l,c in zip(L,caps)]}
u,v=run(source),run(moved);diff=[b-a for a,b in zip(u['lives'],v['lives'])]
a=artifact('model/SP_loss_placement_counterexample.json',json.dumps({'source':u,'diagnostic_reallocation':v,'output_difference':diff,'scope':'formal positive-age counterexample, not an admitted manuscript state'},indent=2)+'\n')
finish(s,{'placement_counterexample':a,'lifespan_difference':diff},'A diagnostic exchange of100 and120 preserves the outer350 loss but changes Methuselah’s capped life by20. The source locations carry explanatory information that an endpoint total discards.','Determine which baseline lifespan relations the new threshold explanation still leaves unresolved.',{'same_total':sum(source)==sum(moved)==350,'positive_ages':min(v['ages'])>0,'field_changes':diff==[0,0,0,0,0,0,0,20,0]})
