In a set theory, a tree is defined to be a set and a relation
such that:
The nodes (elements of the tree) immediately greater than a node are termed its children, the node immediately less is its parent (if it exists), any node less is an ancestor and any node greater is a descendant. A node with no ancestors is a root.
The partial ordering represents distance from the root, and the well-ordering requirement prohibits any loops or splits below a node (that is, each node has at most one parent, and therefore at most one grand-parent, and so on). Conversely, if then there is exactly one such that and there is nothing between and . Note that there is no requirement that a node have a parent-there could be an infinitely long branch
with each .
Since there is generally no requirement that the tree be connected, the null ordering makes any set into a tree, although the tree is a trivial one, since each element of the set forms a single node with no children.
Since the set of ancestors of any node is well-ordered, we can associate it with an ordinal. We call this the height, and write:
. This all accords with normal usage: a root has height 0, something immediately above the root has height , and so on. We can then assign a height to the tree itself, which we define to be the least number greater than the height of any element of the tree. For finite trees this is just one greater than the height of its tallest element, but infinite trees may not have a tallest element, so we define
.
For every
we define the -th level to be the set
. So of course is all roots of the tree. If
then is the subtree of elements with height less than :
.
We call a tree a -tree for any cardinal if
and
. If is finite, the only way to do this is to have a single branch of length .
|