/usr/share/axiom-20170501/src/algebra/SUPFRACF.spad is in axiom-source 20170501-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | )abbrev package SUPFRACF SupFractionFactorizer
++ Author: P. Gianni
++ Date Created: October 1993
++ Date Last Updated: March 1995
++ Description:
++ SupFractionFactorize contains the factor function for univariate
++ polynomials over the quotient field of a ring S such that the package
++ MultivariateFactorize works for S
SupFractionFactorizer(E,OV,R,P) : SIG == CODE where
E : OrderedAbelianMonoidSup
OV : OrderedSet
R : GcdDomain
P : PolynomialCategory(R,E,OV)
FP ==> Fraction P
SUP ==> SparseUnivariatePolynomial
SIG ==> with
factor : SUP FP -> Factored SUP FP
++ factor(p) factors the univariate polynomial p with coefficients
++ which are fractions of polynomials over R.
squareFree : SUP FP -> Factored SUP FP
++ squareFree(p) returns the square-free factorization of the univariate polynomial p with coefficients
++ which are fractions of polynomials over R. Each factor has no repeated roots and the factors are
++ pairwise relatively prime.
CODE ==> add
MFACT ==> MultivariateFactorize(OV,E,R,P)
MSQFR ==> MultivariateSquareFree(E,OV,R,P)
UPCF2 ==> UnivariatePolynomialCategoryFunctions2
factor(p:SUP FP) : Factored SUP FP ==
p=0 => 0
R has CharacteristicZero and R has EuclideanDomain =>
pden : P := lcm [denom c for c in coefficients p]
pol : SUP FP := (pden::FP)*p
ipol: SUP P := map(numer,pol)$UPCF2(FP,SUP FP,P,SUP P)
ffact: Factored SUP P := 0
ffact := factor(ipol)$MFACT
makeFR((1/pden * map(coerce,unit ffact)$UPCF2(P,SUP P,FP,SUP FP)),
[["prime",map(coerce,u.factor)$UPCF2(P,SUP P,FP,SUP FP),
u.exponent] for u in factors ffact])
squareFree p
squareFree(p:SUP FP) : Factored SUP FP ==
p=0 => 0
pden : P := lcm [denom c for c in coefficients p]
pol : SUP FP := (pden::FP)*p
ipol: SUP P := map(numer,pol)$UPCF2(FP,SUP FP,P,SUP P)
ffact: Factored SUP P := 0
if R has CharacteristicZero and R has EuclideanDomain then
ffact := squareFree(ipol)$MSQFR
else ffact := squareFree(ipol)
makeFR((1/pden * map(coerce,unit ffact)$UPCF2(P,SUP P,FP,SUP FP)),
[["sqfr",map(coerce,u.factor)$UPCF2(P,SUP P,FP,SUP FP),
u.exponent] for u in factors ffact])
|