Equal - Maple Help

PolyhedralSets

 Equal
 tests equality of two polyhedral sets

 Calling Sequence Equal(ps1, ps2)

Parameters

 ps1, ps2 - polyhedral sets to be compared

Description

 • Returns true if ps1 and ps2 are the same set and false otherwise.
 • For sets to be equal, they must have the same coordinates.  Sets with different coordinate names are considered to be different.

Examples

 > $\mathrm{with}\left(\mathrm{PolyhedralSets}\right):$

Sets constructed with different relations, but corresponding to the same set of points are considered equal.

 > $\mathrm{set1}≔\mathrm{PolyhedralSet}\left(\left[0\le x\right]\right):$$\mathrm{set2}≔\mathrm{PolyhedralSet}\left(\left[0\le x,-1\le x\right]\right):$$\mathrm{Equal}\left(\mathrm{set1},\mathrm{set2}\right)$
 ${\mathrm{true}}$ (1)

Two cubes defined with different coordinates are not considered equal

 > $\mathrm{c1}≔\mathrm{ExampleSets}:-\mathrm{Cube}\left(\left[a,b,c\right]\right)$
 ${\mathrm{c1}}{≔}{{}\begin{array}{lll}{\mathrm{Coordinates}}& {:}& \left[{a}{,}{b}{,}{c}\right]\\ {\mathrm{Relations}}& {:}& \left[{-}{c}{\le }{1}{,}{c}{\le }{1}{,}{-}{b}{\le }{1}{,}{b}{\le }{1}{,}{-}{a}{\le }{1}{,}{a}{\le }{1}\right]\end{array}$ (2)
 > $\mathrm{c2}≔\mathrm{ExampleSets}:-\mathrm{Cube}\left(\left[x,y,z\right]\right)$
 ${\mathrm{c2}}{≔}{{}\begin{array}{lll}{\mathrm{Coordinates}}& {:}& \left[{x}{,}{y}{,}{z}\right]\\ {\mathrm{Relations}}& {:}& \left[{-}{z}{\le }{1}{,}{z}{\le }{1}{,}{-}{y}{\le }{1}{,}{y}{\le }{1}{,}{-}{x}{\le }{1}{,}{x}{\le }{1}\right]\end{array}$ (3)
 > $\mathrm{Equal}\left(\mathrm{c1},\mathrm{c2}\right)$
 ${\mathrm{false}}$ (4)

Compatibility

 • The PolyhedralSets[Equal] command was introduced in Maple 2015.