/usr/share/axiom-20170501/src/algebra/MPCPF.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 | )abbrev package MPCPF MPolyCatPolyFactorizer
++ Author: P. Gianni
++ Date Last Updated: March 1995
++ Description:
++ This package exports a factor operation for multivariate polynomials
++ with coefficients which are polynomials over
++ some ring R over which we can factor. It is used internally by packages
++ such as the solve package which need to work with polynomials in a specific
++ set of variables with coefficients which are polynomials in all the other
++ variables.
MPolyCatPolyFactorizer(E,OV,R,PPR) : SIG == CODE where
R : EuclideanDomain
E : OrderedAbelianMonoidSup
-- following type is required by PushVariables
OV : OrderedSet with
convert : % -> Symbol
++ convert(x) converts x to a symbol
variable: Symbol -> Union(%, "failed")
++ variable(s) makes an element from symbol s or fails.
PR ==> Polynomial R
PPR : PolynomialCategory(PR,E,OV)
NNI ==> NonNegativeInteger
ISY ==> IndexedExponents Symbol
SE ==> Symbol
UP ==> SparseUnivariatePolynomial PR
UPPR ==> SparseUnivariatePolynomial PPR
SIG ==> with
factor : PPR -> Factored PPR
++ factor(p) factors a polynomial with polynomial
++ coefficients.
--- Local Functions ----
CODE ==> add
import PushVariables(R,E,OV,PPR)
---- factorization of p ----
factor(p:PPR) : Factored PPR ==
ground? p => nilFactor(p,1)
c := content p
p := (p exquo c)::PPR
vars:List OV :=variables p
g:PR:=retract pushdown(p, vars)
flist := factor(g)$GeneralizedMultivariateFactorize(Symbol,ISY,R,R,PR)
ffact : List(Record(irr:PPR,pow:Integer))
ffact:=[[pushup(u.factor::PPR,vars),u.exponent] for u in factors flist]
fcont:=(unit flist)::PPR
nilFactor(c*fcont,1)*(_*/[primeFactor(ff.irr,ff.pow) for ff in ffact])
|