nonemptyset - Maple Help

type/nonemptyset

check for a nonempty set

 Calling Sequence type(expr, nonemptyset) type(expr, nonemptyset(K))

Parameters

 expr - any expression K - type name

Description

 • In the first calling sequence, the type command checks if expr is a valid nonempty Maple set. It returns true if expr is a set containing at least one element and false otherwise.
 • See the set help page for a description of the set datatype.
 • In the second calling sequence, where K is a specified type name, the type command checks whether expr is a nonempty set whose entries are of type K.  That is, type(expr, nonemptyset(K)) returns true if type(expr, nonemptyset) is true and type(x, K) is true for each entry x of expr.
 • See the type help page for a description of valid types in Maple.

Supertypes

 •

Examples

 > $S≔\left\{1,2,\frac{3}{2}\right\}$
 ${S}{≔}\left\{{1}{,}{2}{,}\frac{{3}}{{2}}\right\}$ (1)
 > $\mathrm{type}\left(S,\mathrm{nonemptyset}\right)$
 ${\mathrm{true}}$ (2)
 > $\mathrm{type}\left(S,\mathrm{nonemptyset}\left(\mathrm{rational}\right)\right)$
 ${\mathrm{true}}$ (3)
 > $\mathrm{type}\left(S,\mathrm{nonemptyset}\left(\mathrm{integer}\right)\right)$
 ${\mathrm{false}}$ (4)
 > $\mathrm{type}\left(\varnothing ,\mathrm{nonemptyset}\right)$
 ${\mathrm{false}}$ (5)