Checked, tested and assumed
Why Lema never uses a vague "verified" badge, how kernel receipts, contract selections, static IR guarantees, and releases stay distinct, and what stays with human engineers.
In many developer tools, the word “verified” is stretched to mean anything from “passed a unit test suite” to “checked by a static linter” to “proved in a theorem prover.” When one badge covers all three, an engineer reading a release summary cannot tell what was proved mathematically across all inputs versus what was spot-checked on five test vectors.
Lema avoids bare “verified” claims altogether. Every guarantee in the CLI, store records, and documentation carries one of three explicit evidence labels: checked, tested, or assumed (paired with workflow status labels open, waived, and reviewed for project governance).
One algorithm, three kinds of evidence
To see why keeping these categories apart matters in practice, consider Lema’s ChaCha20Poly1305 authenticated encryption module used by TLS 1.3 and Noise:
checked(by the Lean 4.34.1 kernel): Theorems replayed from canonical objects in the Lean kernel prove that for every valid 32-byte key, 12-byte nonce, additional data, and plaintext of any bounded length, the fixed-width implementation matches the RFC 8439 mathematical specification, decrypts sealed ciphertexts back to the exact plaintext, and returnsnonewhenever a 16-byte authentication tag has been altered.tested(by VM execution and staticLemaIRanalyzers): Runninglema testexecutes the compiled module on the Rust register VM against RFC 8439 and Wycheproof vectors, and the static bytecode analyzer checks the loweredLemaIRto issue aConstantTimereceipt confirming that no secret register controls a branch, slice index, or variable-time primitive.assumed(trusted premises): Neither the kernel theorem nor theLemaIRcheck proves that physical silicon executesUInt32XORs without electromagnetic emissions, that ChaCha20-Poly1305 is computationally unbreakable, or that the Lean kernel, Rust compiler, and OS kernel have zero bugs. Those belong to the trusted base.
| Label | Category | Exact meaning in Lema | How it is established |
|---|---|---|---|
checked | Mathematical proof | Accepted by source-free kernel replay (addDeclCore) in the pinned Lean 4.34.1 kernel within the store’s axiom policy. | Established on store admission; re-checked from scratch without caches by lema reverify. |
tested | Runtime & static engineering checks | Observed on concrete inputs, hosts, or compiled LemaIR closures (VM test runs, oracle comparisons, static IR receipts, loopback interop). | Established by lema test, lema release, and workspace test suites. Never called a proof. |
assumed | Trusted premise | Relied upon as an explicit theorem hypothesis (DhCommutes, Fermat, CrashIntegrity) or part of the trusted computing base. | Stated explicitly in theorem types or listed in The trusted base. |
Four distinct evidence records in a store
Inside a Lema store, those categories map onto four separate immutable record kinds that never blur into one another:
1. Kernel acceptance receipts (checked)
Whenever a definition or theorem passes source-free kernel replay (How the store accepts code), the store writes an accepted receipt recording the exact Lean 4.34.1 checker identity, host profile, and audited axiom footprint:
Sample kernel acceptance receipt
- Declaration
- Lema.Std.ChaCha20Poly1305.aead_roundtrip_checked
- Checker
- Lean 4.34.1 (5045d0056413 · lema.replay/v4)
- Axiom footprint
- propext, Quot.sound
- Store ceiling
- propext, Quot.sound, Classical.choice
On a def or contract, an accepted receipt means the declaration is well-typed and terminating; on a theorem, it means the proof term proves its statement proposition under its stated hypotheses.
2. Contract selections (open, checked, waived)
Under Decision 0051, selecting a contract for an implementation (select LawfulEscrowStorage(MemoryStorage)) tracks obligation status explicitly (Contracts, selections and proofs):
open: The closed target proposition is well-typed over the pinned implementation IDs, with zero or partial per-law witnesses recorded so far.checked: An accepted theorem proves the entire contract over those exact implementation IDs.waived: An authorized project actor closed the workflow obligation with a recorded reason. A waiver is a governance decision, never proof evidence, andlema diffand inspection pages always displaywaiveddistinctly fromchecked.
3. Static LemaIR guarantee receipts (tested)
Static bytecode analyses (ConstantTime, SecretFlow.<role>, NoBigIntPrimitives, NoBoxOrCtorInCycles, NoCopySliceCall, FlatMessage, ExclusiveActorLoop) inspect compiled LemaIR (The compiler and VM). Lema labels them tested, never checked, because the analyzers are Rust engineering checks over LemaIR rather than theorems proved inside Lean or physical hardware timing measurements.
4. Release records (tested gate over a checked closure)
Running lema release verifies the full chain before producing a deployable artifact: every object in the dependency closure holds a valid accepted receipt within axiom policy, recompiling those objects matches the artifact’s LemaIR digest byte for byte, and any closure touching secret holds passing ConstantTime and SecretFlow receipts.
Lema v0.3.2 · Updated 29 October 2026 · Version and compatibility