 verify/Array - Maple Programming Help

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

verify/Array

verify a relation between two Arrays

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

Parameters

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

Description

 • The verify(expr1, expr2, Array) and verify(expr1, expr2, 'Array'(ver)) calling sequences return true if it can be determined that the two Arrays 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 Array is symmetric and a verification 'Array'(ver) is symmetric if and only if the verification ver is symmetric.
 • Since Array is a Maple function, it must be enclosed in single quotes to prevent evaluation.
 • If either expr1 or expr2 is not of type Array, then false is returned.
 • The special verifications %NULL, seq, and &, can be used to verify an expression sequence in an Array. See verify/exprseq.

Examples

 > $a≔\mathrm{Array}\left(1..3,\left[1,2,{\left(x-1\right)}^{2}\right]\right)$
 ${a}{≔}\left[\begin{array}{ccc}{1}& {2}& {\left({x}{-}{1}\right)}^{{2}}\end{array}\right]$ (1)
 > $b≔\mathrm{Array}\left(1..3,\left[1,2,{\left(x-1\right)}^{2}\right]\right)$
 ${b}{≔}\left[\begin{array}{ccc}{1}& {2}& {\left({x}{-}{1}\right)}^{{2}}\end{array}\right]$ (2)
 > $c≔\mathrm{Array}\left(1..3,\left[1,2,{x}^{2}-2x+1\right]\right)$
 ${c}{≔}\left[\begin{array}{ccc}{1}& {2}& {{x}}^{{2}}{-}{2}{}{x}{+}{1}\end{array}\right]$ (3)
 > $\mathrm{evalb}\left(a=b\right)$
 ${\mathrm{false}}$ (4)
 > $\mathrm{verify}\left(a,b,'\mathrm{Array}'\right)$
 ${\mathrm{true}}$ (5)
 > $\mathrm{verify}\left(a,c,'\mathrm{Array}'\right)$
 ${\mathrm{false}}$ (6)
 > $\mathrm{verify}\left(a,c,'\mathrm{Array}\left(\mathrm{expand}\right)'\right)$
 ${\mathrm{true}}$ (7)

Compatibility

 • The verify/Array command was updated in Maple 2015.