The quickstart uses a local
file:// Hub built from this repository, so it needs no account and no network access beyond the first Mathlib download. To use the hosted Spec Hub instead, see Installation.Prerequisites
- Linux or macOS with Python 3.12 and uv
- elan (the Lean 4 toolchain manager);
lakemust be on yourPATH, or in~/.elan/bin - About 8 GB of free disk space for Mathlib’s build cache
1
Get the repository and its dependencies
2
Build the Lean 4 spec library
lake exe cache get downloads prebuilt Mathlib files instead of compiling Mathlib.3
Publish the specs to a local Hub
$WORK/hub.4
Point the CLI at the local Hub
THEFORMALERA_HUB overrides the hub in theformalera.toml. THEFORMALERA_MATHLIB lets each spec workspace reuse the Mathlib build from step 2.5
Pull and lock the specs
6
Verify
verify usable as a CI gate.7
Read the counterexample
What just happened
theformaleraread the@tfe.implements(...)annotation on each kernel. Each annotation names a node of the Qwen3.8-27B compute graph, such aslayers[*].input_norm.- It lowered each kernel, once per autotune config, to Triton IR, on the CPU.
- The engine searched for counterexamples. Where there was none, it wrote a Lean 4 proof that the kernel equals the node’s Op Spec for every allowed shape, and the Lean kernel checked that proof.
- The proofs are in
.theformalera/proofs/. They are ordinary Lean 4 files; see Re-check proofs.
Next steps
Fix it and finish the release
Continue with repro, the fix, waivers, CI and sign-off.
Annotate your own kernels
The
@tfe.implements reference, with worked examples.