This file is indexed.

/usr/share/axiom-20170501/src/algebra/LODOOPS.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
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
)abbrev package LODOOPS LinearOrdinaryDifferentialOperatorsOps
++ Author: Manuel Bronstein
++ Date Created: 18 January 1994
++ Date Last Updated: 15 April 1994
++ References:
++ Bron95 On radical solutions of linear ordinary differential equations
++ Abra01 On Solutions of Linear Functional Systems
++ Muld95 Primitives: Orepoly and Lodo
++ Description:
++ \spad{LinearOrdinaryDifferentialOperatorsOps} provides symmetric
++ products and sums for linear ordinary differential operators.
-- Putting those operations here rather than defaults in LODOCAT allows
-- LODOCAT to be defined independently of the derivative used.
-- MB 1/94

LinearOrdinaryDifferentialOperatorsOps(A, L): SIG == CODE where
  A : Field
  L : LinearOrdinaryDifferentialOperatorCategory A

  N  ==> NonNegativeInteger
  V  ==> OrderlyDifferentialVariable Symbol
  P  ==> DifferentialSparseMultivariatePolynomial(A, Symbol, V)

  SIG ==> with

    symmetricProduct : (L, L, A -> A) -> L
      ++ symmetricProduct(a,b,D) computes an operator \spad{c} of
      ++ minimal order such that the nullspace of \spad{c} is
      ++ generated by all the products of a solution of \spad{a} by
      ++ a solution of \spad{b}.
      ++ D is the derivation to use.

    symmetricPower : (L, N, A -> A) -> L
      ++ symmetricPower(a,n,D) computes an operator \spad{c} of
      ++ minimal order such that the nullspace of \spad{c} is
      ++ generated by all the products of \spad{n} solutions
      ++ of \spad{a}.
      ++ D is the derivation to use.

    directSum : (L, L, A -> A) -> L
      ++ directSum(a,b,D) computes an operator \spad{c} of
      ++ minimal order such that the nullspace of \spad{c} is
      ++ generated by all the sums of a solution of \spad{a} by
      ++ a solution of \spad{b}.
      ++ D is the derivation to use.

  CODE ==> add

          import IntegerCombinatoricFunctions

          var1 := new()$Symbol
          var2 := new()$Symbol

          nonTrivial?: Vector A -> Boolean
          applyLODO  : (L, V) -> P
          killer     : (P, N, List V, List P, A -> A) -> L
          vec2LODO   : Vector A -> L

          nonTrivial? v == any?((x1:A):Boolean +-> x1 ^= 0, v)$Vector(A)

          vec2LODO v    == +/[monomial(v.i, (i-1)::N) for i in 1..#v]

          symmetricPower(l, m, diff) ==
            u := var1::V; n := degree l
            un := differentiate(u, n)
            a  := applyLODO(inv(- leadingCoefficient l) * reductum l, u)
            killer(u::P ** m, binomial(n + m - 1, n - 1)::N, [un], [a], diff)

-- returns an operator L such that L(u) = 0, for a given differential
-- polynomial u, given that the differential variables appearing in u
-- satisfy some linear ode's
-- m is a bound on the order of the operator searched.
-- lvar, lval describe the substitution(s) to perform when differentiating
--     the expression u (they encode the fact the the differential variables
--     satisfy some differential equations, which can be seen as the rewrite
--     rules   lvar --> lval)
-- diff is the derivation to use
          killer(u, m, lvar, lval, diff) ==
            lu:List P := [u]
            for q in 0..m repeat
              mat := reducedSystem(matrix([lu])@Matrix(P))@Matrix(A)
              (sol := find(nonTrivial?, l := nullSpace mat)) case Vector(A) =>
                return vec2LODO(sol::Vector(A))
              u := eval(differentiate(u, diff), lvar, lval)
              lu := concat_!(lu, [u])
            error "killer: no linear dependence found"

          symmetricProduct(l1, l2, diff) ==
            u  := var1::V;   v  := var2::V
            n1 := degree l1; n2 := degree l2
            un := differentiate(u, n1); vn := differentiate(v, n2)
            a  := applyLODO(inv(- leadingCoefficient l1) * reductum l1, u)
            b  := applyLODO(inv(- leadingCoefficient l2) * reductum l2, v)
            killer(u::P * v::P, n1 * n2, [un, vn], [a, b], diff)

          directSum(l1, l2, diff) ==
            u  := var1::V;   v  := var2::V
            n1 := degree l1; n2 := degree l2
            un := differentiate(u, n1); vn := differentiate(v, n2)
            a  := applyLODO(inv(- leadingCoefficient l1) * reductum l1, u)
            b  := applyLODO(inv(- leadingCoefficient l2) * reductum l2, v)
            killer(u::P + v::P, n1 + n2, [un, vn], [a, b], diff)

          applyLODO(l, v) ==
            p:P := 0
            while l ^= 0 repeat
              p := p + monomial(leadingCoefficient(l)::P,
                                  differentiate(v, degree l), 1)
              l := reductum l
            p