Tagless-final free model of open composition #
This module defines Interp, the final (tagless-final / Church-encoded) free
model of OpenTheory.
An Interp Atom Δ stores no syntax tree. Instead it is determined entirely
by its universal interpretation function: for every lawful target OpenTheory
and every atom interpretation, it produces an object of boundary Δ in the
target.
This representation is convenient for proving universal properties because its lawfulness reduces immediately to the target theory's laws.
See OpenSyntax.Expr for the quotiented initial model that supports
pattern matching and inspection.
Interp Atom Δ is the tagless-final free open-system expression of boundary
Δ generated by primitive atoms Atom.
An element stores its universal elimination principle: for every lawful target
open theory T and every atom interpretation, it produces an object of
boundary Δ in T.
- run (T : OpenTheory) : T.CompactClosed → ({Δ : PortBoundary} → Atom Δ → T.Obj Δ) → T.Obj Δ
Interpret the free expression in an arbitrary compact closed target theory.
Instances For
Interpret a tagless-final expression in a compact closed target theory.
This is just the run field restated as a named eliminator.
Instances For
Two tagless-final expressions are equal when they have the same interpretation in every lawful target theory.
Inject a primitive open component into the tagless-final syntax.
Instances For
Adapt the exposed boundary of a tagless-final expression.
Instances For
Place two tagless-final expressions side by side.
Instances For
Connect one shared boundary between two tagless-final expressions.
Instances For
Close a tagless-final expression against a matching context.
Instances For
The monoidal unit (closed system with no boundary).
Instances For
The identity wire (coevaluation) on boundary Γ.
Instances For
The free lawful OpenTheory generated by tagless-final expressions over Atom.