Field of fractions of an integral domain
Dom::Fraction(R
)
Dom::Fraction(R)(r
)
Dom::Fraction(R)
creates a domain which represents
the field of fractions
of
the integral domain R.
An element of the domain Dom::Fraction(R)
has
two operands, the numerator and denominator.
If Dom::Fraction(R)
has the axiom Ax::canonicalRep
(see below),
the denominators have unit normal form and
the gcds of numerators and denominators cancel.
The domain Dom::Fraction(Dom::Integer)
represents
the field of rational numbers. But the created domain is not the domain Dom::Rational
, because
it uses a different representation of its elements. Arithmetic in Dom::Rational
is
much more efficient than it is in Dom::Fraction(Dom::Integer)
.
If r
is a rational expression, then an element
of the field of fractions Dom::Fraction(R)
is created
by going through the operands of r
and converting
each operand into an element of R
. The result of
this process is r
in the form
,
where x and y are
elements of R
. If R
has Cat::GcdDomain
, then x and y are
coprime.
If one of the operands can not be converted into the domain R
,
an error message is issued.
We define the field of rational functions over the rationals:
F := Dom::Fraction(Dom::Polynomial(Dom::Rational))
and create an element of F
:
a := F(y/(x  1) + 1/(x + 1))
To calculate with such elements use the standard arithmetical operators:
2*a, 1/a, a*a
Some system functions are overloaded for elements of domains
generated by Dom::Fraction
, such as diff
, numer
or denom
(see the description
of the corresponding methods "diff"
, "numer"
and "denom"
above).
For example, to differentiate the fraction a
with
respect to x
enter:
diff(a, x)
If one knows the variables in advance, then using the domain Dom::DistributedPolynomial
yields
a more efficient arithmetic of rational functions:
Fxy := Dom::Fraction( Dom::DistributedPolynomial([x, y], Dom::Rational) )
b := Fxy(y/(x  1) + 1/(x + 1)): b^3
We create the field of rational numbers as the field of fractions of the integers, i.e., :
Q := Dom::Fraction(Dom::Integer): Q(1/3)
domtype(%)
Another representation of ℚ in MuPAD^{®} is
the domain Dom::Rational
where
the rationals are of the kernel domains DOM_INT
and DOM_RAT
.
Therefore it is much more efficient to work with Dom::Rational
than
with Dom::Fraction(Dom::Integer)
.

An integral domain, i.e., a domain of category 

A rational expression, or an element of 
"characteristic"  is the characteristic of 
"coeffRing"  is the integral domain 
"one"  is the one of the field of fractions of 
"zero"  is the zero of the field of fractions of 