from research import *
s=begin(886,'Derive the held-anchor order displacement','How does anchor choice affect composition on an entire path?',{'k':E,'l':P,'a':14006,'b':4836},['File46 named anchors','formal diagnostic only'])
k,l,a,b=E,P,14006,4836
constant_left=k*(1-l)*b+(1-k)*a
constant_right=l*(1-k)*a+(1-l)*b
delta=constant_left-constant_right
proof={'maps':'D_k,a(x)=k*x+(1−k)*a','same_slope':'both compositions have slope k*l','constant_difference':'(k−1)*(l−1)*(a−b)','scope':'same-side linear coordinates; diagnostic mixed routes'}
art=artifact('model/anchor_order_identity.json',json.dumps(clean({'proof':proof,'left_constant':constant_left,'right_constant':constant_right,'difference':delta}),indent=2)+'\n')
finish(s,{'constant_displacement':delta,'identity':art},'Different held anchors produce a constant whole-path displacement even though the scalar products agree. For the source anchors14006 and4836 with E/P, the formal composition difference is18340/1587 at every point.','Test that constant displacement over the complete frozen head field.',{'identity':delta==(k-1)*(l-1)*(a-b),'value':delta==F(18340,1587),'same_anchor_zero':(k-1)*(l-1)*(a-a)==0})
