AFTD Auto-Formalizing Theoretical Domains

associahedron_root_label

def

The function associahedron_root_label assigns to each ordered full binary tree T a label in (ZMod 2) × (ZMod 2), defined recursively by (0, 0) for a leaf and associahedron_q (associahedron_root_label l) (associahedron_root_label r) for a node with left child l and right child r.

Statement

def associahedron_root_label : BinTree → ZMod 2 × ZMod 2
Defined in
arXiv:2611.19659, Section 2
Verified
20 Nov 2026
Axioms
none listed
Built on 2
  • BinTreeThe inductive type BinTree of ordered full binary trees with constructors leaf and node left right.
  • associahedron_qThe binary operation Q on (ZMod 2)^2 defined by Q(a, b) = (a_0 + a_1 + b_0, a_1 + b_0 + b_1 + 1).
Used by 2
  • associahedron_colouringThe function associahedron_colouring assigns to each ordered full binary tree T the pair (associahedron_root_label T, associahedron_d_stat…
  • associahedron_d_statThe function associahedron_d_stat takes a natural number depth and a tree T : BinTree, and returns the element of ZMod 2 counting…

Read back from the Lean

A definition of the function associahedron_root_label mapping a binary tree BinTree to a pair in ZMod 2 × ZMod 2 by structural recursion: - On BinTree.leaf, it returns (0, 0). - On BinTree.node l r, it returns associahedron_q (associahedron_root_label l) (associahedron_root_label r).

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

/-- Recursive root label λ(T) in (ZMod 2) × (ZMod 2) of an ordered full binary tree. -/
def associahedron_root_label : BinTree → ZMod 2 × ZMod 2
  | .leaf => (0, 0)
  | .node l r => associahedron_q (associahedron_root_label l) (associahedron_root_label r)
See it in the graphDiscuss this resultChallenge it