A computer algebra system in Haskell. At the time of writing this it consists of only 85 lines of code.
As an example, some expansion rules are defined inside the library. Using these, the expression tan(X + Y)
can be expanded into (((sin(X) * cos(Y)) + (cos(X) * sin(Y))) / ((cos(X) * cos(Y)) - (sin(X) * sin(Y))))
using the built-in trigonometry expansion rules.
- Write more transformation rules.
- Basic axioms like
a + b = b + a
,a + 0 = a
. - More trigonemtry identities.
- Loads of other things.
- Might be a good idea to transform
a - b
intoa + (-b)
and similarlya / b
intoa * (1/b)
.
- Basic axioms like
- Simplification of expressions.
- Might be implemented as another set of transformation rules, constructed from some designed to simplify but also the inverses of some expansion rule sets.
- Parsing of expressions, so things can be entered much more easily.
- A REPL.