login  home  contents  what's new  discussion  bug reports help  links  subscribe  changes  refresh  edit

# Edit detail for CommonDenominator for polynomials revision 3 of 3

 1 2 3 Editor: test1 Time: 2018/04/13 15:44:45 GMT+0 Note:

changed:
-Note: Common denominator in FriCAS is extended in such a way.
-
-This package extends UnivariatePolynomialCommonDenominator for arbitrary polynomial categories. In fact, I don't understand why the original package is so restrictive.
-
-)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)
-      ++ splitDenominator(q) returns \spad{[p, d]} such that \spad{q = p/d} and 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]
This page presented extension of UnivariatePolynomialCommonDenominator for arbitrary polynomial categories.  FriCAS now
contains such extension, so we just present an example.

)expose PCDEN


This page presented extension of UnivariatePolynomialCommonDenominator? for arbitrary polynomial categories. FriCAS now contains such extension, so we just present an example.

Example use:

fricas
)set mess type off

fricas
)expose PCDEN
PolynomialCommonDenominator is now explicitly exposed in frame
initial
dom:=DMP([x,y], FRAC DMP([z],INT));
p:dom:=x*y^3/(z^2-1) + 3*x*y/(z^3-1) (1)
fricas
commonDenominator p (2)
fricas
clearDenominator p (3)
fricas
splitDenominator p (4)