Documentation

ComplexityDocs.Verification

Proving correctness #

Start with the mathematical result you want, then connect it to the implementation. The correctness interface includes safety and termination, but asks for no time budget. A separate complexity proof can reuse the same invariants.

Source-level proofs #

Start with the proof view that matches the program. A total mathematical model supports ordinary Lean equations; mutation uses contracts about mathematical contents and the actual endpoint heaps. Both views describe the same declared implementation.

Direct word-RAM proofs #

The direct RAM language remains available for backend work and explicitly low-level implementations. These chapters use its word arithmetic, representations and source contracts: