/usr/share/axiom-20170501/src/algebra/POLY2UP.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 | )abbrev package POLY2UP PolynomialToUnivariatePolynomial
++ Description:
++ This package is primarily to help the interpreter do coercions.
++ It allows you to view a polynomial as a
++ univariate polynomial in one of its variables with
++ coefficients which are again a polynomial in all the
++ other variables.
PolynomialToUnivariatePolynomial(x,R) : SIG == CODE where
x : Symbol
R : Ring
SIG ==> with
univariate : (Polynomial R, Variable x) ->
UnivariatePolynomial(x, Polynomial R)
++ univariate(p, x) converts the polynomial p to a one of type
++ \spad{UnivariatePolynomial(x,Polynomial(R))},
++ ie. as a member of \spad{R[...][x]}.
CODE ==> add
univariate(p, y) ==
q:SparseUnivariatePolynomial(Polynomial R) := univariate(p, x)
map(x1+->x1, q)$UnivariatePolynomialCategoryFunctions2(Polynomial R,
SparseUnivariatePolynomial Polynomial R, Polynomial R,
UnivariatePolynomial(x, Polynomial R))
|