A Machine-to-Machine Interaction Interface for Lean 4
Go to file
Leni Aniva 8ce8e9d389
feat: Add binder name option in `TacticHave`
2024-10-02 11:09:58 -07:00
examples refactor: Update the experiment repo Lean version, use new load_sorry API 2024-09-13 18:18:53 -07:00
experiments refactor: Update the experiment repo Lean version, use new load_sorry API 2024-09-13 18:18:53 -07:00
pantograph feat: Add binder name option in `TacticHave` 2024-10-02 11:09:58 -07:00
src@bec84f857b chore: Library update 2024-09-09 18:49:35 -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 refactor: Update the experiment repo Lean version, use new load_sorry API 2024-09-13 18:18:53 -07:00
build.py feat: Automatic mode (for the gym experience) 2024-09-06 22:26:37 -07:00
poetry.lock Merge branch 'frontend/collect-holes' into search 2024-09-13 17:14:20 -07:00
pyproject.toml Merge branch 'frontend/collect-holes' into search 2024-09-13 17:14:20 -07:00

README.md

PyPantograph

Python interface to the Pantograph library

Getting started

Update submodule

git submodule update --init

Install dependencies

poetry install

Execute

poetry build

To run server tests:

python -m pantograph.server
python -m pantograph.search

The tests in pantograph/server.py also serve as simple interaction examples

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 is an experiment on running a LLM prover on miniF2F data. Run with

python3 experiments/miniF2F_search.py [--dry-run]

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}}
}