symox
Fast symbolic mathematics in Rust, with a SymPy compatible Python API.
symox is a computer algebra system written in Rust, designed as a drop-in replacement for SymPy. It follows SymPy's semantics (canonical forms, automatic simplifications, printing), while being one to three orders of magnitude faster on the included benchmarks.
The project has two goals:
- A fast symbolic engine with SymPy's API. Existing SymPy code should run unchanged and return the same results, only much faster.
- Code generation for GPUs and array frameworks. Symbolic expressions
compile to optimized kernels for CUDA, SYCL, Slang, PyTorch and JAX. This
part currently lives in the optional
symox.extrapackage (see code generation).
Status: usable today, and an ongoing effort. Reaching every capability of SymPy is a big task and it is not finished: the remaining behavioral gaps are tracked in the parity contract. symox is nevertheless usable right now. Every name of the documented SymPy 1.14 modules is exported (see API coverage; a name being present does not by itself mean identical behavior), and it already works as a drop-in replacement in many Python packages built on SymPy: in the downstream audit, the selected test suites of ChemPy, Haarpy, PyDy, SfePy, OctSymPy, pyodesys, pyneqsys and NRPyLaTeX pass unchanged, while others (SageMath, Lcapy, Optlang, Devito) still expose incompatibilities.
from symox import symbols, sin, cos, exp, expand, diff, lambdify
x, y = symbols("x y")
expand((x + y)**3) # x**3 + 3*x**2*y + 3*x*y**2 + y**3
diff(sin(x)*exp(x), x) # exp(x)*sin(x) + exp(x)*cos(x)
(x**2 + y).subs(x, 2) # y + 4
f = lambdify((x, y), sin(x)*cos(y)) # compiled, vectorised over numpy arrays
It is also a plain Rust library:
use symox::prelude::*;
let x = Expr::symbol("x");
let e = expand(&(&x + 1).powi(10));
println!("{}", diff(&e, &x));
Features
- Native Rust expression DAG, exact arithmetic and arbitrary precision evaluation.
- Polynomials, factorization and Gröbner bases over supported exact domains.
- Symbolic differentiation, integration, solving, series, limits and recurrences.
- Dense, sparse and abstract matrices with exact linear algebra.
- Dense and sparse arrays, indexed tensors, Einstein contractions and finite Jacobians.
- Boolean algebra, SAT, symbolic sets and assumptions.
- Exact Euclidean geometry and scalar/linear-system ODE and first-order PDE interfaces.
- Holonomic differential equations, coefficient recurrences and coordinate vector calculus.
- Local differential geometry, finite Cartan root systems and category diagrams.
- Algebraic root objects, Hamilton quaternions, exact splines and variational calculus.
- Classical ciphers, exact RSA/ElGamal protocols, Diffie-Hellman and finite-field LFSRs.
- Symbolic probability, scalar/joint distributions, stochastic processes and random matrices.
- Physical units, moving-frame mechanics, optics, control, quantum/Fock algebra and muscle models.
- Numerical compilation and code generation for NumPy, C/C++, Rust, Fortran, CUDA, PyTorch, JAX, Slang and SYCL.
Supported cases and remaining limitations are detailed in the guides below.
SymPy API coverage
Measured on 2026-10-18 against SymPy 1.14.0 in the current development tree.
The grouped tables summarize the measured import surfaces. The full module inventory also lists every documented module and its parent packages, with missing paths and import failures shown explicitly. The top-level export percentage covers only the package root. The current inventory (2026-10-19) lists 310 module paths with no missing names; 9 of them have no countable exports and every reference import is measured. See implementation limits for the supported behavior.
Core and package exports
| Surface | Present | Missing | API presence |
|---|---|---|---|
| SymPy top-level exports | 921 / 921 | 0 | 100.00% |
| Expr methods | 97 / 97 | 0 | 100.00% |
Polynomials, algebra and number theory
| Surface | Present | Missing | API presence |
|---|---|---|---|
| Poly methods | 154 / 154 | 0 | 100.00% |
| AlgebraicNumber methods | 103 / 103 | 0 | 100.00% |
| Rational domain methods | 87 / 87 | 0 | 100.00% |
| Coefficient domains exports | 32 / 32 | 0 | 100.00% |
| Polynomial ring constructors exports | 4 / 4 | 0 | 100.00% |
| Fraction field constructors exports | 4 / 4 | 0 | 100.00% |
| Number fields exports | 10 / 10 | 0 | 100.00% |
| Simplification exports | 32 / 32 | 0 | 100.00% |
| Number theory exports | 73 / 73 | 0 | 100.00% |
Matrices, arrays and tensors
| Surface | Present | Missing | API presence |
|---|---|---|---|
| Matrix methods | 178 / 178 | 0 | 100.00% |
| MatrixExpr methods | 105 / 105 | 0 | 100.00% |
| Arrays exports | 16 / 16 | 0 | 100.00% |
| Indexed tensor algebra exports | 35 / 35 | 0 | 100.00% |
Calculus and equation solvers
| Surface | Present | Missing | API presence |
|---|---|---|---|
| Ordinary differential equations exports | 11 / 11 | 0 | 100.00% |
| Partial differential equations exports | 9 / 9 | 0 | 100.00% |
| Equation solvers exports | 15 / 15 | 0 | 100.00% |
| Inequalities exports | 8 / 8 | 0 | 100.00% |
| Series and limits exports | 18 / 18 | 0 | 100.00% |
| Sequences exports | 10 / 10 | 0 | 100.00% |
| Real analysis exports | 9 / 9 | 0 | 100.00% |
| Singularities and monotonicity exports | 7 / 7 | 0 | 100.00% |
| Integral transforms exports | 26 / 26 | 0 | 100.00% |
| Holonomic functions exports | 9 / 9 | 0 | 100.00% |
| Coordinate vector calculus exports | 43 / 43 | 0 | 100.00% |
Geometry and discrete mathematics
| Surface | Present | Missing | API presence |
|---|---|---|---|
| Geometry exports | 30 / 30 | 0 | 100.00% |
| Combinatorics exports | 33 / 33 | 0 | 100.00% |
| Symbolic sets exports | 26 / 26 | 0 | 100.00% |
| Differential geometry exports | 24 / 24 | 0 | 100.00% |
| Lie algebras exports | 1 / 1 | 0 | 100.00% |
| Categories exports | 11 / 11 | 0 | 100.00% |
| Discrete transforms and convolutions exports | 11 / 11 | 0 | 100.00% |
Special functions and complex branches
| Surface | Present | Missing | API presence |
|---|---|---|---|
| Special functions: gamma exports | 9 / 9 | 0 | 100.00% |
| Special functions: hypergeometric exports | 17 / 17 | 0 | 100.00% |
| Special functions: Bessel exports | 21 / 21 | 0 | 100.00% |
| Special functions: Mathieu exports | 5 / 5 | 0 | 100.00% |
| Complex functions and branches exports | 14 / 14 | 0 | 100.00% |
Physics
| Surface | Present | Missing | API presence |
|---|---|---|---|
| Physics: units exports | 361 / 361 | 0 | 100.00% |
| Physics: vectors exports | 27 / 27 | 0 | 100.00% |
| Physics: mechanics exports | 74 / 74 | 0 | 100.00% |
| Physics: quantum mechanics exports | 44 / 44 | 0 | 100.00% |
| Physics: optics exports | 39 / 39 | 0 | 100.00% |
| Physics: Pauli algebra exports | 1 / 1 | 0 | 100.00% |
| Physics: control exports | 33 / 33 | 0 | 100.00% |
| Physics: continuum beams exports | 2 / 2 | 0 | 100.00% |
| Physics: continuum trusses exports | 1 / 1 | 0 | 100.00% |
| Physics: continuum cables exports | 1 / 1 | 0 | 100.00% |
| Physics: continuum arches exports | 1 / 1 | 0 | 100.00% |
| Physics: biomechanics exports | 15 / 15 | 0 | 100.00% |
| Physics: high energy exports | 5 / 5 | 0 | 100.00% |
| Physics: Wigner symbols exports | 11 / 11 | 0 | 100.00% |
| Physics: second quantization exports | 37 / 37 | 0 | 100.00% |
Statistics
| Surface | Present | Missing | API presence |
|---|---|---|---|
| Statistics exports | 157 / 157 | 0 | 100.00% |
Cryptography
| Surface | Present | Missing | API presence |
|---|---|---|---|
| Cryptography exports | 57 / 57 | 0 | 100.00% |
Utilities, parsing, printing and plotting
| Surface | Present | Missing | API presence |
|---|---|---|---|
| Iterable utilities exports | 59 / 59 | 0 | 100.00% |
| Printing and code generation exports | 41 / 41 | 0 | 100.00% |
| Plotting exports | 11 / 11 | 0 | 100.00% |
| Expression parsing exports | 21 / 21 | 0 | 100.00% |
These percentages count available names. They do not verify signatures,
accepted domains or behavior, and there is no combined global parity score.
Module rows measure the corresponding import surface (the complete mapping is
in tools/sympy_coverage.py), including absent modules at 0%. A name available
at the package root can still be missing from its compatible module path.
Rows overlap and must not be added together.
Geometry and differential-equation support is scoped in the
geometry and ODE/PDE guides.
The holonomic and coordinate vector
guides describe the new differential operators, series and geometric integrals.
In particular, galois_group currently supports degrees up to six;
DomainMatrix covers implemented exact and numerical domains. See the
polynomial and matrix guides for details.
Reproduce the measurement, including missing names and an optional differential corpus:
python tools/sympy_coverage.py --corpus --json /tmp/symox-coverage.json --update-readme
Building
Use an active Python virtual environment with Rust installed. Python 3.9 or later is required.
python -m pip install maturin numpy
maturin develop --release
See testing and benchmarks for the Rust and Python test commands.
Optional tensor and GPU APIs live in symox.extra; install their Python execution
libraries with pip install 'symox[extra]'. The test guide also covers the
pinned AdaptiveCpp compiler and separate core/extension suites.
Documentation
| Guide | Contents |
|---|---|
| SymPy compatibility | Expressions, precision, assumptions, calculus, logic and sets |
| Algorithmic parity | Mathematical acceptance criteria, solver audit and remaining capability gaps |
| Algorithm performance | 137 public workloads measured against SymPy 1.14.0 and the resulting fixes |
| Downstream integrations | Real featured-project tests with a SymPy 1.14.0 reference gate |
| Audit index | Correctness replays, performance measurements and source inventories under audits/, by topic and date |
| Public core and utilities | Evaluation contexts, import interfaces, dispatch, assumptions and sessions |
| Subclassing | SymPy-named node classes, user Symbol/Function/Expr subclasses and the hooks they can override |
| Algebraic roots and quaternions | Exact root objects, symmetric sums, Hamilton algebra and rotations |
| Splines and integer equations | Piecewise folding, B-splines, Euler equations, singularity integrals and integer parametrizations |
| Expression method options | Coefficients, replacement rules, structural queries and leading terms |
| Series and expression analysis | Formal/Fourier/asymptotic series, meromorphic tests and branch factors |
| Limits and asymptotic orders | limit/Limit with Gruntz and heuristics, directions and branch cuts, AccumBounds, Order arithmetic and containment |
| Integration | integrate/Integral pipeline, rational/Risch/heurisch/Meijer G stages, definite integrals and conditions, NonElementaryIntegral |
| Sequences | Formula and periodic sequences, fitted recurrences and generating functions |
| Finite differences | Exact arbitrary-grid weights and derivative stencils |
| Real and complex analysis | Singularities, continuity, periods, monotonicity, convexity and extrema |
| Polynomials and linear systems | Domains, factorization, Gröbner bases, roots and Galois groups |
| Solution checks and linear isolation | Equation validation, pole exclusions and square LU systems |
| Equation solvers | solve flags and result shapes, solveset result sets, linear/nonlinear systems and nsolve |
| Differential equations | ODE classification, exact equations, linear systems, PDE characteristics and separation |
| Holonomic functions | Ore operators, D-finite closure, Taylor recurrences and numeric continuation |
| Coordinate vector calculus | Cartesian/curvilinear frames, dyadics, field operators, potentials and geometric integrals |
| Differential geometry | Charts, fields, exterior calculus, connections, curvature and integral curves |
| Lie algebras | Finite Cartan types, exact roots, reflections and Dynkin diagrams |
| Categories | Objects, morphisms, finite diagram properties, layouts and Xy-pic previews |
| Geometry | Exact points, linear entities, conics, polygons, planes and intersections |
| Real inequalities | Polynomial sign charts, rational systems and nested absolute values |
| Coefficient domains | Exact arithmetic, free modules, ideals and quotient rings |
| Sparse constructors and number fields | Ring/field parents, embeddings, maximal orders and prime ideals |
| Combinatorics | Finite groups, rankings, free words, polycyclic collection and polyhedra |
| Polar branches | Polar lifts, argument reduction and conservative projection |
| Cryptography | Classical ciphers, RSA, ElGamal, key exchange, bit ciphers, Morse and feedback sequences |
| Physics | Units, mechanics, quantum and atomic physics, optics, control, structures and biomechanics |
| Statistics | Probability, conditioning, distributions, joint moments, processes, random matrices and sampling limits |
| Plotting | Native samples, Matplotlib figures, contours, grids and ASCII plots |
| Special functions | Gamma products, hypergeometric functions, Bessel families and Mathieu identities |
| Structural sets | Power sets, disjoint unions, complex regions and ordinals |
| Algebraic numbers | Exact field coordinates, structural methods and scalar calculations |
| Symbolic matrices | Dense/sparse matrices, matrix expressions and decompositions |
| Domain matrices | Typed coefficient arithmetic, elimination, kernels and solving |
| Matrix expression protocols | Structural queries, scalar calculus and matrix coefficient series |
| Permutation matrices | Native permutation nodes, composition and row/column operations |
| Arrays and tensors | Multidimensional storage, tensor operations and finite matrix derivatives |
| Indexed tensor algebra | Typed indices, slot symmetries, metric contractions, components and matching |
| Utilities | Sorting, traversal, containers, graph ordering and memoization |
| Expression parsing | Token transformations, implicit notation, namespaces and held expressions |
| Printing | Code targets, MathML, Graphviz, tables, TeX previews and SMT-LIB |
| Code generation | Target overview and execution routes |
| CUDA | NVRTC compilation and native execution |
| PyTorch | Source export, autograd and optional compilation |
| JAX | Source export, autodiff and JIT |
| Slang | Shader source and optional SlangPy execution |
| SYCL / AdaptiveCpp | C++ kernels and asynchronous execution |
| Code generation compatibility | SymPy-style constructors and printer extensions |
| Code generation AST | Statement nodes, C/Fortran nodes, C99 functions, rewriting and printer coverage |
| Routines and autowrap | Multi-language routine files, f2py and NumPy ufunc compilation, toolchain requirements |
| New API implementations | Exact algorithms, compiled routines, structural arrays and remaining behavioral limits |
| API connection audit | Section-by-section implementations and behavioral limits |
| Full SymPy module inventory | Documented modules, missing import paths and unmeasurable references |
| Testing and coverage | Differential tests, API measurement and fuzzing |
| Architecture | Rust modules and expression invariants |
Projects using symox
- kernox: fused symbolic GPU reductions (CUDA, HIP, SYCL) built on symox, a successor to PyKeOps.
License
Dual licensed under MIT or Apache-2.0, at your option. Code ported or vendored from SymPy 1.14 remains under SymPy's BSD-3-Clause license; see LICENSE-SYMPY.
Metadata
Release files for symox 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| symox-0.1.1.tar.gz | 4.3 MB | Without provenance | Details for symox-0.1.1.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| symox-0.1.1-cp39-abi3-win_amd64.whl | CPython 3.9 | abi3 | Windows x86-64 | Details for symox-0.1.1-cp39-abi3-win_amd64.whl |
| symox-0.1.1-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ x86-64 | Details for symox-0.1.1-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
| symox-0.1.1-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ ARM64 | Details for symox-0.1.1-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl |
| symox-0.1.1-cp39-abi3-macosx_11_0_arm64.whl | CPython 3.9 | abi3 | macOS 11.0+ ARM64 | Details for symox-0.1.1-cp39-abi3-macosx_11_0_arm64.whl |
| symox-0.1.1-cp39-abi3-macosx_10_12_x86_64.whl | CPython 3.9 | abi3 | macOS 10.12+ x86-64 | Details for symox-0.1.1-cp39-abi3-macosx_10_12_x86_64.whl |
Total release size: 81.3 MB
Release files / symox-0.1.1.tar.gz
| Download URL | symox-0.1.1.tar.gz |
|---|---|
| Size | 4.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
13ba3b1f1cfee72090126e77852c6866cd6fde3ea00dc98d77bb249b51a32a09
|
|
BLAKE2b-256 checksum How to use checksums |
d995e76824076207883454942f28f645d5f26db4ede1f3fa85555a9ffd67b0fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / symox-0.1.1-cp39-abi3-win_amd64.whl
| Download URL | symox-0.1.1-cp39-abi3-win_amd64.whl |
|---|---|
| Size | 16.1 MB |
| Tags | CPython 3.9 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
6ef93f27f7a4f6240df28d5cea1e9c77a356300513691dcb678ad1bccc351974
|
|
BLAKE2b-256 checksum How to use checksums |
3a1a7171c4b8f1e9aa29b9c1e826b0ec6d9e89f80f1498b1797f969b21b889d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / symox-0.1.1-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | symox-0.1.1-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 15.6 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
4254cfa824e8745f6cae11bd6da40b99a2a1cb825dc35be38ff6219e235eff9c
|
|
BLAKE2b-256 checksum How to use checksums |
fc13ec5dbfbef576d40dde93cdd5fff9e30cad1cc7774e44e152f627356e58a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / symox-0.1.1-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
| Download URL | symox-0.1.1-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl |
|---|---|
| Size | 15.2 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
7778f7d729f01fa24642dff7bc0f5bc78384c1b27b2853234139e01b5e6e17ae
|
|
BLAKE2b-256 checksum How to use checksums |
0a387c2edf4f2ac756e42cef7969c20ce0bb56d7a093a5eac08ee1cc93db6176
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / symox-0.1.1-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | symox-0.1.1-cp39-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 14.5 MB |
| Tags | CPython 3.9 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
d8a30895f5c5a3fed6162cfe7a2aee8015ef389224b61db7a56b9fce679ed1ce
|
|
BLAKE2b-256 checksum How to use checksums |
0a5bdb18b524dedc48d569670793887f003a81cca2dcc0c320f69b36c68360ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / symox-0.1.1-cp39-abi3-macosx_10_12_x86_64.whl
| Download URL | symox-0.1.1-cp39-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 15.5 MB |
| Tags | CPython 3.9 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
c4e75771ea0d31044f22f8f1e2cf8aab75e2c7b01bd5ceab8421a7bea8ad6b19
|
|
BLAKE2b-256 checksum How to use checksums |
a1aaa85465141640428b43db7adf37082eaac2148f8c07e7e63861f1ef251564
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for symox 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.