Documentation

BGW.Tree.LocallyFinite

Finite trees in canonical offspring coordinates #

The existing PlaneTree uses zero-based child indices. The locally finite carrier uses positive indices to match the existing BGW-law construction. positiveAddress is the explicit conversion; zero is always an invalid index on the locally finite side. All finite-tree reasoning uses the public list API.

Convert a zero-based address to its positive-index counterpart.

Equations
Instances For

    Offspring count at a positive-index address; invalid addresses have count zero.

    Equations
    Instances For

      View a finite plane tree as a canonical, possibly-infinite-tree value.

      Equations
      Instances For

        The positive-index coordinates agree with the original fringe lookup.

        An existing zero-based child becomes child i + 1 in the new carrier.

        Vertex membership is preserved, including the root and leaves.

        Distinct finite trees stay distinct in the canonical offspring representation.

        Every present positive-index address has a zero-based preimage.

        A finite tree has a uniform bound on the depth of its vertices. Adapted from Freezing1/PlaneFiniteExtinction.lean, without its model imports.

        Cut at a deterministic depth, keeping the root and the order of children.

        Equations
        Instances For

          Once the truncation depth bounds all vertices, no information is lost.

          The finite plane trees are exactly the locally finite trees with finitely many vertices.

          The existing finite-tree type is equivalent to the finite part of the canonical carrier.

          Equations
          Instances For