alkahest
Python API

Python API reference

Every public name in alkahest.__all__, with its signature, docstring and a link to the source that defines it.

The generated Python API reference is published alongside this guide:

Open the Python API documentation

It includes ExprPool, simplification, calculus, polynomials, numerics, transforms, matrices, ODE/DAE, solvers, codegen, error types, and the search / workload surface (Budget, batch_map, DerivedResult.to_dict, …).

Conceptual chapters for agent-facing plumbing:

Topic Guide
Budgets, cancellation, seeds, pool lifetime Budgets
Batch / streaming fan-out Batch
Compact machine-parseable results Derivation logs
Session provenance Claim graphs
Overview Autoresearch / agent loops

Submodules

Not everything lives on the top-level namespace as a function. These are reached as alkahest.<name> and documented in their own chapters:

Module What it is Guide
alkahest.ansatz Parametric families (polynomial, rational, exponential_polynomial, linear_combination, quadratic_form) plus fit, enumerate_family, certify_nonneg Ansatz families
alkahest.crosscheck Differential testing against an external CAS oracle: check, sweep, run_frozen_corpus, to_sympy, register_oracle Cross-CAS testing
alkahest.smt SMT-LIB 2 export and z3/cvc5 bridge: to_smtlib, solve, supported, solvers SMT bridge
alkahest.pari Optional PARI/GP interop (GPL binding installed separately): number_field_invariants, elliptic_curve_invariants, modular_forms, ramanujan_tau, available PARI interop
alkahest.research Session claim graphs and provenance Claim graphs
alkahest.experimental Transforms, dsolve, asymptotics, residue, Fps, Puiseux series, creative telescoping, probability laws and information theory, vector calculus and quaternions, to_jax — may change in a minor release. Must be imported explicitly (from alkahest import experimental as ex); it is not an attribute of the top-level module until then Stability policy, Probability, Vector calculus and quaternions
alkahest.rl Verifiable RL environments Reinforcement learning
alkahest.number_theory, alkahest.modular, alkahest.lattice FLINT-backed integer and lattice routines —

alkahest.ansatz, alkahest.crosscheck and alkahest.smt are new in 3.8. They are in alkahest.__all__ and resolve on attribute access without a separate import, as do their error classes AnsatzError, CrossCheckError and SmtError.

How this reference is built

It is generated statically from the source tree, without importing the compiled extension: Python modules are read with ast, and the native functions' docstrings come from the PyO3 doc comments in alkahest-py/src/, which is exactly the text help() shows. 457 public names, 490 of 586 entries with a docstring. The Rust crate is documented on docs.rs.

Core

Advanced

Submodules

More