"""New 37-phase lift search about the cited old seed, not an old scan rerun. Deterministic output; bounded by 37 phases, fixed 1540-wide source interval, four target lengths and 20000 DFS nodes per candidate. Uses boundary.py solver. """ import json,pathlib from boundary import P,OLD_FIRST,OLD_LAST,slots,solve p=pathlib.Path(__file__).parent out={'method':'37 translations, remaining free phases reoptimized including 73','trials':[],'best':None} for a in range(37): t=(-a*pow(P,-1,37))%37;shift=t*P xx=slots(OLD_FIRST+shift-250,OLD_LAST+shift+250) for L in (33,32,31,30): best=out['best'] if best and L<=best['L']: continue for j in range(len(xx)-L+1): w=xx[j:j+L]; phases,stats,result=solve(w,20000) rec={'a37':a,'t':t,'L':L,'first':w[0],'last':w[-1],'result':result,**stats} if phases: rec.update(slots=w,phases=phases) out['trials'].append(rec) if result=='cover':out['best']=rec;break if result=='node_limit':break raw=json.dumps(out,sort_keys=True,indent=2)+'\n' assert len(raw.encode())<=1048576 (p/'phase-lift.json').write_text(raw,encoding='utf-8')