Skip to main content

A command line tool to help improve the quality of Lean code by converting any "simp" to "simp only".

Project description

Simpleafier

Simpleafier is a command line tool to help improve the quality of Lean code by converting any simp to simp only. This can help make Lean proofs more robust and maintainable by restricting the set of lemmas used by simp.

Requirements

  • Python 3.6+
  • Lean 4
  • lake must be installed and available in your PATH.

Installation

Simpleafier is available on PyPI and can be installed using pip.

python -m pip install Simpleafier

Usage

To convert all simp calls in a Lean file to simp only:

python -m simpleafier path/to/your/file.lean --simponly --fast

simpleafier must be invoked from the root of your lake project. The lean file provided must be compilable without any errors. simpleafier will create a temporary file in the same directory as the original file for processing. At the end of the process, the temporary file will be deleted and the original file will be replaced with the modified version.

The --fast flag provides significantly faster processing, but may result in less accurate results that may need more manual fixes. However it is currently the recommended mode for using simpleafier as it is more stable and gives reasonably good results.

[!WARNING] This tool is still under development and does not guarantee perfect results. You may have to manually fix the output in some cases.

[!NOTE] At the end of this processing, your code might contain some simp only or simp only at ... statements that may not be necessary. These are currently not automatically removed.

License

This project is licensed under the MIT License.

Contributing

Contributions, bug reports, and feature requests are welcome! Please open an issue or submit a pull request on GitHub.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simpleafier-0.1.4.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simpleafier-0.1.4-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file simpleafier-0.1.4.tar.gz.

File metadata

  • Download URL: simpleafier-0.1.4.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.3

File hashes

Hashes for simpleafier-0.1.4.tar.gz
Algorithm Hash digest
SHA256 499c4e8b880ee157ff3754de3aa0354301722a18ff116e0dc883f4ba4ae114e7
MD5 237fe63ee8448a2f8147110c0ed6ce2a
BLAKE2b-256 e77c2c02378e611eb8b7dd911a80c1a32a5dd950d900b702f8816d5ffdbbb16c

See more details on using hashes here.

File details

Details for the file simpleafier-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: simpleafier-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.3

File hashes

Hashes for simpleafier-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e7606bdc034e0c2e81df861e875e48c8a0c3d3b1925213e2b84826e8afa52ee5
MD5 3f114e8fa7f4701a34c25608421cc288
BLAKE2b-256 fd6c0c8cb917b9305862907498de35b92c6adea6d6813219f9fada1a507a4db5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page