/usr/share/axiom-20170501/src/algebra/MRATFAC.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 | )abbrev package MRATFAC MRationalFactorize
++ Author: P. Gianni
++ Description:
++ MRationalFactorize contains the factor function for multivariate
++ polynomials over the quotient field of a ring R such that the package
++ MultivariateFactorize can factor multivariate polynomials over R.
MRationalFactorize(E,OV,R,P) : SIG == CODE where
E : OrderedAbelianMonoidSup
OV : OrderedSet
R : Join(EuclideanDomain, CharacteristicZero) -- with factor over R[x]
FR ==> Fraction R
P : PolynomialCategory(FR,E,OV)
MPR ==> SparseMultivariatePolynomial(R,OV)
SUP ==> SparseUnivariatePolynomial
SIG ==> with
factor : P -> Factored P
++ factor(p) factors the multivariate polynomial p with coefficients
++ which are fractions of elements of R.
CODE ==> add
IE ==> IndexedExponents OV
PCLFRR ==> PolynomialCategoryLifting(E,OV,FR,P,MPR)
PCLRFR ==> PolynomialCategoryLifting(IE,OV,R,MPR,P)
MFACT ==> MultivariateFactorize(OV,IE,R,MPR)
UPCF2 ==> UnivariatePolynomialCategoryFunctions2
numer1(c:FR): MPR == (numer c) :: MPR
numer2(pol:P) : MPR == map(coerce,numer1,pol)$PCLFRR
coerce1(d:R) : P == (d::FR)::P
coerce2(pp:MPR) :P == map(coerce,coerce1,pp)$PCLRFR
factor(p:P) : Factored P ==
pden:R:=lcm([denom c for c in coefficients p])
pol :P:= (pden::FR)*p
ipol:MPR:= map(coerce,numer1,pol)$PCLFRR
ffact:=(factor ipol)$MFACT
(1/pden)*map(coerce,coerce1,(unit ffact))$PCLRFR *
_*/[primeFactor(map(coerce,coerce1,u.factor)$PCLRFR,
u.exponent) for u in factors ffact]
|