Installing the Lean4 proof assistant
Recommended: VS Code Extension
The VS Code extension provides the best experience for working with Lean4:
- Install VS Code: Download from https://code.visualstudio.com/
- Install the Lean4 Extension:
- Open VSCode (recommended: VSCodium instead of VSCode, but they are functionally the same)
- Go to Extensions (
Ctrl+Shift+X/Cmd+Shift+X) - Search for “Lean4”
- Click “Install”
- Follow the setup wizard that appears automatically
- Verify installation: Open a
.leanfile and check that syntax highlighting works
Full (official) installation guide: https://lean-lang.org/lean4/doc/setup.html
Alternative: Online Environment
For quick experimentation without installation:
Lean4 Web: https://live.lean-lang.org/
Note: The online environment is great for trying Lean4, but for the course assignments, we strongly recommend installing locally for the full development experience.