Admissible cuts on planar n-ary rooted trees #
@cite{marcolli-chomsky-berwick-2025} @cite{foissy-introduction-hopf-algebras-trees}
An admissible cut of a tree T is a subset of edges such that every root-to-leaf path of T contains at most one selected edge. After deleting the selected edges, T decomposes into:
- The cut forest
cutForest c: the multiset of subtrees that get separated from the root after the deletion. - The remainder: the connected component containing the root, which
comes in two flavors:
remainderDeletion≈ MCB'sT/^p(admissible cut, Definition 1.2.6, book p. 31): just remove the cut subtrees; the parent vertex now has fewer children, so the remainder lives in the at-most-n-ary substrate (Lemma 1.2.11, book p. 38). NOT MCB'sT/^d(Definition 1.2.5), which would re-binarize via edge contraction.remainderTrace≈ MCB'sT/^c(contraction, Definition 1.2.4, book p. 30; requires[Inhabited α]): replace each cut subtree with a single trace-leaf labeleddefault; the parent's arity is preserved. Used at the C-I (semantic) interface for FormCopy.
This file provides admissible cuts on RootedTree.Planar α (the
list-based n-ary planar carrier from Planar.lean). The cuts work
uniformly across arities — the binary case inherits as a subtype.
Status #
[UPSTREAM] candidate. No sorries.
MCB anchor #
@cite{marcolli-chomsky-berwick-2025} Definition 1.2.6 (book p. 31) for
the admissible cut definition; Lemma 1.2.7 (book p. 32) for the
equivalence with forest extraction. Definitions 1.2.4 (T/^c, p. 30),
1.2.5 (T/^d, p. 31), 1.2.6 (T/^p, p. 31) for the three remainder
flavors. We expose remainderDeletion (T/^p, p. 31) and
remainderTrace (T/^c, p. 30); MCB's T/^d (deletion-then-rebinarize)
is not directly exposed here since it's the closest to the consumer-
visible "Externalization" form (PF interface) and can be derived from
T/^p via tree-binarization at the algebra layer.
§1: The Cut inductive #
A cut is recursively built from a per-vertex choice: at the root, for each child edge, decide whether to (a) cut this edge (extracting that subtree), or (b) recurse into that subtree's own cut. The "antichain" condition (no two cuts on the same root-to-leaf path) is baked in because once you cut an edge, you don't recurse beneath it.
An admissible cut on a tree T: at the root vertex, a per-child cut decision for each child. (For a leaf, the empty list of children gives the unique trivial cut.)
- mk
{α : Type u_1}
{a : α}
{cs : List (Planar α)}
(decisions : ChildCutList cs)
: (node a cs).Cut
A cut on a tree, given as a per-child decision list (matching the children list of the root by length).
Instances For
A per-child cut decision: either extract (cut the edge and
extract this subtree whole) or recurse cut (keep this edge,
apply cut to the subtree).
- extract
{α : Type u_1}
(t : Planar α)
: t.ChildCut
Extract this subtree whole.
- recurse
{α : Type u_1}
{t : Planar α}
(c : t.Cut)
: t.ChildCut
Don't cut at this edge; recurse into the subtree.
Instances For
A list of ChildCut decisions, indexed by the children list.
- nil {α : Type u_1} : ChildCutList []
- cons {α : Type u_1} {t : Planar α} {ts : List (Planar α)} (d : t.ChildCut) (ds : ChildCutList ts) : ChildCutList (t :: ts)
Instances For
§2: The empty cut #
For every tree, there is a canonical "empty cut" that recurses everywhere and extracts nothing.
The empty cut on a tree: recurse into every child with the empty cut, never extract.
Equations
Instances For
The all-recurse decision list for a list of children.
Equations
Instances For
The total cut: extract every child whole at the root level. (Note:
this is shallow — it doesn't recurse. The "total cut" in Foissy's
sense extracting the whole tree as a single piece is not directly
representable in this Cut type; it lives at the bialgebra layer
via the explicit T ⊗ 1 term.)
Equations
Instances For
Equations
Instances For
§3: The cut forest #
For a cut c : Cut T, cutForest c is the multiset of subtrees
extracted by c. We use List for now (the multiset structure
emerges at the Hopf algebra layer via Multiset.ofList).
The list of subtrees extracted by a cut.
Equations
- RootedTree.Planar.cutForest (RootedTree.Planar.Cut.mk decisions) = RootedTree.Planar.cutForestList decisions
Instances For
Auxiliary: extracted subtrees from a child-decision list.
Equations
Instances For
Auxiliary: extracted subtrees from a single child-decision.
Equations
Instances For
§4: Remainders #
Two remainder flavors per MCB §1.11.6:
remainderDeletion c(T/^p): subtree replaced by nothing (parent loses a child). Arity of remainder vertices may decrease.remainderTrace c(T/^c, with[Inhabited α]): subtree replaced by a trace-leaf labeleddefault. Arity is preserved everywhere.
Deletion remainder T/^p: cut subtrees disappear; parent loses children.
Equations
- RootedTree.Planar.remainderDeletion (RootedTree.Planar.Cut.mk decisions) = RootedTree.Planar.node a (RootedTree.Planar.remainderDeletionList decisions)
Instances For
Auxiliary: deletion remainder for a child-decision list — extracted children disappear from the list.
Equations
- One or more equations did not get rendered due to their size.
- RootedTree.Planar.remainderDeletionList RootedTree.Planar.ChildCutList.nil = []
- RootedTree.Planar.remainderDeletionList (RootedTree.Planar.ChildCutList.cons (RootedTree.Planar.ChildCut.extract t) ds) = RootedTree.Planar.remainderDeletionList ds
Instances For
Trace remainder T/^c: cut subtrees replaced with default-leaves.
Arity of all vertices preserved.
Equations
- RootedTree.Planar.remainderTrace (RootedTree.Planar.Cut.mk decisions) = RootedTree.Planar.node a (RootedTree.Planar.remainderTraceList decisions)
Instances For
Auxiliary: trace remainder for a child-decision list.
Equations
- RootedTree.Planar.remainderTraceList RootedTree.Planar.ChildCutList.nil = []
- RootedTree.Planar.remainderTraceList (RootedTree.Planar.ChildCutList.cons (RootedTree.Planar.ChildCut.extract t) ds) = RootedTree.Planar.leaf default :: RootedTree.Planar.remainderTraceList ds
- RootedTree.Planar.remainderTraceList (RootedTree.Planar.ChildCutList.cons (RootedTree.Planar.ChildCut.recurse c) ds) = RootedTree.Planar.remainderTrace c :: RootedTree.Planar.remainderTraceList ds
Instances For
§5: Sanity tests #
Verify on a small concrete cut that cutForest, remainderDeletion,
and remainderTrace behave as expected.