Command relations #
A dominance order has the root at ⊥ and x ≤ y for x dominates y. A set P of nodes
generates a command relation: a commands b when every P-node properly dominating a
dominates b. The relations of the literature differ in the generator alone, c-command taking
the branching nodes, S-command the S nodes and MAX-command the maximal projections.
The relation is an upper polar in the generator, so that its dependence on P is mathlib's
polarity API: a union of generators gives the intersection of the relations by
upperPolar_union, the map is antitone by upperPolar_anti, and the relations some property
generates are the Order.IsIntent sets. In the commanded node it is a set of upper
bounds, and on a tree it is the cone of one node, the lowest generator above the commander.
Main definitions #
PhraseStructure.commandRelation: the command relation a set of nodes generates.PhraseStructure.mateRelation: its symmetric part, each node commanding the other.RoseTree.IsBranchingAt,RoseTree.cCommand: the branching positions of a rose tree and Barker and Pullum's c-command, the command relation they generate.RoseTree.CCommands: Reinhart's c-command, between positions neither of which dominates the other, andRoseTree.cCommandDomain, the positions a position c-commands.
Main statements #
PhraseStructure.mem_commandRelation_iff_mem_upperBounds: the nodesacommands are the upper bounds of the generators properly dominatinga.PhraseStructure.mem_commandRelation_iff_le: when those generators have a greatest member,acommands exactly what it dominates.PhraseStructure.mem_commandRelation_iff_le_of_covBy,PhraseStructure.mem_commandRelation_iff_of_covBy: on a tree a node commands what its mother dominates if the mother is a generator, and what its mother commands if not. ByPhraseStructure.eq_commandRelation_of_forall_covBythe command relation is the only relation obeying these two rules in which the root commands every node.RoseTree.cCommands_iff_parent_lt: c-command is sisterhood plus dominance.
Implementation notes #
commandRelationis anabbrevfor an upper polar, so the lemmas ofMathlib/Order/Concept.leanapply to it as they stand and are not restated here.- The relations are
SetRels, writtena ~[commandRelation P] b, since they are intersected, inverted and compared; dominance, which is only ever applied, stays≤. - Barker and Pullum's own theorems, their generation by relations and their definition of
c-command through the mother relation are in
Studies/BarkerPullum1990.lean.
References #
Command relations #
A node x admits the pair (a, b) when it dominates b if it properly dominates a, so that
it does not bound a away from b.
Equations
- PhraseStructure.Admits x ab = (x < ab.1 → x ≤ ab.2)
Instances For
The command relation generated by P, in which a commands b when every P-node properly
dominating a dominates b: the upper polar of P along Admits.
Equations
- PhraseStructure.commandRelation P = upperPolar PhraseStructure.Admits P
Instances For
The nodes a commands are the upper bounds of the P-nodes properly dominating a.
A node commands everything below what it commands.
What a node commands depends only on the generators properly dominating it.
When the P-nodes properly dominating a have a greatest member m, the lowest of them in
the tree, a commands exactly what m dominates.
Command on trees #
On an order whose ancestors are linearly ordered a node's command domain is fixed by its mother, the node it covers.
In a tree order a node commands a node below c exactly when it commands c, unless c
properly dominates it.
A node commands whatever its mother dominates, whatever the generator.
A node whose mother is a generator commands exactly what its mother dominates.
A node whose mother is not a generator commands exactly what its mother commands.
The command relation of P is the only relation in which the root commands every node and a
node commands what its mother dominates or what its mother commands, according as the mother is
in P or not.
Mates #
Two nodes are P-mates when each P-commands the other.
Equations
- PhraseStructure.mateRelation P = (PhraseStructure.commandRelation P).symmetrize
Instances For
Command relations on the positions of a tree #
Membership in commandRelation P at concrete positions is decidable: the nodes properly
dominating a position are its proper prefixes, a finite list, so the defining universal is a
List-bounded one. The branching property of a position is read off the tree, at least two
children, the geometric reading of [Rei76]'s "branching node".
The nodes properly dominating a position are its proper prefixes.
Equations
- PhraseStructure.instDecidableMemProdTreePathSetRelCommandRelationMkOfDecidablePredSet P a b = decidable_of_iff (∀ x ∈ List.map Core.Order.TreePath.mk a.toList.inits, x ≠ a → x ∈ P → x ≤ b) ⋯
Equations
- One or more equations did not get rendered due to their size.
C-command on the positions of a rose tree #
A position of t is branching when its subtree has at least two children, the
geometric reading of [Rei76]'s "first branching node".
Equations
- t.IsBranchingAt p = (p ∈ RoseTree.positionsWhere (fun (s : RoseTree β) => 2 ≤ s.arity) t)
Instances For
Equations
Barker and Pullum's c-command on the positions of t, the command relation its branching
positions generate. It is reflexive and a position commands what it dominates, unlike
RoseTree.CCommands; it is read off the tree, so decidable.
Equations
- t.cCommand = PhraseStructure.commandRelation {p : Core.Order.TreePath | t.IsBranchingAt p}
Instances For
a c-commands b in t when neither dominates the other and every branching node properly
dominating a dominates b: [Rei76]'s c-command, RoseTree.cCommand without dominance.
Instances For
Equations
- t.instDecidableRelTreePathCCommands x✝¹ x✝ = { decide := decide ((x✝¹, x✝) ∈ t.cCommand) && decide (¬x✝¹ ≤ x✝ ∧ ¬x✝ ≤ x✝¹), reflects_decide := ⋯ }
The c-command domain of a position, the positions it c-commands.
Equations
- t.cCommandDomain a = {b : Core.Order.TreePath | t.CCommands a b}
Instances For
Equations
- t.instDecidableMemTreePathSetCCommandDomain a b = { decide := decide ((a, b) ∈ t.cCommand) && decide (¬a ≤ b ∧ ¬b ≤ a), reflects_decide := ⋯ }
C-command is sisterhood plus dominance: a position whose parent branches c-commands exactly the positions properly below its parent and not below itself.
Relabelling preserves the branching positions.
Replacing the subtree at c leaves the branching positions outside it as they were.
Unless c lies properly above a, what a c-commands is unchanged by replacing the subtree
at c.
A position outside the subtree at c c-commands a position of its replacement exactly when it
c-commands c.
The root of the replacement c-commands what the replaced subtree c-commanded.