from research import *
s=begin(1038,'Joseph double-span constraint','What source condition joins Joseph’s birth to the retained terminal?',{},['File60 §2.5','C1037'])
from covenant_model import *
from algebra import Matrix
v={k:F(x) for k,x in json.loads((ROOT/'model/covenant_source_inputs.json').read_text()).items()};r=regular(v);M=Matrix(coefficient_matrix(claims,KEYS[:13]));before=Matrix(M.tolist()[:4]).rank();after=Matrix(M.tolist()[:5]).rank()
finish(s,{'Joseph_to_terminal':r['Joseph_birth']-v['T'],'twice_Jacob_life':2*v['L_J'],'rank_before':before,'rank_after':after},'Joseph’s294 span adds a source constraint to the preceding same-side relations in this local parameterization. Its contribution will be tested in the complete pattern system.','Check whether the household-middle equality is already forced by those relations.',{'span':r['Joseph_birth']-v['T']==2*v['L_J']==294,'adds_rank':after==before+1})
