 verify/vector - Maple Programming Help

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

verify/vector

verify a relation between the elements of two vectors

 Calling Sequence verify(expr1, expr2, vector) verify(expr1, expr2, 'vector'(ver))

Parameters

 expr1, expr2 - anything, assumed to be of type vector ver - verification for the vector elements

Description

 • The verify(expr1, expr2, vector) and verify(expr1, expr2, 'vector'(ver)) calling sequences return true if it can be determined that the two vectors satisfy a relation elementwise, either by testing with equality or using the verification ver.
 • If true is returned, then each of the pairs of elements satisfied the relation. If false is returned, then at least one pair of elements did not satisfy the relation (a result of type verify(false)). Otherwise, FAIL is returned, indicating that for at least one pair of elements it could not be determined whether or not they satisfied the relation (a result of type verify(FAIL)).
 • The verification vector is symmetric and a verification 'vector'(ver) is symmetric if and only if the verification ver is symmetric.
 • Because vector is a Maple function, it must be enclosed in single quotes to prevent evaluation.
 • If either expr1 or expr2 is not of type vector, then false is returned.
 • Important: The command vector has been superseded by Vector.

Examples

 > $\mathrm{u1}≔\mathrm{vector}\left(2,\left[1,x\left(1-x\right)\right]\right)$
 ${\mathrm{u1}}{≔}\left[\begin{array}{cc}{1}& {x}{}\left({1}{-}{x}\right)\end{array}\right]$ (1)
 > $\mathrm{u2}≔\mathrm{vector}\left(2,\left[1,x-{x}^{2}\right]\right)$
 ${\mathrm{u2}}{≔}\left[\begin{array}{cc}{1}& {-}{{x}}^{{2}}{+}{x}\end{array}\right]$ (2)
 > $\mathrm{verify}\left(\mathrm{u1},\mathrm{u2},'\mathrm{vector}'\right)$
 ${\mathrm{false}}$ (3)
 > $\mathrm{verify}\left(\mathrm{u1},\mathrm{u2},'\mathrm{vector}\left(\mathrm{expand}\right)'\right)$
 ${\mathrm{true}}$ (4)
 > $\mathrm{v1}≔\mathrm{vector}\left(2,\left[0.3222,0.5001\right]\right)$
 ${\mathrm{v1}}{≔}\left[\begin{array}{cc}{0.3222}& {0.5001}\end{array}\right]$ (5)
 > $\mathrm{v2}≔\mathrm{vector}\left(2,\left[0.3223,0.5000\right]\right)$
 ${\mathrm{v2}}{≔}\left[\begin{array}{cc}{0.3223}& {0.5000}\end{array}\right]$ (6)
 > $\mathrm{verify}\left(\mathrm{v1},\mathrm{v2},'\mathrm{vector}'\right)$
 ${\mathrm{false}}$ (7)
 > $\mathrm{verify}\left(\mathrm{v1},\mathrm{v2},'\mathrm{vector}\left(\mathrm{float}\left({10}^{6}\right)\right)'\right)$
 ${\mathrm{true}}$ (8)