Documentation

Linglib.Syntax.Minimalist.SyntacticObject.Selection

Selection-driven heads on the SyntacticObject carrier #

This file defines the c-selection head of a syntactic object: whichever sister's head selects the saturated other projects — [Adg03]'s identification of the projecting item with the selecting item, instantiating the bare-phrase-structure projection ([Cho95a] §4) that [MCB25] §1.13.3 abstracts as head functions (Definition 1.13.6 / Lemma 1.13.7). Like the book's head functions it is partial: 0 at exocentric nodes.

Main declarations #

Main results #

Implementation notes #

SelectionState is a one-field structure over Option (LexicalItem.Token × List Cat), so that the selection product can be an instance on it: the Option is implementation, and 0 is the public spelling of the exocentric failure, the off-domain value of a partial head function. There is no One, since two saturated states multiply to 0, and no associativity claim, so the structure is CommMagma + MulZeroClass only. The trace of a token is a lower copy of the phrase it heads, so it gets that phrase's value, saturated with the token's category (traceState), and a head that selected the moved phrase still selects its trace; the bare trace remembers no token and gets the saturated dummy .of .bareTrace []. selCheck reads only the token's category and sel. Two saturated sisters have no head, as in [MCB25]'s partial head functions: a specifier and its sister are labeled, if at all, by the labeling algorithm (SyntacticObject/Label.lean).

References #

The selection state #

A constituent's selection state is the projecting head with its residual stack (.of tok [] = saturated), and 0 off the endocentric domain.

Instances For
    def Minimalist.instDecidableEqSelectionState.decEq (x✝ x✝¹ : SelectionState) :
    Decidable (x✝ = x✝¹)
    Equations
    Instances For

      A defined selection state has projecting head tok and residual stack stack.

      Equations
      Instances For
        @[instance_reducible]
        Equations

        The projecting head token; none off the endocentric domain.

        Equations
        Instances For

          The residual selectional stack (some [] = saturated).

          Equations
          Instances For
            @[simp]
            theorem Minimalist.SelectionState.head_of (tok : LexicalItem.Token) (stack : List Cat) :
            (of tok stack).head = some tok

            Carrier-free selection combinators #

            The selection decision at a binary node — (which sister projects, head, residual), none at exocentric nodes; * and selSide are its projections.

            Equations
            Instances For
              def Minimalist.selSide (x y : SelectionState) :
              Option Bool

              The projecting daughter is reported as some true for the left and some false for the right.

              Equations
              Instances For
                theorem Minimalist.selCombine_comm (x y : SelectionState) :
                selCombine x y = Option.map (fun (p : Bool × LexicalItem.Token × List Cat) => (!p.1, p.2)) (selCombine y x)

                Swapping the sisters flips the side and keeps the head and residual.

                theorem Minimalist.selSide_comm (x y : SelectionState) :
                selSide x y = Option.map not (selSide y x)

                S₂-equivariance: swap acts on the sisters, Bool.not on the side — MCB's per-vertex edge-marking (Lemma 1.13.4).

                @[instance_reducible]

                The selection product is the head-and-residual of the selCombine decision ([MCB25] §1.13); 0 is absorbing.

                Equations
                • One or more equations did not get rendered due to their size.
                theorem Minimalist.SelectionState.mul_def (x y : SelectionState) :
                x * y = { toOption := Option.map (fun (x : Bool × LexicalItem.Token × List Cat) => x.2) (selCombine x y) }

                * unfolds to the canonical accessor for the selection product.

                @[simp]

                A state never combines with itself, since of two equal sisters neither selects the other.

                theorem Minimalist.selCombine_eq_some {x y : SelectionState} {b : Bool} {hd : LexicalItem.Token} {res : List Cat} (h : selCombine x y = some (b, hd, res)) :
                (bif b then x else y).head = some hd

                The projected head is the head of the sister on the reported side.

                @[instance_reducible]

                The head of a selection product is one of its factors' heads.

                Equations
                theorem Minimalist.SelectionState.head_of_mul_of {a r : LexicalItem.Token} {y : SelectionState} (h : (of a [] * y).head = some r) :
                y.head = some r

                A saturated state never projects, so the head of its product is the other factor's head.

                Triggered Merge #

                A selection state is saturated when its head selects nothing further.

                Equations
                Instances For

                  [CS16b]'s triggered Merge (Definition 27): of the factors of a defined selection product exactly one is saturated, the other still selecting.

                  theorem Minimalist.SelectionState.head_mul_of_not_isSaturated {x y : SelectionState} (h : x * y ≠ 0) (hx : ¬x.IsSaturated) :
                  (x * y).head = x.head

                  [CS16b], Theorem 13: the factor whose selection Merge checks projects.

                  Selection check on the carriers #

                  The selection state of a trace is a saturated copy of the phrase its token heads, and for the bare trace the saturated dummy.

                  Equations
                  Instances For

                    The selection algebra is the SyntacticObject.mergeAlgebra of token + sel leaves and the traces' traceState.

                    Equations
                    Instances For
                      theorem Minimalist.selNode_perm (a : SyntacticObject.Vertex) {l₁ l₂ : List SelectionState} (h : l₁.Perm l₂) :
                      selNode a l₁ = selNode a l₂

                      selNode is invariant under permutation of the daughter states.

                      The selection check on a planar tree is the catamorphism of selNode.

                      Equations
                      Instances For

                        At a node, selCheckPlanar folds the algebra over the daughters.

                        selCheckPlanar is Perm-invariant, so it descends to the quotient.

                        The selection-driven head on SyntacticObject #

                        Selection-driven head check: the selection instance of [MCB25]'s head functions; computable.

                        Equations
                        Instances For

                          The projecting head's lexical item, by c-selection.

                          Equations
                          Instances For

                            Residual pending selectional features (some [] = saturated).

                            Equations
                            Instances For

                              The category of the projecting head, none at exocentric nodes.

                              Equations
                              Instances For

                                selCheck as a morphism of magmas ([MCB25] §1.13's algebraic frame): the lift of the leaf data.

                                Equations
                                Instances For
                                  @[simp]
                                  @[simp]

                                  An object merged with itself has no head.

                                  @[simp]