axiom-developer
[Top][All Lists]

## [Axiom-developer] [CommonDenominator for polynomials] (nouveau)

 From: kratt6 Subject: [Axiom-developer] [CommonDenominator for polynomials] (nouveau) Date: Thu, 17 Mar 2005 03:44:36 -0600

Changes
http://page.axiom-developer.org/zope/mathaction/CommonDenominatorForPolynomials/diff
--
This package extends UnivariatePolynomialCommonDenominator for arbitrary
polynomial categories. In fact, I don't understand why the original package is
so restrictive.

\begin{axiom}
)abbrev package PCDEN PolynomialCommonDenominator
PolynomialCommonDenominator(R, Q, P, E, VarSet): Exports == Impl where
R : IntegralDomain
Q : QuotientFieldCategory R
E : OrderedAbelianMonoidSup
VarSet: OrderedSet
P: PolynomialCategory(Q, E,VarSet)

Exports ==> with
commonDenominator: P -> R
++ commonDenominator(q) returns a common denominator d for
++ the coefficients of q.
clearDenominator : P -> P
++ clearDenominator(q) returns p such that \spad{q = p/d} where d is
++ a common denominator for the coefficients of q.
splitDenominator : P -> Record(num: P, den: R)
d
++ is a common denominator for the coefficients of q.

import CommonDenominator(R, Q, List Q)

commonDenominator p == commonDenominator coefficients p

clearDenominator p ==
d := commonDenominator p
map(numer(d * #1)::Q, p)

splitDenominator p ==
d := commonDenominator p
[map(numer(d * #1)::Q, p), d]
\end{axiom}
--