I picked up co-maintenance on this project a few months ago; it's a Clojure port of the computer algebra system behind Sussmans' "Structure and Interpretation of Classical Mechanics" [0] and "Functional Differential Geometry" [1], and can run all the code from those books. (I'm currently working on integrating it into https://Maria.cloud so all of this will be usable from the browser.)
`sicmutils.generic.simplify` plugs in to a rule-based term rewriting system like Mathematica's, along with polynomial and rational function simplification.
The core idea of the library is that if you build everything on top of extensible generic arithmetic operators (multimethods in Clojure), then a lot of good stuff shows up for free:
- If I implement all the operations for symbols, I get a symbolic arithmetic system for free. - Extend the generics to Dual numbers[2]? Boom, forward-mode AD pops out!
I'm getting carried away. Check it out, get your term-rewriting fix.
[0] https://mitpress.mit.edu/books/structure-and-interpretation-... [1] https://mitpress.mit.edu/books/functional-differential-geome... [2] https://en.wikipedia.org/wiki/Dual_number