Reference
Exact specifications for Lema's contract syntax, object schemas, three-layer capability boundary, standard library, CLI subcommands, and server methods.
Reference pages document the exact schemas, rules, type signatures, wire frames, and flags implemented in the repository. When you want to learn how the pieces fit together conceptually, start with Explanation; when you want step-by-step instructions for a workflow, see the How-to guides.
The reference pages are organized into three groups:
- Language, objects, and libraries cover the Pythonic contract syntax and Lean view (
def, law, contract, and select), the authoring rules for Language and authoring rules (.lema and restricted .lean), the nine canonical Objects and identity schemas (lema.core/v4), The program core (Prog, Contract, Safe, Impl, and concurrency modules at Layer -1), Layer 0 descriptors and the six capabilities (Domain, Region, Ring, and the LC\x02 Layer 1 capability frames), the fileless Standard library and protocol stack (audit/inputs/), and the Glossary.
- Store, governance, and execution formats cover Codebase records (aliases, bundles,
lema.authoring/v2, lema.snapshot/v2, lema.revision/v1, lema.policy/v1, lema.contract/v1, lema.change-report/v1, lema.merge/v1, lema.review/v1, lema.checkpoint/v1, and lema.release/v1), Execution records (lema.exec-source/v2, lema.exec/v2, and VM static guarantees), Axiom policy and the fixed floor, and The trusted base.
- CLI, server, and runtime reference cover every subcommand and flag of CLI reference (including
lema.project/v1 and semantic version control commands), the JSON-over-socket protocol in Codebase API, the sandbox and capability settings in Runtime configuration (lema.runtime-linux/v2, lema.cap-config/v1, and lema.secret-bundle/v1), and the toolchain pins and environment variables in Requirements.
- Pythonic contract syntax Reference for the Pythonic .lema contract surface and the restricted .lean implementation and proof language over canonical store objects, including scope boundaries, grammar, structural rederive, and display-bound review digests.
- Authoring Rules Rules and pipeline for authoring restricted Lean (.lean) and Pythonic contract (.lema) modules in Lema v0.2.
- Objects Wire-format specification for lema.core/v4 canonical JSON objects, expression DAGs, bounds, realizations, and receipts.
- Program core The module Core, in namespace Lema. Programs, contracts, traces and implementations, the two tiers of replacement, refinement, contract status, how programs run and related work.
- Layer 0 descriptors and the six capabilities The three-layer capability architecture from Layer -1 programs through Layer 0 memory descriptors and rings to the six Layer 1 host capability tags.
- Standard library and protocol stack Complete module reference for the Lema standard library (audit/inputs/), including Core, concurrency, data structures, numeric types, cryptography, BlockStore, TLS 1.3, Noise, HTTP/1.1, S3, Web, and LemaIR semantics.
- Glossary Definitions of core terms across Lema's store, contract syntax, verification pipeline, capability layers, and register VM.
- Records Schema reference for all governance, versioning, contract selection, checkpoint, and execution records in a Lema store.
- Execution Manifest Reference for lema.exec-source/v2, lema.exec/v2, VM resource limits, and static VM guarantee profiles.
- CLI Reference for the lema command-line interface, project workflow commands, semantic version control, and operator subcommands.
- Server API Reference for the Lema Unix domain socket JSON protocol, concurrency model, and all method groups.
- Runtime configuration Schema and operational reference for lema.runtime-linux/v2, lema.cap-config/v1, and lema.secret-bundle/v1.
- Release downloads Download the CLI and matching VM, inspect their metadata, or choose the public installer and Homebrew tap.
- Requirements Qualified platforms, external tools, resource controls, and configuration paths for the public Lema binaries.
- Axiom Policy Reference for Lema's fixed axiom floor, configurable store axiom policies, and five-step axiom footprint auditing.
- Trusted Base Reference for what Lema v0.2 proves in the Lean kernel (Checked), what it validates by testing and static analysis (Tested), and what it assumes (Assumed).