···11+\taxon{Definition}
22+\author{liamoc}
33+\title{Submonoid}
44+\p{
55+A \em{submonoid} of a [monoid](dm-000O) #{(X, \iota, \bullet)} is a subset #{Y \subseteq X} such that #{Y} is closed under #{\bullet} and #{\iota \in Y}
66+}
···11+\import{dt-macros}
22+\title{Compactness}
33+\taxon{Definition}
44+\author{liamoc}
55+\p{
66+Let #{A} be a [cpo](dt-001D). Then #{x \in A} is \em{compact} (a.k.a. \em{finite}) iff for all [directed](dt-0010) #{X \subseteq A}:
77+##{
88+x \sqsubseteq \bigsqcup X \implies \exists y \in X.\ x \sqsubseteq y
99+}
1010+In English: A compact element will approximate some element of a [directed](dt-0010) set if it approximates the [lub](dt-0017). We write #{\compact{A}} for the set of compact elements of #{A}, i.e.:
1111+##{\compact{A} = \Set{x \in A \mid x\ \text{is compact} }}
1212+}
+10
trees/dt/dt-003V.tree
···11+\import{dt-macros}
22+\author{liamoc}
33+\taxon{Example}
44+\title{Compact elements}
55+\ul{
66+\li{Every element in a finite [cpo](dt-001D) is [compact](dt-003U). More generally, every element of a [cpo](dt-001D) of finite \em{height} (e.g. #{\mathbb{Z}_\bot}) is [compact](dt-003U). This is because finite [directed sets](dt-0010) are always [boring](dt-003W).}
77+\li{ Take the [cpo](dt-001D) #{\mathcal{P}(X)} of subsets of #{X} ordered by inclusion #{\subseteq}, as seen in \ref{dt-001G}. The [compact](dt-003U) elements of #{\mathcal{P}(X)} are those of finite cardinality. }
88+\li{ Take the [cpo](dt-001D) #{\mathbb{N} \nrightarrow \mathbb{N}} of partial functions on the natural numbers, ordered by inclusion of graphs. The [compact](dt-003U) elements of #{\mathbb{N} \nrightarrow \mathbb{N}} are the functions which are defined only for finite domains. }
99+}
1010+
+12
trees/dt/dt-003W.tree
···11+\import{dt-macros}
22+\import{table-macros}
33+\author{liamoc}
44+\taxon{Definition}
55+\title{Boring and interesting sets}
66+\p{
77+There are two kinds of [directed sets](dt-0010):
88+\ol{
99+ \li{ \em{Boring} sets contain their [lub](dt-0017). \br \strong{Example}: Finite directed sets are boring (but boring sets aren't all finite!). }
1010+ \li{ \em{Interesting} sets don't contain their [lub](dt-0017). \br \strong{Example}: #{\mathbb{N}} in the chain #{\mathbb{N} \cup \Set{ \infty }} is interesting.}
1111+}
1212+}
+17
trees/dt/dt-003X.tree
···11+\import{dt-macros}
22+\import{table-macros}
33+\title{Compact elements with infinitely many approximations }
44+\taxon{Example}
55+\author{liamoc}
66+\<html:div>[class]{sidefigure}{
77+\tex{\usepackage{tikz-cd}\usetikzlibrary{decorations.pathreplacing}\usepackage{amsmath}}{\begin{tikzcd}
88+ \infty + 1& \ar[l,thick]\text{\scriptsize compact}\\
99+ \infty\ar[u,-,thick] & \ar[l,thick]\text{\scriptsize non-compact}\\
1010+ 2\ar[u,-,thick, dotted] & \quad\arrow[dd, start anchor=north, end anchor=south, no head, xshift=-1em, decorate, decoration={brace,amplitude=10pt,raise=-15pt}, thick,"\text{compact}" right=0pt]\\
1111+ 1\ar[u,-,thick]\\
1212+ 0\ar[u,-,thick] & \quad
1313+\end{tikzcd}}
1414+}
1515+\p{[Compact](dt-003U) elements may still have an infinite number of approximations. Consider the [cpo](dt-001D) #{\mathbb{N} \cup \Set{ \infty, \infty + 1 }}, where we have tacked on an additional top element #{\infty + 1} to our normal [cpo](dt-001D) of natural numbers extended with infinity. Then, while #{\infty} is not [compact](dt-003U), #{\infty + 1} \em{is} [compact](dt-003U) — it is not the [lub](dt-0017) of an [interesting](dt-003W) [directed set](dt-0010). If #{\infty + 1} is the [lub](dt-0017) of a set #{X} then #{\infty + 1} must be in the set #{X}. Nonetheless, there are an infinite number of \em{approximations} to #{\infty + 1}, i.e., elements #{x} such that #{x \sqsubseteq \infty + 1}.}
1616+\p{As an aside, requiring that our [compact](dt-003U) elements have a \em{truly} finite number of approximations is the basis for the theory of \em{Berry domains and stable functions}.}
1717+
+4
trees/dt/dt-003Y.tree
···11+\taxon{Theorem}
22+\author{liamoc}
33+\title{Submonoids as a cpo}
44+\p{The [submonoids](dm-000R) of a [monoid](dm-000O) #{(X, \iota, \bullet)} form a [cpo](dt-001D) under #{\subseteq}, where union gives the [lub](dt-0017).}
+11
trees/dt/dt-003Z.tree
···11+\import{dt-macros}
22+\author{liamoc}
33+\title{Both infinite and compact}
44+\taxon{Exercise}
55+\p{Find a set in the [cpo of submonoids](dt-003Y) of #{(\mathbb{N},0,+)} that is \em{both} infinite and [compact](dt-003U)}
66+77+\solnblock{
88+\p{Take #{E \triangleq \Set{ n \in \mathbb{N} \mid n\ \text{is even}}}. Let #{Y \subseteq \pow{\mathbb{N}}} be directed and #{E \subseteq \bigcup Y}. Since #{2 \in E} there must exist #{y \in Y} such that #{2 \in Y}. Since #{(y,0,+)} is a [monoid](dm-000O), every positive multiple of #{2} is also in #{y}, thus #{E \subseteq y} and therefore #{E} is [compact](dt-003U).}
99+\p{Seeing as [compact](dt-003U) elements are also sometimes called \em{finite}, this is surprising as #{E} is an infinite set. The reason it is nonetheless [compact](dt-003U) is that #{E} is \em{finitely generated} — it is the smallest [submonoid](dm-000R) of #{(\mathbb{N},0,+)} such that the \em{finite} set #{\Set{ 2 } \subseteq E}. In fact, the [compact](dt-003U) [submonoids](dm-000R) of #{(\mathbb{N},0,+)} are precisely the finitely generated ones.
1010+}
1111+}
+33
trees/dt/dt-0040.tree
···11+\title{Compactness and Finiteness}
22+\author{liamoc}
33+\p{We begin by formalising the notion of an element in a [cpo](dt-001D) representing a \em{finite} amount of information. }
44+\transclude{dt-003W}
55+\p{
66+Following the above intuition, we might be tempted to say that the \em{"infinite"} elements of a [cpo](dt-001D) are those which are the [lub](dt-0017) of an [interesting](dt-003W) set, but this notion is too weak. Consider this [cpo](dt-001D) #{X}:
77+\figure{
88+\tex{\usepackage{tikz-cd,amsmath,amssymb}}{
99+\begin{tikzcd}
1010+\infty\\
1111+2\ar[u,thick,-,dotted]\\
1212+1\ar[u,thick,-] & & x\ar[uull,thick,-]\\
1313+0\ar[u,thick,-] \\
1414+& \bot \ar[ul,thick,-]\ar[uur,thick,-]
1515+\end{tikzcd}
1616+}}
1717+By the above definition, the only infinite element would be #{\infty}, but if we consider the following isomorphic [cpo](dt-001D), ordered by subset inclusion:
1818+\figure{
1919+\tex{\usepackage{tikz-cd,amsmath,amssymb}}{
2020+\begin{tikzcd}
2121+\mathbb{N}\\
2222+\{0,1,2\}\ar[u,thick,-,dotted]\\
2323+\{0,1\}\ar[u,thick,-] & & x\ar[uull,thick,-]\\
2424+\{0\}\ar[u,thick,-] \\
2525+& \emptyset \ar[ul,thick,-]\ar[uur,thick,-]
2626+\end{tikzcd}
2727+}}
2828+Then the set #{x} cannot be a finite set, as any finite set would be a subset of one of the finite sets in the chain #{\emptyset \sqsubseteq \Set{ 0 } \sqsubseteq \Set{0,1} \sqsubseteq \cdots}. Thus, it makes more sense for us to call #{x} an \em{"infinite"} element as well.}
2929+\transclude{dt-003U}
3030+\p{In the example cpo #{X} above, all the elements except #{\infty} and #{x} would be [compact](dt-003U). Thus, compactness better captures our notion of an element representing a finite amount of information. This understanding of [compact](dt-003U) elements is a generalisation of the notion of a finite element from the theory of algebraic lattices.}
3131+\transclude{dt-003V}
3232+\transclude{dt-003X}
3333+\transclude{dt-003Z}