/usr/share/axiom-20170501/src/algebra/MYEXPR.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 56 57 58 59 60 61 62 | )abbrev domain MYEXPR MyExpression
++ Author: Mark Botch
++ Description:
++ This domain has no description
MyExpression(q,R) : SIG == CODE where
q : Symbol
R : Join(Ring, OrderedSet, IntegralDomain)
UP ==> MyUnivariatePolynomial(q, R)
SIG ==> Join(FunctionSpace R, IntegralDomain,
RetractableTo UP, RetractableTo Symbol,
RetractableTo Integer, CombinatorialOpsCategory,
PartialDifferentialRing Symbol) with
_* : (%,%) -> %
_/ : (%,%) -> %
_*_* : (%,%) -> %
numerator : % -> %
denominator : % -> %
ground? : % -> Boolean
coerce : Fraction UP -> %
retract : % -> Fraction UP
CODE ==> Expression R add
Rep := Expression R
iunivariate(p: Polynomial R): UP ==
poly: SparseUnivariatePolynomial(Polynomial R)
:= univariate(p, q)$(Polynomial R)
map((z1:Polynomial R):R +-> retract(z1), poly)_
$UnivariatePolynomialCategoryFunctions2(Polynomial R,
SparseUnivariatePolynomial Polynomial R,
R, UP)
retract(p: %): Fraction UP ==
poly: Fraction Polynomial R := retract p
upoly: UP := iunivariate numer poly
vpoly: UP := iunivariate denom poly
upoly / vpoly
retract(p: %): UP == iunivariate retract p
coerce(r: Fraction UP): % ==
num: SparseUnivariatePolynomial R := makeSUP numer r
den: SparseUnivariatePolynomial R := makeSUP denom r
u: Polynomial R := multivariate(num, q)
v: Polynomial R := multivariate(den, q)
quot: Fraction Polynomial R := u/v
quot::(Expression R)
|