Documentation

Linglib.Syntax.DependencyGrammar.Length

Dependency length #

This file defines the total dependency length of a graph and its relabeling along a position permutation. Dependency-length minimisation claims natural languages reduce the former beyond what independent constraints predict; relabeling is the formal core of the random-reordering baselines that test the claim.

Main definitions #

Main results #

References #

[Beh32] — Deutsche Syntax IV, source of the "Oberstes Gesetz" threshold [FLG20] — Dependency locality as an explanatory principle for word order, source of the minimisation claim and the random-reordering baselines

def DependencyGrammar.Graph.totalLength {n : } (g : Graph n) :

Total dependency length: the sum of Nat.dist over all arcs — the quantity dependency-length minimisation is about.

Equations
Instances For
    theorem DependencyGrammar.Graph.totalLength_words {n : } (g : Graph n) (words' : Fin nMorphology.Word) :
    { words := words', label := g.label, root := g.root }.totalLength = g.totalLength

    Total dependency length reads only the arc structure, never the tokens.

    def DependencyGrammar.OberstesGesetz {n : } (g : Graph n) (threshold : ) :

    [Beh32]'s Oberstes Gesetz: every arc has length at most threshold.

    Equations
    Instances For

      Relabeling: same structure, different linearization #

      def DependencyGrammar.Graph.relabel {n : } (g : Graph n) (σ : Equiv.Perm (Fin n)) :

      Transport a graph along a position permutation: arcs, tokens, and root move together, so the labeled structure is unchanged and only the linearization varies.

      Equations
      • g.relabel σ = { words := g.words (Equiv.symm σ), label := fun (v w : Fin n) => g.label ((Equiv.symm σ) v) ((Equiv.symm σ) w), root := σ g.root }
      Instances For
        @[simp]
        theorem DependencyGrammar.Graph.relabel_adj {n : } (g : Graph n) (σ : Equiv.Perm (Fin n)) (v w : Fin n) :
        (g.relabel σ).Adj v w g.Adj ((Equiv.symm σ) v) ((Equiv.symm σ) w)
        def DependencyGrammar.Graph.mirror {n : } (g : Graph n) :

        The head-final mirror: relabel along position reversal.

        Equations
        Instances For
          theorem DependencyGrammar.Graph.totalLength_relabel {n : } (g : Graph n) (σ : Equiv.Perm (Fin n)) ( : ∀ (v w : Fin n), (↑(σ v)).dist (σ w) = (↑v).dist w) :

          Relabeling along an isometry of the positions preserves total dependency length.

          theorem Fin.dist_rev_rev {n : } (v w : Fin n) :
          (↑v.rev).dist w.rev = (↑v).dist w

          Position reversal preserves Nat.dist.

          The mirror image of a graph has the same total dependency length — the head-final preference is the exact mirror of the head-initial one ([FLG20], examples (7)–(8)).