Documentation

Linglib.Syntax.DependencyGrammar.Formal.Catena

Catenae #

[OG12]

Formalizes the catena (Osborne, Putnam & Groß 2012, Syntax 15:4, 354–396): a connected subgraph of a dependency tree — any word or combination of words that is continuous with respect to the dominance relation. Catenae strictly generalize constituents: every constituent is a catena, but not every catena is a constituent.

Main declarations #

Implementation notes #

Computable BFS over dependency edges #

def DepGrammar.Catena.isConnected (deps : List Dependency) (nodes : List ) :
Bool

Check if a node set is connected within the dependency graph. BFS from the first node and check that all others are reached.

Equations
Instances For
    def DepGrammar.Catena.isCatena (deps : List Dependency) (nodes : List ) :
    Bool

    Computable catena check: non-empty and connected in the tree.

    Equations
    Instances For
      def DepGrammar.Catena.isConstituent (deps : List Dependency) (n : ) (nodes : List ) :
      Bool

      Check if a node set equals the complete subtree (projection) rooted at some node.

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

        BFS invariants #

        Bidirectional reachability (Prop level) #

        inductive DepGrammar.Catena.BidirReachable (deps : List Dependency) (allowed : List ) :
        Prop

        Bidirectional reachability within a restricted node set. BidirReachable deps allowed u v holds when there is a path from u to v using dependency edges (in either direction) where all nodes are in allowed.

        Instances For
          theorem DepGrammar.Catena.bidir_step_append {deps : List Dependency} {allowed : List } {u v w : } (h : BidirReachable deps allowed u v) (hv : v allowed) (hw : w allowed) (hedge : ddeps, d.headIdx = v d.depIdx = w d.depIdx = v d.headIdx = w) :
          BidirReachable deps allowed u w

          Append a step to the end of a bidirectional path.

          theorem DepGrammar.Catena.bidir_symm {deps : List Dependency} {allowed : List } {u v : } (h : BidirReachable deps allowed u v) :
          BidirReachable deps allowed v u

          Bidirectional reachability is symmetric.

          theorem DepGrammar.Catena.bidir_trans {deps : List Dependency} {allowed : List } {u v w : } (h1 : BidirReachable deps allowed u v) (h2 : BidirReachable deps allowed v w) :
          BidirReachable deps allowed u w

          Bidirectional reachability is transitive.

          BFS completeness #

          theorem DepGrammar.Catena.bfsReachable_complete (deps : List Dependency) (allowed : List ) (start target : ) (h : BidirReachable deps allowed start target) :
          target DepGrammar.Catena.bfsReachable✝ deps allowed start

          BFS completeness: every bidirectionally reachable node appears in the bfsReachable output.

          theorem DepGrammar.Catena.singleton_isCatena (deps : List Dependency) (v : ) :
          isCatena deps [v] = true

          Any singleton is a catena: non-empty and trivially connected.