An LLM agent writes robot manipulation feasible action sets as Lean 4 families over a physics-law library. Candidate actions are checked by interval arithmetic and, optionally, the Lean kernel.
Abstract
A manipulation task such as picking up a mug admits many valid actions: the mug can be grasped by its handle or its rim and lifted along countless paths. Yet vision-language-action models, Code-as-Policies and human teleoperation each generate a single action whose validity is found only by running it on the robot. We argue for the opposite order: first define all valid actions, then choose one. We introduce LEAP (Lean-as-Policy), in which a language-model agent writes the feasible set of a task as a Lean 4 action family over a shared library of physical laws, separating goal, physics and embodiment constraints from user preferences. An objective selects one member of the set, which is checked against the same specification before the robot moves, using exact interval arithmetic and, optionally, the Lean kernel; the check covers only what the family states. Lean thus serves as a unified representation of actions. We instantiate it in LEAP-Harness, which writes feasible actions in Lean from observations and an instruction, then samples verified joint commands. We validate its effectiveness on RoboDojo, RoboCasa365, and LIBERO-Pro.
Problem
Vision-language-action models, code-as-policies and teleoperation each produce a single robot action whose validity is discovered only by executing it. None of them states the set of valid actions or checks a candidate against it before the robot moves.
Approach
LEAP has a language-model agent write the feasible set of a manipulation task as a Lean 4 action family over a shared library of physical laws. The family separates goal, physics and embodiment constraints from user preferences, and perception supplies interval-valued beliefs. A solver picks a candidate via an objective, and the candidate is verified against the same specification before execution, using exact interval arithmetic and optionally the Lean kernel. LEAP-Harness implements this with tools for observe, compose, solve and execute, and recorded robot episodes are also converted into Lean targets.
Figure 2: LEAP-Harness. Five modules carry out the steps of Sec. 3 ; tabs name the agent tools that invoke them. The solver, verifier, and executor run offline on the same compiled constraints; without an admitted plan, the agent observes more or revises (dashed). Shown on a LIBERO-PRO episode, with Depth Anything 3 (Small) depth. The Lean excerpt is abridged; \mathcal{E} , \mathcal{P} , \mathcal{Figure 4: Picking up a glass cup, empty and with water. (a) On the robot: three operator-set grasps of the empty cup in \mathcal{F} , LEAP’s side grasp of the full cup, and the model acting directly. (b) The family, abridged, over one Feasible.ActionRegion; the two scenes differ only in the mass belief. (c) Under the empty-cup beliefs, \mathcal{F} holds rim, handle, and side grasps. (d) Water doub
Results
LEAP raises the same model from 48.0% to 95.0% on LIBERO-PRO and reaches 73.8% success on RoboDojo and 90.1% on RoboCasa365. On three real-robot tasks it completes 13 of 15 rollouts and judges all 30 recorded trajectories correctly before execution.
Figure 5: Trajectories to judge before execution. Columns show the end of each step. Before a recorded trajectory runs, LEAP and GPT-6 Astra predict whether it succeeds ( Fig. 6 ). Tennis ball: success; baseball: bowl not lifted; golf ball: grasp missed.
Method
Object
Spatial
Goal
LIBERO-10
All
Opus 5.5 (EEF)
56.5
90.0
45.5
0.0
48.0
PyRUA-Lean
100.0
80.0
100.0
68.0
87.0
LEAP, open loop
60.0
82.0
70.0
34.0
61.5
LEAP, one replan
100.0
96.0
100.0
84.0
95.0
LIBERO-PRO success rates (%)
Task
Success Astra
Success LEAP
Judge Astra
Judge LEAP
Tennis ball
3/5
5/5
1/10
10/10
Baseball
0/5
4/5
0/10
10/10
Golf ball
2/5
4/5
1/10
10/10
Real-robot results: success out of 5 rollouts, judge accuracy out of 10 trajectories