We add the thesis to the set of hypothesis equations, and we eliminate all variables except those given independently in the construction, namely xy abl
Elim(h..W, Ideal(a(L-x)+b(M-y),
-bL+aM,
X-x-2(L-x),
Y-y-2(M-y),
(a-l)(R-x)+b(S-y),
-b(R-l)+(a-l)S,
Z-x-2(R-x),
W-y-2(S-y),blh-1,
(XW-Zy+xY+yX-YZ-xW)))
Ideal( ya^2 - x^2b - y^2b + yb^2 - yal + xbl );This last polynomial is the equation of a circle, and it passes thru (O,O),(a,b), (l,O).
Therefore the necessary condition for the three points to be aligned is that (x,y) is on the circle that circumscribes the triangle.
It is equally easy to check that this condition is also sufficient. In fact 1 should be in the ideal generated by all the hypothesis (including the newly discovered one) plus the thesis multiplied by a slack variable minus 1. But it turns out that this ideal contains an equation in the variables that give the coordinates of the triangle's vertices:
Elim(h..x, Ideal(a(L-x)+b(M-y),
-bL+aM,
X-x-2(L-x),
Y-y-2(M-y),
(a-l)(R-x)+b(S-y),
-b(R-l)+(a-l)S,
Z-x-2(R-x),W-y-2(S-y),
ya^2 - x^2b - y^2b + yb^2 - yal + xbl,
blh-1,
(XW-Zy+xY+yX-YZ-xW)t-1))
Ideal( a^4 + 2a^2b^2 + b^4 - 2a^3l - 2ab^2l + a^2l^2 + b^2l^2 );