{"id":34048814,"url":"https://github.com/psaegert/simplipy","last_synced_at":"2026-04-01T23:34:18.356Z","repository":{"id":297276276,"uuid":"996264689","full_name":"psaegert/simplipy","owner":"psaegert","description":"Efficient Simplification of Mathematical Expressions","archived":false,"fork":false,"pushed_at":"2026-03-18T17:20:29.000Z","size":7311,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-19T01:57:42.993Z","etag":null,"topics":["computer-algebra-system","expression-simplificator","mathematical-expressions","symbolic-regression","sympy"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/psaegert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-04T17:40:55.000Z","updated_at":"2026-03-18T17:42:15.000Z","dependencies_parsed_at":"2026-03-18T13:06:00.949Z","dependency_job_id":null,"html_url":"https://github.com/psaegert/simplipy","commit_stats":null,"previous_names":["psaegert/simplipy"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/psaegert/simplipy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psaegert%2Fsimplipy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psaegert%2Fsimplipy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psaegert%2Fsimplipy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psaegert%2Fsimplipy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/psaegert","download_url":"https://codeload.github.com/psaegert/simplipy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psaegert%2Fsimplipy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31292970,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T21:15:39.731Z","status":"ssl_error","status_checked_at":"2026-04-01T21:15:34.046Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["computer-algebra-system","expression-simplificator","mathematical-expressions","symbolic-regression","sympy"],"created_at":"2025-12-14T00:13:16.810Z","updated_at":"2026-04-01T23:34:18.338Z","avatar_url":"https://github.com/psaegert.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\" style=\"margin-top: 0px;\"\u003eSimpliPy:\u003cbr\u003eEfficient Simplification of Mathematical Expressions\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![PyPI version](https://img.shields.io/pypi/v/simplipy.svg)](https://pypi.org/project/simplipy/)\n[![PyPI license](https://img.shields.io/pypi/l/simplipy.svg)](https://pypi.org/project/simplipy/)\n[![Documentation Status](https://readthedocs.org/projects/simplipy/badge/?version=latest)](https://simplipy.readthedocs.io/en/latest/?badge=latest)\n\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![pytest](https://github.com/psaegert/simplipy/actions/workflows/pytest.yml/badge.svg)](https://github.com/psaegert/simplipy/actions/workflows/pytest.yml)\n[![quality checks](https://github.com/psaegert/simplipy/actions/workflows/pre-commit.yml/badge.svg)](https://github.com/psaegert/simplipy/actions/workflows/pre-commit.yml)\n[![CodeQL Advanced](https://github.com/psaegert/simplipy/actions/workflows/codeql.yaml/badge.svg)](https://github.com/psaegert/simplipy/actions/workflows/codeql.yaml)\n\n\n\u003c/div\u003e\n\n# Publications\n- Saegert \u0026 Köthe 2026, _Breaking the Simplification Bottleneck in Amortized Neural Symbolic Regression_ (preprint, under review) [https://arxiv.org/abs/2602.08885](https://arxiv.org/abs/2602.08885)\n\n\n# Usage\n\n```sh\npip install simplipy\n```\n\n```python\nimport simplipy as sp\n\nengine = sp.SimpliPyEngine.load(\"dev_7-3\", install=True)\n\n# Simplify prefix expressions\nengine.simplify(('/', '\u003cconstant\u003e', '*', '/', '*', 'x3', '\u003cconstant\u003e', 'x3', 'log', 'x3'))\n# \u003e ('/', '\u003cconstant\u003e', 'log', 'x3')\n\n# Simplify infix expressions\nengine.simplify('x3 * sin(\u003cconstant\u003e + 1) / (x3 * x3)')\n# \u003e '\u003cconstant\u003e / x3'\n```\n\nMore examples can be found in the [documentation](https://simplipy.readthedocs.io/).\n\n# Performance\n\n\u003c!-- \u003cimg src=\"https://raw.githubusercontent.com/psaegert/simplipy/main/assets/images/simplification_comparison_simplipy_sympy.svg\" alt=\"Original vs Simplified Length and Simplification Time\"/\u003e\n\n\u003e Simplification efficacy and efficiency for different maximum pattern lengths (Engine: `dev_7-3`).\n\u003e Original expressions sampled with the [Lample-Charton Algorithm](https://arxiv.org/abs/1912.01412) using the following parameters:\n\u003e - 0 to 3 variables\n\u003e - 0 to 20 operators (corresponding to lengths of 0 to 41)\n\u003e - Operators:\n\u003e   - with relative weight 10: `+`, `-`, `*`, `/`\n\u003e   - with relative weight 1: `abs`, `inv`, `neg`, `pow2`, `pow3`, `pow4`, `pow5`, `pow1_2`, `pow1_3`, `pow1_4`, `pow1_5`, `sin`, `cos`, `tan`, `asin`, `acos`, `atan`, `exp`, `log`, `mult2`, `mult3`, `mult4`, `mult5`, `div2`, `div3`, `div4`, `div5`\n\u003e\n\u003e Points show bootstrapped mean and 95% confidence interval (N = 10,000).\n\u003e Orange points are within the 95% confidence interval of the shortest simplified length for the respective original length.\n\u003e Using patterns beyond a length of 4 tokens does not yield significant improvements and comes at a cost of increased simplification time. --\u003e\n\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\n      \u003cimg src=\"https://raw.githubusercontent.com/psaegert/simplipy/main/assets/images/simplification_comparison_simplipy_sympy.svg\" alt=\"Original vs Simplified Length and Simplification Time\" width=\"500\"\u003e\n      \u003cp\u003e\u003cstrong\u003eLeft:\u003c/strong\u003e 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 \u003ca href=\"https://peerj.com/articles/cs-103/\"\u003e[Meurer et al. 2017]\u003c/a\u003e baseline (orange, red). \u003cstrong\u003eRight:\u003c/strong\u003e 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.\u003cbr\u003e\n      Source expressions are sampled with 0 to 17 unique variables and 1 to 35 symbols \u003ca href=\"https://arxiv.org/abs/2602.08885\"\u003e[Saegert \u0026 Köthe 2026]\u003c/a\u003e\u003c/p\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n# Development\n\n## Setup\nTo set up the development environment, run the following commands:\n\n```sh\npip install -e .[dev]\npre-commit install\n```\n\n## Tests\n\nTest the package with `pytest`:\n\n```sh\npytest tests --cov src --cov-report html\n```\n\nor to skip integration tests,\n\n```sh\npytest tests --cov src --cov-report html -m \"not integration\"\n```\n\n# Citation\n```bibtex\n@misc{saegert2026breakingsimplificationbottleneckamortized,\n  title   = {Breaking the Simplification Bottleneck in Amortized Neural Symbolic Regression},\n  author  = {Paul Saegert and Ullrich Köthe},\n  year    = {2026},\n  eprint  = {2602.08885},\n  archivePrefix =  {arXiv},\n  primaryClass  = {cs.LG},\n  url     = {https://arxiv.org/abs/2602.08885},\n}\n\n% Optionally\n@software{simplipy-2025,\n    author = {Paul Saegert},\n    title = {Efficient Simplification of Mathematical Expressions},\n    year = 2025,\n    publisher = {GitHub},\n    version = {0.2.14},\n    url = {https://github.com/psaegert/simplipy}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsaegert%2Fsimplipy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpsaegert%2Fsimplipy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsaegert%2Fsimplipy/lists"}