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
|
\documentclass{article}
\usepackage{axiom}
\begin{document}
\title{\$SPAD/src/input pat.input}
\author{The Axiom Team}
\maketitle
\begin{abstract}
\end{abstract}
\eject
\tableofcontents
\eject
<<*>>=
-- Input for page PatternMatching
)clear all
square := operator 'square
rule square(x) == x*x
fact(n | n > 0) == n * fact(n - 1)
fact(0) == 1
f('A) == 1
f(0) == 0 otherwise
binary(true) == 1
binary(false) == 0
sinValues == rules
sin(%pi) == 0
sin(%pi/4) == sqrt(2)/2
integrate(log(1 + tan(x)),x,0,%pi/4) == %pi/8*log(2)
powerOf(x,x) == 1
powerOf(x,x**n) == n
powerOf(x,y) == 0 otherwise
powerOf(x,x**n%) == n%
powerOf(x,y) == 0 otherwise
linearExponent?(exp(%a*x+%b | freeOf?(%a,x) and freeOf?(%b,x)),x) == true
linearExponent?(exp(a) | freeOf?(a,x),x) == true
linearExponent?(u,x) == false
linearExponent?(exp(x),x) == true
linearExponent?(exp(a*x) | freeOf?(a,x),x) == true
linearExponent?(exp(x+b) | freeOf?(b,x),x) == true
linearExponent?(exp(a*x+b,x) | freeOf?(a,x) and freeOf?(b,x)) == true
@
\eject
\begin{thebibliography}{99}
\bibitem{1} nothing
\end{thebibliography}
\end{document}
|