from research import *
s=begin(1033,'Covenant incidence identifiability','Does the complete labelled node set recover every local edge parameter?',{},['C1032'])
from covenant_model import *
from algebra import Matrix
M=Matrix(coefficient_matrix(lambda v:list(regular(v).values()),KEYS[:12]));invM=M.inv()
a=artifact('model/covenant_incidence_matrix.json',json.dumps(clean({'parameters':KEYS[:12],'matrix':M.tolist(),'rank':M.rank(),'determinant':M.det(),'inverse':invM.tolist()}),indent=2)+'\n')
finish(s,{'incidence_basis':a,'rank':M.rank(),'determinant':M.det()},'The twelve-coordinate incidence map is invertible over integers. Full labelled coordinates recover the selected local edges by subtraction; this is not a claim of twelve historically independent observations.','Separate common placement from the relative Covenant field.',{'rank_twelve':M.rank()==12,'unimodular':abs(M.det())==1,'integer_inverse':all(x.denominator==1 for x in invM)})
