lean-repl

Evaluate Lean 4 code via REPL with auto-imported libraries.

Updated Mar 16, 2026
One-click install
npx skills add https://github.com/my04337/shapez2-in-lean --skill lean-repl
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lean-repl
Source: https://github.com/my04337/shapez2-in-lean/tree/main/.github/skills/lean-repl
Command: npx skills add https://github.com/my04337/shapez2-in-lean --skill lean-repl

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Interactively evaluate Lean 4 snippets, tactics, and counterexamples by sending them to a REPL with auto-imports of S2IL, Mathlib.Tactic, Plausible, and Duper, enabling quick experimentation.

Core Features & Use Cases

  • Interactive evaluation of Lean 4 snippets and tactics in a live REPL.
  • Batch evaluation via JSONL with persistent or import-first sessions.
  • Transparent workflow: auto-imports, persistent environment across commands, and easy proof-state inspection.

Quick Start

Start a persistent REPL session and feed it a JSONL file of Lean commands to evaluate snippets instantly.

Frequently Asked Questions about lean-repl

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I interactively evaluate Lean 4 snippets and test tactics?

To interactively evaluate Lean 4 snippets, you can send commands to a REPL that auto-imports S2IL, Mathlib.Tactic, Plausible, and Duper, providing per-command environment state and proof-state transitions.

Can I run batch evaluations for Lean 4 code using JSONL?

Yes, you can run batch evaluations for Lean 4 code via JSONL files. The tool supports both persistent sessions and import-first no-pickle modes to process sequential commands.

Do I need to manually import Mathlib.Tactic and Plausible to check counterexamples?

No, you do not need to manually import Mathlib.Tactic and Plausible to check counterexamples. The REPL toolchain auto-imports these libraries to enable quick experimentation.

What is the best way to inspect proof-state transitions in Lean 4?

The best way to inspect proof-state transitions in Lean 4 is by using a persistent REPL session. It maintains the environment across commands and surfaces results for each tactic step.

Why does my Lean 4 REPL environment reset between tactic explorations?

Your Lean 4 REPL environment resets between tactic explorations if you are not using a persistent session. Switching to persistent mode maintains the environment across sequential commands.

Does the Lean 4 REPL support the S2IL library for interactive evaluation?

Yes, the Lean 4 REPL supports the S2IL library for interactive evaluation. The toolchain automatically imports S2IL alongside Mathlib.Tactic, Plausible, and Duper upon initialization.