See section 12.16.8 for checking for squares in two-dimensional geometry.
The is_square command as arguments either four points or a geometric object.
is_rectangle returns 1 if the four points are the vertices of a square or if the geometric object is a square, it returns 0 otherwise.
Input:
Output:
Input:
then:
Output:
Input:
Output: