Interaction specifications and transcripts #
A Spec is a tree that describes the shape of a sequential interaction:
what types of moves can be exchanged at each round, and how later rounds
may depend on earlier moves. A Transcript records one complete play
through a Spec — a concrete move at every node from root to leaf.
On its own, a Spec says nothing about who makes each move or how
moves are computed. Those concerns are separated into companion modules:
Node— realized node contexts and telescope-style node schemasDecoration— concrete per-node metadata on a fixed protocol treeSyntaxOver/InteractionOver— generic local syntax and local execution laws over realized node contextsShapeOver— the functorial refinement of syntax, used when recursive continuations admit a generic mapStrategy— one-player strategies with monadic effectsAppend,Replicate,Chain— sequential composition and iteration
This is the foundation of the entire Interaction layer, which replaces
the old flat ProtocolSpec n model with a dependent-type-native design.
The key advantage is that later rounds can depend on earlier moves, which
is mathematically forced in protocols like sumcheck and FRI.
Module map #
Basic/— spec, node contexts, decoration, generic shapes, strategy, composition (this layer)Concurrent/— structural concurrent source syntax, frontiers and residuals, typed interfaces and directed open boundaries, operations-first open-composition theory and its first final-tagless free lawful model, structural frontier traces and true-concurrency refinements, dynamicProcess/Machine/Treefrontends, generic process executions and policies, finite prefixes and infinite runs, observation extraction, refinement, bisimulation, packaged equivalence notions, fairness, liveness, per-party observation profiles, scheduler/control ownership, and current local frontier viewsTwoParty/— sender/receiver roles,withRoles,CounterpartReduction.lean— prover, verifier, reductionOracle/— oracle decoration, path-dependent oracle accessSecurity.lean/OracleSecurity.lean— security definitionsBoundary/— same-transcript interface adaptationMultiparty/— native multiparty local views and per-party profiles, including broadcast and directed communication models
References #
- Hancock–Setzer (2000), recursion over interaction interfaces
- Escardó–Oliva (2023, TCS 974), games as type trees
- McBride (2010); Dagand–McBride (2014), displayed algebras / ornaments
A Spec describes the shape of a sequential interaction as a tree.
Each internal node specifies a move space Moves, and the rest of the
protocol may depend on the chosen move x : Moves.
On its own, a Spec is intentionally minimal:
it records only the branching structure of the interaction.
It does not say
- who controls a node,
- what local data is attached to that node,
- what kind of participant object lives there, or
- how a collection of participants executes the node.
Those additional layers are supplied separately by:
Spec.Node.Context/Spec.Node.Schema, for node-local semantic contexts and their telescope-style descriptions;Spec.Decoration, for concrete nodewise metadata;Spec.SyntaxOver, for the most general local participant syntax over realized node contexts;Spec.ShapeOver, for the functorial refinement of such syntax;Spec.InteractionOver, for local execution laws over such syntax.
- done : Spec
Terminal node: the interaction is over.
- node
(Moves : Type u)
(rest : Moves → Spec)
: Spec
A round of interaction: a value of type
Movesis exchanged, then the protocol continues withrest xdepending on the chosen movex.