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
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
- t.generationSize h = List.countP (fun (u : List ℕ) => decide (u.length = h)) t.vertices