Symbolica
Symbolica is a computer algebra system which aims to handle expressions with billions of terms, taking up terabytes of diskspace. It can easily be incorporated into existing projects using its Python, Rust or C++ bindings.
For documentation and more, see symbolica.io.
Quick Example
Symbolica allows you to build and manipulate mathematical expressions through matching and replacing patterns, similar to regex for text:
You are able to perform these operations from the comfort of a programming language that you (probably) already know, by using Symbolica's bindings to Python, Rust and C++:
Installation
Visit the Get Started page for detailed installation instructions.
Rust
If you are using Symbolica as a library in Rust, simply include it in the Cargo.toml:
[]
= "0.1"
Python
Symbolica can be installed for Python >3.5 using pip:
The installation may take some time, as it may have to compile Symbolica.
Examples
In the following example we create a Symbolica expression (1+x)^2, expand it, and replace x^2 by 6:
=
= **2
=
which yields 2*x+7.
Pattern matching
Variables ending with a _ are wildcards that match to any subexpression.
In the following example we try to match the pattern f(w1_,w2_):
, , , =
=
= ***2+5
=
which yields y^2*f(2,x^2)+5.
Rational arithmetic
Symbolica is world-class in rational arithmetic, outperforming Mathematica, Maple, Form, Fermat, and other computer algebra packages. Simply convert an expression to a rational polynomial:
, =
=
which yields (45+13*x+50*x*y^2+152*x^2+25*x^2*y^4+300*x^3*y^2+150*x^4*y^4)/(5+2*x+30*x^2+12*x^3).
Development
Follow the development and discussions on Zulip!