Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Lean Verification

This document summarizes the current Lean implementation surface and the proof APIs consumed by runtime gates.

Source of Truth

Verification scale and proof-hole status are tracked by generated reports.

SourcePurpose
Lean Verification Code Mapgenerated library map with file counts and module inventory
just escapemachine check for axiom and sorry budget

Current scale and proof-hole status are tracked in these generated artifacts.

Library Layers

The Lean tree is organized as a layered stack.

LayerMain content
SessionTypesglobal and local syntax, de Bruijn forms, conversions
SessionCoTypescoinductive equality, bisimulation, decidable regular checks
Choreographyprojection, blindness, erasure, harmony
Semanticssmall-step semantics, determinism, deadlock surfaces
Protocolcoherence, typing, monitoring, deployment composition
RuntimeVM model, semantics, runtime adapters, theorem-pack APIs
DistributedFLP, CAP, quorum, synchrony, Nakamoto, reconfiguration, safety families
Classicaltransported queueing and stochastic theorem families
IrisExtractionruntime proof extraction and ghost logic bridge

VM Model and Runtime Surfaces

The VM model is centered under lean/Runtime/VM.

SurfaceLocation
Core instruction and state modelRuntime/VM/Model/*
Executable semanticsRuntime/VM/Semantics/*
Runtime adapters and monitorRuntime/VM/Runtime/*
Composition and domain instancesRuntime/VM/Composition.lean

The effect model uses the current split EffectRuntime and EffectSpec. Monitor typing lives in Runtime/VM/Runtime/Monitor.lean.

Proof Packs and Admission APIs

Runtime proof inventory is exported through theorem-pack modules.

SurfacePurpose
Runtime/Proofs/TheoremPack/API.leanpublic theorem-pack facade and runtime gate aliases
Runtime/Proofs/TheoremPack/Inventory.leancapability inventory keys and determinism extension
Runtime/Proofs/TheoremPack/ReleaseConformance.leanrelease gate and replay conformance report
Runtime/Adequacy/EnvelopeCore/AdmissionLogic.leanadmission soundness, completeness, diagnostics vocabulary

These APIs are consumed by Rust runtime gates and composition admission checks.

Premise-Scoped Interfaces

Some surfaces are intentionally premise-scoped.

Interface classExample
Threaded refinement beyond n = 1ThreadedRoundRefinementPremises
Envelope admission and profile diagnosticsadmission protocol structures in AdmissionLogic.lean
Mixed-profile runtime gatestheorem-pack and runtime-contract capability checks

These are explicit interfaces and not unconditional global theorems.

Distributed and Classical Reach

Distributed and classical families are part of the active theorem-pack space. They are not side notes.

Distributed families include FLP, CAP, quorum geometry, partial synchrony, responsiveness, Nakamoto security, reconfiguration, atomic broadcast, accountable safety, failure detectors, data availability, coordination, CRDT, Byzantine safety, consensus envelope, and failure envelope.

Classical transport families include Foster-Lyapunov, MaxWeight, large deviations, mean-field, heavy-traffic, mixing, fluid limits, concentration bounds, Little’s law, and functional CLT.

Runtime Alignment Lanes

Lean and Rust alignment is checked by automation lanes.

LaneCommand
Runtime capability gatesjust check-capability-gates
Release conformancejust check-release-conformance
VM parity suitejust check-parity --suite
Type and schema parityjust check-parity --types
Conformance-specific parity lanejust check-parity --conformance
Consolidated parity lanejust check-parity --all