In general, rational functions are given in terms of monomials. They are represented by lists, using numbers (see Indeterminates) for the indeterminates.
A monomial is a product of powers of indeterminates. A monomial is
stored as a list (we call this the expanded form of the monomial)
of the form [inum,exp,inum,exp,...] where each inum
is the number of an indeterminate and exp the corresponding exponent.
The list must be sorted according to the numbers of the indeterminates.
Thus for example, if x, y and z are the first three indeterminates,
the expanded form of the monomial x5z8 = z8x5 is [1,5,3,8].
The representation of a polynomials is a list of the form
[mon,coeff,mon,coeff,...] where mon is a monomial in
expanded form (that is given as list) and coeff its coefficent. The
monomials must be sorted according to the total degree/lexicographic
order (implemented by the function MonomialTotalDegreeLess). We call
this the external representation of a polynomial. (The
reason for ordering is that addition of polynomials becomes linear in
the number of monomials instead of quadratic; the reason for the
particular ordering chose is that it is compatible with multiplication
and thus gives acceptable performance for quotient calculations.)
IsRationalFunctionDefaultRep( obj ) R
is the default representation of rational functions. A rational function
in this representation is defined by the attributes
ExtRepNumeratorRatFun and ExtRepDenominatorRatFun where
ExtRepNumeratorRatFun and ExtRepDenominatorRatFun are
both external representations of a polynomial.
ExtRepNumeratorRatFun( ratfun ) A
returns the external representation of the numerator polynomial of the rational function ratfun. Numerator and Denominator are not guaranteed to be cancelled against each other.
ExtRepDenominatorRatFun( ratfun ) A
returns the external representation of the denominator polynomial of the rational function ratfun. Numerator and Denominator are not guaranteed to be cancelled against each other.
ZeroCoefficientRatFun( ratfun ) O
returns the zero of the coefficient ring. This might be needed to represent the zero polynomial for which the external representation of the numerator is the empty list.
IsPolynomialDefaultRep( obj ) R
is the default representation of polynomials. A polynomial
in this representation is defined by the components
and ExtRepNumeratorRatFun where ExtRepNumeratorRatFun is the
external representation of the polynomial.
ExtRepPolynomialRatFun( polynomial ) A
returns the external representation of a polynomial. The difference to
ExtRepNumeratorRatFun is that rational functions might know to be a
polynomial but can still have a non-vanishing denominator. In this case
ExtRepPolynomialRatFun has to call a quotient routine.
IsLaurentPolynomialDefaultRep( obj ) R
This representation is used for Laurent polynomials and univariate
polynomials. It represents a Laurent polynomial via the attributes
CoefficientsOfLaurentPolynomial
(see CoefficientsOfLaurentPolynomial) and
IndeterminateNumberOfLaurentPolynomial
(see IndeterminateNumberOfLaurentPolynomial).
The attributes that give a representation of a a rational function as a laurent polynomial are
CoefficientsOfLaurentPolynomial (see CoefficientsOfLaurentPolynomial)
and IndeterminateNumberOfUnivariateRationalFunction
(see IndeterminateNumberOfUnivariateRationalFunction).
Algorithms should use only the attributes ExtRepNumeratorRatFun,
ExtRepDenominatorRatFun,
ExtRepPolynomialRatFun, CoefficientsOfLaurentPolynomial and -- if
the univariate function is not constant --
IndeterminateNumberOfUnivariateRationalFunction as the low-level
interface to work with a polynomial. They should not refer to the actual
representation used.
[Top] [Previous] [Up] [Next] [Index]
GAP 4 manual