verify/member - Maple Programming Help

Home : Support : Online Help : Programming : Logic : Boolean : verify : verify/member

verify/member

verify the membership in a list or set

 Calling Sequence verify(expr1, expr2, member) verify(expr1, expr2, 'member'(ver)) verify(expr1, expr2, 'member'(ver, p))

Parameters

 expr1 - anything expr2 - anything, assumed to be of type set or list ver - verification for determining membership p - (optional) name

Description

 • The verify(expr1, expr2, member), verify(expr1, expr2, 'member'(ver)), and verify(expr1, expr2, 'member'(ver, p)) calling sequences return true if it can be determined that the first argument expr1 is a member of the set or list expr2, where membership is determined either by testing for equality or by using the verification ver.
 • If a second parameter p is present and a relation is found, then the position of the first element which satisfies the relation of expr2 will be assigned to p.
 • If true is returned, then the first argument satisfied the relation with at least one of the operands of the second argument. If false is returned, then it did not satisfy the relation for all operands of the second argument. Otherwise, FAIL is returned, indicating that for at least one operand of the second argument it could not be determined whether or not they satisfied the relation (a result of type verify(FAIL)).
 • This verification is not symmetric.
 • Since member is a Maple function, it must be enclosed in single quotes to prevent evaluation.
 • If expr2 is not of type list or set, then false is returned.

Examples

 > $\mathrm{verify}\left(a,\left\{a,b,c\right\},'\mathrm{member}'\right)$
 ${\mathrm{true}}$ (1)
 > $\mathrm{verify}\left(a,\left\{ab,ac\right\},'\mathrm{member}'\right)$
 ${\mathrm{false}}$ (2)
 > $\mathrm{verify}\left(x\left(x-1\right),\left[a,b,{x}^{2}-x\right],'\mathrm{member}'\right)$
 ${\mathrm{false}}$ (3)
 > $\mathrm{verify}\left(x\left(x-1\right),\left[a,b,{x}^{2}-x\right],'\mathrm{member}\left(\mathrm{expand}\right)'\right)$
 ${\mathrm{true}}$ (4)