/usr/share/axiom-20170501/src/algebra/LF.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 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 | )abbrev package LF LiouvillianFunction
++ Author: Manuel Bronstein
++ Date Created: 1987
++ Date Last Updated: 10 August 1994
++ Description:
++ This package provides liouvillian functions over an integral domain.
LiouvillianFunction(R, F) : SIG == CODE where
R:Join(OrderedSet, IntegralDomain)
F:Join(FunctionSpace R,RadicalCategory,TranscendentalFunctionCategory)
OP ==> BasicOperator
PR ==> Polynomial R
K ==> Kernel F
SE ==> Symbol
O ==> OutputForm
INP ==> InputForm
INV ==> error "Invalid argument"
SPECIALDIFF ==> "%specialDiff"
SPECIALDISP ==> "%specialDisp"
SPECIALINPUT ==> "%specialInput"
SPECIALEQUAL ==> "%specialEqual"
SIG ==> with
belong? : OP -> Boolean
++ belong?(op) checks if op is Liouvillian
operator : OP -> OP
++ operator(op) returns the Liouvillian operator based on op
Ei : F -> F
++ Ei(f) denotes the exponential integral
Si : F -> F
++ Si(f) denotes the sine integral
Ci : F -> F
++ Ci(f) denotes the cosine integral
li : F -> F
++ li(f) denotes the logarithmic integral
erf : F -> F
++ erf(f) denotes the error function
dilog : F -> F
++ dilog(f) denotes the dilogarithm
fresnelS : F -> F
++ fresnelS(f) denotes the Fresnel integral S
fresnelC : F -> F
++ fresnelC(f) denotes the Fresnel integral C
integral : (F, SE) -> F
++ integral(f,x) indefinite integral of f with respect to x.
integral : (F, SegmentBinding F) -> F
++ integral(f,x = a..b) denotes the definite integral of f with
++ respect to x from \spad{a} to b.
CODE ==> add
iei : F -> F
isi : F -> F
ici : F -> F
ierf : F -> F
ili : F -> F
ili2 : F -> F
iint : List F -> F
eqint : (K,K) -> Boolean
dvint : (List F, SE) -> F
dvdint : (List F, SE) -> F
ddint : List F -> O
integrand : List F -> F
dummy := new()$SE :: F
opint := operator("integral"::Symbol)$CommonOperators
opdint := operator("%defint"::Symbol)$CommonOperators
opei := operator("Ei"::Symbol)$CommonOperators
opli := operator("li"::Symbol)$CommonOperators
opsi := operator("Si"::Symbol)$CommonOperators
opci := operator("Ci"::Symbol)$CommonOperators
opli2 := operator("dilog"::Symbol)$CommonOperators
operf := operator("erf"::Symbol)$CommonOperators
opfis := operator("fresnelS"::Symbol)$CommonOperators
opfic := operator("fresnelC"::Symbol)$CommonOperators
Si x == opsi x
Ci x == opci x
Ei x == opei x
erf x == operf x
li x == opli x
dilog x == opli2 x
fresnelS x == opfis x
fresnelC x == opfic x
belong? op == has?(op, "prim")
isi x == kernel(opsi, x)
ici x == kernel(opci, x)
ierf x == (zero? x => 0; kernel(operf, x))
ili2 x == ((x = 1) => INV; kernel(opli2, x))
ifis(x:F):F == (zero? x => 0; kernel(opfis,x))
ific(x:F):F == (zero? x => 0; kernel(opfic,x))
integrand l == eval(first l, retract(second l)@K, third l)
integral(f:F, x:SE) == opint [eval(f, k:=kernel(x)$K, dummy), dummy, k::F]
iint l ==
zero? first l => 0
kernel(opint, l)
ddint l ==
int(integrand(l)::O * hconcat("d"::SE::O, third(l)::O),
third(rest l)::O, third(rest rest l)::O)
eqint(k1,k2) ==
a1:=argument k1
a2:=argument k2
res:=operator k1 = operator k2
if not res then return res
res:= a1 = a2
if res then return res
res:= (a1.3 = a2.3) and (subst(a1.1,[retract(a1.2)@K],[a2.2]) = a2.1)
dvint(l, x) ==
k := retract(second l)@K
differentiate(third l, x) * integrand l
+ opint [differentiate(first l, x), second l, third l]
dvdint(l, x) ==
x = retract(y := third l)@SE => 0
k := retract(d := second l)@K
differentiate(h := third rest rest l,x) * eval(f := first l, k, h)
- differentiate(g := third rest l, x) * eval(f, k, g)
+ opdint [differentiate(f, x), d, y, g, h]
integral(f:F, s: SegmentBinding F) ==
x := kernel(variable s)$K
opdint [eval(f,x,dummy), dummy, x::F, lo segment s, hi segment s]
ili x ==
x = 1 => INV
is?(x, "exp"::Symbol) => Ei first argument(retract(x)@K)
kernel(opli, x)
iei x ==
x = 0 => INV
is?(x, "log"::Symbol) => li first argument(retract(x)@K)
kernel(opei, x)
operator op ==
is?(op, "integral"::Symbol) => opint
is?(op, "%defint"::Symbol) => opdint
is?(op, "Ei"::Symbol) => opei
is?(op, "Si"::Symbol) => opsi
is?(op, "Ci"::Symbol) => opci
is?(op, "li"::Symbol) => opli
is?(op, "erf"::Symbol) => operf
is?(op, "dilog"::Symbol) => opli2
is?(op, "fresnelC"::Symbol) => opfis
is?(op, "fresnelS"::Symbol) => opfic
error "Not a Liouvillian operator"
evaluate(opei, iei)$BasicOperatorFunctions1(F)
evaluate(opli, ili)
evaluate(opsi, isi)
evaluate(opci, ici)
evaluate(operf, ierf)
evaluate(opli2, ili2)
evaluate(opfis, ifis)
evaluate(opfic, ific)
evaluate(opint, iint)
derivative(opsi, (z1:F):F +-> sin(z1) / z1)
derivative(opci, (z1:F):F +-> cos(z1) / z1)
derivative(opei, (z1:F):F +-> exp(z1) / z1)
derivative(opli, (z1:F):F +-> inv log(z1))
derivative(operf, (z1:F):F +-> 2 * exp(-(z1**2)) / sqrt(pi()))
derivative(opli2, (z1:F):F +-> log(z1) / (1 - z1))
derivative(opfis, (z1:F):F +-> sin(z1**2))
derivative(opfic, (z1:F):F +-> cos(z1**2))
setProperty(opint,SPECIALEQUAL,eqint@((K,K) -> Boolean) pretend None)
setProperty(opint,SPECIALDIFF,dvint@((List F,SE) -> F) pretend None)
setProperty(opdint,SPECIALDIFF,dvdint@((List F,SE)->F) pretend None)
setProperty(opdint, SPECIALDISP, ddint@(List F -> O) pretend None)
if R has ConvertibleTo INP then
inint : List F -> INP
indint: List F -> INP
pint : List INP -> INP
pint l == convert concat(convert("integral"::SE)@INP, l)
inint l ==
r2:= convert(
[convert("::"::SE)@INP,
convert(third l)@INP,
convert("Symbol"::SE)@INP]@List INP)@INP
pint [convert(integrand l)@INP, r2]
indint l ==
pint [convert(integrand l)@INP,
convert concat(convert("="::SE)@INP,
[convert(third l)@INP,
convert concat(convert("SEGMENT"::SE)@INP,
[convert(third rest l)@INP,
convert(third rest rest l)@INP])])]
setProperty(opint, SPECIALINPUT, inint@(List F -> INP) pretend None)
setProperty(opdint, SPECIALINPUT, indint@(List F -> INP) pretend None)
|