This file is indexed.

/usr/share/axiom-20170501/src/algebra/RULESET.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
)abbrev domain RULESET Ruleset
++ Author: Manuel Bronstein
++ Date Created: 20 Mar 1990
++ Date Last Updated: 29 Jun 1990
++ Description:
++ Sets of rules for the pattern matcher.
++ A ruleset is a set of pattern matching rules grouped together.

Ruleset(Base, R, F) : SIG == CODE where
  Base : SetCategory
  R : Join(Ring, PatternMatchable Base, OrderedSet,
                                 ConvertibleTo Pattern Base)
  F : Join(FunctionSpace R, PatternMatchable Base,
                                 ConvertibleTo Pattern Base)

  RR ==> RewriteRule(Base, R, F)

  SIG ==> Join(SetCategory, Eltable(F, F)) with

    ruleset : List RR -> $
      ++ ruleset([r1,...,rn]) creates the rule set \spad{{r1,...,rn}}.

    rules : $ -> List RR
      ++ rules(r) returns the rules contained in r.

    elt : ($, F, PositiveInteger) -> F
      ++ elt(r,f,n) or r(f, n) applies all the rules of r to f at most n times.

  CODE ==> add

    import ApplyRules(Base, R, F)

    Rep := Set RR

    ruleset l == {l}$Rep

    coerce(x:$):OutputForm == coerce(x)$Rep

    x = y == x =$Rep y

    elt(x:$, f:F) == applyRules(rules x, f)

    elt(r:$, s:F, n:PositiveInteger) == applyRules(rules r, s, n)

    rules x == parts(x)$Rep