Classical Programme / Curriculum / Specifying Systems
Module 5

Specifying
Systems.

The transition from mathematics to programming. Leslie Lamport's TLA+ as the bridge from formal reasoning to formal governance. Where axioms become code and specification becomes enforcement.

01

The bridge

Everything before this module was mathematics. Everything after is software. This module is the bridge. Lamport's Specifying Systems (2002) showed that the same axiomatic method Euclid used to derive geometry can specify the correctness of concurrent systems. TLA+ doesn't test software — it specifies what correct behavior means, then exhaustively verifies that the specification holds.

Specification ≠ Implementation — The specification says what. The code says how.
02

From test-and-hope to specify-and-prove

Testing checks examples. Specification checks all possibilities. A test suite might verify that your system handles 10,000 cases correctly. A TLA+ specification verifies that every reachable state satisfies the invariant. This is the difference between confidence and certainty. For autonomous AI agents — where a single unchecked state could violate safety constraints — confidence is not sufficient.

03

TLA+ to SwiftVector

SwiftVector inherits TLA+'s vocabulary directly. The mapping is not analogy — it is structural correspondence. What TLA+ calls a State, SwiftVector calls SessionState. What TLA+ calls an Invariant, SwiftVector calls Constraint.evaluate(). The jump from specification language to governance kernel is shorter than it appears.

The mapping

TLA+ concepts in SwiftVector.

TLA+ Concept
SwiftVector
What it means
State
SessionState
The accumulated history of the system at any point
Action
Action
A proposed state transition that must be evaluated
Invariant
Constraint.evaluate()
A property that must hold in every reachable state
Specification
Codex
The complete set of rules composing the system’s behavior
Model Checking
Determinism tests
Exhaustive verification that the specification holds

Lamport's Specifying Systems: The TLA+ Language and Tools for Hardware and Software Engineers is available as a free PDF from his website. 364 pages. 18 chapters. The intellectual foundation for why deterministic governance is not optional.

— Required reading
Status

This module is planned.

Specifying Systems is the pivotal module — where mathematics becomes governance. Interactive TLA+ specification exercises and model-checking walkthroughs are being designed.

Continue the sequence
Previous Module

← Astronomy of Inference

Inference under radical constraint. The capstone of the Quadrivium.

Next Module

SwiftVector →

The destination. Domain-agnostic governance kernel. Formal methods applied to autonomous AI agents.