Documentation

BGW.Tree.Vertices

Vertex addresses in depth-first order #

The root address is []. Each child contributes its vertex addresses prefixed by its zero-based child index. Thus equal child subtrees still contribute distinct vertex occurrences.

The depth of an address is its list length. For valid vertices, prefix ancestry includes equality; strict ancestry uses a proper prefix. The parent of a nonempty vertex address is obtained with List.dropLast.

All vertex addresses, listed in root-first depth-first order.

Equations
Instances For
    @[simp]
    theorem BGW.PlaneTree.vertices_node (ts : List PlaneTree) :
    (node ts).vertices = [] :: (List.mapIdx (fun (i : ℕ) (t : PlaneTree) => List.map (fun (u : List ℕ) => i :: u) t.vertices) ts).flatten

    The enumeration contains exactly the addresses at which fringe lookup succeeds.

    @[simp]

    The address enumeration has one entry for each vertex counted by size.

    Each vertex address occurs exactly once, including when subtrees are equal.

    The number of vertices at depth h, with the root at depth zero.

    Equations
    Instances For