TL;DR
While Large Language Models (LLMs) can write planning programs that pass empirical test suites, they lack mathematical guarantees of absolute correctness. This paper introduces a framework that automatically translates planning domains into the Lean theorem prover, using an LLM to generate both a generalized planning program and a formal completeness proof. Verified by Lean's rigorous kernel, this approach successfully produced provably complete planning strategies across 12 classic benchmark domains.
What Problem Does This Paper Address?
In automated planning, generalized planning aims to discover a single strategy or program (complete with loops and conditionals) capable of solving every possible problem instance within a given domain. For example, instead of finding a plan to move three specific blocks, a generalized plan should be able to unstack an arbitrary number of blocks in any initial configuration.
Recent advancements have shown that LLMs are highly proficient at generating these generalized plans as Python programs, often achieving 100% empirical coverage on test datasets. However, empirical testing cannot guarantee completeness—the mathematical certainty that the program will successfully resolve an infinite or unseen set of valid instances. Historically, proving completeness required tedious manual analysis by human experts, as prior automated verification techniques were limited to trivial, highly restricted domains.
Methods
The authors address this gap by designing a fully automated pipeline that pairs the generative creativity of LLMs with the absolute verification rigor of an interactive theorem prover.
- PDDL-to-Lean Translation: The framework takes a standard Planning Domain Definition Language (PDDL) description and uses a domain-independent symbolic converter to translate it into Lean. Lean is both a functional programming language and a powerful theorem prover. States, actions, and transitions are encoded directly into Lean's type system.
- Plan and Proof Generation: Using an LLM (
GPT-5.6-Sol), the system prompts the model to generate a generalized plan as an executable Lean function (solve). It then tasks the LLM with writing a formal proof showing that for any valid initial state and goal, the plan will sequentially apply valid actions to achieve the goal. - Basic vs. Iterative Proof Strategies: For simpler domains, the LLM generates the entire proof in a single shot (the Basic approach). For highly complex domains where the LLM explicitly notes that the proof is too complicated to write at once, the authors introduce an Iterative approach. Here, the LLM generates a high-level proof sketch with sub-lemmas, and the pipeline incrementally debugs and verifies individual declarations.
- Anti-Cheating Safeguards: LLMs are notorious for finding loopholes in formal verification (e.g., modifying the theorem statement to make it trivially true). The pipeline implements strict checks to ensure the final theorem matches the original specification exactly and does not rely on unapproved axioms.
Datasets
The pipeline was evaluated on 13 benchmark domains widely utilized in the International Planning Competition (IPC) and generalized planning literature:
- Basic Proof Generation: Delivery, Ferry, Grippers, Heavy, Hiking, Logistics, Satellite.
- Iterative Proof Generation: Blocks, Goldminer, Miconic, Rovers, Spanner, Transport.
Small problem instances extracted from existing public datasets were utilized as initial debugging tasks to validate the plans empirically before initiating the formal proof phase.
Key Insights and Ideas
- Turning Coding into Type-Checking: By compiling PDDL semantics directly into Lean, the authors transform a messy software verification problem into a strict type-checking problem. If the Lean kernel accepts the proof term, the plan is mathematically guaranteed to be correct, completely eliminating the risk of LLM hallucinations.
- The Power of Sketching: When confronted with complex logic, LLMs frequently fail if forced to generate a massive proof all at once. Breaking the task down into a "sketch-and-prove" loop—where the model lays out a blueprint of lemmas and resolves them one by one—significantly amplifies the model's reasoning capacity.
- Neuro-Symbolic Synergy: This architecture beautifully demonstrates a hybrid AI pattern: the neural network (LLM) acts as the creative engine proposing programs and proofs, while the classical symbolic system (Lean kernel) acts as an uncompromising judge.
Key Results
- High Success Rate: The framework successfully generated complete generalized plans alongside valid, kernel-checked completeness proofs for 12 out of the 13 domains.
- Tackling Complexity: 7 domains were successfully verified using the single-shot Basic approach, while 5 highly complex domains (Blocks, Goldminer, Miconic, Rovers, Spanner) successfully converged using the Iterative approach.
- A New State of the Art: Only one domain (Transport) failed proof generation due to its complex resource tracking. This represents a massive leap over prior automated verification methods, which typically maxed out on simple tasks like clearing a single block.
Limitations and Future Work
- Human-in-the-loop Constraints: The system is not entirely autonomous from scratch; it requires a human to provide the initial domain constraints (defining what constitutes a valid instance) and state invariants.
- PDDL Expressivity: The symbolic PDDL-to-Lean converter is currently limited to a subset of PDDL (conjunctive conditions with negation, no action costs). Expanding this to support numeric planning or conditional effects is a key next step.
- Proof Optimization: Highly complex domains involving intricate spatial or resource constraints (like Transport) still push LLMs past their current reasoning limits, highlighting a need for better prompt engineering or fine-tuning strategies.
Summary updated