verify/type - Maple Help

verify/type

verify that a value has a type

 Calling Sequence verify(expr1, expr2, type)

Parameters

 expr1, expr2 - anything

Description

 • The verify(expr1, expr2, type)  calling sequence returns true if expr2 is a type and expr1 is an expression of that type. That is, if type(expr1, expr2) returns true, then so does this calling sequence.
 • The verification type is not symmetric.
 • This calling sequence is useful in structured verifications. Outside of that situation, it is more efficient and clearer to call the type command directly.
 • If expr2 is not a type, then this command returns false. This is different from calling type(expr1, expr2) directly, which throws an error if expr2 is not a type.

Examples

 > $\mathrm{verify}\left(\left[1,2,3\right],\left\{'\mathrm{even}','\mathrm{odd}'\right\},\mathrm{as_set}\left(\mathrm{type}\right)\right)$
 ${\mathrm{true}}$ (1)
 > $\mathrm{verify}\left(\left[1,3,5\right],\left\{'\mathrm{even}','\mathrm{odd}'\right\},\mathrm{as_set}\left(\mathrm{type}\right)\right)$
 ${\mathrm{false}}$ (2)
 > $\mathrm{verify}\left(17,\mathrm{not_a_type},\mathrm{type}\right)$
 ${\mathrm{false}}$ (3)