verify - Maple Programming Help

Online Help

All Products    Maple    MapleSim


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

verify

relation verification procedure

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

verify(a, b)

verify(a, b, ver)

Parameters

a

-

any expression

b

-

any expression

ver

-

(optional) verification

Description

• 

The verify procedure is a semi-Boolean valued procedure that checks a relationship between two objects a and b. By default, the relationship checked is simple equality (evalb).  When verification ver is specified, true is returned in the case where the relationship exists. Otherwise a negative result in a standard form is returned (see type/verify).

• 

When ver is specified as a set of verifications, the value returned is true when a and b satisfy the relation for any one of the verifications in the set. Otherwise, false is returned.

• 

A verification ver is said to be symmetric if it is true that verify(a, b, ver) = verify(b, a, ver) for all possible values a and b.  The two argument form of verify is symmetric since it is true that evalba=b if and only if evalbb=a.

• 

In addition to the structured verifications (see verify/structured), the following verification names are defined in Maple:

And

anyfunc

Array

array

as_list

as_set

boolean

equal

evalc

expand

exprseq

float

function_bounds

function_shells

greater_equal

greater_than

interval

less_equal

less_than

list

listlist

matrix

Matrix

member

neighborhood

normal

Not

Or

permute_elements

plot

plot3d

polynom

range

record

relation

set

sign

simplify

specfunc

sublist

subset

superlist

superset

symbol

table

testeq

truefalse

units

Vector

vector

 

 

• 

In addition, the three trivial verifications true, false, and FAIL will always return that result.

• 

Note:  If a verification name is an operator, it must be back-quoted to prevent a syntax error.  See the examples below.

• 

For more information, see verify/datatype, where datatype is one of the names in the above list.

• 

In Maple, some objects return a different result from what may be expected when compared with evalb. For example, 0 and 0. compare equally under evalb, but [0] and [0.] do not.

• 

For information on using structured verification expressions, see verify/structured.

Examples

verify23,5,greater_than

true

(1)

verifyArray1..3,1,2,3,Array1,2,3,readonly,Array

true

(2)

verifya,b,xx1,a,b,x2x,'list'

false

(3)

verifya,b,xx1,a,b,x2x,'list''expand'

true

(4)

evalbmina,b,xx1=mina,b,x2x

false

(5)

verifymina,b,xx1,mina,b,x2x,'as_list''expand','min'

true

(6)

verify2,3,4,412+3,1,2,3,4,5,'`subset`''simplify'

true

(7)

verifytrue,912,x+1x1,true,3,x21,boolean,simplify,normal

true

(8)

verify2.203,3.375,2.205,9.23,2.204,3.374,9.231,'set''float'106

true

(9)

evalbundefined=undefined

true

(10)

evalbundefined=undefined

true

(11)

verifyundefined,undefined,'list'

true

(12)

evalb0=0.

true

(13)

evalb0=0.

false

(14)

verify0,0.,'set'

true

(15)

See Also

evalb

type/verification

type/verify

verify/structured