from research import *
s=begin(1057,'Complete Covenant/clutch source-only model','Does the full coupled field retain the declared source information without fitted gap inputs?',{},['C1032–C1056','File60','File61','File62'])
from covenant_model import *
from algebra import Matrix
def outputs(v):return list(regular(v).values())+[v['L_A']]+[x for row in cumulative(v)['rails'] for x in row]
M=Matrix(coefficient_matrix(outputs,KEYS));v={k:F(x) for k,x in json.loads((ROOT/'model/covenant_source_inputs.json').read_text()).items()};r=regular(v);c=cumulative(v)
ledger={'parameters':KEYS,'parameter_count':19,'output_count':len(outputs(v)),'rank':M.rank(),'forced_joins':['Kohath→regular Levi death by clutch definition','Levi→regular Levi birth by shared lifespan'],'additional_join':'Jacob→regular Isaac adds A1','source_authority':['full-state Covenant2081 author-designated','offering2051 / Isaac age15 proposed','1936 whole-year separate from1936.5 exact'],'generated_values':{'clutch':c['clutch'],'half':c['half'],'regular_gaps':[161,299,276]},'limits':'local parameter rank, not historical independence or globally minimal model'}
a=artifact('model/covenant_clutch_dependency_ledger.json',json.dumps(clean(ledger),indent=2)+'\n')
finish(s,{'complete_ledger':a,'rank':M.rank(),'outputs':len(outputs(v))},'The55-output coupled model has rank19 in its declared local inputs. The clutch and prominent gap values are derived, while source authority, phase policy and distinct biography roles remain explicit.','Connect the File52c complete paths to the new Key-domain and inverse-branch results.',{'full_source_rank':M.rank()==19,'output_count':len(outputs(v))==55,'Covenant_shift':v['Q']+215==2081,'forty_two':sum(len(row) for row in c['rails'])==42})
