from research import *
s=begin(1191,'Count the exact residual fibre','How many original decompositions share B,R,L away from zero?',{},['C1190'])
counts={z:sum(u+v==z for u in range(-2,3) for v in range(-2,3)) for z in range(-5,6)}
proof='For fixed z, u lies between max(-2,z-2) and min(2,z+2), and v=z-u. Integer count is max(0,5-abs(z)).'
a=artifact('model/joint_rounding_fibre_count.json',json.dumps({'residual_sum_counts':counts,'proof':proof,'scope':'B,R>=5; apply nonnegative intersection separately when either rounded component is zero'},indent=2)+'\n')
finish(s,{'fibre_count':a,'counts':counts},'Interior joint fibres have5−|z| members for |z|<=4. A singleton occurs only at z=±4, where both residuals must be the same extreme ±2.','Apply this criterion to the complete55-row ordinary source domain.',{'all_counts':all(c==max(0,5-abs(z)) for z,c in counts.items()),'singletons':{z for z,c in counts.items() if c==1}=={-4,4}})
