This file is indexed.

/usr/share/axiom-20170501/src/algebra/MONAD.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
)abbrev category MONAD Monad
++ Authors: J. Grabmeier, R. Wisbauer
++ Date Created: 01 March 1991
++ Date Last Updated: 11 June 1991
++ Reference: 
++ Jaco68 Structure and Representations of Jordan Algebras
++ Jaco51 General Representation Theory of Jordan Algebras
++ Description:
++ Monad is the class of all multiplicative monads, that is sets
++ with a binary operation.

Monad() : Category == SIG where

  SIG ==> SetCategory with

    "*" : (%,%) -> %
      ++ a*b is the product of \spad{a} and b in a set with
      ++ a binary operation.

    rightPower : (%,PositiveInteger) -> %
      ++ rightPower(a,n) returns the \spad{n}-th right power of \spad{a},
      ++ that is, \spad{rightPower(a,n) := rightPower(a,n-1) * a} and
      ++ \spad{rightPower(a,1) := a}.

    leftPower : (%,PositiveInteger) -> %
      ++ leftPower(a,n) returns the \spad{n}-th left power of \spad{a},
      ++ that is, \spad{leftPower(a,n) := a * leftPower(a,n-1)} and
      ++ \spad{leftPower(a,1) := a}.

    "**" : (%,PositiveInteger) -> %
      ++ a**n returns the \spad{n}-th power of \spad{a},
      ++ defined by repeated squaring.

   add

      import RepeatedSquaring(%)

      x:% ** n:PositiveInteger == expt(x,n)

      rightPower(a,n) ==
        (n = 1) => a
        res := a
        for i in 1..(n-1) repeat res := res * a
        res

      leftPower(a,n) ==
        (n = 1) => a
        res := a
        for i in 1..(n-1) repeat res := a * res
        res