Symbolica ⊆ Modern Computer Algebra
Symbolica is a blazing fast computer algebra system for Python and Rust, born of a need to push the boundaries of computations in science and enterprise. Check out the live Jupyter Notebook demo!
For documentation and more, see symbolica.io.
Quick Example
Symbolica allows you to build and manipulate mathematical expressions, for example from a Jupyter Notebook:
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 and Rust:
Installation
Symbolica can be installed for Python 3.9 or newer using pip:
pip install symbolica
Visit the Get Started page for detailed installation instructions.
For Pyodide 314.x (Python 3.14), install the PyEmscripten wheel with micropip:
import micropip
await micropip.install("symbolica")
The WebAssembly build uses Symbolica's Rust numeric backends. Native code generation is unavailable in this build.
Examples
Below we list some examples of the features of Symbolica. Check the guide for a complete overview.
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_):
from symbolica import *
x, y, w1_, w2_, f = S('x','y','w1_','w2_', 'f')
e = f(3,x)*y**2+5
r = e.replace_all(f(w1_,w2_), f(w1_ - 1, w2_**2))
print(r)
which yields y^2*f(2,x^2)+5.
Solving a linear system
Solve a linear system in x and y with a parameter c:
from symbolica import *
x, y, c, f = S('x', 'y', 'c', 'f')
x_r, y_r = Expression.solve_linear_system(
[f(c)*x + y + c, y + c**2], [x, y])
print('x =', x_r, ', y =', y_r)
which yields x = (-c+c^2)*f(c)^-1 and y = -c^2.
Series expansion
Perform a series expansion in x:
from symbolica import *
e = E('exp(5+x)/(1-x)').series(S('x'), 0, 3)
print(e)
which yields (exp(5))+(2*exp(5))*x+(5/2*exp(5))*x^2+(8/3*exp(5))*x^3+𝒪(x^4).
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:
from symbolica import *
p = E('(x*y^2*5+5)^2/(2*x+5)+(x+4)/(6*x^2+1)').to_rational_polynomial()
print(p)
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).
Community packages
Version 3.0 ships core Symbolica and symbolic integration, including step-by-step
explanations, through symbolica-integrate 2.0. Integration rule metadata is
compressed to reduce download size.
Native wheels also include Spenso, Idenso, FeynKit HEP tools, Vakint, and the example extension. PyEmscripten wheels include Idenso, Spenso, HEP, and the example extension. Vakint and Spenso's compiled evaluators require a native installation.
The HEP classes are available directly under symbolica.community.hepkit, including
FeynmanDiagram, Model, Generator, CffGenerator, and TensorReducer.
Development
Follow the development and discussions on Zulip!
Metadata
Release files for symbolica 3.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| symbolica-3.0.0.tar.gz | 732.3 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| symbolica-3.0.0-cp314-abi3-pyemscripten_2026_0_wasm32.whl | CPython 3.14 | abi3 | PyEmscripten 2026.0+ WebAssembly | Details |
| symbolica-3.0.0-cp39-abi3-win_amd64.whl | CPython 3.9 | abi3 | Windows x86-64 | Details |
| symbolica-3.0.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| symbolica-3.0.0-cp39-abi3-macosx_11_0_arm64.whl | CPython 3.9 | abi3 | macOS 11.0+ ARM64 | Details |
| symbolica-3.0.0-cp39-abi3-macosx_10_12_x86_64.whl | CPython 3.9 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 398.8 MB
Release files / symbolica-3.0.0.tar.gz
| Download URL | symbolica-3.0.0.tar.gz |
|---|---|
| Size | 732.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f5bf56715fd3ff1017771f3f6ca9d3ee0cec335a283f679dca06d169e4200024
|
|
BLAKE2b-256 checksum How to use checksums |
cc56a2c6cb62f5b66b94b91d4a946319e7344ab327c2b8c8853b73ca86f2bc04
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.15.0
|
Release files / symbolica-3.0.0-cp314-abi3-pyemscripten_2026_0_wasm32.whl
| Download URL | symbolica-3.0.0-cp314-abi3-pyemscripten_2026_0_wasm32.whl |
|---|---|
| Size | 32.3 MB |
| Tags | CPython 3.14 PyEmscripten 2026.0+ WebAssembly abi3 |
|
SHA-256 checksum How to use checksums |
8822b12d963f17131f778cb382be93f5b0e321b03d0f93d88aa1bae741e47673
|
|
BLAKE2b-256 checksum How to use checksums |
916ca7a4bfc317d942fb2712c6465f6aa6cd4f22c327f4c3a0982446290bb2b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.15.0
|
Release files / symbolica-3.0.0-cp39-abi3-win_amd64.whl
| Download URL | symbolica-3.0.0-cp39-abi3-win_amd64.whl |
|---|---|
| Size | 102.0 MB |
| Tags | CPython 3.9 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
bcc3a69d4fd16e71b6d8189b9cf85bbc5724cf542a573cbdea21960ea16f9b32
|
|
BLAKE2b-256 checksum How to use checksums |
058b52026e47f6aedd150d92c02c5f3953ca0cd11ebfd7cb449ae0c99cf9b5ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.15.0
|
Release files / symbolica-3.0.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | symbolica-3.0.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 91.6 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
a2977f78d8f40ce3206ba49850cf75f473785a32a9368e6115d059755a48d15e
|
|
BLAKE2b-256 checksum How to use checksums |
a8c9c18cccc41176637463872cf0111e3d55b5a8f1a144de94fcf9c1b1d7ee86
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.15.0
|
Release files / symbolica-3.0.0-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | symbolica-3.0.0-cp39-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 79.2 MB |
| Tags | CPython 3.9 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
6b7414d8d06ac20c92460e0685c794d97afe976968b5fba5cc9562c471b2365d
|
|
BLAKE2b-256 checksum How to use checksums |
e768b019e129512b3ab21ad7912a268d4f9284b1a550edbb9cc519b9718ef792
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.15.0
|
Release files / symbolica-3.0.0-cp39-abi3-macosx_10_12_x86_64.whl
| Download URL | symbolica-3.0.0-cp39-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 92.9 MB |
| Tags | CPython 3.9 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
b2ea03b9be72a3ebc3fa950d7380b09223084cb5554aa0877c59e12d7749c2a7
|
|
BLAKE2b-256 checksum How to use checksums |
b3e77fa38476a5918994093d1af7acbd28489307ff780167dcfd3b40350c7905
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.15.0
|