Documentation

CslibFrontier.Foundations.Combinatorics.SimpleGraph.TreeSide

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 #

Main results #

def SimpleGraph.IsTree.treeSide {ι : Type u_1} {T : SimpleGraph ι} (hT : T.IsTree) (u v : ι) :
Set ι

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.

@[simp]
theorem SimpleGraph.IsTree.mem_treeSide {ι : Type u_1} {T : SimpleGraph ι} (hT : T.IsTree) {u v w : ι} :
w ∈ hT.treeSide u v ↔ (hT.pathTo w u).length < (hT.pathTo w v).length
theorem SimpleGraph.IsTree.treeSide_compl_of_adj {ι : Type u_1} {T : SimpleGraph ι} (hT : T.IsTree) {u v : ι} (huv : T.Adj u v) :
hT.treeSide v u = (hT.treeSide u v)ᶜ

Along an edge T.Adj u v, the two sides treeSide u v and treeSide v u are complements.

theorem SimpleGraph.IsTree.self_mem_treeSide_of_adj {ι : Type u_1} {T : SimpleGraph ι} (hT : T.IsTree) {u v : ι} (huv : T.Adj u v) :
u ∈ hT.treeSide u v

For an edge T.Adj u v, u lies on its own side treeSide u v.

theorem SimpleGraph.IsTree.not_mem_treeSide_other {ι : Type u_1} {T : SimpleGraph ι} (hT : T.IsTree) {u v : ι} (huv : T.Adj u v) :
v ∉ hT.treeSide u v

For an edge T.Adj u v, v does not lie on u's side treeSide u v.

theorem SimpleGraph.IsTree.disjoint_treeSide_of_adj {ι : Type u_1} {T : SimpleGraph ι} (hT : T.IsTree) {t u v : ι} (hu : T.Adj t u) (hv : T.Adj t v) (huv : u ≠ v) :
Disjoint (hT.treeSide u t) (hT.treeSide v t)

Subtrees attached to distinct neighbours u ≠ v of t are disjoint.

theorem SimpleGraph.IsTree.treeSide_eq_insert_biUnion {ι : Type u_1} {T : SimpleGraph ι} (hT : T.IsTree) {t p : ι} (hp : T.Adj t p) :
hT.treeSide t p = insert t (⋃ c ∈ {c : ι | T.Adj t c ∧ c ≠ p}, hT.treeSide c t)

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.

theorem SimpleGraph.IsTree.eq_of_mem_treeSide_of_adj_notMem {ι : Type u_1} {T : SimpleGraph ι} (hT : T.IsTree) {v p z y : ι} (hadj : T.Adj v p) (hz : z ∈ hT.treeSide v p) (hy : y ∉ hT.treeSide v p) (hzy : T.Adj z y) :
z = v ∧ y = p

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).