/usr/lib/open-axiom/input/rules.input is in open-axiom-test 1.4.1+svn~2626-2ubuntu2.
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 | --Copyright The Numerical Algorithms Group Limited 1991.
)clear all
-- first a single rule
logrule := rule log(x) + log(y) == log(x * y)
f := log sin x + log x
logrule f
-- now a pile of several rules
logrules := rule
log(x) + log(y) == log(x * y)
y * log x == log(x ** y)
f := a * log(sin x) - 2 * log x
logrules f
-- example of a predicate attached to a pattern variable
logrules2 := rule
log(x) + log(y) == log(x * y)
(y | integer? y) * log x == log(x ** y)
logrules2 f
-- rules for linearizing sines and cosines
trigLinearize := rule
sin(x) * sin(y) == cos(x-y)/2 - cos(x+y)/2
cos(x) * cos(y) == cos(x+y)/2 + cos(x-y)/2
sin(x) * cos(y) == sin(x+y)/2 + sin(x-y)/2
sin(x) ** (n | integer? n and n > 1) == (1-cos(2*x))/2 * sin(x)**(n-2)
cos(x) ** (n | integer? n and n > 1) == (1+cos(2*x))/2 * cos(x)**(n-2)
g := sin(a)*cos(b) + sin(a)*cos(a) + cos(2*a)*cos(3*a)
trigLinearize g
-- here we show the use of ? to indicate an 'optional' pattern variables
eirule := rule integral((?y + exp x)/x,x) == integral(y/x,x) + Ei x
eirule integral(exp u/u, u)
eirule integral(sin u + exp u/u, u)
-- here we show the use of : to indicate a 'multiple' pattern variables
u := operator u
v := operator v
myrule := rule u(x + y) == u x + v y
h := u(a + b + c + d)
myrule h
myrule2 := rule u(:x + y) == u x + v y
myrule2 h
|