/usr/share/axiom-20170501/src/algebra/GMODPOL.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 63 64 65 66 67 68 69 70 71 72 73 74 | )abbrev domain GMODPOL GeneralModulePolynomial
++ Author: Mark Botch
++ Description:
++ This package is undocumented
GeneralModulePolynomial(vl, R, IS, E, ff, P) : SIG == CODE where
vl : List(Symbol)
R : CommutativeRing
IS : OrderedSet
NNI ==> NonNegativeInteger
E : DirectProductCategory(#vl, NNI)
MM ==> Record(index:IS, exponent:E)
ff : (MM, MM) -> Boolean
OV ==> OrderedVariableList(vl)
P : PolynomialCategory(R, E, OV)
ModMonom ==> ModuleMonomial(IS, E, ff)
SIG ==> Join(Module(P), Module(R)) with
leadingCoefficient : $ -> R
++ leadingCoefficient(x) is not documented
leadingMonomial : $ -> ModMonom
++ leadingMonomial(x) is not documented
leadingExponent : $ -> E
++ leadingExponent(x) is not documented
leadingIndex : $ -> IS
++ leadingIndex(x) is not documented
reductum : $ -> $
++ reductum(x) is not documented
monomial : (R, ModMonom) -> $
++ monomial(r,x) is not documented
unitVector : IS -> $
++ unitVector(x) is not documented
build : (R, IS, E) -> $
++ build(r,i,e) is not documented
multMonom : (R, E, $) -> $
++ multMonom(r,e,x) is not documented
"*" : (P,$) -> $
++ p*x is not documented
CODE ==> FreeModule(R, ModMonom) add
Rep:= FreeModule(R, ModMonom)
leadingMonomial(p:$):ModMonom == leadingSupport(p)$Rep
leadingExponent(p:$):E == exponent(leadingMonomial p)
leadingIndex(p:$):IS == index(leadingMonomial p)
unitVector(i:IS):$ == monomial(1,[i, 0$E]$ModMonom)
build(c:R, i:IS, e:E):$ == monomial(c, construct(i, e))
---- WARNING: assumes c ^= 0
multMonom(c:R, e:E, mp:$):$ ==
zero? mp => mp
monomial(c * leadingCoefficient mp, [leadingIndex mp,
e + leadingExponent mp]) + multMonom(c, e, reductum mp)
((p:P) * (mp:$)):$ ==
zero? p => 0
multMonom(leadingCoefficient p, degree p, mp) +
reductum(p) * mp
|