/usr/share/axiom-20170501/src/algebra/POLYLIFT.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 | )abbrev package POLYLIFT PolynomialCategoryLifting
++ Author: Manuel Bronstein
++ Description:
++ This package provides a very general map function, which
++ given a set S and polynomials over R with maps from the
++ variables into S and the coefficients into S, maps polynomials
++ into S. S is assumed to support \spad{+}, \spad{*} and \spad{**}.
PolynomialCategoryLifting(E,Vars,R,P,S) : SIG == CODE where
E : OrderedAbelianMonoidSup
Vars: OrderedSet
R : Ring
P : PolynomialCategory(R, E, Vars)
S : SetCategory with
"+" : (%, %) -> %
"*" : (%, %) -> %
"**": (%, NonNegativeInteger) -> %
SIG ==> with
map : (Vars -> S, R -> S, P) -> S
++ map(varmap, coefmap, p) takes a
++ varmap, a mapping from the variables of polynomial p into S,
++ coefmap, a mapping from coefficients of p into S, and p, and
++ produces a member of S using the corresponding arithmetic.
++ in S
CODE ==> add
map(fv, fc, p) ==
(x1 := mainVariable p) case "failed" => fc leadingCoefficient p
up := univariate(p, x1::Vars)
t := fv(x1::Vars)
ans:= fc 0
while not ground? up repeat
ans := ans + map(fv,fc, leadingCoefficient up) * t ** (degree up)
up := reductum up
ans + map(fv, fc, leadingCoefficient up)
|