Docs / Semantics / Composition / LiftRel
Relations lifted through types and effects
import Linglib.Semantics.Composition.LiftRel · namespace Interpreter
A relation between two families of base domains extends to every type: at the truth values it is equivalence, at a function type it relates functions that take related arguments to related values, and at a computation type it is the relation its effect lifts. Each operation of an effect respects the lifted relations, so every mode does, and the relation is a logical relation between the two structures of the effect-driven grammar: related lexicons give every derivation related values.
Main definitions
Interpreter.Ty.LiftRel,Interpreter.Eff.LiftRel: a relation between base domains, at a type and through an effect.Interpreter.Eff.rel_mapand its siblings: each operation of an effect respects the relations.
TODO
The basic lemma of logical relations is the statement that terms stay inside a substructure, at the product of two structures. The many-sorted layer has neither products nor substructures.
References
- Bumford & Charlow 2026, Effect-Driven Interpretation: Functors for Natural Language Composition formalized
Declarations
A relation between results through an effect, given a relation between its data: alternatives matched on each side, readers that agree at related data, stored pairs related in both parts, continuations that agree at related continuations, and partial values defined together and then related.
The definition is too large to print here; read it in the source.
Built from
Used by Ty.LiftRel, Eff.LiftRel
A relation between two families of base domains, at a type.
- Ty.LiftRel r Ty.t = Iff
- Ty.LiftRel r (Ty.base b) = r b
- Ty.LiftRel r (a_2.fn b) = Relator.LiftFun (Ty.LiftRel r a_2) (Ty.LiftRel r b)
- Ty.LiftRel r (Ty.comp f a_2) = f.RelWith (Eff.DatumRel r f) (Ty.LiftRel r a_2)
Built from ,
Used by Eff.DatumRel, Eff.rel_lower, Mode.rel_eval, Application.rel_eval, PredicateModification.rel_eval, EventIdentification.rel_eval, application.isLogicalRel, effectGrammar.isLogicalRel
A relation between two families of base domains, at the datum of an effect.
- Eff.DatumRel r (Eff.R i) = Ty.LiftRel r i
- Eff.DatumRel r (Eff.W i) = Ty.LiftRel r i
- Eff.DatumRel r (Eff.C i) = Ty.LiftRel r i
- Eff.DatumRel r Eff.S = fun (x : Eff.Datum D Eff.S) (x_1 : Eff.Datum D' Eff.S) => True
- Eff.DatumRel r Eff.M = fun (x : Eff.Datum D Eff.M) (x_1 : Eff.Datum D' Eff.M) => True
Built from ,
Used by Ty.LiftRel, Eff.LiftRel
A relation between results, through an effect.
- Eff.LiftRel r f R = f.RelWith (Eff.DatumRel r f) R
Built from ,
Used by Eff.rel_map, Eff.rel_pure, Eff.rel_seq, Eff.rel_join, Eff.rel_counit, Eff.rel_eject, Eff.rel_lower
Built from
Built from ,
Where the rules of a grammar respect a relation between base domains, every mode over them does.
Built from
Built from
Built from
Built from
Functional application on two families of domains is logically related by any relation between the base domains.
Built from
A logical relation between two structures for a grammar, lifted from a relation between base domains, is one between the two structures of the effect-driven grammar over it, so related lexicons give every derivation related values.
Built from