You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+30-7Lines changed: 30 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,27 @@
1
1
# itp-interface
2
2
Generic interface for hooking up to any Interactive Theorem Prover (ITP) and collecting data for training ML models for AI in formal theorem proving.
3
3
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:
5
25
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.
6
26
7
27
2. Run the following to install Coq on Linux. The Coq version used in this project is <= 8.15.
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/)).
33
56
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:
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.
39
62
40
-
## Important Notes:
63
+
## Important Note:
41
64
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