 Overview - Maple Help

verify

relation verification procedure Calling Sequence verify(a, b) verify(a, b, ver) Parameters

 a - any expression b - any expression ver - (optional) verification Description

 • The verify procedure is a semi-Boolean valued procedure that checks a relationship between two objects a and b. By default, the relationship checked is simple equality (evalb).  When verification ver is specified, true is returned in the case where the relationship exists. Otherwise a negative result in a standard form is returned (see type/verify).
 • When ver is specified as a set of verifications, the value returned is true when a and b satisfy the relation for any one of the verifications in the set. Otherwise, false is returned.
 • A verification ver is said to be symmetric if it is true that verify(a, b, ver) = verify(b, a, ver) for all possible values a and b.  The two argument form of verify is symmetric since it is true that $\mathrm{evalb}\left(a=b\right)$ if and only if $\mathrm{evalb}\left(b=a\right)$.
 • In addition to the structured verifications (see verify/structured), the following verification names are defined in Maple:

 • In addition, the three trivial verifications true, false, and FAIL will always return that result.
 • Note:  If a verification name is an operator, it must be back-quoted to prevent a syntax error.  See the examples below.
 • For more information, see verify/datatype, where datatype is one of the names in the above list.
 • In Maple, some objects return a different result from what may be expected when compared with evalb. For example, 0 and 0. compare equally under evalb, but  and [0.] do not.
 • For information on using structured verification expressions, see verify/structured. Examples

 > $\mathrm{verify}\left(23,5,\mathrm{greater_than}\right)$
 ${\mathrm{true}}$ (1)
 > $\mathrm{verify}\left(\mathrm{Array}\left(1..3,\left[1,2,3\right]\right),\mathrm{Array}\left(\left[1,2,3\right],\mathrm{readonly}\right),\mathrm{Array}\right)$
 ${\mathrm{true}}$ (2)
 > $\mathrm{verify}\left(\left[a,b,x\left(x-1\right)\right],\left[a,b,{x}^{2}-x\right],'\mathrm{list}'\right)$
 ${\mathrm{false}}$ (3)
 > $\mathrm{verify}\left(\left[a,b,x\left(x-1\right)\right],\left[a,b,{x}^{2}-x\right],'\mathrm{list}'\left('\mathrm{expand}'\right)\right)$
 ${\mathrm{true}}$ (4)
 > $\mathrm{evalb}\left(\mathrm{min}\left(a,b,x\left(x-1\right)\right)=\mathrm{min}\left(a,b,{x}^{2}-x\right)\right)$
 ${\mathrm{false}}$ (5)
 > $\mathrm{verify}\left(\mathrm{min}\left(a,b,x\left(x-1\right)\right),\mathrm{min}\left(a,b,{x}^{2}-x\right),'\mathrm{as_list}'\left('\mathrm{expand}','\mathrm{min}'\right)\right)$
 ${\mathrm{true}}$ (6)
 > $\mathrm{verify}\left(\left\{2,3,4,{4}^{\frac{1}{2}}+3\right\},\left\{1,2,3,4,5\right\},'\mathrm{subset}'\left('\mathrm{simplify}'\right)\right)$
 ${\mathrm{true}}$ (7)
 > $\mathrm{verify}\left(\left[\mathrm{true},{9}^{\frac{1}{2}},\left(x+1\right)\left(x-1\right)\right],\left[\mathrm{true},3,{x}^{2}-1\right],\left[\mathrm{boolean},\mathrm{simplify},\mathrm{normal}\right]\right)$
 ${\mathrm{true}}$ (8)
 > $\mathrm{verify}\left(\left\{2.203,2.205,3.375,9.23\right\},\left\{2.204,3.374,9.231\right\},'\mathrm{set}'\left('\mathrm{float}'\left({10}^{6}\right)\right)\right)$
 ${\mathrm{true}}$ (9)
 > $\mathrm{evalb}\left(\mathrm{undefined}=\mathrm{undefined}\right)$
 ${\mathrm{true}}$ (10)
 > $\mathrm{evalb}\left(\left[\mathrm{undefined}\right]=\left[\mathrm{undefined}\right]\right)$
 ${\mathrm{true}}$ (11)
 > $\mathrm{verify}\left(\left[\mathrm{undefined}\right],\left[\mathrm{undefined}\right],'\mathrm{list}'\right)$
 ${\mathrm{true}}$ (12)
 > $\mathrm{evalb}\left(0=0.\right)$
 ${\mathrm{true}}$ (13)
 > $\mathrm{evalb}\left(\left\{0\right\}=\left\{0.\right\}\right)$
 ${\mathrm{false}}$ (14)
 > $\mathrm{verify}\left(\left\{0\right\},\left\{0.\right\},'\mathrm{set}'\right)$
 ${\mathrm{true}}$ (15)