Reordering a head's dependents #
Graph.reorderDependents g v σ moves the phrases of the dependents of v as whole blocks into the
order a permutation σ of v and its dependents gives them; every other position keeps its
place. The position permutation ranks positions by a key (the block's new rank, then the old
position inside the yield of v), so it is defined on every graph and computable. On a projective
tree only the head's own dependencies change length under the move, by the change in their
boundary distances, so Behaghel's law of growing constituents
(WordOrder.Arrangement.sum_boundaryDist_lt_iff) becomes a statement about total dependency
length: when the phrases after a head grow outward, every reordering that does not is strictly
longer.
Main definitions #
Graph.reorderDependents: the graph with a head's dependent phrases reordered as blocks.
Main results #
Graph.totalLength_reorderDependents_add: on a projective tree, reordering changes total dependency length exactly as it changes the head's boundary distances.Graph.totalLength_lt_reorderDependents_iff: Behaghel's law for graphs.
References #
Blocks #
g.blockHead v x is the sibling of v whose block holds x, the dependent of v whose phrase
contains x, and v itself for v and for positions outside its yield.
Equations
Instances For
The reordered positions are ranked by this key. A position outside the yield of v keeps its
place, and a position inside sorts by the new rank of its block, then by its old position.
Equations
- g.reorderKey v σ x = toLex (if x ∈ g.yield v then v else x, toLex (↑(g.siblingRank v (σ (g.blockHead v x))), x))
Instances For
The new position of x counts the positions whose key is smaller.
Equations
- g.reorderRank v σ x = ⟨{y : Fin n | g.reorderKey v σ y < g.reorderKey v σ x}.card, ⋯⟩
Instances For
The position permutation that moves the blocks of v's dependents into the order σ
gives them; its inverse is computable.
Equations
- g.reorderPerm v σ = { toFun := g.reorderRank v σ, invFun := Fintype.bijInv ⋯, left_inv := ⋯, right_inv := ⋯ }
Instances For
The graph with the dependents of v reordered by σ, each phrase moving as a block.
Equations
- g.reorderDependents v σ = g.map (g.reorderPerm v σ)
Instances For
Total length under transport #
Block lemmas (trees) #
Projectivity: blocks are intervals in the order of their heads #
A dependent after the head has its whole phrase after the head.
The phrases of two dependents lie in the order of their heads.
Two positions of the yield of v in distinct blocks are ordered as their blocks.
The rank, decomposed #
The rank of a position in the yield, decomposed #
Outside the yield, the rank does not depend on σ.
The identity permutation keeps every position #
A position outside the yield of v is before v exactly when it is before any position of
the yield.
Transport of total dependency length #
Per-arc identities #
The transport theorem #
Behaghel's law for graphs #
Reordering the dependents after v changes total dependency length exactly as it changes the
head's boundary distances in the sibling arrangement.
Behaghel's law for a projective tree. When the phrases after a head grow outward, moving them about (each as a block) cannot shorten total dependency length.
The reordering is strictly longer exactly when it is not itself short before long.