A Machine-to-Machine Interaction Interface for Lean 4
Go to file
Leni Aniva 7d4ee57c15
doc: Documentation stub
2024-10-17 21:03:18 -07:00
docs doc: Documentation stub 2024-10-17 21:03:18 -07:00
examples chore: Update Pantograph and Lean version to 4.12 2024-10-07 20:15:07 -07:00
experiments Merge pull request #24 from lenianiva/experiments/minif2f 2024-10-13 19:21:16 -07:00
pantograph feat: Implement TacticLet, TacticExpr 2024-10-12 16:59:52 -07:00
src@a11127a64e chore: Update origin to GitHub Pantograph, with bug fixes 2024-10-13 12:24:04 -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 doc: Documentation stub 2024-10-17 21:03:18 -07:00
pyproject.toml doc: Documentation stub 2024-10-17 21:03:18 -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}}
}