PastaLean: Deterministic transpilation from Python to Lean for Verification
Anirudh Gupta, Petros Markopoulos, Siddhartha Gadgil
Key points
From the paper's conclusion- We present PastaLean, an extensible system for deterministic translation from Python to Lean via the Abstract Syntax Tree of Python.
Abstract
We present PastaLean, an extensible system for deterministic translation from Python to Lean via the Abstract Syntax Tree of Python. This allows for verification of Python code, especially auxiliary code used by AI. Every program is translated into a provable twin written in the form Lean's verification tooling can reason about, and a runnable twin that gives a fast and correct computation support. We also introduce our Type Inference engine TypeInfer which provides static typing support for untyped Python code. Our tool provides coverage of more than 92\% for LeetCode and HumanEval\textsuperscript{+} and more than 98\% for LiveCodeBench ground truth Python files. Further, at least 97\% of each dataset's (numerical) test cases pass, with 100\% on HumanEval\textsuperscript{+} and LiveCodeBench. The TypeInfer engine is the best-scoring tool on the TypeEvalPy static leaderboard, and on a repository-level TypyBench benchmark it scores above every competing repository-level inference tool.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- PaperFormalizer: Author-in-the-Loop Autoformalization of Research Papers in LeanarXiv · 2026
- What Has Actually Been Proved? Auditable Paper-to-Lean Alignment with LeanTrailarXiv · 2026
- Verified Proof Refactoring with Codex and QwenarXiv · 2026
- Typify: A Tool for Usage-driven Type Inference in PythonarXiv · 2026
- How Stable Are LLM-Generated Proofs Under Program Refactoring? A Stress Test for Verifiable Code GenerationarXiv · 2026
- SCOPE: Certified Theorem Proving with a Language Model as the Policy PlannerarXiv · 2026