Skip to content

Commit 5a73382

Browse files
committed
elaborating on trees
1 parent 2eaa035 commit 5a73382

File tree

2 files changed

+101
-39
lines changed

2 files changed

+101
-39
lines changed

content/sets-functions-relations/relations/orders.tex

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,23 @@
6060

6161
\begin{ex}
6262
The relation of \emph{divisibility without remainder} gives us a
63-
partial order which isn't a linear order. For integers $n$, $m$, we
64-
write $n\mid m$ to mean $n$ (evenly) divides $m$, i.e., iff there is
65-
some integer~$k$ so that $m=kn$. On $\Nat$, this is a partial order, but not a
66-
linear order: for instance, $2\nmid3$ and also $3\nmid2$. Considered
67-
as a relation on $\Int$, divisibility is only a preorder since
68-
it is not anti-symmetric: $1\mid-1$ and $-1\mid1$ but $1\neq-1$.
63+
partial order which isn't a linear order. For integers $n$ and~$m$, we
64+
write $n \mid m$ to mean $n$ (evenly) divides $m$, i.e., iff there is
65+
some integer~$k$ so that $m = kn$. On~$\Nat$, this is a partial order,
66+
but not a linear order: for instance, $2 \nmid 3$ and also $3 \nmid
67+
2$. Considered as a relation on $\Int$, divisibility is only a
68+
preorder since it is not anti-symmetric: $1 \mid -1$ and $-1 \mid 1$
69+
but $1 \neq -1$.
70+
\end{ex}
71+
72+
\begin{ex}
73+
The \emph{extension} relation on a set of sequences~$A^*$ is the
74+
following: $s \sqsubseteq s'$ iff $s = \emptyseq$ (the empty
75+
sequence), $s = s'$, or $s = \tuple{s_1, \dots, s_n}$ and $s' =
76+
\tuple{s_1, \dots, s_n, s_{n+1}, \dots, s_m}$. If $s \sqsubseteq s'$
77+
we also say that $s$ is an \emph{initial segment} of~$s'$. The
78+
extension relation on $A^*$ is a partial order but not a linear order,
79+
e.g., if $a \neq b$, then $ab \not\sqsubseteq ba$ and $ba \not\sqsubseteq ab$.
6980
\end{ex}
7081

7182
\begin{defn}[Strict order]

content/sets-functions-relations/relations/trees.tex

