Dominance properties under the unique-heads constraint: parent-pointer
tracing, iterParent chains, antisymmetry of dominance, and dominates_to_parent.
These results require hasUniqueHeads and/or isAcyclic from Basic.lean
and the Dominates inductive + projection bridge theorems from Projection.lean.
The unique parent of node x (follows find? on depIdx). Returns x if no parent.
Equations
- DepGrammar.parentOf_uh t x = match List.find? (fun (d : DepGrammar.Dependency) => d.depIdx == x) t.deps with | some d => d.headIdx | none => x
Instances For
Iterate parentOf k times.
Equations
- DepGrammar.iterParent_uh t x 0 = x
- DepGrammar.iterParent_uh t x fuel'.succ = DepGrammar.parentOf_uh t (DepGrammar.iterParent_uh t x fuel')
Instances For
The iterParent chain length from a dominance derivation is bounded by n.
If k > n, the first n+1 chain values are n+1 distinct values in [0, n).
Distinctness: any duplicate at positions i < j ≤ n creates a sub-cycle
of length j - i ≤ n, detectable by follow_false_of_cycle with fuel
n + 1 ≥ j - i + 1. But isAcyclic = true, contradiction.
Then nodup_bound gives n + 1 ≤ n, contradiction.
In a well-formed tree (unique heads + acyclic), dominance is antisymmetric: if v dominates w and w dominates v, then v = w.
Proof: By contradiction, assume v ≠ w. Extract iterParent chains
from both Dominates derivations, combine into a cycle, and show
isAcyclic.follow detects it (returning false), contradicting
isAcyclic = true.
If v dominates c (with v ≠ c) and every edge into c has head = a, then v dominates a.
Key proof technique: induction on the Dominates derivation.
The last edge in the path v →... → c terminates at c, so its head
endpoint must be c's unique parent a. Dropping this last edge gives
v dominates a.
Used in projective_implies_planar to extract dominance cycles from
crossing edges under unique heads.