A well-quasi-ordering is a preorder in which every infinite sequence has with . A sequence without such a pair is a bad sequence. We use rooted-tree homeomorphic embedding: an injective map of vertices preserving lowest common ancestors, so edges may become paths and a source root may map below the host root. Labels, when present, must increase in their label preorder. This convention is important; adjacency-preserving embeddings do not give the same theorem.
We first prove the auxiliary Higman lemma. If is a well-quasi-order, its finite words are well-quasi-ordered by subsequence embedding with increased letters. Suppose not, and choose a minimal bad sequence of words: at each position choose one of least length among those permitting a bad continuation of the preceding prefix. No word is empty. Write by deleting its last letter. A well-quasi-order has an infinite nondecreasing subsequence of any sequence: if no member of an infinite subsequence had infinitely many later upper bounds within it, one could recursively avoid the finitely many upper bounds of earlier choices and construct a bad sequence. Choose a member with infinitely many later upper bounds, restrict to those bounds and repeat. Apply this to get .
The sequence is still bad. An earlier prefix word embedding into a would embed into , contrary to the original bad sequence. An embedding would extend by the comparable last letters to , equally impossible. But its next word at position is strictly shorter than , contradicting minimality. This proves Higman's lemma, including the possibility that a deleted word is empty, since that would make the proposed bad continuation impossible immediately.
We now prove the labelled version of Kruskal's tree theorem for labels in any well-quasi-order . Assume there is a bad sequence , and choose one minimal in vertex count at each position, subject to bad extendibility. Let be the collection of rooted subtrees obtained by deleting a root and taking one of its child branches, over all .
This collection is well-quasi-ordered. Otherwise take a bad sequence from . Only finitely many of these objects can come from any bounded initial segment of the , since that segment has only finitely many child branches and a bad sequence cannot repeat an object. Pass to a subsequence with a child branch of and . Then
is bad: a prefix tree embedding into would embed into , and the are already bad among themselves. The next object has fewer vertices than , contradicting the minimal bad choice. Notice that a child branch does embed into its full tree under the stated homeomorphic convention.
List each tree's child branches in any chosen order. The preceding result and Higman's lemma make these finite lists well-quasi-ordered. The product of two well-quasi-orders is well-quasi-ordered: first thin to an infinite nondecreasing subsequence in one coordinate and then find an increasing pair in the other. Therefore there are such that the root label of increases to that of , and the child list of embeds as a subsequence into the child list of , with each source branch homeomorphically embedding into its matched branch.
Map the root of to the root of , and use these branch embeddings below it. Different child branches map into different host branches, so their lowest common ancestor maps to the host root. Within each branch it is preserved by the chosen embedding. Thus the whole map is injective, preserves all lowest common ancestors and respects labels, contradicting badness. Finite rooted trees labelled by a well-quasi-order are well-quasi-ordered under homeomorphic embedding. Taking one label proves Kruskal's tree theorem. If one uses a root-preserving convention, mark the root by a separate label incomparable with all ordinary labels and apply the labelled theorem; the marked root then has to map to the marked root. No adjacency-preservation assertion is being made.
For Friedman's finite form of Kruskal's theorem, fix . The required finite conclusion is
Assume there were arbitrarily long bad sequences satisfying these size bounds. Form the tree of their finite prefixes, using rooted-tree isomorphism classes as objects. At position only finitely many finite rooted trees have at most vertices, so this prefix tree is finitely branching and has nodes at arbitrarily large depths. König infinity lemma supplies an infinite branch: at each step some child must still have arbitrarily deep extensions, because there are only finitely many children. The branch is an infinite bad sequence of finite rooted trees, contradicting Kruskal's theorem. Thus such an exists. The argument also works for any prescribed size-bound function, or any fixed finite label set, because each position then still has finitely many possible objects.
Write when every -coloring of the -element subsets of has a homogeneous subset of order type . The Erdős-Rado theorem for pairs states, for infinite ,
In particular a countable-color partition of pairs from has an uncountable homogeneous set. The standard Erdős-Rado theorem for finite arities is
We prove it, including the pair case, by constructing an end-homogeneous routing tree.
For a coloring , , route each vertex as follows. Given its previously selected increasing ancestors, choose the least greater than all those ancestors such that
The candidate always qualifies. Select it and stop if it is the minimum; otherwise add the selected to the ancestors and continue, including at limit stages. The ancestors are strictly increasing below , so the process must stop. If a selected ancestor is routed separately, its earlier path is the same: its color constraints agree with those of and the same least choices are forced. Thus the paths define a tree order on the vertices.
A node at depth is determined by the table of its colors on the -subsets of its ancestors. Given the table on , recursively take the least compatible candidate at each depth; at a limit depth use all preceding constraints. This recovers both the path and its final node. Therefore
Along any branch, once an -tuple of ancestors is fixed, the color is independent of all subsequent choices of on that branch. This is exactly end-homogeneity.
For the pair case take and . If all node depths were below , then each level would have size at most , and the union of levels would have size at most . This contradicts the number of vertices. Hence some node has at least ancestors. On that branch assign to each ancestor its constant color to all later ancestors. Regularity of implies that one of the colors occurs times, giving the desired homogeneous set. Its increasing enumeration has a subsequence of order type .
For the higher-arity induction let , so . At depths below the same bound is at most , forcing a branch of length . End-homogeneity defines a coloring of its -tuples by the common color of adjoining a later branch vertex. The previous-arity theorem gives a subset of order type homogeneous for , and every -tuple from it then has the same color under . The base case is the infinite pigeonhole principle at . This proves the full finite-arity statement.
One suitable ordinal partition-bound function is
It is nondecreasing and . It is total: choose an infinite cardinal ; the pair theorem supplies a homogeneous subset of size for every allowed color number, and its order type contains a copy of . Thus is a bound in the displayed minimum.
Let an uncountable cardinal be the supremum of a cofinal increasing sequence of iterates of , with each iterate and its successor still below . For every , monotonicity and some later iterate give . Thus the relevant consequence of being such a supremum is
If the iteration already reaches a fixed point, its constant continuation of course has that fixed point as supremum as well. A strictly increasing countable iteration instead has a countable-cofinality supremum and cannot satisfy the uncountable regular tree-property condition below; one must not assume existence of the extra condition from iteration alone.
Here closure under forces a strong-limit bound. For infinite , color distinct binary strings in by their first differing coordinate. Three strings cannot have all three first-difference coordinates equal, because there are only two bit values at that coordinate. Hence this -coloring has no homogeneous triangle, and in particular no homogeneous subset of order type . Therefore
Since and , it follows that for every .
Now impose the tree property: every tree of height , with nonempty levels of size below , has a cofinal branch. If this definition is extended to singular cardinals, it also forces regularity. For a singular , take disjoint chains of lengths cofinal in , one for each index below . Every level has at most nodes and the height is , but each branch remains in one shorter chain. A common new root may be added if rooted trees are required. Under the more usual convention the tree property is only defined at regular uncountable cardinals, so regularity is part of the convention instead.
For a coloring with , the routing tree has levels of size at most by the strong-limit property. If some node has height at least , there is already an end-homogeneous branch of that length. Otherwise the tree has height exactly : a smaller number of levels of size below could not contain its nodes, by regularity. The tree property then supplies a cofinal branch. Along it, one of the fewer than ancestor colors occurs times, again by regularity. Thus for every , giving
Moreover the closure argument gives strong limit and the tree argument gives regularity. Thus an uncountable -closed cardinal with the tree property is strongly inaccessible.
The final printed assertion requires that qualification. The ordinary tree property alone does not imply strong inaccessibility. At it is König's infinity lemma and is not uncountable. Even when the convention excludes , there are relative-consistency models in which has the tree property, although a successor cardinal is never strongly inaccessible; this result is recalled in the introduction of Friedman, Honzik and Stejskalová. No proof of the bare implication is possible under that standard definition. The preceding paragraphs prove the corrected implication in the actual -closure setting and the requested fixed-point conclusion, without silently replacing tree property by weak compactness.
A well-quasi-ordering is a reflexive transitive relation such that every infinite sequence has with . An infinite sequence without such a pair is a bad sequence. For a finite rooted tree, let denote the lowest common ancestor of two vertices. A homeomorphic embedding of a rooted tree into another is an injective map with
Thus it preserves branching and sends each edge to a nonempty downward path, with different branches separated. The source root may map to a vertex below the target root. Kruskal's tree theorem says that finite rooted trees are well-quasi-ordered under these embeddings.
We first establish the word lemma used in the proof. The Higman lemma says that finite words over a well-quasi-ordering are well-quasi-ordered by subsequence embedding with increased letters. Every infinite sequence in has an infinite nondecreasing subsequence. To see this, some term must have infinitely many later terms above it: otherwise, repeatedly choosing past all finitely many successors of earlier chosen terms constructs a bad sequence. Apply this observation again inside that infinite upper cone, and repeat.
If the Higman lemma failed, choose a minimal bad sequence of words , minimizing length at each position among choices admitting a bad continuation. None is empty. Write , with last letter , and choose indices on which the are nondecreasing. Then
is still a bad sequence. A comparison from the original prefix into some would give one into . A comparison would extend by to . Both contradict the original badness. But the replacement at position is shorter than , contradicting minimality. This proves the Higman lemma.
Now suppose Kruskal's tree theorem fails and choose a minimal bad sequence , minimizing the number of vertices at each stage. Let contain all proper descendant-rooted subtrees of all . We claim that is well-quasi-ordered by rooted-tree homeomorphic embeddings. Otherwise take a bad sequence from it. Each finite set of host trees supplies only finitely many subtrees, so after passing to a subsequence we may arrange that is a proper subtree of with . The sequence
is bad: a comparison from a prefix tree into would compose with its inclusion into and contradict the original badness; comparisons among the are excluded by construction. Yet is smaller than , contradicting minimality. This proves the claim.
List the immediate-child subtrees of each in any fixed order. These are finite words over . By the Higman lemma, some earlier child list embeds into a later one with increased letters. The selected child subtrees embed into distinct child branches of the later tree. Map the source root to the target root and use these embeddings in the selected branches. The paths from the target root to the embedded child roots are separated because the target child branches are distinct. The resulting injection preserves lowest common ancestors, giving , a contradiction. This proves Kruskal's tree theorem completely. It also gives the root-preserving homeomorphic version: once the weaker relation is well-quasi-ordered on all finite rooted trees, apply the Higman lemma to their child lists to obtain a comparison preserving the root.
For the proposed adjacency-preserving rooted-tree embedding, the answer is no: it is not a well-quasi-ordering. For every , form from a stem of edges starting at the root and then attach two leaves to its terminal vertex. The only vertex with two children is at depth . A root-preserving adjacency injection preserves depths: the unique path of length from the root maps to a simple path of length from the target root. The image of a vertex with two children must still have two distinct children. Thus an embedding must send the branch vertex at depth to the unique branch vertex at depth , forcing . Therefore
This is the branching-depth antichain of rooted trees. Homeomorphic embeddings can stretch the stem and hence do not have this obstruction.
Figure 1.
Root-preserving adjacency embeddings preserve the depth of the branching vertex
. Details.
A well-quasi-ordering is a reflexive transitive relation for which every infinite sequence has with . A bad sequence has no such pair. The labelled version of Kruskal's tree theorem says that finite rooted trees labelled in any well-quasi-ordering are themselves well-quasi-ordered by label-monotone tree embedding.
More explicitly, an embedding is an injective map of vertices preserving lowest common ancestors, and satisfying at every vertex. The root need not map to the host root. This is a homeomorphic embedding of a rooted tree: an edge can map to a longer path, but distinct branches must separate at the image of their common ancestor. We shall prove the stronger version in which every vertex's children are linearly ordered and embeddings respect that ordering. Forgetting the child order gives the stated result for unordered rooted trees.
We first establish the two well-quasi-ordering facts used in the proof. Every infinite sequence in a well-quasi-ordering has an infinite nondecreasing subsequence. Indeed, color an index pair according to whether . The infinite two-color Ramsey theorem gives a homogeneous infinite set; the negative color would be a bad sequence, so the positive color gives the required subsequence. It follows that the componentwise product of two well-quasi-orderings is a well-quasi-ordering: first extract a nondecreasing subsequence in one coordinate, then find a good pair in the other.
Next prove Higman lemma: finite words over a well-quasi-ordering , ordered by subsequence embedding with coordinatewise increase of letters, are a well-quasi-ordering. Suppose not, and choose a minimal bad sequence by making the length of minimal among all choices admitting an infinite bad continuation of the already fixed prefix. No word is the empty word, since that embeds in every later word. Write with . Extract indices for which . Consider
It cannot be a bad sequence, since its first replacement is shorter than the minimal choice . But a good pair within the original prefix is impossible. A prefix word embedding into would embed into , contradicting the original bad sequence. And embedding into would, after appending the ordered last letters, embed into , also impossible. This contradiction proves Higman lemma, including words of arbitrary finite length.
Now suppose there is a bad sequence of finite ordered labelled rooted trees. Choose a minimal bad sequence by minimizing the number of vertices of , subject to the fixed prefix having an infinite bad continuation. Existence of a least possible size uses ordinary well-ordering of the natural numbers; after selecting such a tree retain a bad continuation to make the next choice.
Let be the collection of all proper rooted subtrees of all , with inherited labels and child ordering. These are the subtrees rooted at vertices other than the root, and each embeds into its containing tree. We claim is a well-quasi-ordering under the same label-monotone tree embedding.
Otherwise choose a bad sequence from , and choose for each a containing tree . The indices are unbounded in every tail: finitely many containing trees have only finitely many rooted subtrees, and an infinite bad sequence cannot repeatedly use one of these, since it embeds into itself. Passing to a subsequence, arrange . The spliced sequence
is bad. A good pair within either piece is already excluded. A comparison , where , would compose with to give , contradicting the original bad sequence. But is smaller than , contradicting the minimal choice at that position. This proves the claim about .
Describe by its root label and its finite ordered list of child subtrees. Every entry of lies in . By Higman lemma, is a well-quasi-ordering; hence so is . There exist with and an increasing injection matching the child subtrees in to child subtrees in , each by an embedding. Map root to root and combine these child embeddings. Different matched children lie in different target branches, so their paths meet exactly at the target root; within each branch the chosen embedding already preserves lowest common ancestors. The resulting map is a label-monotone tree embedding , a contradiction. Therefore
The empty labelled tree, if included by convention, embeds into every tree and causes no exception. A common stronger formulation requires the source root to map to the target root. It also follows: the theorem just proved makes all labelled child subtrees a well-quasi-ordering, and the product then provides a good pair with roots explicitly matched, by the same final assembly. Internal child roots may map further down their matched branches. This must not be confused with edge-to-edge embedding, for which the theorem is false in general.
For finite rooted trees write when there is an injective function of vertices preserving greatest common ancestors, equivalently an infimum-preserving rooted-tree homeomorphic embedding. No linear ordering of siblings is imposed. Kruskal's tree theorem says that every infinite sequence has an earlier tree embedding into a later tree: this embedding relation is a well-quasi-ordering.
The finite form uses a parameter to restrict the growth of the trees. It asserts the existence of a length for which
Here is the number of vertices. The parameter is universally quantified; changing the starting index just shifts the parameter. This is Friedman's finite form of Kruskal's theorem.
Fix and suppose there were arbitrarily long sequences violating the conclusion. Form a tree whose nodes are their finite prefixes, including the empty prefix. Choose one representative of each finite rooted-tree isomorphism type. At position there are only finitely many choices, since the tree has at most vertices. Hence this finite bad-sequence tree is finitely branching. It has nodes at arbitrarily large heights by the supposed failure of the finite form. König infinity lemma supplies an infinite branch. The branch is an infinite sequence satisfying the size bounds and with no pair having , contradicting Kruskal's tree theorem. Therefore the finite length exists for every .
The significance is that this is a true statement about finite objects and natural numbers which is not provable in Peano arithmetic; in fact it is not provable in the stronger arithmetical transfinite recursion theory in second-order arithmetic, . It is a natural combinatorial instance of incompleteness. For fixed , the condition can be checked by finite search over trees and injective vertex maps, so its uniform arithmetic form is with a computable, indeed primitive recursive, predicate . Thus its least sufficient length is a total computable function, but its totality cannot be proved in those theories. Each fixed numerical instance can nevertheless be proved in Peano arithmetic by verifying some particular finite witness. The obstruction concerns the uniform statement for all parameters, rather than the decidability of any one finite search.
Write for the recursively repetition-free labelled trees. Each rooted tree is finite because the inductive definition forms it from an already constructed finite list of finite child rooted trees. Its label list is obtained by visiting the root first, then each child subtree in its prescribed order, using a depth-first traversal of a tree. This list can have repetitions. In particular, different branches may use the same label; the children are required to be distinct rooted trees, not to have distinct root labels.
For any finite label pool , prove by mathematical induction on that is finite. For it is empty. For each root , the children form a finite repetition-free sequence from , which is finite by mathematical induction. There are therefore finitely many child lists for that root, and the finite union over is finite. More explicitly, if is the number of rooted trees on a pool of labels, then
There is no countable choice in this finite mathematical induction.
Now suppose were an injective enumeration of a countably infinite subset of . Their canonical traversal lists give an explicit enumeration of all labels used. If infinitely many different labels occur, the least-first-occurrence procedure gives a countably infinite subset of , a contradiction. Otherwise all labels belong to one finite set . Every then belongs to : recursively its root lies in and its child rooted trees use only with that root removed. But is finite by the preceding mathematical induction, again a contradiction. Finally the single-vertex rooted tree labelled is injective, so is infinite. Hence recursively repetition-free labelled trees preserve Dedekind-finiteness:
The nodes have Lagrange interpolation polynomials
The coefficients obtained from and reproduce the given Butcher tableau. In particular, the second row's last entry is , which is missing from the TeX transcription. Thus this is the three-stage Lobatto IIIA method.
One applicable collocation theorem is that -stage Lobatto IIIA collocation has order . Alternatively, the fourth-order conditions for a Runge-Kutta method give a direct verification. With , and , the eight required Butcher order conditions are
Powers of here are componentwise. Substitution satisfies all eight. The stability function computed from the stages is
Its expansion satisfies , so even the scalar linear problem fails the fifth-order condition. Hence
The Butcher order condition theorem equates order with all conditions for rooted trees through order ; the displayed conditions are its complete specialization through order four.
An element fixing the first level restricts to an automorphism on each rooted subtree, and composition is coordinatewise. Therefore
is a homomorphism. If all three sections are trivial, fixes every word, so is injective.
Directly from the recursions,
The generators found in the preceding part therefore have every section in , so .
Moreover, every coordinate projection of this image contains both and , and is therefore onto . Since acts transitively on the first level, induction shows that acts transitively on every level of the rooted tree. The th level has vertices, so the orders of these finite orbits are unbounded. Hence is infinite.
Path compression 2026-10-18
Path compression changes parent pointers during a disjoint-set find operation so that future queries traverse fewer edges. Full path compression first follows the entire parent route to its root of a tree, then makes every member on that route point directly to that same root of a tree. No member changes its block of a set partition or its disjoint-set representative. Pointers outside the traversed route stay as they were. The following iterative Python implements full path compression and union by rank; parent and rank are initially indexed arrays with parent[x] = x and rank[x] = 0 for every valid member.
def find(x):
    root = x
    while parent[root] != root:
        root = parent[root]
    while parent[x] != x:
        following = parent[x]
        parent[x] = root
        x = following
    return root

def unite(x, y):
    a, b = find(x), find(y)
    if a == b:
        return False
    if rank[a] < rank[b]:
        a, b = b, a
    parent[b] = a
    if rank[a] == rank[b]:
        rank[a] += 1
    return True
Starting from the displayed disjoint-set forest, find(3) traverses , returns and changes only from to . The route still has two edges. Then find(5) changes only from to . The final parent array is ; every stored rank retains its displayed value. The rooted tree at now has height one although its root's rank is two. Root still represents a separate singleton set.
Figure 1.
Full path compression shortens two parent routes while union by rank metadata stays unchanged
. Arrows point towards the parent in a rooted tree; self-pointers at roots are omitted. The same partition of a set appears before and after find(3) followed by find(5). Labels record stored ranks, including historical ranks at nonroots. Details.
The two-pass algorithm first discovers the answer and then reuses it. During the second pass, saving following before overwriting the pointer preserves the remaining route. Every replacement pointer targets the original root of a tree, proving that the partition of a set is unchanged.
Full path compression is one specific rule. The authored UF.java implementation instead uses path halving, redirecting a visited member to its parent's parent while advancing along the route. Its union by rank rule agrees with the one above.[ref]