Docs / Semantics / Composition / Extension

Extending a system of rules

import Linglib.Semantics.Composition.Extension

A system of rules is extended by a map of languages: the rules of one are among the rules of another, which may have more. Where an interpreter of the larger system admits at a node what an interpreter of the smaller admits there, and a larger lexicon has the items of a smaller, every derivation of the smaller is one of the larger, and in a structure that expands the smaller one it has the same value. A claim that a structure has a reading therefore holds in every extension. A claim that it has no other reading, or none, does not, and those are the claims an extension tests.

Main definitions

  • Interpreter.Extends: an interpreter admits at each node the images of the rules another admits there.

Declarations

An interpreter extends another along a map of languages when it admits at each node the images of the rules the other admits there.

structure Interpreter.ExtendsL36–44
{T : Type u} {L L' : ManySorted.Language T} {N : Type v} (J : Interpreter L' N) (I : Interpreter L N) (φ : L.LHom L') :
  • unary {n : N} {a : T} {r : (b : T) × L.Unary a b} : r ∈ I.unary n a → ⟨r.fst, φ.onFunction r.snd⟩ ∈ J.unary n a

    The unary rules.

  • binary {n : N} {l r : T} {m : (u : T) × L.Binary l r u} : m ∈ I.binary n l r → ⟨m.fst, φ.onFunction m.snd⟩ ∈ J.binary n l r

    The binary rules.

Used by Interpreter.mem_derivs_of_le, Interpreter.mem_values_of_le, Interpreter.typeDriven_sum_extends, Interpreter.Extends.withAbstraction, PhraseStructure.Tree.mem_values_of_le

A derivation survives an extension of the rules and of the lexicon: its image along the map is a derivation the extending interpreter finds.

theorem Interpreter.mem_derivs_of_leL46–63
{T : Type u} {L L' : ManySorted.Language T} {N : Type v} {Lx : Type w} {W : T → Type w} {I : Interpreter L N} {J : Interpreter L' N} {φ : L.LHom L'} {lex lex' : Lx → List ((a : T) × W a)} (h : J.Extends I φ) (hl : ∀ (x : Lx), lex x ⊆ lex' x) {s : Skeleton N Lx} {d : (a : T) × L.Deriv W a} :
d ∈ I.derivs lex s → ⟨d.fst, φ.onTerm d.snd⟩ ∈ J.derivs lex' s

Built from

A value survives an extension of the rules and of the lexicon, in a structure that expands the one it was computed in.

theorem Interpreter.mem_values_of_leL65–73
{T : Type u} {L L' : ManySorted.Language T} {N : Type v} {Lx : Type w} {W : T → Type w} {D : T → Type x} {I : Interpreter L N} {J : Interpreter L' N} {φ : L.LHom L'} {lex lex' : Lx → List ((a : T) × W a)} {M : L.Structure D} {M' : L'.Structure D} (h : J.Extends I φ) (hM : φ.IsExpansionOn M M') (hl : ∀ (x : Lx), lex x ⊆ lex' x) (ρ : {a : T} → W a → D a) {s : Skeleton N Lx} {d : (a : T) × D a} (hd : d ∈ I.values M (fun {a : T} => ρ) lex s) :
d ∈ J.values M' (fun {a : T} => ρ) lex' s

Built from

L85–92
L125–135
L137–148