···11+\import{dt-macros}
22+\taxon{Remark}
33+\title{[Lubs](dt-0017) of chains}
44+\p{The \em{limit} of the [ascending Kleene chain](dt-000X) of a [monotonic](dt-000J) function #{f : X \rightarrow X} is the same as the [least upper bound](dt-0017) of the set #{\Set{ f^n(\bot) \mid n \in \nat}} (where #{f^n} is the #{n}-fold self-composition of the function #{f}). If we require that our semantic domain #{X} is a [cpo](dt-001D), we know that this limit exists.
55+\scope{
66+ \put\transclude/toc{false}
77+ \put\transclude/numbered{false}
88+\subtree{\taxon{Thesis}
99+\p{Our semantic domains are [cpos](dt-001D), ensuring the presence of these limits.}}}}
+17
trees/dt-001I.tree
···11+\import{dt-macros}
22+\title{Continuity and Fixed Points}
33+\p{By choosing a [cpo](dt-001D) for our semantic domain, we can ensure that the [Kleene chain](dt-000X) has a limit. However, it is not guaranteed that the limit we find will be a [fixed point](dt-000S) to our [monotonic](dt-000J) function #{f}.}
44+\transclude{dt-001K}
55+\p{
66+To address this problem, we shall strengthen our requirement on functions from mere [monotonicity](dt-000J) to \em{continuity}.}
77+\transclude{dt-001J}
88+\transclude{dt-001L}
99+\transclude{dt-001M}
1010+\transclude{dt-001N}
1111+\transclude{dt-001O}
1212+\scope{
1313+ \put\transclude/toc{false}
1414+ \put\transclude/numbered{false}
1515+\subtree{\taxon{Thesis}
1616+\p{Computable functions are [continuous](dt-001J) functions on [cpos](dt-001D).}
1717+}}
+11
trees/dt-001J.tree
···11+\import{dt-macros}
22+\taxon{Definition}
33+\author{liamoc}
44+\title{Continuity}
55+\p{A function #{f : A \rightarrow B} on [cpos](dt-001D) #{A} and #{B} is \em{continuous} iff for all [directed](dt-0010) #{X \subseteq A},
66+\ol{
77+ \li{#{\bigsqcup \{ f(x) \mid x \in X \}} exists, and}
88+ \li{#{f(\bigsqcup X) = \bigsqcup \{ f(x) \mid x \in X \}}, i.e., #{f} preserves [lubs](dt-0017).}
99+}
1010+The intuition behind continuity is that "nothing is suddenly invented at infinity": our function will behave analogously at the limit as it does for each element in our [chain](dt-000V).
1111+}
+20
trees/dt-001K.tree
···11+\import{dt-macros}
22+\author{liamoc}
33+\taxon{Problem}
44+\title{Monotonicity is insufficient}
55+\p{Consider this [monotonic](dt-000J) function #{g} defined over a [cpo](dt-001D) #{(\mathbb{R} \cup \{\infty,-\infty\}, \leq)}:
66+##{g(x) = \begin{cases}
77+ \tan^{-1} x & \text{if}\ x < 0\\
88+ 1 & \text{otherwise}
99+ \end{cases}
1010+ }
1111+ Note this function is not continuous at 0. Starting from our [#{\bot} element](dt-000A) #{-\infty}, we can see that the limit of the [ascending Kleene chain](dt-000X) is #{0}:
1212+ ##{
1313+ \begin{array}{lcl}
1414+ g(-\infty) & = & -\frac{\pi}{2}\\
1515+ g(-\frac{\pi}{2}) & = & -1\\
1616+ g(-1) & \approx & -0.78\\
1717+ \end{array}
1818+ }
1919+ But #{g(0) = 1}! — the [lub](dt-0017) of the [Kleene chain](dt-000X) is \em{not} a [fixed point](dt-000S)!
2020+}
+11
trees/dt-001L.tree
···11+\import{dt-macros}
22+\author{liamoc}
33+\taxon{Theorem}
44+\title{Continuity implies monotonicity}
55+\p{All [continuous](dt-001J) functions are [monotonic](dt-000J).
66+\scope{
77+ \put\transclude/toc{false}
88+ \put\transclude/numbered{false}
99+\subtree{\taxon{Proof}
1010+\p{Consider two elements #{x, y} of a [cpo](dt-001D) where #{x \sqsubseteq y}. Then #{\Set{x,y}} is [directed](dt-0010) with a [lub](dt-0017) of #{y}. By the second condition in \ref{dt-001J}, we get #{f(y) = f(x) \sqcup f(y)} which is equivalent to #{f(x) \sqsubseteq f(y)}.}
1111+}}}
+12
trees/dt-001M.tree
···11+\import{dt-macros}
22+\author{liamoc}
33+\taxon{Example}
44+\title{[Monotonic](dt-000J) but not [continuous](dt-001J)}
55+\p{Consider this function from #{\mathbb{N} \cup \Set{\infty} \rightarrow \Set{\top,\bot}}, defined by:
66+ ##{f(x) = \begin{cases}
77+ \bot & \text{if}\ x \in \mathbb{N}\\
88+ \top & \text{otherwise}
99+ \end{cases}
1010+ }
1111+ This function is [monotonic](dt-000J), but, taking #{X = \mathbb{N}} (which is a [directed](dt-0010) subset of the [cpo](dt-001D) #{\mathbb{N} \cup \{\infty\}}), then #{f(\bigsqcup \mathbb{N}) = f(\infty) = \top}, but #{\bigsqcup \{ f(n) \mid n \in \mathbb{N} \} = \bigsqcup \{ \bot \} = \bot}. Thus, this function is not [continuous](dt-001J).
1212+}
+11
trees/dt-001N.tree
···11+\import{dt-macros}
22+\author{liamoc}
33+\taxon{Exercise}
44+\p{Show that if a function on [cpos](dt-001D) #{f : A \rightarrow B} is [monotonic](dt-000J), then #{\bigsqcup \Set{ f(x) \mid x \in X }} exists for any [directed](dt-0010) #{X \subseteq A} (i.e.the first condition for [continuity](dt-001J) in \ref{dt-001J}).}
55+\p{\strong{Hint}: It suffices to show that #{\Set{ f(x) \mid x \in X } \subseteq B} is [directed](dt-0010).}
66+\scope{
77+ \put\transclude/toc{false}
88+ \put\transclude/numbered{false}
99+ \put\transclude/expanded{false}
1010+\subtree{\taxon{Solution}
1111+\p{Because #{B} is a [cpo](dt-001D), it suffices to show that #{\Set{ f(x) \mid x \in X } \subseteq B} is [directed](dt-0010). Let #{a,b \in \Set{ f(x) \mid x \in X }}. Let #{x_a, x_b \in X} be the values that #{f} maps to #{a} and #{b} respectively, i.e. #{f(x_a) = a} and #{f(x_b) = b}. Because #{X} is [directed](dt-0010), an [upper bound](dm-000C) of #{x_a} and #{x_b} exists in #{X}. Call this [upper bound](dm-000C) #{x_c}. Because #{x_a \sqsubseteq x_c} and #{x_b \sqsubseteq x_c}, we know that #{f(x_a) = a \sqsubseteq f(x_c)} and #{f(x_b) = b \sqsubseteq f(x_c)} by [monotonicity](dt-000J) of #{f}. Also, #{f(x_c) \in \Set{ f(x) \mid x \in X }} because #{x_c \in X}. Therefore, because two arbitrary elements in #{\Set{ f(x) \mid x \in X }} have an [upper bound](dm-000C) within the set, the set #{\Set{ f(x) \mid x \in X }} is [directed](dt-0010). }}}
+15
trees/dt-001O.tree
···11+\import{dt-macros}
22+\taxon{Theorem}
33+\author{liamoc}
44+\title{Alternative definition of continuity}
55+\p{A function #{f : A \rightarrow B} on [cpos](dt-001D) #{A} and #{B} is [continuous](dt-001J) iff:
66+\ol{
77+ \li{#{f} is [monotonic](dt-000J), and}
88+ \li{#{f(\bigsqcup X) = \bigsqcup \{ f(x) \mid x \in X \}}, for all [directed](dt-0010) #{X \subseteq A}}
99+}
1010+\scope{
1111+ \put\transclude/toc{false}
1212+ \put\transclude/numbered{false}
1313+\subtree{\taxon{Proof}
1414+\p{The second condition here is identical to that of \ref{dt-001J}. The [monotonicity](dt-000J) requirement is equivalent to the first condition of \ref{dt-001J}, with one direction shown by \ref{dt-001L}, and the other shown by the solution of \ref{dt-001N}. }}}
1515+}