/usr/share/axiom-20170501/src/algebra/FAMR2.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 FAMR2 FiniteAbelianMonoidRingFunctions2
++ Author: Martin Rubey
++ Description:
++ This package provides a mapping function for
++ \spadtype{FiniteAbelianMonoidRing}
++ The packages defined in this file provide fast fraction free rational
++ interpolation algorithms. (see FAMR2, FFFG, FFFGF, NEWTON)
FiniteAbelianMonoidRingFunctions2(E, R1, A1, R2, A2) : SIG == CODE where
E : OrderedAbelianMonoid
R1 : Ring
A1 : FiniteAbelianMonoidRing(R1, E)
R2 : Ring
A2 : FiniteAbelianMonoidRing(R2, E)
SIG ==> with
map : (R1 -> R2, A1) -> A2
++ \spad{map}(f, a) applies the map f to each coefficient in a. It is
++ assumed that f maps 0 to 0
CODE ==> add
map(f: R1 -> R2, a: A1): A2 ==
if zero? a then 0$A2
else
monomial(f leadingCoefficient a, degree a)$A2 + map(f, reductum a)
|