from research import *
s=begin(982,'Cap as an irreversible operation','Which structural properties distinguish the cap from a frame translation?',{},['C968','C970','C978'])
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'];cap=lambda v:[min(x,c) for x,c in zip(v,C)];Y=cap(L);LX=L.copy();LX[-1]=753
finish(s,{'properties':['monotone','idempotent','many-to-one'],'inverse_available':False,'domain':'resolved count vector with fixed capacity vector'},'The cap is a monotone idempotent projection with demonstrated information loss. The family’s operation grammar therefore includes irreversible maps as well as reversible translations.','Regenerate the complete source family from the output-free packet and close the block.',{'idempotent':cap(Y)==Y,'many_to_one':L!=LX and cap(L)==cap(LX),'monotone_increase':all(x<=y for x,y in zip(cap([v-1 for v in L]),Y))})
