 type/relation - Help

type

 relation

 Calling Sequence type(expr, relation)

Parameters

 expr - any expression

Description

 • These functions return true if expr is of the specified type, and false otherwise.
 • An expression is of type relation if it is of type $\mathrm{=}$, $\mathrm{<>}$, $\mathrm{<}$, or $\mathrm{<=}$.
 • For each of the types f, where f is one of $\mathrm{=}$, $\mathrm{<>}$, $\mathrm{<}$, or $\mathrm{<=}$, x is of type f if op(0, x) = f.
 • Note: Expressions formed using the operators > and >= are automatically converted to expressions of type < and <=, respectively.

Subtypes

 •

Supertypes

 •

Examples

 > $\mathrm{type}\left(x<5,\mathrm{relation}\right)$
 ${\mathrm{true}}$ (1)
 > $\mathrm{type}\left(a\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{or}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{not}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}b,\mathrm{relation}\right)$
 ${\mathrm{false}}$ (2)
 > $\mathrm{type}\left(1<2\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{and}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}5
 ${\mathrm{true}}$ (3)