This repo is a collection of verified algorithms in Lean, implemented and proved by AIs. Our main goals:
-
Be instructive. We aim to create a curated set of examples, of using AIs to produce code with proofs of correctness. We hope this can serve as recipes for creating agentic systems for coding, sources of examples for multi-shot prompting, and/or data set for fine-tuning.
-
Be useful. A secondary goal is to serve as a library of verified algorithms, that can be used to build more complex projects with provable guarantees.
This is part of an effort to create safe and hallucination-free coding AIs.
Contributions welcome! We are interested in algorithms that are partially or wholly produced by AIs. Methods of production may include but are not limited to:
- prompting, including with worked examples;
- translation / autoformalization, from natural languages, other programming languages and/or formal languages;
- tool calling, including LeanTool, LeanExplore, lean-lsp-mcp;
- custom models, including fine-tuning via SFT or RL;
- other custom scaffolding, such as multi-agent workflows.
Feel free to send in PRs. Please document your process in the open comments of the source file.