Generic interface for hooking up to any Interactive Theorem Prover (ITP) and collecting data for training ML models for AI in formal theorem proving.
Reason this release was yanked:
Has some bugs which can spoil installations
Project description
itp-interface
Generic interface for hooking up to any Interactive Theorem Prover (ITP) and collecting data for training ML models for AI in formal theorem proving.
Quick Setup for Lean 4:
- Install itp-interface using the following command:
pip install itp-interface
- Run the following command to prepare the REPL for Lean 4. (The default version is 4.7.0-rc2. You can change the version by setting the
LEAN_VERSIONenvironment variable. If no version is set, then 4.7.0-rc2 is used.)
NOTE: The Lean 4 version must match the version of the Lean 4 project you are working with.
export LEAN_VERSION="4.15.0"
install-lean-repl
- Run the following command to build the REPL for Lean 4. Make sure that
lean --versionreturns the correct version before running the command below. If not then check if$HOME/.elan/binis in your path. Recommended to runsource $HOME/.elan/envbefore running the command below.
install-itp-interface
NOTE: These steps are only tested on Linux. For Windows, you can use WSL. These steps will not setup the Coq interface.
Full Setup for Coq and Lean:
-
Install OCaml first. Use the instructions here: https://opam.ocaml.org/doc/Install.html . The opam version used in this project is 2.1.3 (OCaml 4.14.0). Note that OCaml officially only supports Linux installations. One can use WSL on Windows machines.
-
Run the following to install Coq on Linux. The Coq version used in this project is <= 8.15.
sudo apt install build-essential unzip bubblewrap
sh <(curl -sL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)
- Add the following to your
.bashrcfile: (sometimes the path~/.opam/defaultmight not exist, so use the directory with version number present in the~/.opamdirectory)
export PATH="/home/$USER/.opam/default/bin:$PATH"
-
Create a
Minicondaenvironment and activate it. -
Run the commands for installing the Lean 4 interface as mentioned in Quick Setup for Lean 4.
-
Change to the project root directory, and run the setup script i.e.
./src/scripts/setup.shfrom the root directory. -
Add the following to your
.bashrcfile for Lean:
export PATH="/home/$USER/.elan/bin:$PATH"
Generating Proof Step Data:
1.a. You need to run the following command to generate sample proof step data for Lean 4:
python src/itp_interface/main/run_tool.py --config-name simple_lean_data_gen
Check the simple_lean_data_gen.yaml configuration in the src/itp_interface/configs directory for more details. These config files are based on the hydra library (see here).
1.b. You need to run the following command to generate sample proof step data for Coq:
python src/itp_interface/main/run_tool.py --config-name simple_coq_data_gen
Check the simple_coq_data_gen.yaml configuration in the src/itp_interface/configs directory for more details about where the generated data is stored and where the different ITP (Coq and Lean) projects are located in the file system.
Important Note:
The ITP projects must be built before running proof step data generation. Make sure that the switch is set correctly while generating data for Coq projects because the Coq projects can be using different versions of Coq. Instructions for Coq project setup are listed in src/itp_interface/main/config/repo/coq_repos.yaml file.
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 itp_interface-1.0.0.tar.gz.
File metadata
- Download URL: itp_interface-1.0.0.tar.gz
- Upload date:
- Size: 4.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.10.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f62b175ef03a4be0ce5ce02c00666dcec13ddf00edcaef193056a950e8ac2e3c
|
|
| MD5 |
d0848b1acf30ead9939bd947e2f91d33
|
|
| BLAKE2b-256 |
e7d1dd845cb4a78f19618a2a4261e35a87dd4645f98bbf2fbe6e46669f984863
|
File details
Details for the file itp_interface-1.0.0-py3-none-any.whl.
File metadata
- Download URL: itp_interface-1.0.0-py3-none-any.whl
- Upload date:
- Size: 2.0 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.10.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a37441e1ad04e9f3d5cd8b6093355566aa1b020fc81a4d680af3462db2155ed
|
|
| MD5 |
ee118f4374565ae5b9c7109894fa4483
|
|
| BLAKE2b-256 |
04f4d9d5a96430ccbb272215324178b187ae9b72b323ed8d4ced8c4f8579ede1
|