Find algebraic equations given their solution
Project description
ries-rs
ries-rs is a Rust implementation of Robert P. Munafo's RIES inverse equation
solver. Given a target number, it searches for algebraic equations that have
that number as a solution.
The historical acronym is RIES, for "RILYBOT Inverse Equation Solver". This repository aims to be a modern, documented, reproducible reference implementation rather than a historical clone.
Install
Until packaged release binaries are published, the primary CLI install path is from git or source.
CLI
cargo install --git https://github.com/maxwellsantoro/ries-rs --locked
# Or, from a local checkout:
cargo install --path . --locked
Python Bindings
pip install maturin
cd ries-py
maturin develop --release
Web App / WASM
npm run build:web:site
Deploy the contents of dist/web-site/ to a path such as
https://example.com/projects/ries-rs/.
Detailed setup guides:
Quick Start
Basic search:
ries-rs 3.141592653589793
# Example output:
# x = pi ('exact' match) {14}
# x-3 = 1/7 for x = T + 1.26e-3 {24}
Classic-style output:
ries-rs --classic 2.5063
Deterministic machine-readable output:
ries-rs 3.141592653589793 --deterministic --json --emit-manifest run.json
For the authoritative option list:
ries-rs --help
What v1.0 Delivers
Version 1.0 is scoped as a disciplined, modern reference implementation:
- Faithful reimplementation of the core RIES search model
- Deterministic and documented execution modes
- Memory-safe Rust implementation with optional parallel search
- Structured output for automation (
--json,--emit-manifest) - CLI, Rust library, Python bindings, and WebAssembly builds
- Modular presets, profiles, and extension points
Out of scope for v1.0:
- Symbolic AI or conjecture systems
- PSLQ research-platform ambitions beyond the shipped CLI mode
- Experimental search branches outside the core RIES model
Why Use ries-rs
- Rust implementation with a cleaner architecture and broad regression coverage
- Deterministic mode for reproducible output ordering
- Structured JSON and manifests for automation and research workflows
- Browser and library integrations in addition to the CLI
- Public benchmark artifacts and explicit parity tracking against older versions
Performance
Performance claims are tracked conservatively with separate benchmark artifacts for end-to-end CLI runs and generation-only scaling:
- End-to-end CLI baseline:
docs/benchmarks/2026-02-25-level3-baseline.mdreports1.084xobserved speedup on the published level-3 workload because matching/Newton dominates that run. - Generation-only scaling:
docs/benchmarks/2026-02-25-generation-parallel-scaling.mdreports3.18xmedian speedup for parallel generation.
Raw benchmark artifacts live under docs/benchmarks/artifacts/.
Compatibility
ries-rs tracks behavior against two historical baselines:
- The original RIES by Robert Munafo
- The
clsn/riesfork with additional compatibility-oriented CLI behavior
Current status in brief:
- Core equation search and classic-style output flow are implemented
- Legacy CLI semantics and diagnostic channels are supported substantially more completely than in early versions
- Internal generation and ranking are Rust-native, so exact ordering and complexity numbers can still differ on some targets
See docs/PARITY_STATUS.md for the detailed status and
historical notes.
How It Works
- Enumerate valid postfix expressions up to the current complexity limit
- Check fast-path exact matches against well-known constants when possible
- Generate left-hand-side and right-hand-side expression candidates
- Use Newton refinement to solve
LHS(x) = RHS - Filter, deduplicate, and refine candidate equations
- Rank matches by exactness, error, and parity-style or complexity-style order
Documentation
- Documentation map
- Search model
- Complexity and weights
- Architecture overview
- Performance notes and benchmarks
- Parity and compatibility status
- Python bindings
- WASM bindings
- Web UI build and hosting
Additional Interfaces
Python
The Python bindings expose ries-rs.search() and typed match objects through
PyO3. See docs/PYTHON_BINDINGS.md for installation,
API details, and troubleshooting.
WebAssembly
The WASM build supports browser, Node.js, bundler, and static-site workflows. See docs/WASM_BINDINGS.md for the JS/TS API and web/README.md for the browser UI and static hosting flow.
PSLQ
The CLI includes PSLQ integer-relation detection via --pslq,
--pslq-extended, and --pslq-max-coeff. This is part of the shipped tool, but
it is not the primary scope of the v1.0 project definition.
How to Cite
If you use ries-rs in academic work, cite the project version you used.
CITATION.cff is the canonical metadata source.
@software{ries-rs2026,
author = {RIES Contributors},
title = {ries-rs: A Rust Implementation of the RIES Inverse Equation Solver},
year = {2026},
version = {1.0.0},
url = {https://github.com/maxwellsantoro/ries-rs},
license = {MIT},
note = {Features parallel search, deterministic mode, and run manifest for reproducibility}
}
Each GitHub release is archived on Zenodo after
publication. Once a release DOI exists, copy it into CITATION.cff, this
README, and the release notes.
For reproducible research runs, prefer --deterministic together with
--emit-manifest.
License
MIT License. See LICENSE.
References
- Original RIES by Robert Munafo
- RIES Documentation
clsn/riesfork- Stoutemyer, D.R. (2024). "Computing with No Machine Constants, Only Constructive Axioms". arXiv:2402.03304
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ries_rs-1.0.0-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: ries_rs-1.0.0-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 288.8 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78cffe80f085dfb2b2ff2ed45816de3319c2c7a8fa79213902190d48b76e2165
|
|
| MD5 |
ce435402d448217c689d6f619b83e3ab
|
|
| BLAKE2b-256 |
2fc3b921f5b4f9a5127e603c007d485938c86c791d833216170239384a4b7e16
|