from research import *
from algebra import Matrix
s=begin(1207,'Identify the missing located measurements for cap recovery','How many extra independent excess measurements supplement the total?',{},['C1206'])
H=Matrix([[1,1,1],[1,0,0],[0,1,0]]);obs=[488,115,249];sol=list(H.inv()*Matrix(obs))
a=artifact('model/SP_excess_measurement_completion.json',json.dumps(clean({'measurements':['total','Jared excess','Methuselah excess'],'matrix':H.tolist(),'determinant':H.det(),'observed':obs,'recovered_excesses':sol,'limitation':'Two independent located measurements suffice and are necessary for unrestricted rational positive-branch recovery; their values remain source-supplied.'}),indent=2)+'\n')
finish(s,{'measurement_completion':a,'recovered':sol},'After the total is retained, two independent located excesses recover the third. The source must still provide those measurements or equivalent baseline facts.','Relate rounded reduction to exact cap excess using the residual identity.',{'rank3':H.rank()==3,'exact':sol==[115,249,124]})
