Splitting a tree along an edge by path length #
For a tree T (hT : T.IsTree) on an arbitrary vertex type ι (without requiring [Fintype ι]),
hT.treeSide u v is the set of vertices strictly closer to u than to v along hT.pathTo.
Along an edge T.Adj u v, the two sides hT.treeSide u v and hT.treeSide v u are complements
(treeSide_compl_of_adj), (u, v) is the unique edge crossing from hT.treeSide u v to its
complement (eq_of_mem_treeSide_of_adj_notMem), subtrees attached to distinct neighbours of t
are disjoint (disjoint_treeSide_of_adj), and hT.treeSide t p decomposes as insert t of the
child subtrees hT.treeSide c t over all neighbours c ≠ p of t
(treeSide_eq_insert_biUnion).
Main definitions #
SimpleGraph.IsTree.treeSide: the vertices ofTstrictly closer touthan tov.
Main results #
SimpleGraph.IsTree.treeSide_compl_of_adj: along an edgeT.Adj u v,hT.treeSide v uis the complement ofhT.treeSide u v.SimpleGraph.IsTree.self_mem_treeSide_of_adj:u ∈ hT.treeSide u vwhenT.Adj u v.SimpleGraph.IsTree.disjoint_treeSide_of_adj: distinct neighboursu ≠ vofthave disjoint subtreeshT.treeSide u tandhT.treeSide v t.SimpleGraph.IsTree.treeSide_eq_insert_biUnion: child decomposition ofhT.treeSide t p.SimpleGraph.IsTree.eq_of_mem_treeSide_of_adj_notMem: along an edgeT.Adj v p,(v, p)is the unique edge ofTcrossing fromhT.treeSide v pto its complement.
The vertices of T strictly closer to u than to v. When T.Adj u v, this is the connected
component of T - uv containing u.
For an edge T.Adj u v, u lies on its own side treeSide u v.
For an edge T.Adj u v, v does not lie on u's side treeSide u v.
Child decomposition of a tree side. For any edge T.Adj t p, treeSide t p consists of
t together with the disjoint subtrees treeSide c t over all neighbours c ≠ p of t.
An edge T.Adj v p separates hT.treeSide v p from its complement: the only edge of T
crossing from z ∈ hT.treeSide v p to y ∉ hT.treeSide v p is (z, y) = (v, p).