Documentation

Linglib.Syntax.ConstructionGrammar.Inheritance

Constructional inheritance #

Computational content for the two modes of constructional inheritance distinguished by [Gol95] §3.3.1 (the InheritanceMode enum in ConstructionGrammar.Basic), grounded in the flat feature-slot order: in the complete mode representations must strictly unify (Compat, PartialUnify.unify — the regime [KF99] built their formal CxG on and [Sag12]'s SBCG inherits from HPSG), while in the default mode the inheriting construction overrides its parents ([Die23] Table 2; the default-unification tradition of [LC99]): inheritField is the priority union (Flat.or) of the child's slot with its parents' unification (PartialUnify.unifyList), so a parental conflict the child does not legislate leaves the slot unspecified.

Main declarations #

Default-mode slot algebra #

A specification slot is a Flat-ordered partial value: is "unspecified", and inheritance fills unspecified slots from parents.

def ConstructionGrammar.inheritField {α : Type u_1} [DecidableEq α] (own : Flat α) (parents : List (Flat α)) :
Flat α

Normal-mode (default) inheritance for one slot ([Gol95] §3.3.1; [Die23] Table 2: "low-level representations override high-level representations if there is a conflict"; [LC99]): the inheriting construction's own value wins; an unspecified slot takes its parents' unification when it exists; a parental conflict the child does not legislate leaves the slot unspecified.

Equations
Instances For
    def ConstructionGrammar.ResolvesField {α : Type u_1} [DecidableEq α] (own : Flat α) (parents : List (Flat α)) :

    The child legislates wherever its parents conflict — [Gol95]'s normal mode: "conflicts are addressed by the inheriting construction, which specifies its own constraints".

    Equations
    Instances For
      @[instance_reducible]
      instance ConstructionGrammar.instDecidableResolvesField {α : Type u_1} [DecidableEq α] (own : Flat α) (parents : List (Flat α)) :
      Decidable (ResolvesField own parents)
      Equations
      @[simp]
      theorem ConstructionGrammar.inheritField_coe {α : Type u_1} [DecidableEq α] (a : α) (parents : List (Flat α)) :
      inheritField (↑a) parents = a
      @[simp]
      theorem ConstructionGrammar.inheritField_nil {α : Type u_1} [DecidableEq α] (own : Flat α) :
      inheritField own [] = own
      theorem ConstructionGrammar.inheritField_of_compat {α : Type u_1} [DecidableEq α] (own : Flat α) {p q : Flat α} (h : Compat p q) :
      inheritField own [p, q] = (own.or p).or q

      Absent conflict, normal-mode inheritance agrees with strict (complete-mode) unification: with compatible parents the inherited value is the priority union of child and parents. Normal mode departs from complete inheritance only at genuine conflicts.

      theorem ConstructionGrammar.resolvesField_of_compat {α : Type u_1} [DecidableEq α] (own : Flat α) {p q : Flat α} (h : Compat p q) :
      ResolvesField own [p, q]

      Compatible parents impose no resolution burden on the child.

      Inheritance through a constructicon #

      A specification assignment maps each construction to its own (conflict-resolving) specification; the network then computes each construction's full specification by normal-mode inheritance from the parents its links name. The walk is generic in the specification type: record-valued specifications supply their componentwise inherit and Resolves lifts.

      def ConstructionGrammar.Constructicon.parentsOf {Sem : Type u_1} (cx : Constructicon Sem) (name : String) :
      List (Construction Sem)

      The constructions a network's links name as parents of name.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        def ConstructionGrammar.Constructicon.childrenOf {Sem : Type u_1} (cx : Constructicon Sem) (name : String) :
        List (Construction Sem)

        The constructions a network's links name as children of name.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          Every link endpoint resolves to a construction in the network — no dangling name-keyed links.

          Equations
          Instances For
            def ConstructionGrammar.Constructicon.derivedSpec {Sem : Type u_1} {σ : Type u_2} (cx : Constructicon Sem) (inherit : σList σσ) (own : Construction Semσ) (c : Construction Sem) :
            σ

            Normal-mode derived specification of c in the network: c's own specification wins; fields it leaves open are filled from the parents its links name ([Die23] Table 2's default mode, computed over the links rather than stipulated per node).

            Equations
            Instances For
              def ConstructionGrammar.Constructicon.ResolvesAll {Sem : Type u_1} {σ : Type u_2} (cx : Constructicon Sem) (resolves : σList σProp) (own : Construction Semσ) :

              Normal-mode well-formedness of the whole network: every construction legislates every field its parents conflict on.

              Equations
              Instances For
                @[instance_reducible]
                instance ConstructionGrammar.instDecidableResolvesAll {Sem : Type u_1} {σ : Type u_2} (cx : Constructicon Sem) (resolves : σList σProp) [(o : σ) → (ps : List σ) → Decidable (resolves o ps)] (own : Construction Semσ) :
                Decidable (cx.ResolvesAll resolves own)
                Equations

                Inheritance of denotation-valued fields #

                Denotations (e.g. PartialProp-valued pragmatic contributions) have no decidable equality, so agreeing parents cannot be reconciled by unification. inheritFieldUnique inherits when exactly one parent supplies a value — sufficient for single-mother inheritance, the configuration of conventional-subtype links.

                def ConstructionGrammar.inheritFieldUnique {α : Type u_3} (own : Option α) (parents : List (Option α)) :
                Option α

                Normal-mode inheritance for one field without decidable equality: the child's own value wins; an unspecified field takes the value of the unique supplying parent; multiple suppliers (which inheritField could reconcile when they agree) yield none.

                Equations
                Instances For
                  def ConstructionGrammar.Constructicon.derivedField {Sem : Type u_1} {α : Type u_3} (cx : Constructicon Sem) (own : Construction SemOption α) (c : Construction Sem) :
                  Option α

                  Derived value of a denotation-valued field for c in the network: c's own value wins; otherwise the value of the unique supplying parent.

                  Equations
                  Instances For