Documentation

Linglib.Core.Combinatorics.RootedTree.PlanarCut

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:

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.

inductive RootedTree.Planar.Cut {α : Type u_1} :
Planar αType u_1

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
    inductive RootedTree.Planar.ChildCut {α : Type u_1} :
    Planar αType u_1

    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).

    Instances For
      inductive RootedTree.Planar.ChildCutList {α : Type u_1} :
      List (Planar α)Type u_1

      A list of ChildCut decisions, indexed by the children list.

      Instances For

        §2: The empty cut #

        For every tree, there is a canonical "empty cut" that recurses everywhere and extracts nothing.

        def RootedTree.Planar.emptyCut {α : Type u_1} (t : Planar α) :
        t.Cut

        The empty cut on a tree: recurse into every child with the empty cut, never extract.

        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

            §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).

            def RootedTree.Planar.cutForest {α : Type u_1} {t : Planar α} :
            t.CutList (Planar α)

            The list of subtrees extracted by a cut.

            Equations
            Instances For
              def RootedTree.Planar.cutForestChild {α : Type u_1} {t : Planar α} :
              t.ChildCutList (Planar α)

              Auxiliary: extracted subtrees from a single child-decision.

              Equations
              Instances For

                §4: Remainders #

                Two remainder flavors per MCB §1.11.6:

                def RootedTree.Planar.remainderDeletion {α : Type u_1} {t : Planar α} :
                t.CutPlanar α

                Deletion remainder T/^p: cut subtrees disappear; parent loses children.

                Equations
                Instances For
                  def RootedTree.Planar.remainderDeletionList {α : Type u_1} {cs : List (Planar α)} :
                  ChildCutList csList (Planar α)

                  Auxiliary: deletion remainder for a child-decision list — extracted children disappear from the list.

                  Equations
                  Instances For
                    def RootedTree.Planar.remainderTrace {α : Type u_1} [Inhabited α] {t : Planar α} :
                    t.CutPlanar α

                    Trace remainder T/^c: cut subtrees replaced with default-leaves. Arity of all vertices preserved.

                    Equations
                    Instances For

                      §5: Sanity tests #

                      Verify on a small concrete cut that cutForest, remainderDeletion, and remainderTrace behave as expected.