A Machine-to-Machine Interaction Interface for Lean 4
Go to file
Leni Aniva 2fae5e97f1
feat: Concise prompts and unhygienic mode
2024-10-04 17:55:32 -07:00
data/debug/toy_example1_dsp pushing dsp to my branch 2024-07-11 15:49:37 -07:00
examples fix: `sorry` extraction from sketch 2024-10-03 01:32:43 -07:00
experiments feat: Concise prompts and unhygienic mode 2024-10-04 17:55:32 -07:00
pantograph feat: Concise prompts and unhygienic mode 2024-10-04 17:55:32 -07:00
src@10cb32e03f fix: Argument passing in dsp 2024-10-03 12:03:33 -07:00
.gitignore Merge branch 'main' into dev 2024-09-06 22:34:48 -07:00
.gitmodules add conv_sgl tests 2024-05-20 00:02:33 -07:00
LICENSE Initial commit 2024-04-11 12:37:58 -07:00
README.md fix: Absolute directories in experiments 2024-10-01 11:34:30 -07:00
SNAP.md doc: Move SNAP instructions into its own file 2024-10-01 10:57:21 -07:00
build.py Merge branch 'main' into brando 2024-09-26 19:26:59 -07:00
main_krbtmux_bm.sh trying PyPantograph install aesop 2024-06-03 20:17:58 -07:00
poetry.lock feat: Concise prompts and unhygienic mode 2024-10-04 17:55:32 -07:00
pyproject.toml feat: Concise prompts and unhygienic mode 2024-10-04 17:55:32 -07:00
test_vllm.py all worked, added pytorch and vllm test 2024-04-29 12:53:54 -07:00

README.md

PyPantograph

A Machine-to-Machine Interaction System for Lean 4.

Installation

  1. Install poetry
  2. Clone this repository with submodules:
git clone --recursive-submodules <repo-path>
  1. Install elan and lake: See Lean Manual
  2. Execute
poetry build
poetry install

Examples

For API interaction examples, see examples/README.md

An agent based on the sglang library is provided in pantograph/search_llm.py. To use this agent, set the environment variable OPENAI_API_KEY, and run

python3 -m pantograph.search_llm

Experiments

In experiments/, there are some experiments:

  1. minif2f/ is an example of executing a SGLANG based prover on the miniF2F dataset
  2. dsp is an Lean implementation of Draft-Sketch-Prove

If the experiments don't work, run them in poetry shell. The environment variable OPENAI_API_KEY must be set when running experiments calling the OpenAI API.

Referencing

@misc{pantograph,
	title = "Pantograph, A Machine-to-Machine Interface for Lean 4",
	author = {Aniva, Leni and Miranda, Brando and Sun, Chuyue},
	year = 2024,
	howpublished = {\url{https://github.com/lenianiva/PyPantograph}}
}