verify/superlist - Maple Programming Help

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

verify/superlist

verify that the first list is a superlist of the second

 Calling Sequence verify(expr1, expr2, superlist) verify(expr1, expr2, superlist(ver))

Parameters

 expr1, expr2 - anything, assumed to be of type list ver - verification for the list operands

Description

 • The verify(expr1, expr2, superlist) and verify(expr1, expr2, superlist(ver)) calling sequences return true if it can be determined that the first list contains the second list as a sublist, where this relationship is satisfied operandwise, either by testing with equality or using the verification ver.
 • If true is returned, then for one sublist of the first list, each of the pairs of operands satisfied the relation. If false is returned, then for all sublists of the first list at least one pair of operands did not satisfy the relation (a result of type verify(false)). Otherwise, FAIL is returned, indicating that for every sublist at least one pair of operands it could not be determined whether or not they satisfied the relation (a result of type verify(FAIL)).
 • This verification is not symmetric.
 • If either expr1 or expr2 is not of type list, then false is returned.

Examples

 > $\mathrm{verify}\left(\left[a,b,c,d,e\right],\left[a,b,c\right],'\mathrm{superlist}'\right)$
 ${\mathrm{true}}$ (1)
 > $\mathrm{verify}\left(\left[a,b,c,d,e\right],\left[a,b,c,f\right],'\mathrm{superlist}'\right)$
 ${\mathrm{false}}$ (2)
 > $\mathrm{verify}\left(\left[a,b,{x}^{2}-x\right],\left[a,b,x\left(x-1\right)\right],'\mathrm{superlist}'\right)$
 ${\mathrm{false}}$ (3)
 > $\mathrm{verify}\left(\left[a,b,{x}^{2}-x\right],\left[a,b,x\left(x-1\right)\right],'\mathrm{superlist}\left(\mathrm{expand}\right)'\right)$
 ${\mathrm{true}}$ (4)
 > $\mathrm{verify}\left(\left[a,b,{x}^{2}-x,c\right],\left[a,b,x\left(x-1\right)\right],'\mathrm{superlist}\left(\mathrm{expand}\right)'\right)$
 ${\mathrm{true}}$ (5)
 > $\mathrm{verify}\left(\left[0.2334,0.102221\right],\left[0.2333,0.10222\right],'\mathrm{superlist}'\right)$
 ${\mathrm{false}}$ (6)
 > $\mathrm{verify}\left(\left[0.2334,0.102221\right],\left[0.2333,0.10222\right],'\mathrm{superlist}\left(\mathrm{float}\left({10}^{6}\right)\right)'\right)$
 ${\mathrm{true}}$ (7)