Ready when you are
Two ways to try Lean.
The lessons are ready in this browser. Choose where you want to experiment with the code.
What you will see
Wherever you run Lean, the screen has two halves: your code, and a panel that shows the goal.
Swipe sideways to see the whole window.
- The code pane. Type your claim and tactics here.
- The cursor. Click on a line to ask “what is the goal here?”
- The infoview. Shows the goal at the cursor, after
⊢. This is the same goal state the lessons show in “Step by step”. - Errors. A wavy red line marks a problem. Hover over it or read the infoview for the message.
The quickest first step
In your browser.
Use any lesson’s Try it live button. It opens the official Lean editor with that example already loaded.
- Open a lesson.
- Choose Try it live.
- Wait for the Lean server to connect, then change one line.
- Read the goal or output before changing more.
The editor is an external service. It runs Lean on its own server and needs an internet connection. If it cannot connect, you can keep reading here and copy the code for later.
For bigger adventures
On your computer.
The official setup uses VS Code and the Lean 4 extension. Follow the current official instructions for your operating system.
- Install VS Code.
- Install the official Lean 4 extension.
- Follow its setup guide.
- Open the course’s lean folder to use its pinned toolchain and Mathlib revision.
The course examples are checked with Lean 4.36.0. Local installation details can change, so the official guide stays the source for those steps.