intersect - Maple Help

type/union

check for an object of type union

type/minus

check for an object of type minus

type/intersect

check for an object of type intersect

type/subset

check for an object of type subset

 Calling Sequence type(expr, union) type(expr, minus) type(expr, intersect) type(expr, subset)

Parameters

 expr - any expression

Description

 • These procedures check to see if expr is a function of type union, minus, intersect, or subset respectively. See union for more information on these functions.
 • It is important to put quotes around the words union, minus, intersect, and subset as they are keywords.  Not using quotes will cause a syntax error.
 • Note that in the case of the third example, the call to the minus function is made before the call to the type function, and therefore the return is false. The set difference, $b$, which is clearly not a function of type minus, is passed to the type function.

Supertypes

 •

Examples

 > $\mathrm{type}\left(a\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{union}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}b,\mathrm{union}\right)$
 ${\mathrm{true}}$ (1)
 > $\mathrm{type}\left(\mathrm{intersect}\left(a,b,c\right),\mathrm{intersect}\right)$
 ${\mathrm{true}}$ (2)
 > $\mathrm{type}\left(\left\{a,b,c\right\}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{minus}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\left\{a,c\right\},\mathrm{minus}\right)$
 ${\mathrm{false}}$ (3)
 > $\mathrm{type}\left(a\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{subset}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}b,\mathrm{subset}\right)$
 ${\mathrm{true}}$ (4)