Documentation

Anderson4D.Combinatorics.TreeCountReal

Quantitative counting for the Hepp-tree carrier #

Paper: L-5.2 — tree counting via the Dyck-word injection

This is paper Lemma 5.2 for Anderson4D.PlaneTree, the carrier used by the formalization.

A valid tree with at most r leaves is injected into Fin (4 * r + 1) × (Fin (4 * r) → Bool) through the balanced-parentheses key. This gives the explicit bound 4 ^ (4 * r). The final declarations package the sets of trees with at most, and exactly, r leaves as actual Finset PlaneTrees.

Size and key bounds on the real carrier #

A real-carrier valid Hepp tree has at most twice as many vertices as leaves, in subtraction-free form.

Paper Lemma 5.2, size part, on Anderson4D.PlaneTree.

Each vertex of a real-carrier tree contributes one opening and one closing symbol to its key.

theorem Anderson4D.PlaneTree.key_mem (t : PlaneTree) (x : ℕ) :
x ∈ t.key → x = 0 ∨ x = 1

Every symbol in a real-carrier tree key is either 0 or 1.

Explicit encoding and cardinality #

@[reducible, inline]

The type of valid real-carrier trees having at most r leaves.

Equations
Instances For
    def Anderson4D.PlaneTree.validTreeCode (r : ℕ) :
    ValidTreesAtMost r → Fin (4 * r + 1) × (Fin (4 * r) → Bool)

    Bounded binary-word code used to count ValidTreesAtMost r.

    Equations
    Instances For

      The bounded binary-word code is injective.

      Quantitative real-carrier version of paper Lemma 5.2.

      The actual finite set of valid real-carrier trees with at most r leaves.

      Equations
      Instances For

        Cardinality bound for the concrete Finset of valid trees with at most r leaves.

        The corresponding finite-set statement, for clients formulated with Set.Finite or Nat.card.

        The actual finite set of valid real-carrier trees with exactly r leaves.

        Equations
        Instances For

          Cardinality bound for valid real-carrier trees with exactly r leaves.