Efficient Simplification of Mathematical Expressions
Project description
SimpliPy:
Efficient Simplification of Mathematical Expressions
Publications
- Saegert & Köthe 2026, Breaking the Simplification Bottleneck in Amortized Neural Symbolic Regression (preprint, under review) https://arxiv.org/abs/2602.08885
Usage
pip install simplipy
import simplipy as sp
engine = sp.SimpliPyEngine.load("dev_7-3", install=True)
# Simplify prefix expressions
engine.simplify(('/', '<constant>', '*', '/', '*', 'x3', '<constant>', 'x3', 'log', 'x3'))
# > ('/', '<constant>', 'log', 'x3')
# Simplify infix expressions
engine.simplify('x3 * sin(<constant> + 1) / (x3 * x3)')
# > '<constant> / x3'
More examples can be found in the documentation.
Performance
|
Left: Empirical Cumulative Distribution Functions (ECDFs) of simplification wall-clock time. Our SimpliPy rewriting engine (shades of blue, varying Lmax) operates in the low to moderate millisecond regime, orders of magnitude faster than the SymPy [Meurer et al. 2017] baseline (orange, red). Right: ECDF of the simplification ratio |τ ∗|/|τ |. The inset highlights the tail of the distribution. Our method with Lmax ≥ 5 achieves simplification ratios comparable to the SymPy baseline while maintaining high throughput. |
Development
Setup
To set up the development environment, run the following commands:
pip install -e .[dev]
pre-commit install
Tests
Test the package with pytest:
pytest tests --cov src --cov-report html
or to skip integration tests,
pytest tests --cov src --cov-report html -m "not integration"
Citation
@misc{saegert2026breakingsimplificationbottleneckamortized,
title = {Breaking the Simplification Bottleneck in Amortized Neural Symbolic Regression},
author = {Paul Saegert and Ullrich Köthe},
year = {2026},
eprint = {2602.08885},
archivePrefix = {arXiv},
primaryClass = {cs.LG},
url = {https://arxiv.org/abs/2602.08885},
}
% Optionally
@software{simplipy-2025,
author = {Paul Saegert},
title = {Efficient Simplification of Mathematical Expressions},
year = 2025,
publisher = {GitHub},
version = {0.2.15},
url = {https://github.com/psaegert/simplipy}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 simplipy-0.2.15.tar.gz.
File metadata
- Download URL: simplipy-0.2.15.tar.gz
- Upload date:
- Size: 61.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb92a86564932844d8567569582353d154a17a082236b2878387dcb2181132fe
|
|
| MD5 |
56ac46ed42f7375028ac1f54d3832763
|
|
| BLAKE2b-256 |
ad1b6a70cab4b2e41ee18679593d365837c7f3c3721ae3b67f6b527796b26f81
|
Provenance
The following attestation bundles were made for simplipy-0.2.15.tar.gz:
Publisher:
publish.yml on psaegert/simplipy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
simplipy-0.2.15.tar.gz -
Subject digest:
eb92a86564932844d8567569582353d154a17a082236b2878387dcb2181132fe - Sigstore transparency entry: 1243748992
- Sigstore integration time:
-
Permalink:
psaegert/simplipy@c84741f56185e484fc16c680116960bb05bf0323 -
Branch / Tag:
refs/tags/v0.2.15 - Owner: https://github.com/psaegert
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c84741f56185e484fc16c680116960bb05bf0323 -
Trigger Event:
release
-
Statement type:
File details
Details for the file simplipy-0.2.15-py3-none-any.whl.
File metadata
- Download URL: simplipy-0.2.15-py3-none-any.whl
- Upload date:
- Size: 47.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ef9078771a612ae8186a021f160b83e1086ea31328454e4a7a68971dbebf398
|
|
| MD5 |
433cc07035c0e093f2de54904a4de2d7
|
|
| BLAKE2b-256 |
2ebfa035e6213c08fa20184ff1ef2a1e41060e9689d31f220c4c74618030b554
|
Provenance
The following attestation bundles were made for simplipy-0.2.15-py3-none-any.whl:
Publisher:
publish.yml on psaegert/simplipy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
simplipy-0.2.15-py3-none-any.whl -
Subject digest:
1ef9078771a612ae8186a021f160b83e1086ea31328454e4a7a68971dbebf398 - Sigstore transparency entry: 1243749004
- Sigstore integration time:
-
Permalink:
psaegert/simplipy@c84741f56185e484fc16c680116960bb05bf0323 -
Branch / Tag:
refs/tags/v0.2.15 - Owner: https://github.com/psaegert
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c84741f56185e484fc16c680116960bb05bf0323 -
Trigger Event:
release
-
Statement type: