Hepp trees: carrier, canonicalization, automorphism group, markings (node D-hepp) #
Paper: D-hepp — Hepp trees, markings, the automorphism group
Stable Hepp-tree carrier and the Hepp-specific data of paper Definition 5.1: branching vertices, leaves, dyadic markings, leaf multiplicities.
PlaneTree— plane rooted trees (nested inductive throughList);size,leafCount,isValid(no unary vertices), injective serializationkey, canonical order-forgotten formcanon, and the automorphism-count formulaautCard(run factorials on canonically sorted children × children's counts).- Vertices are position paths (
VPos); the automorphism groupAut tis the subgroup of vertex permutations commuting with the total parent map, acting on markings with orbit–stabilizer (card_orbit_mul_card_autMarked). BranchNodes,Leaves,HeppMarking,Multiplicities— Def 5.1 data.card_aut_eq_autCard— the D-hepp cross-check tying both descriptions.
Implementation note: children are sorted with mathlib's structurally
recursive List.insertionSort instead of List.mergeSort, because mergeSort
is defined by well-founded recursion and does not reduce in the kernel; the
carrier needs decide/rfl to evaluate autCard.
All helpers below are structurally recursive.
Number of vertices.
Equations
Instances For
Number of leaves; a bare node [] counts as one leaf. (Children's leaf
counts are all ≥ 1, so the max 1 only affects the leaf case.)
Equations
Instances For
leafCountList is the sum of the children's leaf counts.
Hepp validity: no internal vertex has exactly one child.
Equations
- (Anderson4D.PlaneTree.node cs).isValid = (cs.length != 1 && Anderson4D.PlaneTree.isValidList cs)
Instances For
isValidList is the conjunction of the children's validities.
Injective serialization (balanced-parentheses encoding): 0 opens a node
and 1 closes it. Injectivity is proved below using the stack decoder.
Equations
- (Anderson4D.PlaneTree.node cs).key = 0 :: (Anderson4D.PlaneTree.keyList cs ++ [1])
Instances For
Equations
Canonical (order-forgotten) representative: recursively canonicalize children, then sort them by key. Two plane trees represent the same unordered rooted tree iff their canonical forms are equal.
Equations
Instances For
Product of (run length)! over maximal runs of key-equal adjacent
elements (intended for canonicalized, i.e. sorted, children lists).
Equations
Instances For
Tail of runsProdFactorial: go c k ds scans ds with current run
representative c of length k.
Equations
- One or more equations did not get rendered due to their size.
- Anderson4D.PlaneTree.runsProdFactorial.go a✝¹ a✝ [] = a✝.factorial
Instances For
Order of the automorphism group of the unordered rooted tree represented
by a plane tree: permutations of iso-equal children (run factorials on the
canonicalized children) times the children's own automorphism counts
(Prop 5.6's |Aut(T)|). Cross-checked against the permutation-subgroup
order in card_aut_eq_autCard.
Equations
- One or more equations did not get rendered due to their size.
Instances For
autCardList is the product of the children's automorphism counts.
Basic examples and compiled-evaluation sanity checks #
A leaf.
Instances For
A cherry: two leaves. |Aut| = 2.
Equations
Instances For
Positions (vertex addresses) #
A vertex address: the path of child indices from the root.
Equations
Instances For
The parent of a valid vertex is valid; the root maps to itself.
All valid positions of t, root first.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Total parent map on vertices; the root is its own parent.
Equations
Instances For
The automorphism group #
A vertex permutation is an automorphism of the unordered rooted tree iff it
commutes with the total parent map (a classical, HEq-free characterization).
A vertex permutation is an automorphism of the unordered rooted tree iff it commutes with the parent map.
Equations
- t.IsAut e = ∀ (v : t.VPos), e (Anderson4D.PlaneTree.parentV v) = Anderson4D.PlaneTree.parentV (e v)
Instances For
Automorphisms of the unordered rooted tree presented by t, as a subgroup
of the vertex permutations.
Equations
Instances For
Equations
The automorphism group of (the unordered tree presented by) t.
Equations
- t.Aut = ↥t.autSubgroup
Instances For
A plain marking: one natural number per vertex (the raw carrier on which
Aut t acts; the Def 5.1 constraints are bundled in HeppMarking).
Instances For
Aut t acts on markings by precomposition with the inverse vertex
transport (the position transport is just g.1 : Equiv.Perm (VPos t)).
Automorphisms of the marked tree (T, N) = the marking stabilizer
(paper's Aut(T, N) in Prop 5.6).
Equations
- t.AutMarked N = MulAction.stabilizer t.Aut N
Instances For
Equations
- t.instDecidablePredAutMemSubgroupAutMarked N g = decidable_of_iff (g • N = N) ⋯
Equations
- t.instFintypeElemMarkingOrbitAut N = Fintype.ofFinset (Finset.image (fun (g : t.Aut) => g • N) Finset.univ) ⋯
Orbit–stabilizer for marked trees (Prop 5.6 counting step):
#(orbit of N) · |Aut(T, N)| = |Aut(T)|.
Sanity checks on the cherry #
Hepp data (paper Def 5.1): branching vertices, leaves, markings, #
multiplicities
Number of children of the vertex at position p (0 if p is invalid);
Bool-free companion of isPos, kernel-reducible.
Equations
- (Anderson4D.PlaneTree.node cs).childCount [] = cs.length
- (Anderson4D.PlaneTree.node cs).childCount (i :: p) = if h : i < cs.length then cs[i].childCount p else 0
Instances For
Branching vertices: at least two children (paper Def 5.1's branching nodes; in a Hepp-valid tree every internal vertex is branching).
Equations
- t.BranchNodes = {v : t.VPos | 2 ≤ t.childCount ↑v}
Instances For
A Hepp marking on t (paper Def 5.1): dyadic scales N_n = 2 ^ Nexp n
attached to the branching vertices, with N_n ≥ 2 and strictly increasing
toward the root (N_{n⁺} > N_n for the parent n⁺). The exponent function
Nexp is stored as a total function on all vertices; its values at
non-branching vertices are junk (unconstrained), and both constraints
quantify over BranchNodes t only. Note that in a Hepp-valid tree the parent
of any vertex has ≥ 2 children, so parent_gt only ever inspects Nexp at
branching vertices.
Exponent of the dyadic scale: the paper's
N_nis2 ^ Nexp n.- pos (v : t.VPos) : v ∈ t.BranchNodes → 1 ≤ self.Nexp v
Scales are dyadic with exponent
≥ 1, i.e.N_n ∈ {2, 4, 8, …}. Strict monotonicity toward the root: the parent's scale is larger.
Instances For
Leaf multiplicities on t (paper Def 5.1): m v ≥ 2 at every leaf;
values at non-leaf vertices are junk (unconstrained).
The multiplicity of each leaf.
Every leaf occurs with multiplicity at least two.
Instances For
Proof toolkit for the D-hepp cross-check #
Key injectivity (stack decoder), order properties of KeyLe, the vertex
calculus of node trees (childV), tree isomorphisms Iso as
parent-commuting vertex bijections, the graft/split equivalence for nodes,
permutations of fibers of a classification, and run-length counting on
canonically sorted lists. All of it feeds card_aut_eq_autCard.
Key injectivity via a stack decoder #
Stack decoder inverting key: token 0 opens a frame, token 1 closes the
top frame into the frame below (children are collected in reverse order).
Equations
- Anderson4D.PlaneTree.dec [] x✝ = x✝
- Anderson4D.PlaneTree.dec (0 :: xs) x✝ = Anderson4D.PlaneTree.dec xs ([] :: x✝)
- Anderson4D.PlaneTree.dec (1 :: xs) (ts :: us :: st) = Anderson4D.PlaneTree.dec xs ((Anderson4D.PlaneTree.node ts.reverse :: us) :: st)
- Anderson4D.PlaneTree.dec (head :: xs) x✝ = Anderson4D.PlaneTree.dec xs x✝
Instances For
The serialization key is injective.
Equations
- a.instDecidableEq b = decidable_of_iff (a.key = b.key) ⋯
The lexicographic comparator is a total preorder, antisymmetric on keys #
Vertices of a node: root and child embeddings #
Isomorphisms of unordered rooted trees #
An isomorphism between the unordered rooted trees presented by s and t:
a parent-commuting bijection of vertices (for s = t this is exactly the
defining property of autSubgroup).
Equations
Instances For
The identity isomorphism.
Equations
Instances For
Transport along an equality of trees.
Equations
Instances For
Transport an isomorphism along equalities of its endpoints.
Equations
- Anderson4D.PlaneTree.Iso.congr hs ht e = (Anderson4D.PlaneTree.Iso.ofEq ⋯).trans (e.trans (Anderson4D.PlaneTree.Iso.ofEq ht))
Instances For
Automorphisms are exactly the self-isomorphisms.
Equations
Instances For
Splitting a node's vertex set into root and child parts; grafting #
Carrier bijection of a graft: permute children by π, act inside child i
by F i.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Splitting an isomorphism of nodes into child data #
The permutation of children induced by an isomorphism of nodes.
Equations
- Anderson4D.PlaneTree.childEquiv e = { toFun := Anderson4D.PlaneTree.childIdx e, invFun := Anderson4D.PlaneTree.childIdx e.symm, left_inv := ⋯, right_inv := ⋯ }
Instances For
The isomorphism induced by e from child i onto child childEquiv e i.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Master counting step: isomorphisms of nodes are counted by a child permutation together with per-child isomorphisms.
Permutations of the children list give isomorphisms #
Counting values of a list function via index fibers #
Permutations preserving a classification #
Assemble a family of fiber permutations into a permutation of the base.
Equations
- Anderson4D.PlaneTree.assemblePerm f u = { toFun := fun (i : ι) => ↑((u (f i)) ⟨i, ⋯⟩), invFun := fun (i : ι) => ↑((Equiv.symm (u (f i))) ⟨i, ⋯⟩), left_inv := ⋯, right_inv := ⋯ }
Instances For
Permutations preserving the classification f are families of
permutations of the fibers of f.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Runs of key-equal elements in a sorted list #
runsProdFactorial of a KeyLe-pairwise list is the product of the
factorials of the key multiplicities.
Assembly helpers #
The canon-class-preserving permutation count is the run-factorial product of the canonically sorted children.
Blueprint obligation (D-hepp cross-check).
The order of the automorphism group realized as parent-commuting vertex
permutations (Aut) equals the recursive product formula autCard (run
factorials on canonically sorted children × the children's own counts).
Proof: strong induction on t; an automorphism of
node cs fixes the root, permutes the depth-1 vertices by some σ with
canon cs[σ i] = canon cs[i] and restricts to subtree isomorphisms, giving an
equivalence of Aut (node cs) with (canon-class-preserving σ) × (a family of
subtree isomorphism sets, each of cardinality autCard cs[i]); the σ-factor
has runsProdFactorial many elements by key-injectivity. Kernel-checked
instances follow below.