/usr/share/axiom-20170501/src/algebra/POLY.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 | )abbrev domain POLY Polynomial
++ Author: Dave Barton, Barry Trager
++ Description:
++ This type is the basic representation of sparse recursive multivariate
++ polynomials whose variables are arbitrary symbols. The ordering
++ is alphabetic determined by the Symbol type.
++ The coefficient ring may be non commutative,
++ but the variables are assumed to commute.
Polynomial(R) : SIG == CODE where
R : Ring
SIG ==> PolynomialCategory(R, IndexedExponents Symbol, Symbol) with
if R has Algebra Fraction Integer then
integrate : (%, Symbol) -> %
++ integrate(p,x) computes the integral of \spad{p*dx},
++ integrates the polynomial p with respect to the variable x.
CODE ==> SparseMultivariatePolynomial(R, Symbol) add
import UserDefinedPartialOrdering(Symbol)
coerce(p:%):OutputForm ==
(r:= retractIfCan(p)@Union(R,"failed")) case R => r::R::OutputForm
a :=
userOrdered?() => largest variables p
mainVariable(p)::Symbol
outputForm(univariate(p, a), a::OutputForm)
if R has Algebra Fraction Integer then
integrate(p, x) == (integrate univariate(p, x)) (x::%)
|