Tree diagrams for Thompson's group
DefinitionCannonFloydParry_TreeDiagramsThe rest of section 2's vocabulary: standard dyadic intervals and partitions, tree diagrams and the element of a diagram represents, reducedness, the generators , the words they form, the positive elements and the normal-form data. The two standard-dyadic predicates do not mention , but they belong with the diagrams they qualify; “negative” elements (p. 224) are not defined here. The tree type and the partition its leaves cut out are imported from the companion trees definition, and from the Cannon–Floyd–Parry definition of section 1; neither is redefined here.
Standard dyadic intervals and partitions. p. 219: “Define a standard dyadic interval in to be an interval of the form , where , are nonnegative integers with .” It is stated as a relation between the two endpoints, with the bound written .
p. 220: “A partition of determines intervals for which are called the intervals of the partition. A partition of is called a standard dyadic partition if and only if the intervals of the partition are standard dyadic intervals.” A standard dyadic partition is given here by its increasing list of breakpoints, starting at , ending at , and with every consecutive pair a standard dyadic interval. Since a standard dyadic interval has distinct endpoints, that consecutive-pair condition already forces the list to increase.
Tree diagrams. p. 221: “Formally, a tree diagram is an ordered pair of -trees such that and have the same number of leaves.” And p. 221: “The tree is called the domain tree of the diagram, and is called the range tree of the diagram.” The -trees are those of the imported tree type.
The element of a diagram represents has no single defining sentence; it is pieced together from two passages of p. 221: “Suppose given . Lemma 2.2 shows that there exist standard dyadic partitions and such that is linear on the intervals of and maps them to the intervals of . To is associated the tree diagram , where is the -tree corresponding to and is the -tree corresponding to .” and “Furthermore, if is a tree diagram, then it is clear that there exists such that is linear on every leaf of and maps the leaves of to the leaves of .” An element of is the function of a tree diagram when is affine on every interval of the partition cut out by the domain tree and carries that partition's breakpoints, in order, to those of the partition cut out by the range tree. Note that membership in does not by itself make affine on the intervals of that partition: it provides only some finite set of breakpoints off which is affine, and that set need not sit inside the domain tree's marks. Nothing here asks the slopes to be powers of two; for these maps that is a consequence rather than a hypothesis.
p. 221: “In the other direction, if there exists a positive integer such that the and leaves of , respectively , are the vertices of a caret , respectively , then deleting all of and but the roots from and leads to a new tree diagram for . If there do not exist such carets , in , , then the tree diagram is said to be reduced.” Here a tree diagram is reduced when there is no position such that the th and th leaves are the two children of one vertex both in the domain tree and in the range tree, leaves being counted from , so that is the source's .
Generators. p. 217: “Now define functions in so that and for .” In particular ; and are the two generators already constructed in the imported definition of .
p. 224: “The functions in of the form with for will be called positive.”
p. 224, Corollary-Definition 2.7: “Every nontrivial element of can be expressed in unique normal form , where are nonnegative integers such that i) exactly one of and is nonzero and ii) if and for some integer with , then or .” The bundle defines only the conditions on this exponent data: two nonempty lists and of nonnegative integers, of the same length, satisfying i) and ii).
import Definitions.Def_CannonFloydParry
import Definitions.Def_CannonFloydParry_Trees
import Mathlib
/-!
# Tree diagrams for Thompson's group `F`
Cannon–Floyd–Parry, *Introductory notes on Richard Thompson's groups*,
L'Enseignement Mathématique (2) **42** (1996), 215–256, §2 (pages 219–224), with the
generators `Xₙ` from §1 (page 217).
The rest of §2's vocabulary: standard dyadic intervals and partitions, tree diagrams and the
element of `F` a diagram represents, reducedness, the generators `Xₙ`, the words they form, and
the positive elements. Everything in §2 that mentions `F` is here; the two standard-dyadic
predicates do not mention it, but they belong with the diagrams they qualify.
Two files are imported and neither is redefined here. `Def_CannonFloydParry` supplies `F`,
`UI`, `IsThompson`, `IsDyadic`, `extend`, and the generators `mapA` and `mapB`, so that
`X₀ = mapA` and `X₁ = mapB`. `Def_CannonFloydParry_Trees` supplies the tree type `TTree` and,
in particular, `leafCount` and `marks` — the partition of `[0,1]` cut out by a tree's leaves —
which is what a tree diagram is read against.
-/
namespace CannonFloydParry
/-! ### Standard dyadic intervals and partitions -/
/-- A **standard dyadic interval** in `[0,1]`: one of the form `[a / 2 ^ n, (a + 1) / 2 ^ n]`
with `a` and `n` nonnegative integers and `a ≤ 2 ^ n - 1` (CFP p. 219). Stated as a relation
on the two endpoints. -/
def IsStandardDyadicInterval (x y : ℝ) : Prop :=
∃ a n : ℕ, a + 1 ≤ 2 ^ n ∧ x = (a : ℝ) / 2 ^ n ∧ y = ((a : ℝ) + 1) / 2 ^ n
/-- A **standard dyadic partition** of `[0,1]`: a partition `0 = x₀ < ⋯ < xₙ = 1` all of whose
intervals are standard dyadic intervals (CFP p. 220), as the list of its breakpoints.
`List.IsChain` says consecutive entries are related, and `IsStandardDyadicInterval x y` already
forces `x < y`, so the increasing condition is not stated separately. -/
def IsStandardDyadicPartition (xs : List ℝ) : Prop :=
xs.head? = some 0 ∧ xs.getLast? = some 1 ∧ xs.IsChain IsStandardDyadicInterval
/-! ### Tree diagrams -/
/-- A **tree diagram** (CFP p. 221): an ordered pair of trees with the same number of leaves.
`dom` is the *domain tree*, `ran` the *range tree*. -/
structure TreeDiagram where
dom : TTree
ran : TTree
leaves_eq : dom.leafCount = ran.leafCount
/-- `L` is **affine on every interval** cut out by the list `xs` of breakpoints: between each
consecutive pair there are `a`, `c` with `L z = a * z + c` throughout the closed interval.
This is CFP's "linear on every interval of the partition" (p. 220). Nothing here asks the
slope to be a power of two; for the maps this is applied to that is a consequence, not a
hypothesis.
The pieces are cut out by *consecutive entries in list order*, not by the set of entries, and
the condition is imposed on the closed interval, so consecutive constraints overlap at the
shared endpoint. On a list of fewer than two entries there is nothing to check, and on a pair
that decreases the interval is empty and nothing is required — the predicate does not itself
demand an increasing list. It is only ever applied to `marks`, which does increase. -/
def AffineOnPieces (L : ℝ ≃o ℝ) (xs : List ℝ) : Prop :=
xs.IsChain (fun u v => ∃ a c : ℝ, ∀ z ∈ Set.Icc u v, L z = a * z + c)
/-- `f` is **the function of the tree diagram** `d` (CFP p. 221): `f` lies in `F`, is affine on
every interval of the partition cut out by the domain tree, and carries the breakpoints of that
partition, in order, to those of the partition cut out by the range tree.
Membership in `F` does not by itself make `f` affine on the intervals of the domain tree's
partition: it provides only *some* finite set of breakpoints off which `f` is affine, and that
set need not sit inside the tree's marks. -/
def Represents (d : TreeDiagram) (f : UI ≃o UI) : Prop :=
f ∈ F ∧ AffineOnPieces (extend f) d.dom.marks ∧
d.dom.marks.map (extend f) = d.ran.marks
/-- A tree diagram is **reduced** when no position admits a caret in *both* trees: there is no
`k` such that the `k`th and `(k+1)`th leaves of the domain tree are siblings and the `k`th and
`(k+1)`th leaves of the range tree are siblings (CFP p. 221).
CFP phrase it as the absence of carets `C` in the domain tree and `D` in the range tree at a
common position; deleting such a pair, keeping their roots, would give a smaller tree diagram
for the same element, which is why its absence is the right notion of irreducibility. -/
def IsReduced (d : TreeDiagram) : Prop :=
∀ k : ℕ, ¬ (d.dom.caretAt k = true ∧ d.ran.caretAt k = true)
/-! ### The generators `Xₙ` -/
/-- CFP's generators (p. 217): `X₀ = A` and `Xₙ = A^{-(n-1)} B A^{n-1}` for `n ≥ 1`. In
particular `X₁ = B`. `A` and `B` are `mapA` and `mapB` of the imported bundle. -/
noncomputable def X : ℕ → UI ≃o UI
| 0 => mapA
| n + 1 => (mapA ^ n)⁻¹ * mapB * mapA ^ n
/-- `X₀` is `A`. -/
@[simp] theorem X_zero : X 0 = mapA := rfl
/-- `X₁` is `B`. -/
@[simp] theorem X_one : X 1 = mapB := by
show (mapA ^ 0)⁻¹ * mapB * mapA ^ 0 = mapB
simp
/-- The word `X i ^ c₀ * X (i+1) ^ c₁ * ⋯`, reading exponents off a list and starting the index
at `i`. -/
noncomputable def wordFrom (i : ℕ) : List ℕ → UI ≃o UI
| [] => 1
| c :: cs => X i ^ c * wordFrom (i + 1) cs
/-- The positive word `X₀ ^ c₀ * X₁ ^ c₁ * ⋯ * Xₙ ^ cₙ` determined by a list of nonnegative
exponents, smallest index leftmost. This is the shape of CFP's positive elements (p. 224), and
the left half of their normal form; the right half is the inverse of such a word. -/
noncomputable def word (cs : List ℕ) : UI ≃o UI := wordFrom 0 cs
/-- The **positive** elements of `F` (CFP p. 224): the products `X₀^{b₀} ⋯ Xₙ^{bₙ}` with every
`bₖ` a nonnegative integer. -/
def IsPositive (f : UI ≃o UI) : Prop := ∃ cs : List ℕ, f = word cs
/-- CFP's conditions on the exponent data of a normal form (p. 224). Writing `n + 1` for the
common length, the two lists are nonempty and of equal length; **exactly one** of the last
entries `aₙ`, `bₙ` is nonzero; and if `aₖ` and `bₖ` are both positive for some `k < n`, then
`a_{k+1}` or `b_{k+1}` is positive.
Entries are read with `List.getD` and default `0`, so an index past the end reads as `0`; the
length condition means that never happens for the indices actually constrained. -/
def IsNormalFormData (as bs : List ℕ) : Prop :=
as ≠ [] ∧ as.length = bs.length ∧
((as.getD (as.length - 1) 0 = 0 ∧ 0 < bs.getD (as.length - 1) 0) ∨
(0 < as.getD (as.length - 1) 0 ∧ bs.getD (as.length - 1) 0 = 0)) ∧
∀ k, k + 1 < as.length →
0 < as.getD k 0 → 0 < bs.getD k 0 → 0 < as.getD (k + 1) 0 ∨ 0 < bs.getD (k + 1) 0
end CannonFloydParry
Read-back
What the Lean code literally says, in plain math · claude-opus-5
Read-back: nine declarations
Throughout, "list" means a finite ordered sequence, possibly empty, with repetitions allowed. Several accounts below need the same two background objects, and each account restates what it needs, so the accounts may be read in any order and none of them requires the others.
The unit interval as a type. One of the ambient types is the set
regarded as a type in its own right: an element of it is a pair consisting of a real number together with a proof that , and the associated real number is recovered by the first projection. Below, an element of this type is silently identified with the real number it carries. Note the interval is closed: both and belong to it.
Order isomorphisms. For an ordered set , an order isomorphism of is a bijection together with the property that for all ,
(The data is: a map, an inverse map, proofs that the two compose to the identity in both directions, and the displayed equivalence.) For or this is the same thing as an increasing bijection of onto itself. The order isomorphisms of form a group in which
- the product is the composite that applies first, i.e. ;
- the identity element is the identity map;
- the inverse is the inverse bijection;
- consequently is the identity and , so is the -fold composite of with itself, and denotes .
1. IsStandardDyadicInterval
This is a property of an ordered pair of real numbers — a two-place relation on , not a set and not a single interval. It asserts:
There exist natural numbers and (so and ) such that
Three points of literal detail.
The same and serve both equations. The quantifier is a single governing all three conjuncts, so exactly, and and are consecutive multiples of .
Where the arithmetic happens. The inequality is an inequality between natural numbers: , , and are all natural there, and is the natural-number power. The two equations are equations between real numbers: is converted to a real, and is the real number raised to the natural-number power . No truncated (natural-number) subtraction or division occurs anywhere.
What the hypothesis buys. It is equivalent to , i.e. . It is satisfiable for every (take ), so the relation is not vacuous. Together with it forces
So the relation holds only for pairs lying inside with strictly less than ; but note that "" is a consequence of the three displayed conjuncts and is not itself written down as a hypothesis.
Degenerate case. If then forces , and the pair is . For each there are exactly admissible pairs, namely for . The same pair of reals may be witnessed only by the reduced choice of , but the statement demands merely that some witness exist.
2. IsStandardDyadicPartition
This is a property of a list of real numbers (the list is finite; may be ). It is the conjunction of exactly three conditions:
- The list is nonempty and its first entry is . (Literally: the "first entry, if any" of the list is present and equal to . For the empty list no first entry is present, so the condition fails.)
- The list is nonempty and its last entry is , in the same sense.
- Every pair of consecutive entries, taken in list order, satisfies the relation of §1: for each with , there are natural numbers with , and .
Condition 3 is the "chain" condition. It constrains only adjacent pairs in the order in which they occur; it says nothing directly about non-adjacent pairs, and it holds automatically (with nothing to check) for a list of length or .
Edge cases. Because of 1 and 2, the empty list is not a standard dyadic partition, and no one-entry list is either: a one-entry list would need from 1 and from 2. Hence any list satisfying all three conditions has at least two entries. The shortest example is , for which condition 3 requires only the single pair , witnessed by .
What the three conditions amount to. By §1 each adjacent pair is strictly increasing, so the list is strictly increasing; combined with first entry and last entry the entries are and the closed intervals are standard dyadic intervals covering with disjoint interiors. Nothing beyond the three conditions is asserted; in particular the exponents are not required to be equal to one another, nor is any compatibility between successive witnesses imposed beyond the shared endpoint .
3. TreeDiagram
This declaration introduces a type (a kind of mathematical object), not a proposition. It depends on the following notion of tree.
Finite binary trees. A tree is built by the two rules: there is a tree called the leaf; and from any two trees and one forms a tree, the node with left subtree and right subtree . Two trees are equal only if built by identical sequences of these rules; in particular the node built from is distinct from the node built from unless , so the trees are ordered (planar) rooted binary trees in which every internal vertex has exactly two children. Equality of trees is decidable.
Leaf count. The number of leaves of a tree is defined recursively: the leaf has leaf, and the node with subtrees and has (number of leaves of ) (number of leaves of ) leaves. This is a natural number, and it is at least for every tree.
A tree diagram is a triple consisting of:
- a tree, called the domain tree;
- a tree, called the range tree;
- a proof that the two trees have the same number of leaves.
So the third component is not an extra piece of numerical data but a requirement: only pairs of trees with equal leaf counts give rise to a tree diagram, and each tree diagram remembers which tree is the domain one and which is the range one. The two trees are allowed to be equal, and the pair (leaf, leaf) is admissible (both have one leaf), so the type is nonempty. No other condition is imposed — in particular the two trees need not have the same shape, the same number of internal vertices, or the same height.
4. AffineOnPieces
This is a property of a pair: an order isomorphism of the whole real line, and a list of real numbers . It asserts exactly this chain condition:
For every pair of consecutive entries of the list, in list order — that is, for each with , with and — there exist real numbers and such that
Details that the wording is chosen to preserve.
Which pairs. Only adjacent pairs, and only in the given order: the first coordinate is the earlier entry. Nothing is asserted about and for , and nothing about the behaviour of outside .
The interval is closed at both ends. The condition ranges over with , so the endpoints and themselves are included; consecutive constraints therefore overlap at the shared endpoint.
The constants are local and unconstrained. The numbers and are chosen inside the quantifier, so they may differ from one adjacent pair to the next. Neither nor is required by the statement, and is a real number (no restriction to powers of , to rationals or to positive numbers appears). That is an increasing bijection forces whenever ; that is a consequence, not a hypothesis.
Degenerate cases. For a list with fewer than two entries — the empty list, or a one-entry list — there are no adjacent pairs and the condition holds for every , with nothing to verify. If some adjacent pair has , then the set of with is empty and the requirement for that pair is satisfied by any and whatsoever; the property does not itself demand that the list be increasing. Repeated entries likewise impose only the one-point condition , which is always solvable.
5. Represents
This is a property of a pair: a tree diagram (as in §3) and an order isomorphism of the closed unit interval . Four auxiliary notions enter, and all of them are spelled out below.
(a) The subdivision list of a tree. To a tree one attaches a finite list of real numbers as follows. First, for a tree and reals define a list recursively:
- is the empty list;
- for the node with subtrees , writing ,
the concatenation of the list for on , then the single entry , then the list for on .
The list attached to is then
Concretely this is the increasing list of all endpoints of the subdivision of obtained by repeatedly bisecting according to : the root corresponds to , and each node splits its interval at the midpoint, the left subtree taking the left half and the right subtree the right half. Its first entry is , its last entry is , and its length is (number of leaves of ) . For example the leaf gives ; the node with two leaves gives ; the node whose left subtree is a node of two leaves and whose right subtree is a leaf gives .
(b) Extension by the identity. Given an order isomorphism of , let be
This is an increasing bijection of , i.e. an order isomorphism of , and it agrees with on (including at the endpoints and , which must fix since it is an increasing bijection of ).
(c) The ambient group. Call an order isomorphism of piecewise dyadic-affine if:
there exists a finite set of real numbers, each element of which is a dyadic rational in the sense that for some integer (possibly negative) and some natural number , such that for all with whose open interval meets not at all, there exist an integer and a real with
Here is a real integer power of , so the admissible slopes are , always strictly positive; and may depend on and ; the interval on which the affine formula is required is the closed interval , while the set that must avoid is the open interval ; the elements of are arbitrary dyadic rationals and are not required to lie in ; and is allowed to be empty, in which case must be on all of .
Let be the smallest subgroup of the group of all order isomorphisms of that contains every piecewise dyadic-affine element — equivalently, the intersection of all subgroups containing them; equivalently again, the set of all finite products of piecewise dyadic-affine elements and their inverses, the empty product being the identity. Membership of is the first condition below. Note this is membership in the generated subgroup, which is weaker on its face than being itself piecewise dyadic-affine.
The assertion. " is represented by " is the conjunction of exactly three statements:
- ;
- is affine on the pieces cut out by the subdivision list of the domain tree of : for each pair of consecutive entries of there are reals with for all real with (the property of §4);
- applying to every entry of , entry by entry and keeping the order, yields exactly the list — equality of lists, hence equal lengths and equal entries in corresponding positions.
Remarks on what is and is not said. Condition 2 is imposed on the domain list only; no affineness condition is stated relative to the range list. Condition 3 is an equality of lists, not of sets, so the order is part of the claim; since the two trees of a tree diagram have the same number of leaves, the two lists have the same length automatically, and condition 3 is equivalent to the pointwise equalities for all , where and enumerate the domain and range subdivision lists. All the entries of these lists lie in , so acts on them as does. Nothing here asserts that is determined by , nor that every tree diagram is represented by something, nor that is piecewise dyadic-affine in the sense of (c).
6. X
This declaration defines, for every natural number , an order isomorphism of the closed unit interval . Two specific such isomorphisms are used, and both are described here.
The map . is the restriction to of the increasing bijection of given by
(The clauses agree on the overlaps, so the formula is unambiguous.) Thus is the piecewise linear increasing homeomorphism of with breakpoints at , sending them to respectively, with slopes on the three pieces.
The map . is the restriction to of the increasing bijection of given by
Thus is the identity on , and on it is the piecewise linear increasing homeomorphism with breakpoints sent to , with slopes .
The definition. is given by cases on whether is zero or a successor:
the product being taken in the group of order isomorphisms of described at the top, and the two multiplications associating to the left: . Because that product applies its right factor first, as a map
i.e. is the conjugate of that first pushes forward by applications of , then applies , then undoes the applications of . The exponent here is the natural number appearing in the case split, so the exponents are nonnegative powers and means the inverse of the -fold composite.
Indexing. Because of the shift in the second clause, the index on the left is one more than the exponent on the right: involves , involves , and in general for one has . In particular (see §8) and , meaning the map . The single index is the only one at which the first clause applies, so is and is not of the conjugate form.
7. X_zero
This asserts the single equality
between elements of the group of order isomorphisms of the closed unit interval , where is the value at of the family of §6 and is the piecewise linear increasing homeomorphism of described there, with breakpoints sent to .
There are no quantifiers, no hypotheses and no free variables: it is a closed equation between two specific order isomorphisms of . Equality here is equality of these objects, which for order isomorphisms is the same as equality of the underlying maps .
8. X_one
This asserts the single equality
between elements of the group of order isomorphisms of , where is the value at of the family of §6 and is the map described there: the identity on , and on the piecewise linear increasing homeomorphism with breakpoints sent to .
Again there are no quantifiers, hypotheses or free variables. Unwinding the definition of §6 at with , the left-hand side is , i.e. the conjugate of by the empty power of ; the assertion is that this equals .
9. IsPositive
This is a property of a single order isomorphism of the closed unit interval . It asserts:
There exist a natural number and a function from the natural numbers to the natural numbers such that
where the are the order isomorphisms of §6, the product is taken in the group of order isomorphisms of , the factors occur in increasing order of index from left to right, and the final factor is the identity element.
Precisely, the product is formed by folding the list of indices from the right onto the identity element: the result is
so the factor of smallest index stands leftmost. Since the product of order isomorphisms applies its right factor first, as a map this means: apply first, then , and finally .
Points of literal detail.
The exponents are natural numbers. takes values in , so every exponent is ; no negative exponent may occur. ( is the identity and .)
The list of indices always starts at and is nonempty. The index list is , of length ; even the smallest choice gives the one-entry list . So always appears as a factor, though possibly with exponent . There is no choice of producing an empty product and no way to skip an index — an index is "skipped" only in the sense that its exponent may be .
The function is total but only finitely much of it matters. is a function on all of , yet only the values appear in the product; the remaining values are unconstrained junk. Consequently the existential over is equivalent to an existential over the finite tuple of natural numbers.
Degenerate cases. Taking and makes the product the identity, so the identity map of has this property; the property is therefore not vacuous. Taking and gives the -fold composite , so every nonnegative power of has the property.
What is asserted is an equality of group elements only. The property says that equals some such product; it does not, of itself, state that lies in any particular subgroup, that the representation is unique, that the exponents are determined by , or that is minimal.
Confirmed by the mission captain (proposal self-audit).