def run(load,check): controls=load('C319_DATA.json')['rows'];families=load('C357_DATA.json')['hits'];rows=[] for r in controls: hits=[f for f in families if f['SP_context']==[0,0,1] and f['pivots'][0]['center']==r['n']] check('one or zero local source family '+str((r['a'],r['b'],r['i'])),len(hits)<=1) h=hits[0] if hits else None;admitted=bool(h and r['joint_admitted']);F=h['inputs'][1]['center'] if h else None if h:check('R displacement is b '+str((r['a'],r['b'],r['i'])),r['R']-F==r['b']) rows.append({'a':r['a'],'b':r['b'],'i':r['i'],'N':r['n'],'R':r['R'],'joint_admitted':r['joint_admitted'],'local_three_row_family':h,'local_three_row_admitted':admitted,'same_Gear_Flood_input':F,'R_equals_same_Gear_input':admitted and r['R']==F,'regular_side_2K':r['sides'][1]==1058,'two_17K':r['two17K'],'all_K':r['allK']}) def sig(rr):return sorted([f"{r['a']}{r['b']}:i{r['i']}" for r in rr]) local=[r for r in rows if r['local_three_row_admitted']];same=[r for r in local if r['R_equals_same_Gear_input']];side=[r for r in local if r['regular_side_2K']];allk=[r for r in local if r['all_K']] check('twenty controls fourteen joint',len(rows)==20 and sum(x['joint_admitted'] for x in rows)==14) check('nine local across all choices',len(local)==9 and {(r['a'],r['b']) for r in local}=={(0,0),(0,2),(2,0),(2,2)}) check('sameGear binding selects five b0',len(same)==5 and all(r['b']==0 for r in same)) check('regular2K selects four b2',len(side)==4 and all(r['b']==2 for r in side)) check('two allK primary controls retained',sig(allk)==['22:i3','22:i5']) check('no sameGear and2K simultaneous',not any(r['R_equals_same_Gear_input'] and r['regular_side_2K'] for r in local)) return {'step':'C358','rows':rows,'counts':{'controls':20,'joint_admitted':14,'local_three_row':9,'local_and_sameGear_R':5,'local_and_regular2K':4,'local_and_allK':2},'survivors':{'local':sig(local),'R_equals_same_Gear_input':sig(same),'regular_2K':sig(side),'allK':sig(allk)},'identities':['R=F_same+b','N-F_same=1060','N-R=1060-b'],'interpretation':'The local pattern does not selecta,b. Identifying its MT Flood input with R selectsb0, whereas the original2K side needsb2. The new arrow and original rectangle coexist using distinct existing Flood nodes; no source rule equates them.'}