Evidence

s978.py

Download source fileOpen in research workspace
from research import *
s=begin(978,'Rounding the cap counts','Does nearest-five rounding commute with the source minimum?',{},['C953','C955','C956','File51a nearest-five policy'])
q=lambda n:5*((n+2)//5)
L=json.loads((ROOT/'model/sp_cap_inputs.json').read_text())['baseline_lives'];C=json.loads((ROOT/'model/sp_capacity_field.json').read_text())['capacities'];left=[q(min(l,c)) for l,c in zip(L,C)];right=[min(q(l),q(c)) for l,c in zip(L,C)]
a=artifact('model/sp_cap_rounded_counts.json',json.dumps({'rounded_lives':left,'rounded_baseline':[q(x) for x in L],'rounded_capacities':[q(x) for x in C]},indent=2)+'\n')
finish(s,{'field':a,'rounded_lives':left,'proof':'A monotone map on a total order preserves binary minima.'},'Count rounding commutes with the cap across all nine rows because the rounding map is monotone. This does not yet define Rounded date labels.','Check whether this source field keeps the same strict active support.',{'commutes_all_rows':left==right,'expected_counts':left==[930,910,905,910,895,845,365,720,655]})

Linked sources and evidence

Edition and provenance

s978.py

SHA-256 26e2e1ac4792802601a53299b7a54525dd217952365d8b9ee4b403b783ed25f0

C480–C1634/Research_Cycles/C0932_C1131/evidence/s978.py