What is a core?
A physical core, which is two vCPUs on most clouds. --cpu 4 lets a command use up to four physical cores.
Pricing
One plan. No seats, no monthly fee, no charge for idle sandboxes. $5 of credit is added to every account each month.
The meter runs only while your command runs. Syncing files, starting the sandbox, and the idle minutes it stays warm afterwards are on us.
| What | How it is measured | What it means for you |
|---|---|---|
| CPU | Core-seconds of CPU time consumed by your command, sampled from the sandbox. | --cpu 16 is a ceiling, not a purchase. A build that uses 16 cores for 20 seconds and one core for 3 minutes is billed 500 core-seconds, not 16 cores for the whole time. |
| Memory | GiB-seconds of memory your command allocates (anonymous memory), sampled ten times a second. | Library files that Lean memory-maps, including all of prebuilt Mathlib, are not allocations and are not billed. --memory caps allocated memory. |
| Minimum | 0.125 cores and 0.125 GiB for each second a command runs. | A command that mostly waits still costs something: about $0.02 per hour. |
| Storage | Your synced sources and build outputs in each workspace. | Free for now. Prebuilt environments are never counted against you. |
Measured on the live service with Lean 4.36 and Mathlib v4.36.0, on a small project that imports all of Mathlib, in a warm sandbox with default limits (4 cores, 16 GiB). Your numbers will vary with the proofs.
| Command | Wall time | Core-seconds | GiB-seconds | Cost |
|---|---|---|---|---|
| Check one file that imports all of Mathlib pp lake env lean Demo/Basic.lean | 7 s | 6.0 | 0.8 | $0.0002 |
| Build with nothing to rebuild pp lake build | 10 s | 28 | 1.3 | $0.0011 |
| Rebuild after editing one file pp lake build | 26 s | 54 | 5.7 | $0.0021 |
| One hour of a build that keeps 8 cores and 20 GiB busy pp --cpu 8 --memory 32G lake build | 1 h | 28,800 | 72,000 | $1.53 |
With the monthly $5 of credit you can check that single file more than 20,000 times, or run the one-file rebuild about 2,300 times, before paying anything.
A physical core, which is two vCPUs on most clouds. --cpu 4 lets a command use up to four physical cores.
Lean does not copy a compiled library into memory, it maps the .olean files. Those pages are read-only and the same for everyone on the same Mathlib version, so we do not meter them at all.
No. --cpu and --memory are ceilings that protect you from a runaway command. You are billed for what was used underneath them, so raise them freely.
New commands are refused with a clear message, and a running command is stopped when its cost reaches your remaining credit. Nothing is deleted: workspaces and caches stay where they are.
No. If you are the first person to use a particular Lean or Mathlib version, building its environment takes a few minutes and is free. After that it starts instantly for everyone.
Up to 32 cores and 128 GiB per command, a 24 hour maximum run time, and 8 commands running at once per account. Ask if you need more.