See section 11.16.10 for checking for parallelograms in two-dimensional geometry.
The is_parallelogram command as arguments either four points or a geometric object.
is_parallelogram returns 4, 3, 2 or 1 if the four points are the vertices of a square, rectangle, rhombus or parallelogram, respectively, or if the geometric object is a square, rectangle, rhombus or parallelogram. It returns 0 otherwise.
Input:
Output:
Input:
Output:
Input:
then:
Output:
Note that
Input:
defines P to be a list consisting of the parallelogram and
the point D; to test if the object is a parallelogram, the
first component of P needs to be tested.
Input:
Output:
Input:
Output: