from research import *
s=begin(760,'Prove rounding equivariance for admitted shifts','Which state changes commute with componentwise rounding?',{'admitted_amounts':[60,130,215,460]},['File51a variants; C752'])
q=lambda n:5*((n+2)//5)
tests={str(k):all(q(n+k)-q(n)==k for n in range(1000)) for k in [60,130,215,460]}
proof='For k=5m, Q(n+k)=5 floor((n+5m+2)/5)=Q(n)+5m. Thus row residuals and corresponding boundary residuals persist under compatible admitted changes.'
finish(s,{'identity':proof,'checked_amounts':tests,'scope':'compatible coordinates or rows; insertion retains topology; finite source states only'},'Rounding compatibility is an equivariance under multiples of five. It explains why several variants preserve residual profiles without making all chronology operations interchangeable.','Test counted-versus-completed input order where the shift is not a multiple of five.',{'all_shifts':all(tests.values()),'one_unit_counterexample':q(53)-q(52)==5})
