verify/expand - Maple Programming Help

Online Help

All Products    Maple    MapleSim


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

verify/expand

verify the equality of two objects when expanded

verify/normal

verify the equality of two objects when normalized

verify/simplify

verify the equality of two objects when simplified

verify/evala

verify the equality of two objects in algebraic number fields

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

verify(expr1, expr2, expand)

verify(expr1, expr2, 'expand'(opt1, opt2, ...))

verify(expr1, expr2, normal)

verify(expr1, expr2, 'normal'(expanded))

verify(expr1, expr2, simplify)

verify(expr1, expr2, 'simplify'(opt1, opt2, ...))

verify(expr1, expr2, evala)

verify(expr1, expr2, 'evala'(opt1, opt2, ...))

Parameters

expr1, expr2

-

anything, assumed to be of type algebraic

opt1, opt2, ...

-

optional parameters passed to expand or simplify or evala

Description

• 

The verify(expr1, expr2, expand), verify(expr1, expr2, normal), verify(expr1, expr2, simplify), and verify(expr1, expr2, evala) calling sequences return true if the difference between the arguments expr1 and expr2 is zero after having applied the procedures expand, normal, simplify, and evala, respectively.

• 

Any optional parameters are passed on as subsequent arguments to the appropriate procedures.

• 

These verifications are symmetric.

• 

Because expand, normal, simplify, and evala are Maple procedures, they must be enclosed in single quotes to prevent evaluation.

• 

If expr1 and expr2 are of type relation, the verification is applied to each side of the relation.

• 

If expr1 and expr2 are lists, the verification is applied element-wise.  If the lists have differing lengths, then false is returned.

• 

If either expr1 or expr2 is not of type algebraic, relation, or list, then false is returned.

Examples

aArray1..3,1,2,x12

a12x12

(1)

bArray1..3,1,2,x22x+1

b12x22x+1

(2)

verifya,b,Array

false

(3)

verifya,b,Arrayexpand

true

(4)

verifyfx21fx1,fx+1

false

(5)

verifyfx21fx1,fx+1,normal

true

(6)

verify1x+xx+1,x+1+x2x2+x,expand

false

(7)

verify1x+xx+1,x+1+x2x2+x,normal

true

(8)

verifya,412+3,a,5,list

false

(9)

verifya,412+3,a,5,listnormal

false

(10)

verifya,412+3,a,5,listsimplify

false

(11)

verifya,412+3,a,5,simplify

false

(12)

verifyabsx,sqrtx2,simplify

false

(13)

verifyabsx,sqrtx2,simplifyassume=real

true

(14)

verifyR=1cosx2,R=sinx2,simplify

true

(15)

r1RootOf4_Z38_Z27_Z+3,index=2

r1RootOf4_Z38_Z27_Z+3,index=2

(16)

r2RootOf4_Z38_Z27_Z+3,2.562..2.57

r2RootOf4_Z38_Z27_Z+3,2.562..2.57

(17)

verifyr1,r2,evala

true

(18)

See Also

evala

expand

normal

simplify

verify