Every TLA+ specification lives inside a module. A module is delimited by a header and a footer:
---- MODULE MySpec ----
( your spec goes here )
========================
The header line starts with four or more dashes, followed by MODULE, the module name, and four or more dashes:
---- MODULE MySpec ----
The module name must match the filename (e.g., MySpec.tla).
The footer is a line of four or more equals signs:
========================
Everything after the footer is ignored.
The EXTENDS keyword imports definitions from other modules. You'll almost always extend at least one standard module:
EXTENDS Naturals, Sequences
Common standard modules:
Inside a module, you can use separator lines (four or more dashes) to visually organize your spec:
----
These have no semantic meaning — they're just for readability.
The spec on the right shows a minimal module structure. Try modifying it and running TLC to see what happens.