Docs / Semantics / Composition / Interpret

Type-driven interpretation of a tree

import Linglib.Semantics.Composition.Interpret

Heim and Kratzer's interpretation of a tree, for any language of rules: at each node the rules that apply to the types of its daughters, abstraction over its index at a binder, and at a trace the value the assignment gives its index. A lexicon says what typed items each word may be, and the meanings of a tree are functions of an assignment. The meanings of a node come from those of its daughters, and a binder's are the functions of the value its index is given.

Main definitions

References

Declarations

L37–43
L47–52
L54–58

The derivations of a tree over a language of rules with abstraction over indices typed by Γ: at each node the rules that apply to the types of its daughters, and at a binder abstraction over its index.

def PhraseStructure.Tree.deriveL66–72
{C Lx B : Type} {W : Interpreter.Ty B → Type} (L : ManySorted.Language (Interpreter.Ty B)) [L.LocallyFinite] (Γ : ℕ → Interpreter.Ty B) (lex : Lx → List ((a : Interpreter.Ty B) × W a)) (t : Tree C Lx) :
List ((a : Interpreter.Ty B) × (L.withAbstraction Γ).Deriv (Interpreter.Leaf W Γ) a)

Built from ,

Used by PhraseStructure.Tree.interpret_eq_map, PhraseStructure.Tree.derive_terminal, PhraseStructure.Tree.derive_trace, PhraseStructure.Tree.derive_bind, PhraseStructure.Tree.derive_phrase_binary, PhraseStructure.Tree.derive_phrase_unary

Used in Barker2027

The meanings of a tree over a language of rules, at domains D, with abstraction over indices typed by Γ, relative to an assignment of values to the indices: the values of its derivations, an item's value being what ρ gives it.

def PhraseStructure.Tree.interpretL74–82
{C Lx B : Type} {W : Interpreter.Ty B → Type} (L : ManySorted.Language (Interpreter.Ty B)) (D : B → Type) [L.LocallyFinite] [M : L.Structure (Interpreter.Ty.Dom D)] (Γ : ℕ → Interpreter.Ty B) (ρ : {a : Interpreter.Ty B} → W a → ((n : ℕ) → Interpreter.Ty.Dom D (Γ n)) → Interpreter.Ty.Dom D a) (lex : Lx → List ((a : Interpreter.Ty B) × W a)) (t : Tree C Lx) :
List ((a : Interpreter.Ty B) × (((n : ℕ) → Interpreter.Ty.Dom D (Γ n)) → Interpreter.Ty.Dom D a))

The definition is too large to print here; read it in the source.

Used by PhraseStructure.Tree.interpret_eq_map, PhraseStructure.Tree.interpret_terminal, PhraseStructure.Tree.interpret_trace, PhraseStructure.Tree.interpret_bind, PhraseStructure.Tree.interpret_phrase_binary, PhraseStructure.Tree.interpret_phrase_unary

Used in Semantics/Composition/Extension, Barker2027

L90–93
L95–97
L103–106
L108–114
L120–123
L125–128

A binder's meanings are the functions of the value its index is given.

@[simp] theorem PhraseStructure.Tree.interpret_bindL130–135
{C Lx B : Type} {D : B → Type} {W : Interpreter.Ty B → Type} (L : ManySorted.Language (Interpreter.Ty B)) [L.LocallyFinite] [M : L.Structure (Interpreter.Ty.Dom D)] (Γ : ℕ → Interpreter.Ty B) (ρ : {a : Interpreter.Ty B} → W a → ((n : ℕ) → Interpreter.Ty.Dom D (Γ n)) → Interpreter.Ty.Dom D a) (lex : Lx → List ((a : Interpreter.Ty B) × W a)) (n : ℕ) (c : C) (t : Tree C Lx) :
interpret L D Γ (fun {a : Interpreter.Ty B} => ρ) lex (bind n c t) = List.map (fun (x : (a : Interpreter.Ty B) × (((n : ℕ) → Interpreter.Ty.Dom D (Γ n)) → Interpreter.Ty.Dom D a)) => match x with | ⟨a, x⟩ => ⟨(Γ n).fn a, fun (g : (n : ℕ) → Interpreter.Ty.Dom D (Γ n)) (v : Interpreter.Ty.Dom D (Γ n)) => x (Function.update g n v)⟩) (interpret L D Γ (fun {a : Interpreter.Ty B} => ρ) lex t)

Built from

The meanings of a binary node are those of the rules that apply to the types of its daughters, at the meanings of its daughters.

@[simp] theorem PhraseStructure.Tree.interpret_phrase_binaryL137–146
{C Lx B : Type} {D : B → Type} {W : Interpreter.Ty B → Type} (L : ManySorted.Language (Interpreter.Ty B)) [L.LocallyFinite] [M : L.Structure (Interpreter.Ty.Dom D)] (Γ : ℕ → Interpreter.Ty B) (ρ : {a : Interpreter.Ty B} → W a → ((n : ℕ) → Interpreter.Ty.Dom D (Γ n)) → Interpreter.Ty.Dom D a) (lex : Lx → List ((a : Interpreter.Ty B) × W a)) (c : C) (k : PhraseKind) (t₁ t₂ : Tree C Lx) :
interpret L D Γ (fun {a : Interpreter.Ty B} => ρ) lex (phrase c k [t₁, t₂]) = List.flatMap (fun (x : (a : Interpreter.Ty B) × (((n : ℕ) → Interpreter.Ty.Dom D (Γ n)) → Interpreter.Ty.Dom D a)) => match x with | ⟨a, x⟩ => List.flatMap (fun (x_1 : (a : Interpreter.Ty B) × (((n : ℕ) → Interpreter.Ty.Dom D (Γ n)) → Interpreter.Ty.Dom D a)) => match x_1 with | ⟨b, y⟩ => List.map (fun (x_2 : (u : Interpreter.Ty B) × L.Binary a b u) => match x_2 with | ⟨u, f⟩ => ⟨u, fun (g : (n : ℕ) → Interpreter.Ty.Dom D (Γ n)) => ManySorted.Language.Structure.funMap f (x g, y g)⟩) (ManySorted.Language.LocallyFinite.binaryRules a b)) (interpret L D Γ (fun {a : Interpreter.Ty B} => ρ) lex t₂)) (interpret L D Γ (fun {a : Interpreter.Ty B} => ρ) lex t₁)

Built from

L148–151