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.

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.3.tar.gz (5.4 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.3-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: simpleafier-0.1.3.tar.gz
  • Upload date:
  • Size: 5.4 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.3.tar.gz
Algorithm Hash digest
SHA256 7bb8e6c00f838c013b7c97816ca25db1d79e55955a38fbd889c63a5616777e4f
MD5 641d0b33dbb37a6bdd948c0f3ff7201a
BLAKE2b-256 e14f439673f5aecdfc60f2ed1c8842d8149fc1a6adb63609277ad897ba9b736f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: simpleafier-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 6.0 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 80e73e009e1ed61854ece59de0f001935f0dbba89fe3592d016b06df8320c5e2
MD5 8fb7e99961cee89229d9142a10e5ae3d
BLAKE2b-256 16117342d7206ba17e9654ed4cfec0e1799e4879c57e9e47297f1506ee528409

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