from itertools import combinations from collections import Counter def run(load,check): reg=load('C286_DATA.json')['target_register'];keys=['tradition','rail','gear','Cainan','Terah60','full430'];roles=['Noah birth','Shem birth','Noah death','Shem death'];groups={} for i,r in enumerate(reg): if r['role'] not in roles:continue k=tuple(r.get(x) for x in keys);groups.setdefault(k,{})[r['role']]=i contexts=[] for k,rs in sorted(groups.items(),key=lambda x:str(x[0])): check('complete profile '+str(k),set(rs)==set(roles));contexts.append({'context':dict(zip(keys,k)),'record_indices':rs,'coordinates':{role:reg[rs[role]]['center'] for role in roles}}) pairs=[];hits=[];dist=Counter() for i,j in combinations(range(len(contexts)),2): a,z=contexts[i],contexts[j] if a['coordinates']['Noah birth']0),'distinct_offsets':len(dist),'same_role_2K_profiles':len(hits)},'interpretation':'All four person roles share a context offset by source construction; the unfiltered census finds one labelled profile pair at1058. Uniqueness is relative to the frozen96-context menu. Primary SP and LXX coordinates at the chosen upper settings give1059, not1058. No upstream or cumulative Gear is searched.'}