solvelib::isEmpty

Predicate expressing the emptyness of a set

Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.

Syntax

solvelib::isEmpty(S)

Description

solvelib::isEmpty(S) returns a boolean expression that is equivalent to the statement that S is the empty set.

Since functions operating on boolean expressions like assume, is, or solve cannot handle equations involving sets, it is not possible to pass the expression S={} to them. solvelib::isEmpty(S) helps to get around this problem, as it tries to express the emptyness of S in an equivalent way that can be handled by the aforementioned functions. If no suitable equivalen expression is found, the unevaluated call to solvelib::isEmpty is returned.

S may be a set of any type; see solve for an enumeration of the various types of sets.

The solvelib::isEmpty function always returns Boolean expressions, even if the function cannot resolve an expression. See Example 4.

Examples

Example 1

The emptyness of a DOM_SET can be decided immediately:

solvelib::isEmpty({a, b}), solvelib::isEmpty({})

Example 2

The intersection of a finite set with any other set is empty if and only if none of the elements of the finite set is in the other set:

solvelib::isEmpty({a, b} intersect Z_)

Example 3

The output of solve can be entered directly into solvelib::isEmpty:

solvelib::isEmpty(solve(a*x=b, x))

Example 4

Sometimes, no simpler equivalent expression can be found:

result := solvelib::isEmpty(solve(x^2 = sin(x), x))

The returned expression is a Boolean expression:

testtype(result, Type::Boolean)

Parameters

S

Any set

Return Values

Boolean expression

Overloaded By

S

See Also

MuPAD Functions

Was this topic helpful?