verify/wildcard - Maple Programming Help

Online Help

All Products    Maple    MapleSim


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

verify/wildcard

verify a relation between two expressions, independent of variable names

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

verify(expr1, expr2, wildcard)

verify(expr1, expr2, wildcard(typ))

verify(expr1, expr2, wildcard(typ, ver))

Parameters

expr1, expr2

-

expressions

typ

-

(optional) type

ver

-

(optional) verification

Description

• 

The verify(expr1, expr2, wildcard) and verify(expr1, expr2, wildcard(typ, ver)) calling sequences return true if it can be determined that the expressions expr1 and expr2 are equivalent except for their subexpressions of type typ, either by testing for equality or by using verify with verification ver.

• 

Concretely, this command determines all subexpressions of expr1 and expr2 of type typ and verifies that expr1 has equally many different subexpressions of type typ as expr2 does. If this is not the case, then the command returns false. Otherwise, it goes through all possible matchings m that pair one subexpression of type typ of expr1 with one of expr2; for each m, Maple tests if substituting the paired subexpression into expr1 yields an expression that is equal to expr2. If ver is specified, then instead of testing for equality, Maple tests if the result of the substitution is in the relation tested by that verification to expr2.

• 

The default value for the type typ is name.

• 

The verifications wildcard and wildcard(typ) are symmetric. A verification wildcard(typ, ver) is symmetric if and only if the verification ver is symmetric.

• 

If expr1 and expr2 have many subexpressions of type typ, this command can take a long time.

Examples

This returns true, because both expressions contain a single name and substituting y for x in the first expression yields the second.

verifyx2x,y2y,wildcard

true

(1)

In the following two examples, only the name a indexed by something is allowed to be considered a wildcard.

verifyx2a0,x2a1,wildcardspecindexa

true

(2)

verifyx2a0,y2a1,wildcardspecindexa

false

(3)

In the following examples, the order of the entries of the lists does not matter. You can specify this by using the verification as_set.

verifyx2a,x+xy,s+sz,s2y,wildcardname,as_set

true

(4)

verifyx2a,x+xy+1,s+sz,s2y,wildcardname,as_set

false

(5)

Compatibility

• 

The verify/wildcard command was introduced in Maple 2017.

• 

For more information on Maple 2017 changes, see Updates in Maple 2017.

See Also

type

type/name

verify