Looking for symbolic lisp code?
MockMMA was a small CAS. It won't have what you need, but does
provide a simple framework.
http://www.cs.berkeley.edu/~fateman/mma.mailer
Axiom is a much larger CAS; this page has a decent description of the
three actively developed variants.
http://sage.math.washington.edu/home/wdj/sigsam/opensource_math.html
Maxima was already mentioned in another subthread; it is comparable to
Axiom, but the two have some philosophical differences in their usage
and implementation.
- Daniel