MuPAD-Combinat knows (according to the docs)
for Dyck words the canonical bijection from ordered trees with n+1 nodes to Dyck words of size n such that if a tree t has t_1,...,t_k as childs then f(t) = [1,f(t_1),0,...,1,f(t_k),0].
fromOrderedTree
– canonical bijection from ordered trees to Dyck words combinat::dyckWords::fromOrderedTree(ordered tree t) Returns the Dyck word corresponding to the ordered tree t.
toOrderedTree
– canonical bijection from Dyck words to ordered trees combinat::dyckWords::toOrderedTree(Dyck word w) Returns the ordered tree corresponding to the Dyck word w.
SageMath-Combinat knows
to_ordered_tree()
from_ordered_tree() NotImplementedError: TODO
What a pitty! My question is: What is a quick workaround for this missing function?