Lines changed: 84 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -13,66 +13,117 @@
1313
all parts of logic is a \emph{tree}. Finite trees occur in elementary
1414
parts of logic: for example, !!{formula}s can be understood in terms
1515
of their decomposition into a syntax tree, while !!{derivation}s in
16-
natural deduction also take the form of a finite tree.
16+
many derivation systems also take the form of finite trees.
1717
%
1818
Infinite trees appear already in the proof of the completeness
1919
theorems for propositional and first-order logic, and are used
20-
throughout mathematical logic. For example, in descriptive set theory,
21-
many pointclasses of real numbers (such as Borel sets or analytic sets)
22-
have representations in terms of trees.
20+
throughout mathematical logic.
21+
22+
The set-theoretic concept of a tree is closely related to the notion
23+
of a tree in graph theory. Here is a picture of a (finite) tree:
24+
25+
\begin{center}
26+
\begin{tikzpicture}[nodes={draw, circle}, -]
27+
\node{r} [grow'=up]
28+
child { node {a}
29+
child { node {c} }
30+
child { node {d} }
31+
child { node {e} }
32+
}
33+
child { node {b} };
34+
\end{tikzpicture}
35+
\end{center}
36+
37+
The lowermost node~$r$ is the root. Every node other than $r$ has
38+
exactly one parent node immediately below it. We can think of the relation
39+
a node~$x$ stands in to a node~$y$ if $y$ can be reached from $x$ by
40+
following edges upwards as $x$ being an ancestor of~$y$.
41+
42+
The ancestor relation in a tree is a strict partial order. This
43+
motivates the set-theoretic definition. To state it we need two
44+
concepts. A \emph{minimal element} in a set~$A$ partially ordered
45+
by~$\le$ is !!a{element} $x \in A$ such that for all $y \in A$ we have
46+
that~$x \le y$. A set is \emph{well-ordered} by~$\le$ if every one of
47+
its subsets has a minimal element.
2348

2449
\begin{defn}[Tree]
25-
A \emph{tree} is a pair $T = \tuple{X,\le}$ such that $X$ is a set
26-
and $\le$ is a partial order on $X$ with a unique minimal element
27-
$r \in X$ (called a \emph{root}) such that for all $t \in X$,
28-
the set $\Setabs{s}{s \le t}$ is well-ordered by $\le$.
50+
A \emph{tree} is a pair $T = \tuple{A, \le}$ such that $A$ is a set
51+
and $\le$ is a partial order on~$A$ with a unique minimal element
52+
$r \in A$ (called the \emph{root}) such that for all $x \in A$,
53+
the set $\Setabs{y}{y \le z}$ is well-ordered by~$\le$.
2954
\end{defn}
3055

3156
\begin{defn}[Successors]
32-
Suppose $T = \tuple{X,\le}$ is a tree.
33-
%
34-
If $t,s \in X$, $t < s$, and there is no $s' \in X$ such that
35-
$t < s' < s$, then we say that $s$ is a \emph{successor} of $t$.
57+
Suppose $T = \tuple{A, \le}$ is a tree.
58+
If $x,y \in A$, $x < y$, and there is no $z \in A$ such that
59+
$x < z < y$, then we say that $y$ is a \emph{successor} of~$x$.
3660
\end{defn}
3761

38-
\begin{defn}[Infinite and finitely branching trees]
39-
Suppose that $T = \tuple{X,\le}$ is a tree.
40-
%
41-
$T$ is said to be \emph{infinite} if $X$ is an infinite set,
42-
\emph{finite} otherwise.
43-
%
44-
If $T$ is such that every $t \in X$ has only finitely many
45-
successors, then we say that $T$ is \emph{finitely branching}.
62+
The successors of $x \in A$ are also called its \emph{children}. If
63+
$y$ is a successor of~$x$, then we call $x$ the \emph{predecessor} or
64+
\emph{parent} of~$y$.
65+
66+
\begin{prop}
67+
If $\tuple{A,\le}$ is a tree, then every $x \in A$ other than the root
68+
has at most one predecessor.
69+
\end{prop}
70+
71+
\begin{proof}
72+
Suppose $y < x$ and $y' < x$ and $y \neq y$. Then both $\{y,
73+
y'\} \subseteq \Setabs{z}{z<x}$. Since $\Setabs{z}{z<x}$ is
74+
well-ordered by~$\le$, it has a minimal element, which obviously
75+
must be either $y$ or~$y'$. So either $y \le y'$ or $y' \le y$. We
76+
assumed that $y \neq y'$, so actually either $y < y'$ or $y' < y$.
77+
Since we assumed that $y < x$ and $y' < x$, we furthermore have that
78+
either $y < y' < x$ or $y' < y < x$. So $y$ and $y'$ cannot both be
79+
predecessors of~$x$.
80+
\end{proof}
81+
82+
\begin{defn}
83+
A tree $T = \tuple{A, \le}$ is said to be \emph{infinite} if $A$ is an
84+
infinite set, and \emph{finite} otherwise. If $T$ is such that every
85+
$x \in A$ has only finitely many successors, then we say that $T$ is
86+
\emph{finitely branching}.
4687
\end{defn}
4788

4889
\begin{defn}[Branches]
49-
Given a tree $T = \tuple{X,\le}$, a \emph{branch} of $T$ is a
50-
maximal chain in $T$, i.e.\ a set $B \subseteq X$ such that
51-
for any $a,b \in B$ either $a \le b$ or $b \le a$, and for any
52-
$c \in X \setminus B$ there exists $d \in B$ such that neither
53-
$c \le d$ nor $d \le c$.
90+
Given a tree $T = \tuple{A, \le}$, a \emph{branch} of~$T$ is a
91+
maximal chain in~$T$, i.e., a set $B \subseteq A$ such that
92+
for any $x, y \in B$ either $x \le y$ or $y \le x$, and for any
93+
$z \in X \setminus B$ there exists $u \in B$ such that neither
94+
$z \le u$ nor $u \le z$.
5495
%
5596
We use $[T]$ to denote the set of all branches of $T$.
5697
\end{defn}
5798

5899
\begin{ex}
59100
A classic example of a finitely branching tree is the
60-
\emph{binary tree} of finite sequences of $0$s and $1$s,
61-
sometimes denoted $\{0,1\}^*$, ordered by the extension
101+
\emph{infinite binary tree} of finite sequences of $0$s and~$1$s,
102+
sometimes denoted $\{0,1\}^*$ or~$\Bin^*$, ordered by the extension
62103
relation $\sqsubseteq$ (e.g., $101 \sqsubseteq 101101$).
63104
Since any binary string can always be extended by adding
64105
a $0$ or a $1$ on the end, this tree contains infinitely
65-
many elements. Its root is the empty sequence $\emptyseq$.
106+
many elements: every element~$s$ has exactly two successors, $s0$ and~$s1$. Its root is the empty sequence $\emptyseq$.
107+
\end{ex}
108+
109+
\begin{ex}
110+
Slightly more generally, the set of finite sequences of natural
111+
numbers~$\Nat^*$ with the extension relation~$\sqsubseteq$ is also a
112+
tree. It is obviously not finitely branching: every $s \in \Nat^*$ has
113+
infinitely many successurs~$sn$, one for every $n \in \Nat$. Every $A
114+
\subseteq \Nat^*$ which is closed under~$\sqsubseteq$ is a
115+
\emph{subtree} of~$\Nat^*$. (That is, $A$ is such that if $s \in A$
116+
and $s' \sqsubseteq s$, then also $s' \in A$.) All finite trees can be
117+
represented as finite subtrees of~$\Nat^*$.
66118
\end{ex}
67119

68120
\begin{prop}[K\H{o}nig's lemma]
69-
If $T = \tuple{X,\le}$ is a finitely branching infinite tree,
121+
If $T = \tuple{A,\le}$ is a finitely branching infinite tree,
70122
then $T$ has an infinite branch.
71123
\end{prop}
72124

73-
A special case of K\H{o}nig's lemma widely used in
74-
computability theory, known as \emph{weak K\H{o}nig's lemma},
75-
is the following:
76-
any infinite subtree of $\{0,1\}^*$ has an infinite branch.
125+
A special case of K\H{o}nig's lemma widely used in computability
126+
theory, known as \emph{weak K\H{o}nig's lemma}, is the following: any
127+
infinite subtree of $\{0,1\}^*$ has an infinite branch.
77128

78129
\end{document}

0 commit comments

Comments
 (0)