This file is indexed.

/usr/share/axiom-20170501/src/algebra/PUSHVAR.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
)abbrev package PUSHVAR PushVariables
++ Description:
++ This package has no description

PushVariables(R,E,OV,PPR) : SIG == CODE where
  E : OrderedAbelianMonoidSup
  OV : OrderedSet with

    convert : % -> Symbol
      ++ convert(x) converts x to a symbol

    variable : Symbol -> Union(%, "failed")
      ++ variable(s) makes an element from symbol s or fails

  R : Ring
  PR ==> Polynomial R
  PPR: PolynomialCategory(PR,E,OV)

  SUP ==> SparseUnivariatePolynomial

  SIG ==> with

    pushdown : (PPR, OV) -> PPR
      ++ pushdown(p,v) \undocumented{}

    pushdown : (PPR, List OV) -> PPR
      ++ pushdown(p,lv) \undocumented{}

    pushup : (PPR, OV) -> PPR
      ++ pushup(p,v) \undocumented{}

    pushup : (PPR, List OV) -> PPR
      ++ pushup(p,lv) \undocumented{}

    map : ((PR -> PPR), PPR) -> PPR
      ++ map(f,p) \undocumented{}

  CODE ==> add

     pushdown(g:PPR,x:OV) : PPR ==
       eval(g,x,monomial(1,convert x,1)$PR)

     pushdown(g:PPR, lv:List OV) : PPR ==
       vals:=[monomial(1,convert x,1)$PR for x in lv]
       eval(g,lv,vals)

     map(f:(PR -> PPR), p: PPR) : PPR ==
       ground? p => f(retract p)
       v:=mainVariable(p)::OV
       multivariate(map((x:PPR):PPR+->map(f,x),univariate(p,v)),v)

               ----  push back the variable  ----
     pushupCoef(c:PR, lv:List OV): PPR ==
       ground? c => c::PPR
       v:=mainVariable(c)::Symbol
       v2 := variable(v)$OV
       uc := univariate(c,v)
       ppr : PPR := 0
       v2 case OV =>
          while not zero? uc repeat
             ppr := ppr + monomial(1,v2,degree(uc))$PPR *
                            pushupCoef(leadingCoefficient uc, lv)
             uc := reductum uc
          ppr
       while not zero? uc repeat
          ppr := ppr + monomial(1,v,degree(uc))$PR *
                            pushupCoef(leadingCoefficient uc, lv)
          uc := reductum uc
       ppr

     pushup(f:PPR,x:OV) :PPR ==
       map(y +-> pushupCoef(y,[x]), f)

     pushup(g:PPR, lv:List OV) : PPR ==
       map(y +-> pushupCoef(y, lv), g)