/usr/share/axiom-20170501/src/algebra/FR2.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 FR2 FactoredFunctions2
++ Author: Robert S. Sutor
++ Date Created: 1987
++ Description:
++ \spadtype{FactoredFunctions2} contains functions that involve
++ factored objects whose underlying domains may not be the same.
++ For example, \spadfun{map} might be used to coerce an object of
++ type \spadtype{Factored(Integer)} to
++ \spadtype{Factored(Complex(Integer))}.
FactoredFunctions2(R, S) : SIG == CODE where
R: IntegralDomain
S: IntegralDomain
SIG ==> with
map : (R -> S, Factored R) -> Factored S
++ map(fn,u) is used to apply the function \userfun{fn} to every
++ factor of \spadvar{u}. The new factored object will have all its
++ information flags set to "nil". This function is used, for
++ example, to coerce every factor base to another type.
CODE ==> add
map(func, f) ==
func(unit f) *
_*/[nilFactor(func(g.factor), g.exponent) for g in factors f]
|