subset - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


verify/subset

verify that the first set is a subset of the second

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

verify(expr1, expr2, `subset`)

verify(expr1, expr2, '`subset`(ver)')

Parameters

expr1, expr2

-

anything, assumed to be of type set

ver

-

verification for the set operands

Description

• 

The verify(expr1, expr2, `subset`) and verify(expr1, expr2, '`subset`(ver)') calling sequences return true if for every operand in the first set it can be determined that there is an operand in the second set which satisfies a relationship that is determined either by testing with equality or by using the verification ver.

• 

If true is returned, then it has been determined that each operand of the first set satisfies the relationship with at least one element in the second set. If false is returned, then there is at least one operand in the first set which does not satisfy the relationship (a result of type verify(false)) with each operand of the second set. Otherwise, FAIL is returned.

• 

The relation of a proper subset can be implemented as the verification And(`subset`(ver), Not(set(ver))). This verification is not symmetric.

• 

If either expr1 or expr2 is not of type set, then false is returned.

• 

The name subset is a keyword and therefore it must be enclosed by backquotes in a call to verify.

Examples

verifya,b,c,a,b,c,d,e,`subset`

true

(1)

a,b,csubseta,b,c,d,e

true

(2)

verifya,b,c,f,a,b,c,d,e,`subset`

false

(3)

verifya,b,xx1,a,b,x2x,`subset`

false

(4)

a,b,xx1subseta,b,x2x

false

(5)

The following examples use the expand and float verifications, explained on the help pages verify,expand and verify,float, respectively.

verifya,b,xx1,a,b,x2x,`subset`expand

true

(6)

verifya,b,xx1,a,b,c,x2x,`subset`expand

true

(7)

verify0.10222,0.2333,0.102221,0.2334,`subset`

false

(8)

verify0.10222,0.2333,0.102221,0.2334,`subset`float106

true

(9)

Consider the lattice of subsets of the set a,b,c,d,e,f,g. Given the point a,b,d, select all points which precede this point:

selectverify,combstructallstructsSubseta,b,c,d,e,a,b,d,And`subset`,Notset

,a,b,d,a,b,a,d,b,d

(10)

See Also

keywords

set

verify

verify/set

verify/sublist

verify/superset