Symbolica logo.
  • Overview
  • Get Started
  • Guide
  • License
  • Blog
  • About

Welcome to Symbolica

Symbolica is a blazing fast symbolic manipulation toolkit

  • Match complicated mathematical patterns (regex for maths)
  • Work with expressions that are huge (your disk space is the limit)
  • State-of-the art polynomial arithmetic and expression optimization
  • Framework for numerical integration
  • APIs for Python, Rust and C++

Get Started Guide

Examples

Perform easy mathematical manipulations on expressions and create expressions in a format very close to Python’s own notation:

from symbolica import Expression

x, y, w_ = Expression.vars('x', 'y', 'w_')
f = Expression.fun("f")
b = Expression.parse("x^2+2*x*y+y")

e1 = f(x, f(x,y))*f(5) * b
print('e1 =', e1)

e2 = 1/(x*y+1)
print('d/dx e2 =', e2.derivative(x))

e3 = e1.replace_all(f(w_,y), f(w_**2))
print('e3 =', e3)
e1 = (y+x^2+2*x*y)*f(5)*f(x,f(x,y))
d/dx e2 = -y*(x*y+1)^-2
e3 = (y+x^2+2*x*y)*f(5)*f(x,f(x^2))

Perform low-level operations with ultimate flexiblity:

use symbolica::{
    printer::{PrintOptions, RationalPolynomialPrinter},
    representations::Atom,
    rings::{
        integer::IntegerRing, rational::RationalField, rational_polynomial::RationalPolynomial,
    },
    state::{State, Workspace},
};

fn main() {
    let mut state = State::new();
    let workspace = Workspace::default();

    let expr = Atom::parse(
        "(x*y^2*5+5)^2/(2*x+5)+(x+4)/(6*x^2+1)",
        &mut state,
        &workspace,
    )
    .unwrap();
    let rat: RationalPolynomial<IntegerRing, u8> = expr
        .as_view()
        .to_rational_polynomial(
            &workspace,
            &state,
            RationalField::new(),
            IntegerRing::new(),
            None,
        )
        .unwrap();
    println!(
        "{}",
        RationalPolynomialPrinter::new(&rat, &state, PrintOptions::default())
    );
}

Perform blazing fast polynomial arithmetic:

int main()
{
    const char *in = "(x*y^2*5+5)^2/(2*x+5)+(x+4)/(6*x^2+1)";

    Symbolica *s = init();
    set_vars(s, "x,y");
    const char *out = simplify(s, in, 0ull, 0);
    std::cout << out <<  std::endl;

    drop(s);

    return 0;
}

APIs in many languages

Symbolica is designed to be used as a library and has bindings to Python, Rust, C++ and Mathematica. Try it out in your project!

Learn more »

Advanced Pattern Matching

Match mathematical patterns with advanced wildcards. The matcher is aware of symmetric functions and other properties.

Learn more »

Ultimate Scalability

Each term in an expression can be manipulated independently and in parallel.

Learn more »

Polynomial Algebra

Symbolica has dedicated polynomial algebra routines and has one of the fastest greatest common divisor implementation for multivariate polynomials.

Learn more »

Free for Students

Symbolica is free for students and hobbyists. Try it out! University staff and companies have to obtain a license.

Learn more »

Source Available

The complete code and development process is open and available on GitHub.

Learn more »

Adapt Symbolica in your workflow or in new projects!

Get Started