plane_tree_mirror
def
The left-right mirror reflection involution τ on plane trees, recursively reversing child order.
Statement
def plane_tree_mirror : PlaneTree → PlaneTree- Defined in
- arXiv:2611.10154 Sec. 2.3
- Verified
- 10 Nov 2026
- Axioms
- none listed
- Built on 1
- PlaneTreeA finite plane tree is either a leaf or an internal node with a list of child plane trees.
- Used by 4
- op_1429_mirror_symmetric_m_leafy_trees_involutionThe mirror reflection involution τ preserves the class LT_n^m of m-leafy trees with n internal vertices and mn + 1 leaves.
- op_1429_mirror_symmetric_m_leafy_trees_n_one_uniqueFor every natural number m ≥ 1, there exists a unique tree t such that t ∈ mirror_symmetric_m_leafy_trees m 1.
- op_1429_mirror_symmetric_m_leafy_trees_nonemptyFor all natural numbers m ≥ 1 and n ≥ 1, the set mirror_symmetric_m_leafy_trees m n is nonempty.
- mirror_symmetric_m_leafy_treesThe set mirror_symmetric_m_leafy_trees m n consists of all trees t in in_m_leafy_trees m n satisfying plane_tree_mirror t = t.
Read back from the Lean
The recursive function plane_tree_mirror : PlaneTree → PlaneTree maps a plane tree to its mirror image:
- leaf is mapped to leaf.
- node cs (where cs is a list of child PlaneTrees) is mapped to node whose list of children is the list of recursively mirrored trees of cs in reversed order.
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
Lean source view module on GitHub
/-- Left-right mirror reflection involution on plane trees. -/ def plane_tree_mirror : PlaneTree → PlaneTree | .leaf => .leaf | .node cs => .node (cs.attach.map (fun ⟨c, _⟩ => plane_tree_mirror c) |>.reverse) termination_by t => sizeOf t