Skip to content

Lean-zh/PyPantograph

This branch is 1 commit ahead of, 45 commits behind stanford-centaur/PyPantograph:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Jan 13, 2025
f07d9f7 · Jan 13, 2025
Jan 13, 2025
Dec 12, 2024
Dec 12, 2024
Jan 13, 2025
Jan 13, 2025
Jan 11, 2025
Jan 13, 2025
Jan 13, 2025
Oct 17, 2024
Oct 21, 2024
Dec 12, 2024
Oct 1, 2024
Jan 13, 2025
Jun 4, 2024
Jan 13, 2025
Jan 13, 2025
Jan 13, 2025
Apr 29, 2024

Repository files navigation

PyPantograph

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

Installation

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

Documentation

Build the documentations by

poetry install --only doc
poetry run jupyter-book build docs

Then serve

cd docs/_build/html
python3 -m http.server -d .

Examples

For API interaction examples, see examples/README.md. The examples directory also contains a comprehensive Jupyter notebook.

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

The experiments should be run in poetry shell. The environment variable OPENAI_API_KEY must be set when running experiments calling the OpenAI API.

Referencing

Paper Link

@misc{pantograph,
      title={Pantograph: A Machine-to-Machine Interaction Interface for Advanced Theorem Proving, High Level Reasoning, and Data Extraction in Lean 4},
      author={Leni Aniva and Chuyue Sun and Brando Miranda and Clark Barrett and Sanmi Koyejo},
      year={2024},
      eprint={2410.16429},
      archivePrefix={arXiv},
      primaryClass={cs.LO},
      url={https://arxiv.org/abs/2410.16429},
}

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TeX 59.6%
  • Lean 30.2%
  • Python 10.1%
  • Shell 0.1%