Skip to content

Commit ec22542

Browse files
author
Amitayush Thakur
committed
Updated the README
1 parent a8671c7 commit ec22542

File tree

1 file changed

+30
-7
lines changed

1 file changed

+30
-7
lines changed

README.md

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,27 @@
11
# itp-interface
22
Generic interface for hooking up to any Interactive Theorem Prover (ITP) and collecting data for training ML models for AI in formal theorem proving.
33

4-
## Setup Steps:
4+
## Quick Setup for Lean 4:
5+
1. Install itp-interface using the following command:
6+
```bash
7+
pip install itp-interface
8+
```
9+
10+
2. 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_VERSION` environment variable. If no version is set, then 4.7.0-rc2 is used.)
11+
>NOTE: The Lean 4 version must match the version of the Lean 4 project you are working with.
12+
```bash
13+
export LEAN_VERSION="4.15.0"
14+
install-lean-repl
15+
```
16+
17+
3. Run the following command to build the REPL for Lean 4. Make sure that `lean --version` returns the correct version before running the command below. If not then check if `$HOME/.elan/bin` is in your path. Recommended to run `source $HOME/.elan/env` before running the command below.
18+
```bash
19+
install-itp-interface
20+
```
21+
22+
>NOTE: These steps are only tested on Linux. For Windows, you can use WSL. These steps will not setup the Coq interface.
23+
24+
# Full Setup for Coq and Lean:
525
1. 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.
626

727
2. Run the following to install Coq on Linux. The Coq version used in this project is <= 8.15.
@@ -17,25 +37,28 @@ export PATH="/home/$USER/.opam/default/bin:$PATH"
1737

1838
4. Create a `Miniconda` environment and activate it.
1939

40+
5. Run the commands for installing the Lean 4 interface as mentioned in [Quick Setup for Lean 4](#quick-setup-for-lean-4).
2041

21-
5. Change to the project root directory, and run the setup script i.e. `./src/scripts/setup.sh` from the root directory.
42+
6. Change to the project root directory, and run the setup script i.e. `./src/scripts/setup.sh` from the root directory.
2243

23-
6. Add the following to your `.bashrc` file for Lean:
44+
7. Add the following to your `.bashrc` file for Lean:
2445
```
2546
export PATH="/home/$USER/.elan/bin:$PATH"
2647
```
2748

28-
7. You need to run the following command to generate sample proof step data for Lean 4:
49+
## Generating Proof Step Data:
50+
51+
1.a. You need to run the following command to generate sample proof step data for Lean 4:
2952
```
3053
python src/itp_interface/main/run_tool.py --config-name simple_lean_data_gen
3154
```
3255
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](https://hydra.cc/docs/intro/)).
3356

34-
8. You need to run the following command to generate sample proof step data for Coq:
57+
1.b. You need to run the following command to generate sample proof step data for Coq:
3558
```
3659
python src/itp_interface/main/run_tool.py --config-name simple_coq_data_gen
3760
```
38-
Check the `simple_coq_data_gen.yaml` configuration in the `src/itp_interface/configs` directory for more details.
61+
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.
3962

40-
## Important Notes:
63+
## Important Note:
4164
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.

0 commit comments

Comments
 (0)