Eduardo Cavazos wrote:

For those of you who are interested in the design and implementation
of computer algebra systems, run, don't walk, to the library and grab
these:

http://web.cs.du.edu/~jscohen/ElementaryAlgorithms/index.htm
http://web.cs.du.edu/~jscohen/MathematicalMethods/index.htm

Chapter 3 of the "Mathematical Methods" volume is dedicated to the topic
of "automatic simplification". This refers to the process by which a
computer algebra system transforms input expressions into a "canonical
form" which the more advanced algorithms expect and operate on.

A preliminary implementation of the ideas in this chapter is available
in a library '(mpl automatic-simplification)' at:

    http://github.com/dharmatech/mpl/tree/master

This might come in handy for others. Maybe you're reading the book and
want to work on one of the specific algorithms which assume automatic
simplification. Or maybe you want to implement the process yourself and
want something to compare your work to.

Why 'mpl'? Cohen gives many examples in Mathematica, Maple, and MuPAD.
But the algorithms are expressed in MPL, Mathematical Pseudo Language,
which he designed specifically for the book.

Cohen describes various procedures such as automatic_simplify,
simplify_power, simplify_product, etc. While the library implements
these, the above library also exports +, -, *, /, etc. which implicitly
utilize the simplification procedures. So for example:

(define x 'x)
(define y 'y)
(define z 'z)

(- (/ (* x y) 3))
(* -1/3 x y)
(^ (^ (^ x 1/2) 1/2) 8)
(^ x 2)
(^ (* (^ (* x y) 1/2) (^ z 2)) 2)
(* x y (^ z 4))
(/ x x)
1
(* (/ x y)
     (/ y x))
1
(* 2 3)
6
(* (^ x 2) (^ x 3))
(^ x 5)


Ed

Reply via email to