Algebraeon is a computational algebra system (CAS) written purely in Rust. It implements algorithms for working with matrices, polynomials, algebraic numbers, factorizations, etc. The focus is on exact algebraic computations over approximate numerical solutions. Algebraeon is in early stages of development and the API subject to change.
The Python library currently supports only a very small subset of the capabilities of the Rust library. Once it has been better fleshed out it will be the recommended way to use Algebraeon for people who care more about maths than software.
- See the User Guide to get started.
- There is a
server for informal discussions about Algebraeon.
- Published to PyPI.
- GitHub for the Rust library.
from algebraeon import *
# Algebraeon can factor numbers with much
# bigger prime factors than a naive algorithm is capable of.
assert(
Nat(706000565581575429997696139445280900).factor().powers()
== {2: 2, 5: 2, 6988699669998001: 1, 1010203040506070809: 1}
)The tests folder has more examples.
The Python codeblocks in the User Guide can executed as tests by the following steps:
One time setup:
cdintoalgebraeon.- Run
python3 -m venv .envto create a Python venv. - Run
source .env/bin/activateto ender the venv. - Run
pip install maturin.maturinis the tool used to build the Python module. Don't runpip install algebraeon; this venv is for installing the locally built version ofalgebraeon, which is handled bymaturin.
To build the algebraeon Python module locally and run the tests in the User Guide against the local build:
cdintorun_tests.- Run
cargo run.