Mathlib Map

Theorems · Definition · combinatorics

DyckWord.toTree

DyckWord → BinaryTree Unit

Convert a Dyck word to a binary rooted tree. f(0) = nil. For a nonzero word find the D that matches the initial U, which has index p.firstReturn, then let x be everything strictly between said U and D, and y be everything strictly after said D. p = x.nest + y with x, y (possibly empty) Dyck words. f(p) = f(x) △ f(y), where △ (defined in Mathlib/Data/Tree/Basic.lean) joins two subtrees to a new root node.

Defined in
Mathlib.Combinatorics.Enumerative.DyckWord
Cited by
7 results in Mathlib
Foundations
Depth 77 from the axioms · uses propext, Classical.choice, Quot.sound

Around this declaration

Dashed lines are statement dependencies; solid lines are citations in proofs.

Cites5

Mathlib declarations this one mentions in its statement or cites explicitly in its proof. Plumbing is filtered out.

Cited by8

Results whose statement or proof uses this declaration.