Alkahest — Python API reference

Installation

Python — install from PyPI. Supported versions: 3.9 through 3.13:

python -m pip install -U pip
pip install alkahest

That wheel includes the Gröbner solver (groebner) and egglog (egraph) by default, so alkahest.solve and related APIs work out of the box. It omits LLVM JIT, Cranelift, and parallel (numeric APIs fall back to the interpreter). There is no pip extra that swaps in a different native binary.

For Linux x86_64 opt-in wheels with local versions +jit or +full, use assets attached to GitHub Releases. Other platforms: build from source with maturin.

Rust — add alkahest-cas to your Cargo.toml:

[dependencies]
alkahest-cas = "2"
# alkahest-cas = { version = "2", features = ["groebner", "parallel", "egraph"] }

Requires libflint-dev / libgmp-dev / libmpfr-dev at build time (apt-get or brew install flint). See docs.rs/alkahest-cas for the full Rust API reference.

For optional Cargo features (jit, parallel, cuda, …) and full developer setup, see the Getting started chapter of the user guide. The groebner and egraph features are defaults and do not need to be specified explicitly.

For the conceptual guide (kernel design, rule engine, e-graph, derivation logs) see the mdBook user guide.