from research import *
from algebra import Matrix
s=begin(1166,'Propagate the disjoint source pattern through the whole cumulative field','Does the three-amplitude model retain its meaning at every ordered boundary?',{},['C1165','inherited U reconstruction'])
d=json.loads((ROOT/'model/SP_LXX_disjoint_life_pattern.json').read_text());M=Matrix(d['matrix']);U=Matrix([[int(j>=i) for j in range(9)] for i in range(9)]);B=U*M;v=list(B*Matrix([100,60,27]))
a=artifact('model/SP_LXX_cumulative_amplitude_pattern.json',json.dumps(clean({'names':d['names'],'matrix':B.tolist(),'rank':B.rank(),'field':v,'interpretation':'held common cumulative terminal; common regular path has zero displacement after Cainan leveling; the ordered life masks generate every nonzero cumulative difference'}),indent=2)+'\n')
finish(s,{'cumulative_pattern':a,'rank':B.rank(),'complete_field':v},'The same three amplitudes generate all nine cumulative differences574,574,547,520,420,320,220,120,60. Repeated and changing plateaus follow the exact source support; the cumulative representation retains all three parameters.','Separate the triangle’s operator consistency from genuinely additional source constraints.',{'rank_preserved':B.rank()==3,'fullfield':[int(x) for x in v]==[574,574,547,520,420,320,220,120,60],'local_recovered':(U.inv()*B).tolist()==M.tolist()})
