This file is indexed.

/usr/share/axiom-20170501/src/algebra/FAMONC.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
)abbrev category FAMONC FreeAbelianMonoidCategory
++ Category for free abelian monoid on any set of generators
++ Author: Manuel Bronstein
++ Date Created: November 1989
++ Date Last Updated: 6 June 1991
++ Description:
++ A free abelian monoid on a set S is the monoid of finite sums of
++ the form \spad{reduce(+,[ni * si])} where the si's are in S, and the ni's
++ are in a given abelian monoid. The operation is commutative.

FreeAbelianMonoidCategory(S,E) : Category == SIG where
  S : SetCategory
  E : CancellationAbelianMonoid

  SIG ==> Join(CancellationAbelianMonoid, RetractableTo S) with

    "+" : (S, $) -> $
      ++ s + x returns the sum of s and x.

    "*" : (E, S) -> $
      ++ e * s returns e times s.

    size : $ -> NonNegativeInteger
      ++ size(x) returns the number of terms in x.
      ++ mapGen(f, a1\^e1 ... an\^en) returns 
      ++\spad{f(a1)\^e1 ... f(an)\^en}.

    terms : $ -> List Record(gen: S, exp: E)
      ++ terms(e1 a1 + ... + en an) returns \spad{[[a1, e1],...,[an, en]]}.

    nthCoef : ($, Integer) -> E
      ++ nthCoef(x, n) returns the coefficient of the n^th term of x.

    nthFactor : ($, Integer) -> S
      ++ nthFactor(x, n) returns the factor of the n^th term of x.

    coefficient : (S, $) -> E
      ++ coefficient(s, e1 a1 + ... + en an) returns ei such that
      ++ ai = s, or 0 if s is not one of the ai's.

    mapCoef : (E -> E, $) -> $
      ++ mapCoef(f, e1 a1 +...+ en an) returns
      ++ \spad{f(e1) a1 +...+ f(en) an}.

    mapGen : (S -> S, $) -> $
      ++ mapGen(f, e1 a1 +...+ en an) returns
      ++ \spad{e1 f(a1) +...+ en f(an)}.

    if E has OrderedAbelianMonoid then

      highCommonTerms : ($, $) -> $
        ++ highCommonTerms(e1 a1 + ... + en an, f1 b1 + ... + fm bm) 
        ++ returns \spad{reduce(+,[max(ei, fi) ci])}
        ++ where ci ranges in the intersection
        ++ of \spad{{a1,...,an}} and \spad{{b1,...,bm}}.