Semiring of natural integer numbers
MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.
MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.
Dom::Natural(x
)
Dom::Natural
is the semiring of integer
numbers represented by elements of the domain DOM_INT
.
Dom::Natural
is the domain of natural integer
numbers represented by expressions of type DOM_INT
.
Elements of Dom::Natural
are usually not
created explicitly. However, if one creates elements using the usual
syntax, it is checked whether the input is an integer number. This
means that Dom::Natural
is a façade domain
which creates elements of domain type DOM_INT
.
Viewed as a differential ring Dom::Natural
is
trivial, it contains constants only.
Dom::Natural
has the domain Dom::Numerical
as its
super domain, i.e., it inherits each method which is defined by Dom::Numerical
and
not reimplemented by Dom::Natural
. Methods described
below are those implemented by Dom::Natural
.
Ax::canonicalRep
, Ax::systemRep
, Ax::canonicalOrder
, Ax::canonicalUnitNormal
, Ax::closedUnitNormals
, Ax::efficientOperation
("_divide")
, Ax::efficientOperation
("_mult")
Creating some integer numbers using Dom::Natural
.
This example also shows that Dom::Natural
is a
façade domain.
Dom::Natural(2); domtype(%)
Dom::Natural(2/3)
Error: The arguments are invalid. [Dom::Natural::new]
By tracing the method Dom::Natural::testtypeDom
we
can see the interaction between testtype
and Dom::Natural::testtypeDom
.
prog::trace(Dom::Natural::testtypeDom): delete x: testtype(x, Dom::Natural); testtype(3, Dom::Natural); prog::untrace(Dom::Natural::testtypeDom):
enter Dom::Natural::testtypeDom(x, Dom::Natural) computed FAIL
enter Dom::Natural::testtypeDom(3, Dom::Natural) computed TRUE

An integer 