Eleguá
Domain-agnostic, multi-tier test harness for validating mathematical equivalence across symbolic computing systems.
The problem
When you port a symbolic math library to a new language, how do you prove the new implementation produces the same results as the original? Manual spot-checks don't scale — you need automated, layer-by-layer comparison that catches everything from bitwise differences to deep semantic mismatches.
What Eleguá does
Eleguá orchestrates validation tasks across multiple implementations of the same mathematical system. It runs the same symbolic action on a high-fidelity Oracle (ground truth) and one or more Implementations Under Test, then compares results through a 4-layer pipeline that cascades from fast structural checks to deeper semantic and invariant-based comparison.
TOML fixture → EleguaTask → Adapter.execute() → ValidationToken → Comparison Pipeline → pass/fail
Choose your path
1. Evaluate Eleguá
Run your first comparison using the built-in stubs in under five minutes.
Minimal prerequisites:
- Python 3.11+ — python.org/downloads
- uv —
curl -LsSf https://astral.sh/uv/install.sh | sh(docs)
Install and run one comparison:
git clone https://github.com/sashakile/elegua.git # or git@github.com:sashakile/elegua.git
cd elegua
uv sync
Then run a quick comparison:
from elegua.adapter import WolframAdapter
from elegua.comparison import compare_pipeline
from elegua.task import EleguaTask
task = EleguaTask(action="Echo", payload={"expr": "x + y"})
a = WolframAdapter().execute(task)
b = WolframAdapter().execute(task)
result = compare_pipeline(a, b)
print(result.layer, result.layer_name, result.status.value)
# => 1 identity ok
See the Getting Started guide for the full tutorial.
2. Build an adapter
To validate your own symbolic engine, you need to connect it to the harness. Eleguá uses a simple Adapter interface to dispatch tasks and receive validation tokens.
Read Writing an adapter in the documentation to learn how to plug your system into the 4-layer comparison pipeline.
3. Contribute
If you plan to work on the Eleguá repository itself, you'll need the full contributor environment.
just setup # install deps, sync vale, configure hooks
just check # run all pre-commit checks
just fix # auto-fix lint and format issues
just test # run tests (pass args: just test -v -k blob)
just cov # run tests with coverage report
just ci # full local CI: check + test
Git hooks (installed by just setup): pre-commit runs ruff, pyright, typos, and vale; pre-push runs pytest.
CI runs on push and PR to main: lint, typecheck, typos, vale, and test matrix across Python 3.11–3.13.
Experimental Status
License
MIT
Metadata
Release files for elegua 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| elegua-0.2.0.tar.gz | 258.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| elegua-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 309.8 kB
Release files / elegua-0.2.0.tar.gz
| Download URL | elegua-0.2.0.tar.gz |
|---|---|
| Size | 258.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
846bcc3895059700b84f6d206f8ac0a65abac3465f02e4828fe0a3a17664ff75
|
|
BLAKE2b-256 checksum How to use checksums |
ac3c21e96579582dc3eeb565470f455a17424cb7f71396d74430d62ecc585b3c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 10, 2026.
Transparency logRelease files / elegua-0.2.0-py3-none-any.whl
| Download URL | elegua-0.2.0-py3-none-any.whl |
|---|---|
| Size | 51.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f2b3d05a88e874ab2fa7aa9b85f0eaf8b842a5ef87d24e9e9b006e8fed13b1de
|
|
BLAKE2b-256 checksum How to use checksums |
2821f7af54fd58be408f9ae64f40a58e808100f66927dbadfd07bf2bc8086496
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 10, 2026.
Transparency log