Skip to main content
By default the cloud uses the versions your project uses locally. You can override either one.

How versions are chosen

Lean, first match wins:
  1. --lean VERSION on the command line (or PROOFPOD_LEAN, or lean in proofpod.toml).
  2. elan’s prefix on the command itself: pp lake +v4.35.0 build.
  3. The project’s lean-toolchain file.
  4. Outside a project: the toolchain your local lean resolves to.
  5. If none of those exist: the service default (pp envs shows it).
Mathlib, first match wins:
  1. --mathlib REV (or PROOFPOD_MATHLIB, or mathlib in proofpod.toml).
  2. The commit pinned for mathlib in the project’s lake-manifest.json.
  3. If there is no manifest yet: the revision named in the lakefile, if any.
pp status shows what was detected and where it came from:
VERSION accepts 4.36.0, v4.36.0, a release candidate such as v4.37.0-rc1, a dated nightly such as nightly-2026-11-20, or a full elan toolchain name such as leanprover/lean4:v4.36.0. Moving channels (nightly, beta) are rejected because the result would not be reproducible. REV accepts a tag (v4.36.0), a branch (master) or a full commit hash.

Environments

An environment is a Lean toolchain plus, optionally, a complete Mathlib checkout with every .olean already built. Environments are identified by the exact toolchain and the exact Mathlib commit, and they are shared: the first person to need a pair pays the build time, everyone after starts instantly.
If your versions are not listed, the first command you run builds the environment. It takes about five minutes for a Mathlib environment and about a minute for Lean alone, and it is free:

How prebuilt Mathlib reaches your project

Lake expects dependencies under .lake/packages/. Before your command runs, ProofPod compares each package pinned in your lake-manifest.json with what the environment has built. Where the commit matches exactly, the package directory in your cloud workspace becomes a link to the prebuilt copy. Lake then finds a checkout at the right commit with up-to-date build outputs and has nothing to fetch or compile. Mathlib and the packages it depends on (Batteries, Aesop, Qq, ProofWidgets, Plausible, ImportGraph, LeanSearchClient, Cli) are handled this way. Any other dependency is cloned and built by Lake into your workspace the first time, then cached there. This is why:
  • you never need lake exe cache get in the cloud (running it is harmless and reports there is nothing to download);
  • a project that imports all of Mathlib leaves only its own build outputs in its workspace, around 19 MB for a small project;
  • pp lake clean cannot make you rebuild Mathlib.

When versions disagree

A Mathlib commit is built for exactly one Lean version.

Overriding versions

Try a project against another Mathlib

Your files are not modified. In the cloud, ProofPod writes a .lake/package-overrides.json that points Lake at the requested Mathlib and its dependencies, and removes it again when you stop passing --mathlib. Your lake-manifest.json and lean-toolchain stay as they are. To make the change permanent, edit your lakefile and run pp lake update, which updates the manifest and toolchain file on your machine.

Try another Lean

Without a project

Outside a Lake project, pp lean File.lean uploads just the files you name and runs in a scratch workspace. Add --mathlib to make Mathlib importable:

Projects without a manifest

A new project that has never been built has no lake-manifest.json, so there is no exact Mathlib commit to match. Run this once:
It resolves your dependencies in the cloud and writes the manifest back to your machine. Commit it. From then on your builds use the matching prebuilt environment.