equal - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

verify/greater_than, verify/greater_equal, verify/equal, verify/less_equal, verify/less_than

verify the sign of difference of two objects

 Calling Sequence verify(expr1, expr2, greater_than) verify(expr1, expr2, greater_equal) verify(expr1, expr2, equal) verify(expr1, expr2, less_equal) verify(expr1, expr2, less_than)

Parameters

 expr1, expr2 - anything, assumed to be of type algebraic

Description

 • The verify(expr1, expr2, equal) function returns true if $\mathrm{signum}\left(0,\mathrm{expr1}-\mathrm{expr2},0\right)=0$ and false if the call to signum returns a numeric object. Otherwise, it returns FAIL.
 • The verify(expr1, expr2, greater_than) returns true if $\mathrm{signum}\left(0,\mathrm{\Im }\left(\mathrm{expr1}\right),0\right)=0$, $\mathrm{signum}\left(0,\mathrm{\Im }\left(\mathrm{expr2}\right),0\right)=0$, and $\mathrm{signum}\left(0,\mathrm{expr1}-\mathrm{expr2},0\right)=-1$, and false if either of the first two calls to signum return a nonzero numeric value or if the third returns $0$ or $1$. Otherwise, it returns FAIL.
 • The behavior is similar for the remaining verifications.
 • The verify/equal function is symmetric in its arguments while the others are not.
 • If either expr1 or expr2 is not of type algebraic, then false is returned.

Examples

 > $\mathrm{verify}\left(\left[1,2,3\right],\left[6,2,3,6\right],'\mathrm{sublist}'\left('\mathrm{less_than}'\right)\right)$
 ${\mathrm{true}}$ (1)

Get all points in a list greater than Pi

 > $\mathrm{select}\left(\mathrm{verify},\left[1,2,3,4,5,6,a\right],\mathrm{Pi},'\mathrm{truefalse}'\left('\mathrm{greater_than}'\right)\right)$
 $\left[{4}{,}{5}{,}{6}\right]$ (2)
 > $\mathrm{verify}\left({ⅇ}^{x},0,'\mathrm{greater_than}'\right)$
 ${\mathrm{FAIL}}$ (3)
 > $\mathrm{verify}\left({x}^{2},0,'\mathrm{greater_than}'\right)$
 ${\mathrm{FAIL}}$ (4)
 > $\mathrm{assume}\left(x,'\mathrm{real}'\right)$
 > $\mathrm{verify}\left({ⅇ}^{x},0,'\mathrm{greater_than}'\right)$
 ${\mathrm{true}}$ (5)
 > $\mathrm{verify}\left({x}^{2},0,\left\{'\mathrm{greater_than}','\mathrm{equal}'\right\}\right)$
 ${\mathrm{FAIL}}$ (6)
 > $\mathrm{verify}\left({x}^{2},0,\left\{'\mathrm{greater_equal}'\right\}\right)$
 ${\mathrm{true}}$ (7)