from research import *
s=begin(1009,'Joint Esau reconstruction','Do combined source registers recover all nine original counts?',{},['C1008','File58 §13'])
from algebra import Matrix
p=json.loads((ROOT/'model/structural_transfer_inputs.json').read_text())
def prefixes(order):return [[int(j in order[:i]) for j in range(9)] for i in range(1,len(order)+1)]
M=Matrix(prefixes(p['clean_order'])+prefixes(p['female_order'])+[[1]*9]);y=M*Matrix(p['Esau_counts']);sol=M.gauss_jordan_solve(y)[0]
a=artifact('model/esau_joint_measurements.json',json.dumps(clean({'matrix':M.tolist(),'measurements':list(y),'rank':M.rank(),'recovered':list(sol)}),indent=2)+'\n')
finish(s,{'measurement_field':a,'rank':M.rank(),'recovered':list(sol)},'The two ordered registers plus grand total recover every supplied count. This extends the separate-register analysis to the whole list.','Remove the grand total to identify its exact information contribution.',{'full_rank':M.rank()==9,'complete_reconstruction':list(sol)==p['Esau_counts']})
Evidence
s1009.py
Linked sources and evidence
Edition and provenance
s1009.py
SHA-256 e8e2b60e3193105ed1e735c5af880c6d686659616c91fd805d14ec45b120f0a1
C480–C1634/Research_Cycles/C0932_C1131/evidence/s1009.py