For readers of this topic, it may seem that the Gerry Sussman scmutils system is migrating to Clojure. This is a very advanced CAS, offering things like automatic differentiation, literal functions, etc., mainly in Maple style. It is used at MIT for advanced programs in dynamics and differential geometry, as well as for partial electrical engineering. It is also the system used by Sussman & Wisdom "Continuation" (LOL) for SICP, SICM (structure and interpretation of classical mechanics). Although originally a Scheme program, it is not a direct translation, but a renaming to use the best Clojure features. It was named sycmutil, both in honor of the original and the book. This excellent effort is the work of Colin Smith, and you can find it at https://github.com/littleredcomputer/sicmutils .
I believe that this could be the basis of an amazing computer algebraic system for Clojure, competitive with any other available. Although this is a rather huge beast, as you can imagine, and tons of things still need to be ported, there are a lot of fundamentals there, the system will differentiate and do great with literals and literal functions. This is a work in progress. The system also uses the βgeneralβ approach proposed by Sussman, in which operations can be applied to functions, creating a great abstraction that simplifies the notation endlessly.
Here's the taster:
> (def unity (+ (square sin) (square cos))) > (unity 2.0) ==> 1.0 > (unity 'x) ==> 1 ;; yes we can deal with symbols > (def zero (D unity)) ;; Let differentiate > (zero 2.0) ==> 0
SicmUtils introduces two new types of vectors "up" and "down" (called "structures"), they work pretty much as the vectors expected, but they have some special mathematical (covariant, contravariant) properties, as well as some programming properties, because they are executable!
> (def fnvec (up sin cos tan)) => fnvec > (fnvec 1) ==> (up 0.8414709848078965 0.5403023058681398 1.5574077246549023) > ;; differentiated > ((D fnvec) 1) ==> (up 0.5403023058681398 -0.8414709848078965 3.425518820814759) > ;; derivative with symbolic argument > ((D fnvec) 'ΞΈ) ==> (up (cos ΞΈ) (* -1 (sin ΞΈ)) (/ 1 (expt (cos ΞΈ) 2)))
Partial differentiation is fully supported.
> (defn ff [xy] (* (expt x 3)(expt y 5))) > ((D ff) 'x 'y) ==> (down (* 3 (expt x 2) (expt y 5)) (* 5 (expt x 3) (expt y 4))) > ;; ie vector of results wrt to both variables
The system also supports TeX output, polynomial factorization, and many other useful properties. However, much of what could be easily implemented was not done solely due to a lack of human resources. The graphical output and the notepad / worksheet interface (using Clojure Gorilla) also work.
I hope this goes to increase your appetite enough to visit the site and give it a whirl. You don't even need Clojure, you can run it from the provided jar file.
==========
PS. By the way, in order to directly answer the original quest, yes, sicmutils supports symbolic structures: you can customize the matrix view, where the elements are formulas, for example. rotation matrix, and then calculate (multiply) it by a given coordinate. It is surprisingly flexible in this sense.