\chapter{Literature Review}

\section{Introduction}
This chapter covers literature review on algorithm selection and reinforcement learning. The discussion focuses on background and methods surrounding these topics. The last section discusses the reinforcement learning approach to algorithm selection.

\section{Algorithm Selection}
The algorithm selection (AS) problem describes how a set of problems can be mapped to a set of algorithms such that the least amount of computing resources are spent to solve the whole set of problems \citep{rice1976algorithm}. A model of the AS problem is depicted in Figure \ref{fig:asmodel}.

\begin{figure}[H]
	\centering
	 \scalebox{.7}{\includegraphics{./img/as_model.png}}
	\caption{Model of the AS problem}
	\label{fig:asmodel}
\end{figure}

An AS model is composed of four components: \textit{problems, features, algorithms,} and \textit{performance}.

\begin{enumerate}
	\item Problem space ($\mathbf{P}$) \\
	The set of problem instances. Instances are often grouped into \textit{problem classes}, which categorize their level of difficulty. The number of problems are usually vast and diverse.
	\item Feature space ($\mathbf{F}$) \\
	The set of features describing the problem instances. Specifically, features define the measurable characteristics of problems, which provides an indication on the difficulty of problems.
	\item Algorithm space ($\mathbf{A}$) \\
	The set of algorithms used to solving the problem instances. A large number of algorithms could be possibly used, but practically only a handful is considered.
	\item Performance space ($\mathbf{Y}$) \\
	The set of metrics that defines how algorithm performance is measured.
\end{enumerate}

Formally stating the AS problem,

\fbox{
\begin{minipage}{\dimexpr\textwidth-1cm}
\textit{Given problem instance $x \in \mathbf{P}$ with features $f(x) \in \mathbf{F}$ , find a selection mapping $\alpha = S(f(x))$ in algorithm space $\mathbf{A}$, where the selected algorithm $\alpha \in \mathbf{A}$ provides the maximum performance $y(\alpha(x)) \in \mathbf{Y}$ in solving the problem instance $x \in \mathbf{P}$.}
\end{minipage}
}

\subsection{Motivation}
AS is based on the observation that there is no single algorithm that can optimally solve all kinds of problems. The \textit{No Free Lunch} (NFL) theorems assert that on a set of problems with varying degrees of difficulty, all algorithms perform the same on average \citep{wolpert1997no}. This implies that if an algorithm executes well on one class of problems, it pays off for decreased performance on other classes. NFL theorems have been demonstrated on problems such as search \citep{wolpert1995no}, cross validation \citep{goutte1997note}, multiobjective optimization \citep{corne2003no}, and sparse approximation \citep{xu2012sparse}.

\begin{figure}[H]
	\centering
	\scalebox{.6}{\includegraphics{./img/algo_perf_dist.png}}
	\caption{Typical distribution of algorithms with respect to performance}
	\label{fig:algoperfdist}
\end{figure}

The NFL theorems suggest to shift the focus of solving problems to AS. Learning the problem characteristics can help in deciding which algorithm is most suitable in solving a problem. Also, a set of algorithms with complementary strengths is desirable. A collection of algorithms used for solving a set of problems is called an \textit{algorithm portfolio}.

\subsection{Algorithm Portfolios}
Algorithm portfolios combine multiple algorithms with complementary strengths in order to solve problems more efficiently. This is inspired by \textit{investment portfolios} concept in Economics where maximizing a utility with associated risks is handled by mixing strategies with desired risk and performance \citep{huberman1997economics}.

\begin{figure}[H]
	\scalebox{.7}{\includegraphics{./img/sat_correl.png}}
	\caption[Correlation matrix of SAT solvers]{Correlation matrix of SAT solvers. Solvers with less correlation have more complementary performance. Red and blue boxes indicate negative and positive correlation respectively; shading represents the correlation strength \citep{bischl2016aslib}}
	\label{fig:satcorrel}
\end{figure}

Using algorithm portfolios have been proven effective on solving hard combinatorial problems \citep{gomes2001algorithm}. Gomes and Selman concluded that algorithm portfolios can obtain superior performance by exploiting the variance in behavior among algorithms. One AS technique that takes advantage of this is called \textit{presolving}. Presolving makes use of \textit{presolvers}, which basically are algorithms that execute quickly and can solve a large number of problems \citep{xu2008satzilla}. Presolvers tend to eliminate the easier problems so AS can focus on solving the much harder problems.

\subsection{Problem Domain}
AS can be best applied on combinatorial search and optimization problems. One example is the Boolean satisfiability (SAT) problem, a classic NP-complete problem of finding assignments of variables to a Boolean formula such that it evaluates to TRUE. Successful AS implementations include SATzilla \citep{xu2008satzilla}, SATenstein \citep{khudabukhsh2009satenstein}, and Hydra \citep{xu2010hydra}. Efficient SAT solvers benefit applications such as IC design, computer-aided design and manufacturing, and automated theorem proving.

\begin{figure}[H]
	\centering
	\scalebox{.9}{\includegraphics{./img/logic_circuits.png}}
	\caption[Fault-diagnosis of very-large-scale-integration (VLSI) circuits modelled as a SAT problem]{Fault-diagnosis of very-large-scale-integration (VLSI) circuits modelled as a SAT problem. \citep{smith2005fault}}
	\label{fig:logiccircuits}
\end{figure}

Travelling salesman problem (TSP), a famous example of an \textit{NP}-hard problem, also benefits from AS. Given a list of points and the associated costs between pairs of points, the goal of TSP is to find a path with minimum total cost between two selected points. Points can represent destinations or, in a more abstract sense, nodes in a graph. Costs can refer to distance or any measure that represents the weight of relationship between a pair of nodes in a graph. An algorithm portfolio of inexact TSP solvers showed significant performance improvements after AS \citep{kotthoff2015improving}. The travelling thief problem \citep{bonyadi2013travelling}, a combination of TSP and knapsack problem \citep{kellerer2004introduction}, has also been tackled using AS techniques, resulting in substantial improvements over single solvers \citep{wagner2018case}.

\begin{figure}[H]
	\centering
	\scalebox{.6}{\includegraphics{./img/water_tank.png}}
	\caption[Water tank delivery schedule generated by an optimizer software]{Water tank delivery schedule generated by an optimizer software. This demonstrates the real-world application of the solution to travelling thief problem. \citep{stolk2013combining}}
	\label{fig:watertank}
\end{figure}

In this study, AS is applied on solving subgraph isomorphism problems. This is an \textit{NP}-complete problem whereby a smaller graph is located in a larger graph. As the number of graph nodes increases, the amount of effort expended in searching for subgraph isomorphisms exponentially increases. Using AS to search for subgraph isomorphisms have demonstrated significant performance improvements over standalone algorithms (\citet{battiti2007algorithm}; \citet{kotthoff2016portfolios}). Subgraph isomorphism problems manifest in applications that use graphs to model problems. A few examples include chemistry, software engineering, and biocomputing.

\begin{figure}[H]
	\centering
	\scalebox{.7}{\includegraphics{./img/flowchart.png}}
	\caption[Identifying malware in executable files through recognition of cryptographic algorithm patterns]{Identifying malware in executable files through recognition of cryptographic algorithm patterns. Searching for a cryptographic signature (pattern graph) from the program's data flow graph (DFG) is a subgraph isomorphism problem. \citep{lestringant2015automated}}
	\label{fig:flowchart}
\end{figure}

Combining the strengths of several algorithms through AS can lead to more efficient solutions to hard combinatorial problems. In retrospect, AS does not entirely discourage the formulation of new algorithms. Research in AS seeks not only to improve problem solving performance, but also to learn more about the nature of problems and the behaviors of algorithms used. It can also provide valuable insights in creating new algorithms or improving upon existing ones. Studies on new algorithms are just as important as AS research, since the effectiveness of AS still relies on how well individual algorithms perform.

\section{Algorithm Selection Techniques}
A comprehensive review of AS techniques can be referred from Smith-Miles \citep{smith2009cross} and Kotthoff \citep{kotthoff2016algorithm}. Typically, the following are considered when creating a new AS technique:

\begin{enumerate}
	\item How can algorithm portfolios be constructed? (e.g. static portfolios vs. dynamic portfolios)
	\item What algorithms to select and when? (e.g. single algorithm per problem vs. multiple algorithms with scheduling)
	\item How to select algorithms? (modelling algorithm performance with respect to problems)
\end{enumerate}

This study is limited to the use of a static portfolio and the selection of one algorithm per problem instance. This section mainly discusses techniques in (3).

On most approaches, machine learning is used to discover the relationship between algorithms and problems.  This often includes a training phase, where algorithms are executed on a subset of problems to evaluate their performance. The general approach to AS \citep{bischl2016aslib} is depicted in Figure \ref{fig:asworkflow}.

\begin{figure}[H]
	\centering
	\scalebox{.6}{\includegraphics{./img/as_workflow.png}}
	\caption[AS workflow]{AS workflow.}
	\label{fig:asworkflow}
\end{figure}

\begin{enumerate}
	\item For each problem instance \textit{i}, a vector of instance features $f(i) \in \mathbf{F}$ is computed.
	\item A machine learning technique \textit{s} selects an algorithm $a \in \mathbf{A}$ based on the feature vector from Step 1.
	\item The selected algorithm \textit{a} is applied to problem instance \textit{i}.
	\item Performance measure \textit{m} is evaluated, taking into account feature computation costs and the performance of the selected algorithm.
\end{enumerate}

Choosing a machine learning technique is often based from the nature of the problem to be solved. For instance, a classification model is viable for simple problem-algorithm mappings. Each problem can be labeled with the best-performing algorithm, then the classifier is trained to recognize problems and their corresponding optimal algorithms. One classifier implementation used a decision tree that assigned slower or faster algorithms to constraint satisfaction problems \citep{gent2010learning}.

\begin{figure}[H]
	\centering
	\scalebox{.7}{\includegraphics{./img/decision_tree.png}}
	\caption[Decision tree classifier built using C4.5 algorithm]{Decision tree classifier built using C4.5 algorithm.Nodes represent attribute rules the guide the decision of choosing a ‘slower’ or a ‘faster’ algorithm for a problem. \citep{gent2010learning}}
	\label{fig:decisiontree}
\end{figure}

Alternatively, algorithm performance can be predicted using regression models. Training is slower since it is done for each algorithm per problem instance, as opposed to classification models where training iterates only for each problem instance. The advantage is that models are learned per individual algorithm instead of the whole algorithm portfolio, as with the case for classification models. SATzilla, a SAT solver that dominated SAT competitions, used ridge regression to learn an AS model of SAT problems \citep{xu2008satzilla}. For subgraph isomorphism problems, pairwise random forest regression stands as the current best approach \citet{kotthoff2016portfolios}.

\begin{figure}[H]
	\centering
	\scalebox{.7}{\includegraphics{./img/subgraph_isomorphism.png}}
	\caption[Performance comparison of subgraph isomorphism algorithms]{ Performance comparison of subgraph isomorphism algorithms. \textit{LLAMA} is the AS model trained using pairwise random forest regression. Its performance comes near the virtual best solver (VBS)—the upper-bound of what an AS model can achieve in an algorithm portfolio. \citep{kotthoff2016portfolios}}
	\label{fig:subgraphisomorphism}
\end{figure}

Another approach is to group problem instances into clusters and assign the cost-optimal solver for each cluster. This approach is useful when there is minimal knowledge about the problem. One example did not rely on problem features to do AS; instead a model of algorithm performance behavior is learned and then used to identify clusters of similar problems \citep{silverthorn2010latent}. The AS model gathered roughly competitive results after comparing against SATzilla.

\begin{table}[H]
	\centering
	\begin{tabular}{llll}
		\hline
		\multicolumn{1}{c}{\multirow{2}{*}{\textbf{Method}}} & \multicolumn{3}{c}{\textbf{SAT Instances Solved}} \\ \cline{2-4}
		\multicolumn{1}{c}{} & \multicolumn{1}{c}{random} & \multicolumn{1}{c}{crafted} & \multicolumn{1}{c}{indust.} \\ \hline
		Best Single & 320.8 (3.7) & 122.6 (3.8) & \textbf{153.5 (3.2)} \\
		Random & 261.6 (4.8) & 89.3 (3.5) & 54.5 (3.4) \\
		SATzilla & 407.5 (3.1) & 125.6 (3.3) & 137.6 (3.3) \\
		Soft + Mult. & 319.3 (8.2) & 116.9 (4.9) & 136.2 (4.3) \\
		Soft + DCM & 342.2 (8.2) & 118.2 (4.3) & 138.1 (5.0) \\
		Hard + Mult. & 340.3 (45.7) & 104.8 (9.7) & 129.4 (8.0) \\
		Hard + DCM & \textbf{424.2 (12.9)} & \textbf{129.4 (6.5)} & 146.0 (5.6) \\ \hline
	\end{tabular}
	\caption[Comparison of the number of SAT problems solved between SATzilla vs. latent class clustering models]{Comparison of the number of SAT problems solved between SATzilla vs. latent class clustering models. The last four methods in the table correspond to different latent class methods used. \citep{silverthorn2010latent}}
	\label{tbl:satzilla}
\end{table}

Several machine-learning approaches to AS exist, such as hybrid regression-classification models \citep{kotthoff2012hybrid}, ensembles \citep{kotthoff2010ensemble}, and reinforcement learning \citep{lagoudakis2000algorithm}.

\section{Reinforcement Learning Approach to Algorithm Selection}
Training AS models typically use classification or regression methods (or a hybrid of these two) due to the complete availability of information on problems and algorithm performance. Reinforcement learning (RL) techniques are typically used when dynamic (a.k.a. online learning) AS is necessary, where the AS model continuously adapts and learns as it solves more problems. One example is an AS model trained using a modified Q-learning algorithm \citep{lagoudakis2000algorithm}. The model continuously learns to select algorithms that minimize the overall time in solving all problems. A more sophisticated application used a multi-armed bandit approach to AS where the model progressively learns how to efficiently schedule and distribute problem solving across multiple CPUs \citep{gagliolo2009towards}.

RL encompasses computational methods in learning from interactions with the environment to achieve long term goals \citep{sutton1998reinforcement}. An \textit{agent} perceives the \textit{state} of its \textit{environment} and receives \textit{feedback} (instantly or time-delayed) for every \textit{action} it takes. Feedback can be understood as rewards in which the agent seek to maximize over time. Learning is driven by the interaction between agent and environment: the environment provides stimulus to the agent, and then the agent makes decisions on how to respond. In RL terms this is called \textit{policy} – a set of rules that guides agent behavior.

Figure \ref{fig:rlmodel} summarizes the main idea behind RL. The RL model can be framed in the context of AS by mapping its elements to the model of AS problem (Figure 2.1). This is shown in Figure \ref{fig:rlasmodel}.

\begin{figure}[H]
	\centering
	\scalebox{.5}{\includegraphics{./img/rl_model.png}}
	\caption{Reinforcement learning model}
	\label{fig:rlmodel}
\end{figure}

\begin{figure}[H]
	\centering
	\scalebox{.85}{\includegraphics{./img/rlas_model.png}}
	\caption{Reinforcement learning-based algorithm selection model}
	\label{fig:rlasmodel}
\end{figure}

\subsection{Policy Gradient Methods}

The agent's \textit{policy} is a function that outputs an action based from the input environment state. It can be learned by applying some performance measure and monitoring how it changes with respect to the environment state. \textit{Policy gradient} methods represent a class of techniques under RL that learns a policy through change in performance measure. These methods seek to maximize long term rewards by optimizing performance.

\begin{equation}
\mathbf{\theta_{t+1}} = \mathbf{\theta_t} + \alpha \nabla J(\theta_t)
\label{eq:pgrad}
\end{equation}

This study uses REINFORCE algorithm \citep{williams1992simple} to train an AS model. The acronym describes the policy parameter update equation used in its algorithm: \textbf{RE}ward \textbf{IN}crement \textit{equals} \textbf{N}onnegative \textbf{F}actor \textit{plus} \textbf{O}ffset \textbf{R}einforcement \textit{plus} \textbf{C}haracteristic \textbf{E}ligibility.

\begin{equation}
\mathbf{\theta_{t+1}} = \mathbf{\theta_t} + \alpha G_t \frac{\nabla_\theta\pi(A_t|S_t, \theta_t)}{\pi(A_t|S_t, \theta_t)}
\label{eq:reinforce}
\end{equation}

The intuition behind Equation \ref{eq:reinforce} is as follows: each increment is proportional to the product of a reward $G_t$ and a vector, the gradient of the probability of taking the action actually taken, $\nabla_\theta\pi(A_t|S_t, \theta_t)$, divided by the probability of taking that action $\pi(A_t|S_t, \theta_t)$. The vector is the direction in parameter space that most increases the probability of repeating the action $A_t$ on future visits to state $S_t$. The update increases the parameter vector in this direction proportional to the reward, and inversely proportional to the action probability. The former makes sense because it causes the parameter to move most in the directions that favor actions that yield the highest reward. The latter makes sense because otherwise actions that are selected frequently are at an advantage (the updates will be more often in their direction) and might win out even if they do not yield the highest return. \citep{sutton1998reinforcement}.


\chapter{Cauchy Filters on Reloids}

In this chapter I consider \emph{low filters} on reloids, generalizing
Cauchy filters on uniform spaces. Using low filters, I define Cauchy-complete
reloids, generalizing complete uniform spaces.

\fxnote{I forgot to note that Cauchy spaces induce topological (or convergence) spaces.}

\section{Preface}

Replace {\tt \textbackslash langle \dots \textbackslash rangle} with {\tt \textbackslash supfun\{\dots\}} in \LaTeX{}.

This is a preliminary partial draft.

To understand this article you need first look into my book \cite{volume-1}.

\url{http://math.stackexchange.com/questions/401989/what-are-interesting-properties-of-totally-bounded-uniform-spaces}

\url{http://ncatlab.org/nlab/show/proximity+space\#uniform\_spaces} for a proof
sketch that proximities correspond to totally bounded uniformities.

\section{Low spaces}

\fxwarning{Analyze \url{http://link.springer.com/article/10.1007/s10474-011-0136-9} (``A note on Cauchy spaces''),
\url{http://link.springer.com/article/10.1007/BF00873992} (``Filter spaces''). It also contains references to some useful results,
including (``On continuity structures and spaces of mappings'' freely available at \url{https://eudml.org/doc/16128}) that the category $\mathrm{FIL}$ of filter spaces is isomorphic to
the category of filter merotopic spaces (copy its definition).}

\begin{defn}
A \emph{lower set}\footnote{Remember that our orders on filters is the
reverse to set theoretic inclusion. It could be called an \emph{upper} set
in other sources.} of filters on $U$ (a set) is a set $\mathscr{C}$
of filters on $U$, such that if $\mathcal{G} \sqsubseteq
\mathcal{F}$ and $\mathcal{F} \in \mathscr{C}$ then $\mathcal{G} \in
\mathscr{C}$.
\end{defn}

\begin{rem}
Note that we are particularly interested in nonempty (=~containing the improper filter) lower sets of filters.
This does not match the traditional theory of Cauchy spaces (see below) which are traditionally defined as not containing empty set.
Allowing them to contain empty set has some advantages:
\begin{itemize}
\item Meet of any lower filters is a lower filter.
\item Some formulas become a little simpler.
\end{itemize}
\end{rem}

\begin{defn}
  I call \emph{low space} a set together with a nonempty lower set of
  filters on this set.
  Elements of a (given) low space are called \emph{Cauchy filters}.
\end{defn}

\begin{defn}
  $\GR \left( U , \mathscr{C} \right) = \mathscr{C}$; $\Ob \left(
  U , \mathscr{C} \right) = U$.
  $\GR (U, \mathscr{C})$ is read as \emph{graph} of space $(U, \mathscr{C})$.
  I denote $\Low(U)$ the set of graphs of low spaces on the set~$U$.
  Similarly I will denote its subsets $\mathbf{ASJ}(U)$, $\mathbf{CASJ}(U)$, $\mathbf{Cau}(U)$, $\mathbf{CCau}(U)$ (see below).
\end{defn}

\fxnote{Should use ``space structure'' instead of ``graph of space'', to match customary terminology.}

\begin{defn}
  Introduce an order on graphs of low spaces and on low spaces:
  $\mathscr{C}\sqsubseteq\mathscr{D}\Leftrightarrow\mathscr{C}\subseteq\mathscr{D}$ and
  $\left( U , \mathscr{C} \right) \sqsubseteq \left( U , \mathscr{D} \right) \Leftrightarrow \mathscr{C} \sqsubseteq \mathscr{D}$.
\end{defn}

\begin{obvious}
Every set of low spaces on some set is partially ordered.
\end{obvious}

\section{Almost sub-join-semilattices}

\begin{defn}
For a join-semilattice~$\mathfrak{A}$, a \emph{almost sub-join-semilattice} is such a set~$S\in\subsets\mathfrak{A}$, that
if $\mathcal{F},\mathcal{G}\in S$ and $\mathcal{F} \nasymp \mathcal{G}$ then $\mathcal{F} \sqcup \mathcal{G}\in S$.
\end{defn}

\begin{defn}
For a complete lattice~$\mathfrak{A}$, a \emph{completely almost sub-join-semilattice} is such a set~$S\in\subsets\mathfrak{A}$, that
if $\bigsqcap T \neq \bot^{\mathscr{F}(X)}$ then $\bigsqcup T\in S$ for every $T\in\subsets S$.
\end{defn}

\begin{obvious}
Every completely almost sub-join-semilattice is a almost sub-join-semilattice.
\end{obvious}

\section{Cauchy spaces}

\begin{defn}
A \emph{reflexive} low space is a low space $( U , \mathscr{C})$ such that
$\forall x \in U : \uparrow^U \{ x \} \in \mathscr{C}$.
\end{defn}

\begin{defn}
The \emph{identity} low space~$1^{\Low(U)}$ on a set~$U$ is the low space with graph $\setcond{\uparrow^U \{x\}}{x\in U}$.
\end{defn}

\begin{obvious}\label{cs-refl-by-id}
A low space~$f$ is reflexive iff $f\sqsupseteq 1^{\Low(\Ob f)}$.
\end{obvious}

\begin{defn}
\emph{An almost sub-join space} is a low space whose graph is an almost sub-join-semilattice.
I will denote such spaces as $\mathbf{ASJ}$.
\end{defn}

\begin{defn}
\emph{A completely almost sub-join space} is a low space whose graph is a completely almost sub-join-semilattice.
I will denote such spaces as $\mathbf{CASJ}$.
\end{defn}

\begin{defn}
A \emph{precauchy space} (aka \emph{filter space}) is a reflexive low space.
I will denote such spaces as $\mathbf{preCau}$.
\end{defn}

\begin{defn}
A \emph{Cauchy space} is a precauchy space which is also an almost sub-join space.
I will denote such spaces as $\mathbf{Cau}$.
\end{defn}

\begin{defn}
  A \emph{completely Cauchy space} is a precauchy space which is also a completely almost sub-join space.
I will denote such spaces as $\mathbf{CCau}$.
\end{defn}

\begin{obvious}
Every completely Cauchy space is a Cauchy space.
\end{obvious}

\begin{prop}
  $a\sqcup^{
    \setcond{\mathcal{X} \in \mathscr{C} }{\mathcal{X} \sqsupseteq \mathcal{F}}
  } b = a\sqcup b$ for
  $a,b \in \setcond{\mathcal{X} \in \mathscr{C} }{\mathcal{X} \sqsupseteq \mathcal{F}}$,
  provided that $\mathcal{F}$ is a proper fixed Cauchy filter on an almost sub-join space.
\end{prop}

\begin{proof}
  $\mathcal{F}$ is proper. So
  we have $a \sqcap b \sqsupseteq \mathcal{F} \neq \bot^{\mathscr{F} (X)}$. Thus $a\sqcup b$ is a Cauchy
  filter and so $a\sqcup b \in \setcond{\mathcal{X} \in \mathscr{C} }{\mathcal{X} \sqsupseteq \mathcal{F}}$.
\end{proof}

\begin{prop}
  $\bigsqcup^{
    \setcond{\mathcal{X} \in \mathscr{C} }{\mathcal{X} \sqsupseteq \mathcal{F}}
  } S = \bigsqcup S$ for nonempty
  $S \in \subsets \setcond{\mathcal{X} \in \mathscr{C} }{\mathcal{X} \sqsupseteq \mathcal{F}}$,
  provided that $\mathcal{F}$ is a proper fixed Cauchy filter on a completely almost sub-join space.
\end{prop}

\begin{proof}
  $\mathcal{F}$ is proper. So for every nonempty $S \in \subsets
  \setcond{\mathcal{X} \in \mathscr{C} }{\mathcal{X} \sqsupseteq \mathcal{F}}$
  we have $\bigsqcap S \sqsupseteq \mathcal{F} \neq \bot^{\mathscr{F} (X)}$. Thus $\bigsqcup S$ is a Cauchy
  filter and so $\bigsqcup S \in \setcond{\mathcal{X} \in \mathscr{C} }{\mathcal{X} \sqsupseteq \mathcal{F}}$.
\end{proof}

\begin{cor}
Every proper Cauchy filter is contained in a unique maximal Cauchy filter (for completely almost sub-join spaces).
\end{cor}

\begin{proof}
Let $\mathcal{F}$ be a proper Cauchy filter. Then
$\bigsqcup^{ \setcond{\mathcal{X} \in \mathscr{C} }{\mathcal{X} \sqsupseteq \mathcal{F}} }\setcond{\mathcal{X} \in \mathscr{C} }{\mathcal{X} \sqsupseteq \mathcal{F}}$
(existing by the above proposition) is the maximal Cauchy filter containing~$\mathcal{F}$.

Suppose another maximal Cauchy filter~$\mathcal{T}$ contains~$\mathcal{F}$. Then $\mathcal{T}\in\setcond{\mathcal{X} \in \mathscr{C} }{\mathcal{X} \sqsupseteq \mathcal{F}}$
and thus $\mathcal{T} = \bigsqcup^{ \setcond{\mathcal{X} \in \mathscr{C} }{\mathcal{X} \sqsupseteq \mathcal{F}} }\setcond{\mathcal{X} \in \mathscr{C} }{\mathcal{X} \sqsupseteq \mathcal{F}}$.
\end{proof}

\section{Relationships with symmetric reloids}

\fxnote{Also consider relationships with funcoids.}

\begin{defn}
  Denote $(\mathsf{RLD})_{\Low} \left( U , \mathscr{C} \right) =
  \bigsqcup \setcond{ \mathcal{X} \times^{\mathsf{RLD}} \mathcal{X}}
  {\mathcal{X} \in \mathscr{C} }$.
\end{defn}

\begin{defn}
  $(\Low) \nu$ (\emph{low space} for endoreloid $\nu$) is a low
  space on $U$ such that
  \[ \GR (\Low) \nu = \setcond{\mathcal{X} \in \mathscr{F}(U)}
     {\mathcal{X} \times^{\mathsf{RLD}} \mathcal{X} \sqsubseteq \nu } . \]
\end{defn}

\begin{thm}
  If $\left( U , \mathscr{C} \right)$ is a low space, then $\left( U ,
  \mathscr{C} \right) = (\Low) (\mathsf{RLD})_{\Low} \left(
  U , \mathscr{C} \right)$.
\end{thm}

\begin{proof}
  If $\mathcal{X} \in \mathscr{C}$ then $\mathcal{X}
  \times^{\mathsf{RLD}} \mathcal{X} \sqsubseteq
  (\mathsf{RLD})_{\Low} \left( U , \mathscr{C} \right)$ and thus
  $\mathcal{X} \in \GR (\Low) (\mathsf{RLD})_{\Low}
  \left( U , \mathscr{C} \right)$. Thus $\left( U , \mathscr{C} \right)
  \sqsubseteq (\Low) (\mathsf{RLD})_{\Low} \left( U ,
  \mathscr{C} \right)$.

  Let's prove $\left( U , \mathscr{C} \right) \sqsupseteq (\Low)
  (\mathsf{RLD})_{\Low} \left( U , \mathscr{C} \right)$.

  Let $\mathcal{A} \in \GR (\Low)
  (\mathsf{RLD})_{\Low} \left( U , \mathscr{C} \right)$. We need
  to prove $\mathcal{A} \in \mathscr{C}$.

  Really $\mathcal{A} \times^{\mathsf{RLD}} \mathcal{A} \sqsubseteq
  (\mathsf{RLD})_{\Low} \left( U , \mathscr{C} \right)$. It is
  enough to prove that $\exists \mathcal{X} \in \mathscr{C} : \mathcal{A}
  \sqsubseteq \mathcal{X}$.

  Suppose $\nexists \mathcal{X} \in \mathscr{C} : \mathcal{A} \sqsubseteq
  \mathcal{X}$.

  For every $\mathcal{X} \in \mathscr{C}$ obtain $X_{\mathcal{X}} \in
  \mathcal{X}$ such that $X_{\mathcal{X}} \notin \mathcal{A}$ (if forall $X \in
  \mathcal{X}$ we have $X_{\mathcal{X}} \in \mathcal{A}$, then $\mathcal{X}
  \sqsupseteq \mathcal{A}$ what is contrary to our supposition).

  It is now enough to prove $\mathcal{A} \times^{\mathsf{RLD}}
  \mathcal{A} \nsqsubseteq \bigsqcup \setcond{ \uparrow^U
  X_{\mathcal{X}} \times^{\mathsf{RLD}} \uparrow^U X_{\mathcal{X}}
  }{\mathcal{X} \in \mathscr{C} }$.

  Really, $\bigsqcup \setcond{ \uparrow^U X_{\mathcal{X}}
  \times^{\mathsf{RLD}} \uparrow^U X_{\mathcal{X}} }{
  \mathcal{X} \in \mathscr{C} } =
  \uparrow^{\mathsf{RLD} (U , U)} \bigcup \setcond{ \uparrow^U X_{\mathcal{X}}
  \times^{\mathsf{RLD}} \uparrow^U X_{\mathcal{X}} }{
  \mathcal{X} \in \mathscr{C} }$. So our claim takes the form $\bigcup \setcond{ \uparrow^U X_{\mathcal{X}}
  \times^{\mathsf{RLD}} \uparrow^U X_{\mathcal{X}} }{
  \mathcal{X} \in \mathscr{C} } \notin \GR (\mathcal{A}
  \times^{\mathsf{RLD}} \mathcal{A})$ that is $\forall A \in
  \mathcal{A} : \bigcup \setcond{ \uparrow^U X_{\mathcal{X}}
  \times^{\mathsf{RLD}} \uparrow^U X_{\mathcal{X}} }{
  \mathcal{X} \in \mathscr{C} } \nsupseteq
  A \times A$ what is true because $X_{\mathcal{X}} \nsupseteq A$ for every $A
  \in \mathcal{A}$.
\end{proof}

\begin{rem}
  The last theorem does not hold with $\mathcal{X}
  \times^{\mathsf{FCD}} \mathcal{X}$ instead of $\mathcal{X}
  \times^{\mathsf{RLD}} \mathcal{X}$ (take $\mathscr{C} = \setcond{ \{ x
  \} }{x \in U}$ for an infinite set $U$ as a counter-example).
\end{rem}

\begin{rem}
  Not every symmetric reloid is in the form
  $(\mathsf{RLD})_{\Low} \left( U , \mathscr{C} \right)$ for some
  Cauchy space $\left( U , \mathscr{C} \right)$. The same Cauchy space can be
  induced by different uniform spaces. See
  \url{http://math.stackexchange.com/questions/702182/different-uniform-spaces-having-the-same-set-of-cauchy-filters}
\end{rem}

\begin{prop}
~
\begin{enumerate}
\item \label{low-rld-relf}$(\Low)f$~is reflexive iff endoreloid~$f$ is reflexive.
\item \label{rld-low-relf}$(\mathsf{RLD})_{\Low}f$~is reflexive iff low space~$f$ is reflexive.
\end{enumerate}
\end{prop}

\begin{proof}
~
\begin{widedisorder}
\item[\ref{low-rld-relf}] $\text{$f$ is reflexive} \Leftrightarrow
  1^{\mathsf{RLD}}\sqsubseteq f  \Leftrightarrow \forall x\in\Ob f:\uparrow(\{x\}\times\{x\})\sqsubseteq f \Leftrightarrow
  \forall x\in\Ob f:\uparrow\{x\}\times^{\mathsf{RLD}}\uparrow\{x\}\sqsubseteq f \Leftrightarrow
  \forall x\in\Ob f:\uparrow\{x\}\in(\Low)f \Leftrightarrow \text{$(\Low)f$~is reflexive}$.

\item[\ref{rld-low-relf}] Let $f$ is reflexive. Then $\forall x\in\Ob f:\uparrow\{x\}\in f$;
  $\forall x\in\Ob f:\uparrow\{x\}\times^{\mathsf{RLD}}\uparrow\{x\}\sqsubseteq(\mathsf{RLD})_{\Low}f$;
  $\forall x\in\Ob f:\uparrow(\{x\}\times\{x\})\sqsubseteq(\mathsf{RLD})_{\Low}f$;
  $1^{\mathsf{RLD}}\sqsubseteq(\mathsf{RLD})_{\Low}f$.

  Let now $(\mathsf{RLD})_{\Low}f$~be reflexive. Then $f = (\Low)(\mathsf{RLD})_{\Low}f$ is reflexive.
\end{widedisorder}
\end{proof}

\begin{defn}
A \emph{transitive} low space is such low space~$f$ that $(\mathsf{RLD})_{\Low}f\circ(\mathsf{RLD})_{\Low}f=(\mathsf{RLD})_{\Low}f$.
\end{defn}

\begin{rem}
The composition $(\mathsf{RLD})_{\Low}f\circ(\mathsf{RLD})_{\Low}f$ may be inequal to $(\mathsf{RLD})_{\Low}\mu$ for all low spaces~$\mu$ (exercise!).
Thus usefulness of the concept of transitive low spaces is questionable.
\end{rem}

\begin{rem}
Every low space is ``symmetric'' in the sense that it corresponds to a symmetric reloid.
\end{rem}

\begin{thm}
  $(\Low)$ is the upper adjoint of $(\mathsf{RLD})_{\Low}$.
\end{thm}

\begin{proof}
  We will prove $(\Low) (\mathsf{RLD})_{\Low} f \sqsupseteq
  f$ and $(\mathsf{RLD})_{\Low} (\Low) g \sqsubseteq g$
  (that $(\Low)$ and $(\mathsf{RLD})_{\Low}$ are monotone
  is obvious).

  Really:
  \begin{multline*}
  \GR (\Low) (\mathsf{RLD})_{\Low} f =
  \GR (\Low) \bigsqcup \setcond{ \mathcal{X}
  \times^{\mathsf{RLD}} \mathcal{X} }{
  \mathcal{X} \in \GR f } = \\
  \setcond{ \mathcal{Y} \in \mathscr{F}\Ob (f) }{ \mathcal{Y}
  \times^{\mathsf{RLD}} \mathcal{Y} \sqsubseteq \bigsqcup \setcond{
  \mathcal{X} \times^{\mathsf{RLD}} \mathcal{X} }{
  \mathcal{X} \in \GR f } } \supseteq \setcond{
  \mathcal{Y} \in \mathscr{F} \Ob (f) }{
  \mathcal{Y} \in \GR f } = \GR f;
  \end{multline*}

  $(\mathsf{RLD})_{\Low} (\Low) g = \bigsqcup \setcond{
  \mathcal{X} \times^{\mathsf{RLD}} \mathcal{X} }{
  \mathcal{X} \in \GR (\Low) g } = \bigsqcup
  \setcond{ \mathcal{X} \times^{\mathsf{RLD}} \mathcal{X} }{
  \mathcal{X} \in \mathscr{F}(\Ob g),
  \mathcal{X} \times^{\mathsf{RLD}} \mathcal{X}
  \sqsubseteq g } \sqsubseteq g$.
\end{proof}

\begin{cor}
  ~
  \begin{enumerate}
    \item $(\mathsf{RLD})_{\Low} \bigsqcup S = \bigsqcup \langle
    (\mathsf{RLD})_{\Low} \rangle^{\ast} S$;

    \item $(\Low) \bigsqcap S = \bigsqcap \langle (\Low)
    \rangle^{\ast} S$.
  \end{enumerate}
\end{cor}

Below it's proved that $(\Low)$ and $(\mathsf{RLD})_{\Low}$ can be restricted to completely almost sub-join spaces and symmetrically transitive reloids.
Thus they preserve joins of (completely) almost sub-join spaces and meets of symmetrically transitive reloids.
\fxwarning{Check.}
\fxwarning{Move it to be below the definition.}

\section{Lattices of low spaces}

\begin{prop}\label{ls-order2}
$\mu \sqsubseteq \nu \Leftrightarrow \forall \mathcal{X}\in\GR\mu \exists\mathcal{Y}\in\GR\nu: \mathcal{X}\sqsubseteq\mathcal{Y}$ for
low filter spaces (on the same set~$U$).
\end{prop}

\begin{proof}
~
\begin{description}
\item[$\Rightarrow$] $\mu \sqsubseteq \nu \Leftrightarrow \GR\mu\subseteq\GR\nu \Rightarrow
  \forall \mathcal{X}\in\GR\mu \exists\mathcal{Y}\in\GR\nu: \mathcal{X}=\mathcal{Y} \Rightarrow
  \forall \mathcal{X}\in\GR\mu \exists\mathcal{Y}\in\GR\nu: \mathcal{X}\sqsubseteq\mathcal{Y}$.
\item[$\Leftarrow$] Let $\forall \mathcal{X}\in\GR\mu \exists\mathcal{Y}\in\GR\nu: \mathcal{X}\sqsubseteq\mathcal{Y}$.
  Take $\mathcal{X}\in\GR\mu$. Then $\exists\mathcal{Y}\in\GR\nu: \mathcal{X}\sqsubseteq\mathcal{Y}$. Thus $\mathcal{X}\in\GR\nu$.
  So $\GR\mu\subseteq\GR\nu$ that is $\mu \sqsubseteq \nu$.
\end{description}
\end{proof}

\begin{obvious}
~
\begin{enumerate}
\item $(\mathsf{RLD})_{\Low}$ is an order embedding.
\item $(\Low)$ is an order homomorphism.
\end{enumerate}
\end{obvious}

I will denote $\bigsqcup$, $\bigsqcap$, $\sqcup$, $\sqcap$ the lattice operations on low spaces or graphs of low spaces.

\begin{prop}
$\bigsqcup S=\bigcup S$ for every set~$S$ of graphs of low spaces on some set.
\end{prop}

\begin{proof}
It's enough to prove that there is a low space~$\mu$ such that $\GR\mu=\bigcup S$. In other words, it's enough to prove
that $\bigcup S$ is a nonempty lower set, but that's obvious. \fxwarning{A little more detailed proof.}
\end{proof}

\begin{prop}
$\bigsqcap S=\setcond{\bigsqcap\im P}{P\in\prod_{X\in S} X}$ for every set~$S$ of graphs of low spaces on some set.
\end{prop}

\begin{proof}
First prove that there is such low space~$\mu$ that $\mu=\setcond{\bigsqcap\im P}{P\in\prod_{X\in S} X}$. In other words,
we need to prove that $\setcond{\bigsqcap\im P}{P\in\prod_{X\in S} X}$ is a nonempty lower set. That it is nonempty is obvious.
Let filter $\mathcal{G}\sqsubseteq\mathcal{F}$ and $\mathcal{F}\in\setcond{\bigsqcap\im P}{P\in\prod_{X\in S} X}$. Then
$\mathcal{F}=\bigsqcap\im P$ for a $P\in\prod_{X\in S} X$ that is $P(X)\in X$ for every $X\in S$. Take $P'=(\mathcal{G}\sqcap)\circ P$.
Then $P'\in\prod_{X\in S} X$ because $P'(X)\in X$ for every $X\in S$ and thus
obviously $\mathcal{G}=\bigsqcap\im P'$ and thus $\mathcal{G}\in\setcond{\bigsqcap\im P}{P\in\prod_{X\in S} X}$. So such~$\mu$ exists.

It remains to prove that $\mu$ is the greatest lower bound of~$S$.

$\mu$ is a lower bound of~$S$. Really, let $X\in S$ and $Y\in X$.
Then exists $P\in\prod_{X\in S} X$ such that $P(X)=Y$ (taken into account that every $ X$ is nonempty)
and thus $\im P\ni Y$ and so $\bigsqcap\im P\sqsubseteq Y$, that is (proposition~\ref{ls-order2}) $\mu\sqsubseteq X$.

Let $\nu$ be a lower bound of~$S$. It remains to prove that $\mu\sqsupseteq\nu$, that is
$\forall Q\in\nu: Q=\bigsqcap\im P$ for some $P\in\prod_{X\in S} X$.
Take $P=(\mylambda{X}{S}{Q})$. This $P\in\prod_{X\in S} X$ because $Q\in X$ for every~$X\in S$.
\end{proof}

\begin{cor}
$f\sqcap g = \setcond{F\sqcap G}{F\in f,G\in g}$ for every graphs~$f$ and~$g$ of low spaces (on some set).
\end{cor}

\subsection{Its subsets}

\begin{prop}
The set of sub-join low spaces (on some fixed set) is meet-closed in the lattice of low spaces on a set.
\end{prop}

\begin{proof}
Let $f$, $g$ be graphs of almost sub-join spaces (on some fixed set), $f\sqcap g = \setcond{F\sqcap G}{F\in f,G\in g}$.

If $\mathcal{A}, \mathcal{B} \in f\sqcap g$ and $\mathcal{A}
\nasymp \mathcal{B}$, then $\mathcal{A}, \mathcal{B} \in f$ and $\mathcal{A}, \mathcal{B} \in g$.
Thus $\mathcal{A}\sqcup\mathcal{B}\in f$ and $\mathcal{A}\sqcup\mathcal{B}\in g$ and so
$\mathcal{A} \sqcup \mathcal{B} \in f\sqcap g$.
\end{proof}

\begin{cor}
The set of Cauchy spaces (on some fixed set), is meet-closed in the lattice of low spaces on a set.
\end{cor}

\begin{prop}
The set of completely almost sub-join spaces is meet-closed in the lattice of low spaces on a set.
\end{prop}

\begin{proof}
Let $S$~be a set of graphs of almost completely sub-join low spaces (on some fixed set). $ \bigsqcap S = \setcond{ \bigsqcap
\im P }{ P \in \prod_{X \in S}  X}$.

If $\mathcal{A}, \mathcal{B} \in  \bigsqcap S$ and $\mathcal{A}
\nasymp \mathcal{B}$, then $\mathcal{A}, \mathcal{B} \in  X$ for
every $X \in S$. Thus $\mathcal{A} \sqcup \mathcal{B} \in  X$ and so
$\mathcal{A} \sqcup \mathcal{B} \in  \bigsqcap S$.
\end{proof}

\begin{cor}
The set of completely Cauchy spaces is meet-closed in the lattice of low spaces on a set.
\end{cor}

From the above it follows:

\begin{obvious}
The following sets are complete lattices in our order:
\begin{enumerate}
\item almost sub-join spaces, whose graphs are almost sub-join-semilattices;
\item completely almost sub-join spaces;
\item reflexive low spaces;
\item precauchy spaces;
\item Cauchy spaces;
\item completely Cauchy spaces.
\end{enumerate}
\end{obvious}

Denote $Z(f)=\setcond{F\sqcup G}{F\in f,G\in f,F\nasymp G}\cup\{\bot\}$ for every set $f$ of filters (on some fixed set).

\begin{prop}
$Z(f)\sqsupseteq f$ for every set $f$ of filters.
\end{prop}

\begin{proof}
Consider for $F\in f$ both cases $F=\bot$ and $F\ne\bot$.
\end{proof}

\begin{lem}
For graphs of low spaces~$f$, $g$ (on the same set)
\[
Q = \bigcup S\cup Z\left(\bigcup S\right)\cup Z\left(Z\left(\bigcup S\right)\right)\cup\dots
\]
is a graph of some almost sub-join space.
\end{lem}

\begin{proof}
That it is nonempty and a lower set of filters is obvious. It remains to prove that it is an almost sub-join-semilattice.

Let $\mathcal{A},\mathcal{B}\in Q$ and $\mathcal{A}\nasymp\mathcal{B}$.
Then
\[
\mathcal{A},\mathcal{B} \in \underbrace{Z\dots Z}_{n\text{ times}}\left(\bigcup S\right)
\]
for a natural~$n$. Thus
\[
\mathcal{A}\sqcup\mathcal{B} \in \underbrace{Z\dots Z}_{n+1\text{ times}}\left(\bigcup S\right)
\]
and so $\mathcal{A}\sqcup\mathcal{B}\in Q$.
\end{proof}

\begin{prop}
Join on the lattice of graphs of almost sub-join spaces is described by the formula
\[
\bigsqcup^{\mathbf{ASJ}}S = \bigcup S\cup Z\left(\bigcup S\right)\cup Z\left(Z\left(\bigcup S\right)\right)\cup\dots
\]
\end{prop}

\begin{proof}
The right part of the above formula~$\mu$ is a graph of an almost sub-join space (lemma).

That $\mu$ is an upper bound of $S$ is obvious.

It remains to prove that $\mu$ is the least upper bound.

Suppose $\nu$~is an upper bound of $S$. Then $\nu\supseteq\bigcup S$. Thus, because $\nu$ is an almost sub-join-semilattice,
$Z(\nu)\subseteq\nu$, likewise $Z(Z(\nu))\subseteq\nu$, etc. Consequently $Z(\bigcup S)\subseteq\nu$, $Z(Z(\bigcup S))\subseteq\nu$, etc.
So we have $\mu\sqsubseteq\nu$.
\end{proof}

\begin{prop}
~ \fxnote{Should be merged with the previous proposition.}
\[
\bigsqcup^{\mathbf{ASJ}}S =
\setcond{F_0\sqcup\dots\sqcup F_{n-1}}{F_0,\dots,F_{n-1}\in\bigcup S,F_0\nasymp F_1\land F_1\nasymp F_2\land\dots\land F_{n-2}\nasymp F_{n-1} \text{ for } n\in\mathbb{N}}.
\]
\end{prop}

\begin{rem}
We take $F_0\sqcup\dots\sqcup F_{n-1} = \bot$ for $n=0$.
\end{rem}

\begin{proof}
Denote the right part of the above formula as~$R$.

Suppose $F\in R$. Let's prove by induction that $F\in Q$. If $F=\bot$ that's obvious. Suppose we know that
$F_0\sqcup\dots\sqcup F_{n-1}\in Q$ that is for a natural~$m$
\[F_0\sqcup\dots\sqcup F_{n-1}\in \underbrace{Z\dots Z}_{m\text{ times}}\left(\bigcup S\right)\]
for $F_0,\dots,F_{n-1}\in\bigcup S$, $F_0\nasymp F_1\land F_1\nasymp F_2\land\dots\land F_{n-2}\nasymp F_{n-1}$
and also $F_{n-1}\nasymp F_n$. Then $F_0\sqcup\dots\sqcup F_{n-1}\nasymp F_n$ and thus
$F_0\sqcup\dots\sqcup F_{n-1}\sqcup F_n\in \underbrace{Z\dots Z}_{m+1\text{ times}}\left(\bigcup S\right)$ that is
$F_0\sqcup\dots\sqcup F_{n-1}\sqcup F_n\in Q$. So $F\in Q$ for every~$F\in R$.

Now suppose $F\in Q$ that is for a natural~$m$
\[F \in \underbrace{Z\dots Z}_{m\text{ times}}\left(\bigcup S\right).\]
Let's prove by induction that $F=F_0\sqcup\dots\sqcup F_{n-1}$ for some $F_0,\dots,F_{n-1}\in\bigcup S$
such that $F_0\nasymp F_1\land F_1\nasymp F_2\land\dots\land F_{n-2}\nasymp F_{n-1}$.
If $m=0$ then $F\in\bigcup S$ and our promise is obvious.
Let our statement holds for a natural~$m$. Prove that it holds for
\[F' \in \underbrace{Z\dots Z}_{m+1\text{ times}}\left(\bigcup S\right).\]
We have $F'=Z(F)$ for some $F=F_0\sqcup\dots\sqcup F_{n-1}$ where $F_0\nasymp F_1\land F_1\nasymp F_2\land\dots\land F_{n-2}\nasymp F_{n-1}$.
The case $F'=\bot$ is easy. So we can assume $F'=A\sqcup B$ where $A,B\in F$ and $A\nasymp B$.
By the statement of induction $A=A_0\sqcup\dots\sqcup A_{p-1}$, $B=B_0\sqcup\dots\sqcup B_{q-1}$ for natural~$p$ and~$q$,
where $A_0\nasymp A_1\land A_1\nasymp A_2\land\dots\land A_{p-2}\nasymp A_{p-1}$,
$B_0\nasymp B_1\land B_1\nasymp B_2\land\dots\land B_{n-2}\nasymp B_{n-1}$.
Take $j$ such that $A\nasymp B_j$ and then take $i$ such that $A_i\nasymp B_j$.
Then (using symmetry of the relation~$\nasymp$) we have
$(A_0\nasymp A_1\land A_1\nasymp A_2\land\dots\land A_{p-2}\nasymp A_{p-1}) \land
(A_{p-1} \nasymp A_{p-2} \nasymp \dots A_{i+1} \nasymp A_i) \land A_i \nasymp B_j \land
(B_j \nasymp B_{j-1} \land \dots \land B_1\nasymp B_0) \land
(B_0\nasymp B_1\land B_1\nasymp B_2\land\dots\land B_{q-2}\nasymp B_{q-1})$.
So $F'=A\sqcup B$ is representable as the join of a finite sequence of filters with each adjacent pair of filters in this sequence being intersecting.
That is $F'\in Q$.
\end{proof}

\begin{prop}
The lattice of Cauchy spaces (on some set) is a complete sublattice of the lattice of almost sub-join spaces.
\end{prop}

\begin{proof}
It's obvious, taking into account obvious~\ref{cs-refl-by-id}.
\end{proof}

Denote $Z_{\infty}(f)=\setcond{\bigsqcup T}{T\in\subsets f\land\bigsqcap T\ne\bot}\cup\{\bot\}$.

\begin{prop}
$Z_{\infty}(f)\sqsupseteq f$.
\end{prop}

\begin{proof}
Consider for $F\in f$ both cases $F=\bot$ and $F\ne\bot$.
\end{proof}

\begin{lem}
If $S$ is a set of graphs of low spaces, then
\[
Q = \bigcup S \cup Z_{\infty}\left(\bigcup S\right) \cup Z_{\infty}\left(Z_{\infty}\left(\bigcup S\right)\right) \cup \dots
\]
is a graph of a completely Cauchy space.
\end{lem}

\begin{proof}
That it is nonempty and a lower set of filters is obvious. It remains to prove that it is a completely almost sub-join-semilattice.

Let $T\in\subsets Q$ and $\bigsqcap T\ne\bot$.
Then
\[
T\in\subsets \underbrace{Z_{\infty}\dots Z_{\infty}}_{n\text{ times}}\left(\bigcup S\right)
\]
for a natural~$n$. Thus
\[
T\in\subsets \underbrace{Z_{\infty}\dots Z_{\infty}}_{n+1\text{ times}}\left(\bigcup S\right)
\]
and so $\bigsqcup T\in Q$.
\end{proof}

\begin{prop}
The lattice of completely Cauchy spaces (on some set) is a complete sublattice of the lattice of completely almost sub-join spaces.
\end{prop}

\begin{proof}
It's obvious, taking into account obvious~\ref{cs-refl-by-id}.
\end{proof}

\begin{prop}
Join of a set~$S$ on the lattice of graphs of completely almost sub-join-semilattice is described by the formula:
\[
\bigsqcup^{\mathbf{CASJ}}S=\bigcup S \cup Z_{\infty}\left(\bigcup S\right) \cup Z_{\infty}\left(Z_{\infty}\left(\bigcup S\right)\right) \cup \dots
\]
\end{prop}

\begin{proof}
The right part of the above formula~$\mu$ is a graph of an almost sub-join space (lemma).

That $\mu$ is an upper bound of $S$ is obvious.

It remains to prove that $\mu$ is the least upper bound.

Suppose $\nu$~is an upper bound of $S$. Then $\nu\supseteq\bigcup S$. Thus, because $\nu$ is an almost sub-join-semilattice,
$Z_{\infty}(\nu)\subseteq\nu$, likewise $Z_{\infty}(Z_{\infty}(\nu))\subseteq\nu$, etc. Consequently $Z_{\infty}(\bigcup S)\subseteq\nu$, $Z_{\infty}(Z_{\infty}(\bigcup S))\subseteq\nu$, etc.
So we have $\mu\sqsubseteq\nu$.
\end{proof}

\begin{conjecture}
~
\begin{enumerate}
\item $\bigsqcup^{\mathbf{CASJ}}S=
\setcond{\bigsqcup T_0\sqcup\dots\sqcup\bigsqcup T_{n-1}}{
\begin{aligned}
&n\in\mathbb{N},T_0,\dots,T_{n-1}\in\bigcup S, \\
&\bigsqcap T_0\ne\bot\land\dots\land\bigsqcap T_{n-1}\ne\bot, \\
&\bigsqcup T_0\nasymp\bigsqcup T_1\land\dots\land\bigsqcup T_{n-2}\nasymp\bigsqcup T_{n-1}.
\end{aligned}}$;

\item $\bigsqcup^{\mathbf{CASJ}}S=
\setcond{\bigsqcup T_0\sqcup \bigsqcup T_1\sqcup\dots}{
\begin{aligned}
&T_0,T_1,\dots\in\bigcup S, \\
&\bigsqcap T_0\ne\bot\land\bigsqcap T_2\ne\bot\land\dots,
\bigsqcup T_0\nasymp\bigsqcup T_1\land\bigsqcup T_1\nasymp\bigsqcup T_2\land\dots
\end{aligned}}$.
\end{enumerate}
\end{conjecture}

\section{Up-complete low spaces}

\begin{defn}
  \emph{Ideal base} is a nonempty subset $S$ of a poset such that $\forall
  a, b \in S \exists c \in S : (a, b \sqsubseteq c)$.
\end{defn}

\begin{obvious}
Ideal base is dual of filter base.
\end{obvious}

\begin{thm}
  Product of nonempty posets is a ideal base iff every factor is an ideal
  base.
\end{thm}

\begin{proof}
  \fxwarning{more detailed proof}

  In one direction it is easy: Suppose one multiplier is not a dcpo. Take a
  chain with fixed elements (thanks our posets are nonempty) from other
  multipliers and for this multiplier take the values which form a chain
  without the join. This proves that the product is not a dcpo.

  Let now every factor is dcpo. $S$ is a filter base in $\prod \mathfrak{A}$
  iff each component is a filter base. Each component has a join. Thus by proposition~\bookref{cw-join} $S$ has a componentwise join.
\end{proof}

\begin{defn}
  I call a low space \emph{up-complete} when each ideal base (or
  equivalently every nonempty chain, see theorem~\bookref{fclosed}) in this space has join in
  this space.
\end{defn}

\begin{rem}
  Elements of this ideal base are filters. (Thus is could be called a
  generalized ideal base.)
\end{rem}

\begin{example}
  ~
  \begin{enumerate}
    \item $\setcond{ \mathcal{X} \in \mathfrak{F} ]0 ; + \infty[ }{
    \exists \varepsilon > 0 : \mathcal{X} \sqsubseteq \uparrow
    ]\varepsilon ; + \infty[ } \cup \uparrow\{ 0 \}$ is a graph of Cauchy space
    on $\mathbb{R}_+$, but not up-complete.

    \item $\mathfrak{F} [0 ; + \infty[$ is a strictly greater graph of Cauchy
    space on $\mathbb{R}_+$ and is up-complete.
  \end{enumerate}
\end{example}

\begin{lem}
  Let $f$ be a reloid. Each ideal base $T \subseteq \setcond{ (\mathcal{A} ,
  \mathcal{B}) }{ \mathcal{A}
  \times^{\mathsf{RLD}} \mathcal{B} \sqsubseteq f }$ has a join
  in this set.
\end{lem}

\begin{proof}
  Let $T$ be an ideal base and $\forall (\mathcal{A} , \mathcal{B}) \in T :
  \mathcal{A} \times^{\mathsf{FCD}} \mathcal{B} \sqsubseteq f$.

  $\forall (\mathcal{A} , \mathcal{B}) \in T \forall \mathcal{X} \in
  \mathscr{F} \Src f : (\mathcal{X} \nasymp \mathcal{A} \Rightarrow
  \mathcal{B} \sqsubseteq \supfun{f} \mathcal{X})$;

  taking join we have:

  $\forall \mathcal{A} \in \Pr_0 T \forall \mathcal{X} \in \mathscr{F}
  \Src f : \left( \mathcal{X} \nasymp \mathcal{A} \Rightarrow
  \bigsqcup_{\mathcal{B} \in \Pr_1 T} \mathcal{B} \sqsubseteq \langle f
  \rangle \mathcal{X} \right)$;

  $\forall \mathcal{A} \in \Pr_0 T : \mathcal{A} \times^{\mathsf{FCD}}
  \bigsqcup_{\mathcal{B} \in \Pr_1 T} \mathcal{B} \sqsubseteq f$.

  Now repeat a similar operation second time:

  $\forall \mathcal{A} \in \Pr_0 T : \bigsqcup_{\mathcal{B} \in \Pr_1 T}
  \mathcal{B} \times^{\mathsf{FCD}} \mathcal{A} \sqsubseteq f^{- 1}$;

  $\forall \mathcal{A} \in \Pr_0 T \forall \mathcal{Y} \in \mathscr{F}
  \Dst f : \left( \mathcal{Y} \nasymp \bigsqcup_{\mathcal{B} \in \Pr_1
  T} \mathcal{B} \Rightarrow \mathcal{A} \sqsubseteq \langle f^{- 1} \rangle
  \mathcal{Y} \right)$;

  $\forall \mathcal{Y} \in \mathscr{F} \Dst f : \left( \mathcal{Y}
  \nasymp \bigsqcup_{\mathcal{B} \in \Pr_1 T} \mathcal{B} \Rightarrow
  \bigsqcup_{\mathcal{A} \in \Pr_0 T} \mathcal{A} \sqsubseteq \langle f^{- 1}
  \rangle \mathcal{Y} \right)$;

  $\bigsqcup_{\mathcal{B} \in \Pr_1 T} \mathcal{B}
  \times^{\mathsf{FCD}} \bigsqcup_{\mathcal{A} \in \Pr_0 T} \mathcal{A}
  \sqsubseteq f^{- 1}$;

  $\bigsqcup_{\mathcal{A} \in \Pr_0 T} \mathcal{A}
  \times^{\mathsf{FCD}} \bigsqcup_{\mathcal{B} \in \Pr_1 T} \mathcal{B}
  \sqsubseteq f$. But $\bigsqcup_{\mathcal{A} \in \Pr_0 T} \mathcal{A}
  \times^{\mathsf{FCD}} \bigsqcup_{\mathcal{B} \in \Pr_1 T}
  \mathcal{B}$ is the join in consideration, because ideal base is ideal base
  in each argument.
\end{proof}

\begin{prop}
  A Cauchy space generated by an endoreloid is always up-complete.
\end{prop}

\begin{proof}
  Let $f$ be an endoreloid. $\GR (\Low) f = \setcond{ \mathcal{X} \in
  \Ob f }{ \mathcal{X}
  \times^{\mathsf{RLD}} \mathcal{X} \sqsubseteq f }$.

  Let $T\subseteq \setcond{ \mathcal{X} \in \Ob f }{ \mathcal{X} \times^{\mathsf{RLD}} \mathcal{X} \sqsubseteq f }$
  be an ideal base.

  Then $N = \setcond{(\mathcal{F},\mathcal{F})}{\mathcal{F}\in T}$ is also an ideal base.
  Obviously $N \subseteq \setcond{ (\mathcal{A} , \mathcal{B}) }{ \mathcal{A} \times^{\mathsf{RLD}} \mathcal{B} \sqsubseteq f }$.
  Thus by the lemma it has a join in
  $\setcond{ (\mathcal{A} , \mathcal{B}) }{ \mathcal{A} \times^{\mathsf{RLD}} \mathcal{B} \sqsubseteq f }$.
  It's easy to see that this join is in
  $\setcond{ (\mathcal{A} , \mathcal{A}) }{ \mathcal{A}\in\Ob f, \mathcal{A} \times^{\mathsf{RLD}} \mathcal{A} \sqsubseteq f }$.
  Consequently $T$ has a join in $\setcond{ \mathcal{X} \in \Ob f }{ \mathcal{X} \times^{\mathsf{RLD}} \mathcal{X} \sqsubseteq f }$.
\end{proof}

It is long time known that (using our terminology) low space induced by a
uniform space is a Cauchy space, but that it is complete and up-complete is
probably first discovered by Victor Porton.

\section{More on Cauchy filters}

\begin{obvious}
Low filter on an endoreloid $\nu$ is a filter $\mathcal{F}$ such that
\[ \forall U \in \GR f \exists A \in \mathcal{F} : A \times A \subseteq
   U. \]
\end{obvious}

\begin{rem}
  The above formula is the standard definition of Cauchy filters on uniform
  spaces.
\end{rem}

\begin{prop}
  If $\nu \sqsupseteq \nu \circ \nu^{- 1}$ then every neighborhood filter is a
  Cauchy filter, that it
  \[ \nu \sqsupseteq \rsupfun{\tofcd \nu} \{ x \}
     \times^{\mathsf{RLD}} \rsupfun{\tofcd \nu} \{ x \} \]
  for every point $x$.
\end{prop}

\begin{proof}
  $\rsupfun{\tofcd \nu} \{ x \}
  \times^{\mathsf{RLD}} \rsupfun{\tofcd \nu} \{ x \} = \supfun{\tofcd \nu}
  \uparrow^{\Ob \nu} \left\{ x \right\} \times^{\mathsf{RLD}}
  \supfun{\tofcd \nu} \uparrow^{\Ob \nu} \{ x \} =
  \nu \circ (\uparrow^{\Ob \nu} \{ x \} \times^{\mathsf{RLD}}
  \uparrow^{\Ob \nu} \{ x \}) \circ \nu^{- 1} = \nu \circ
  (\uparrow^{\mathsf{RLD} (\Ob \nu , \Ob \nu)} \{ (x , x)
  \}) \circ \nu^{- 1} \sqsubseteq \nu \circ \id^{\mathsf{RLD}
  (\Ob \nu , \Ob \nu)} \circ \nu^{- 1} = \nu \circ \nu^{- 1}
  \sqsubseteq \nu$.
\end{proof}

\begin{prop}
  If $\nu \sqsupseteq \nu \circ \nu^{- 1}$ a filter converges (in~$\nu$) to a point, it is a low filter, provided that every
  neighborhood filter is a low filter.
\end{prop}

\begin{proof}
  Let $\mathcal{F} \sqsubseteq \rsupfun{\tofcd \nu} \{ x \}$. Then $\mathcal{F} \times^{\mathsf{RLD}}
  \mathcal{F} \sqsubseteq \rsupfun{\tofcd \nu} \{
  x \} \times^{\mathsf{RLD}} \rsupfun{\tofcd \nu} \{ x \} \sqsubseteq \nu$.
\end{proof}

\begin{cor}
  If a filter converges to a point, it is a low filter, provided that $\nu
  \sqsupseteq \nu \circ \nu^{- 1}$.
\end{cor}

\section{Maximal Cauchy filters}

\begin{lem}
  Let $S$ be a set of sets with $\bigsqcap \rsupfun{ \uparrow^{\mathfrak{F}} }
  S \neq 0^{\mathfrak{F}}$ (in other words, $S$ has finite
  intersection property). Let $T = \setcond{ X \times X}
  {X \in S }$. Then
  \[ \bigcup T \circ \bigcup T = \bigcup S \times \bigcup S. \]
\end{lem}

\begin{proof}
  Let $x \in \bigcup S$. Then $x \in X$ for some $X \in S$. $\left\langle
  \bigcup T \right\rangle \{ x \} \sqsupseteq \uparrow X \supseteq \bigcap S
  \neq \emptyset$. Thus

  $\left\langle \bigcup T \circ \bigcup T \right\rangle \{ x \} = \left\langle
  \bigcup T \right\rangle \left\langle \bigcup T \right\rangle \{ x \} \in
  \left\langle \uparrow^{\mathsf{FCD}} \bigcup T \right\rangle
  \bigsqcap \langle \uparrow^{\mathfrak{F}} \rangle S \sqsupseteq \bigsqcup
  \setcond{ \langle \uparrow^{\mathsf{FCD}} (X \times X) \rangle
  \bigsqcap \langle \uparrow^{\mathfrak{F}} \rangle S }{
  X \in S } = \bigsqcup \setcond{ \uparrow^{\mathfrak{F}} X}{X \in S } =
  \bigsqcup \langle
  \uparrow^{\mathfrak{F}} \rangle S$ that is $\left\langle \bigcup T \circ
  \bigcup T \right\rangle \{ x \} \supseteq \bigcup S$.
\end{proof}

\begin{cor}
  Let $S$ be a set of filters (on some fixed set) with nonempty meet. Let
  \[ T = \setcond{ \mathcal{X} \times^{\mathsf{RLD}} \mathcal{X} }
     {\mathcal{X} \in S} \]
  Then
  \[ \bigsqcup T \circ \bigsqcup T = \bigsqcup S \times^{\mathsf{RLD}}
     \bigsqcup S. \]
\end{cor}

\begin{proof}
  $\bigsqcup T \circ \bigsqcup T = \bigsqcap \setcond{ \uparrow^{\mathfrak{F}}
  (X \circ X) }{ X \in \bigsqcup T }$.

  If $X \in \bigsqcup T$ then $X = \bigcup_{Q \in T} (P_Q \times P_Q)$ where
  $P_Q \in Q$. Therefore by the lemma we have
  \[ \bigcup \setcond{ P_Q \times P_Q}{Q \in T} \circ \bigcup
  \setcond{ P_Q \times P_Q}{ Q \in T } = \bigcup_{Q \in T} P_Q \times \bigcup_{Q \in T} P_Q .
  \]
  Thus $X \circ X = \bigcup_{Q \in T} P_Q \times \bigcup_{Q \in T} P_Q$.

  Consequently $\bigsqcup T \circ \bigsqcup T = \bigsqcap \setcond{
  \uparrow^{\mathfrak{F}} \left( \bigcup_{Q \in T} P_Q \times \bigcup_{Q \in
  T} P_Q \right)}{X \in \bigsqcup T }
  \sqsupseteq \bigsqcup S \times^{\mathsf{RLD}} \bigsqcup S$.

  $\bigsqcup T \circ \bigsqcup T \sqsubseteq \bigsqcup S
  \times^{\mathsf{RLD}} \bigsqcup S$ is obvious.
\end{proof}

\begin{defn}
  I call an endoreloid $\nu$ \emph{symmetrically transitive} iff for every
  symmetric endofuncoid $f \in \mathsf{FCD} (\Ob \nu , \Ob
  \nu)$ we have $f \sqsubseteq \nu \Rightarrow f \circ f \sqsubseteq \nu$.
\end{defn}

\begin{obvious}
  It is symmetrically transitive if at least one of the following holds:
  \begin{enumerate}
    \item $\nu \circ \nu \sqsubseteq \nu$;

    \item $\nu \circ \nu^{- 1} \sqsubseteq \nu$;

    \item $\nu^{- 1} \circ \nu \sqsubseteq \nu$.

    \item $\nu^{- 1} \circ \nu^{- 1} \sqsubseteq \nu$.
  \end{enumerate}
\end{obvious}

\begin{cor}
  Every uniform space is symmetrically transitive.
\end{cor}

\begin{prop}
  $(\Low) \nu$ is a completely Cauchy space for every symmetrically
  transitive endoreloid $\nu$.
\end{prop}

\begin{proof}
  Suppose $S \in \subsets \setcond{ \mathcal{X} \in \mathfrak{F} }{ \mathcal{X}
  \times^{\mathsf{RLD}} \mathcal{X} \sqsubseteq \nu }$.

  $\bigsqcup \setcond{ \mathcal{X} \times^{\mathsf{RLD}} \mathcal{X}}
  {\mathcal{X} \in S } \sqsubseteq \nu$;
  $\bigsqcup \setcond{ \mathcal{X} \times^{\mathsf{RLD}} \mathcal{X}}
  {\mathcal{X} \in S } \circ \bigsqcup
  \setcond{ \mathcal{X} \times^{\mathsf{RLD}} \mathcal{X} }
  {\mathcal{X} \in S} \sqsubseteq \nu$; $\bigsqcup S
  \times^{\mathsf{RLD}} \bigsqcup S \sqsubseteq \nu$ (taken into
  account that $S$ has nonempty meet). Thus $\bigsqcup S$ is Cauchy.
\end{proof}

\begin{prop}
  The neighbourhood filter $\langle \tofcd \nu \rangle^{\ast} \{
  x \}$ of a point $x \in \Ob \nu$ is a maximal Cauchy filter, if it is a
  Cauchy filter and $\nu$ is a reflexive reloid.
  \fxnote{Does it holds for all low filters?}
\end{prop}

\begin{proof}
  Let $\mathscr{N} = \langle \tofcd \nu \rangle^{\ast} \{ x
  \}$. Let $\mathscr{C \sqsupseteq N}$ be a Cauchy filter. We need to show
  $\mathscr{N \sqsupseteq C}$.

  Since $\mathscr{C}$ is Cauchy filter, $\mathscr{C}
  \times^{\mathsf{RLD}} \mathscr{C} \sqsubseteq \nu$. Since $\mathscr{C
  \sqsupseteq N}$ we have $\mathscr{C}$ is a neighborhood of $x$ and thus
  $\uparrow^{\Ob \nu} \{ x \} \sqsubseteq \mathscr{C}$ (reflexivity of
  $\nu$). Thus $\uparrow^{\Ob \nu} \{ x \} \times^{\mathsf{RLD}}
  \mathscr{C} \sqsubseteq \mathscr{C} \times^{\mathsf{RLD}}
  \mathscr{C}$ and hence $\uparrow^{\Ob \nu} \{ x \}
  \times^{\mathsf{RLD}} \mathscr{C} \sqsubseteq \nu$;
  \[ \mathscr{C} \sqsubseteq \im (\nu |_{\uparrow^{\Ob \nu} \{ x
     \}}) = \langle \tofcd \nu \rangle^{\ast} \{ x \} =
     \mathscr{N} . \]
\end{proof}

\section{Cauchy continuous functions}

\begin{defn}
  A function $f : U \rightarrow V$ is \emph{Cauchy continuous} from a low
  space $\left( U , \mathscr{C} \right)$ to a low space
  $\left( V , \mathscr{D} \right)$ when $\forall \mathcal{X} \in \mathscr{C} :
  \langle \uparrow^{\mathsf{FCD}} f \rangle \mathcal{X} \in
  \mathscr{D}$.
\end{defn}

\begin{prop}
  Let $f$ be a principal reloid. Then $f \in \mathrm{C} \left(
  (\mathsf{RLD})_{\Low} \mathscr{C} ,
  (\mathsf{RLD})_{\Low} \mathscr{D} \right)$ iff $f$ is Cauchy
  continuous.
  \begin{eqnarray*}
    f \circ (\mathsf{RLD})_{\Low} \mathscr{C} \circ f^{- 1}
    \sqsubseteq (\mathsf{RLD})_{\Low} \mathscr{D} &
    \Leftrightarrow & \\
    \bigsqcup_{\mathcal{X} \in
    \mathscr{C}} (f \circ (\mathcal{X} \times^{\mathsf{RLD}}
    \mathcal{X} ) \circ f^{- 1} ) \sqsubseteq (\mathsf{RLD})_{\Low}
    \mathscr{D} & \Leftrightarrow & \\
    \bigsqcup_{\mathcal{X} \in \mathscr{C}} ( \langle \uparrow^{\mathsf{FCD}} f \rangle
    \mathcal{X} \times^{\mathsf{RLD}} \langle
    \uparrow^{\mathsf{FCD}} f \rangle \mathcal{X}) \sqsubseteq
    (\mathsf{RLD})_{\Low} \mathscr{D} & \Leftrightarrow & \\
    \forall \mathcal{X} \in \mathscr{C} : \langle
    \uparrow^{\mathsf{FCD}} f \rangle \mathcal{X}
    \times^{\mathsf{RLD}} \langle \uparrow^{\mathsf{FCD}} f
    \rangle \mathcal{X} \sqsubseteq (\mathsf{RLD})_{\Low}
    \mathscr{D} & \Leftrightarrow & \\
    \forall \mathcal{X} \in \mathscr{C} : \langle
    \uparrow^{\mathsf{FCD}} f \rangle \mathcal{X} \in \mathscr{D} . &
    &
  \end{eqnarray*}
\end{prop}

Thus we have expressed Cauchy properties through the algebra of reloids.

\section{Cauchy-complete reloids}

\begin{defn}
  An endoreloid $\nu$ is \emph{Cauchy-complete} iff every low filter for
  this reloid converges to a point.
\end{defn}

\begin{rem}
  In my book \cite{volume-1} \emph{complete reloid} means something
  different. I will always prepend the word ``Cauchy'' to the word
  ``complete'' when meaning is by the last definition.
\end{rem}

\url{https://en.wikipedia.org/wiki/Complete\_uniform\_space\#Completeness}

\section{Totally bounded}

\url{http://ncatlab.org/nlab/show/Cauchy+space}

\begin{defn}
  Low space is called \emph{totally bounded} when every proper filter
  contains a proper Cauchy filter.
\end{defn}

\begin{obvious}
A reloid $\nu$ is totally bounded iff
\[ \forall X \in \subsets \Ob \nu \exists \mathcal{X} \in
   \mathfrak{F}^{\Ob \nu} : (\bot \neq \mathcal{X} \sqsubseteq
   \uparrow^{\Ob \nu} X \wedge \mathcal{X} \times^{\mathsf{RLD}}
   \mathcal{X} \sqsubseteq \nu) . \]
\end{obvious}

\begin{thm}
  A symmetric transitive reloid is totally bounded iff its Cauchy space is
  totally bounded.
\end{thm}

\begin{proof}~

  \begin{description}
    \item[$\Rightarrow$] Let $\mathcal{F}$ be a proper filter on $\Ob
    \nu$ and let $a \in \atoms \mathcal{F}$. It's enough to prove that
    $a$ is Cauchy.

    Let $D \in \GR \nu$. Let also $E \in \GR \nu$ is symmetric
    and $E \circ E \subseteq D$. There existsa finite subset $F \subseteq
    \Ob \nu$ such that $\langle E \rangle F = \Ob \nu$. Then
    obviously exists $x \in F$ such that $a \sqsubseteq \uparrow^{\Ob
    \nu} \langle E \rangle \{ x \}$, but $\langle E \rangle \{ x \} \times
    \langle E \rangle \{ x \} = E^{- 1} \circ (\{ x \} \times \{ x \}) \circ E
    \subseteq D$, thus $a \times^{\mathsf{RLD}} a \sqsubseteq
    \uparrow^{\mathsf{RLD} (\Ob \nu , \Ob \nu)} D$.

    Because $D$ was taken arbitrary, we have $a \times^{\mathsf{RLD}} a
    \sqsubseteq \nu$ that is $a$ is Cauchy.

    \item[$\Leftarrow$] Suppose that Cauchy space associated with a reloid
    $\nu$ is totally bounded but the reloid $\nu$ isn't totally bounded. So
    there exists a $D \in \GR \nu$ such that $(\Ob \nu) \setminus
    \langle D \rangle F \neq \emptyset$ for every finite set $F$.

    Consider the filter base
    \[ S = \setcond{ (\Ob \nu) \setminus \langle D \rangle F}
       {F \in \subsets \Ob \nu, F \text{ is finite}
       } \]
    and the filter $\mathcal{F} = \bigsqcap \langle \uparrow^{\Ob \nu}
    \rangle S$ generated by this base. The filter $\mathcal{F}$ is proper
    because intersection $P \cap Q \in S$ for every $P, Q \in S$ and
    $\emptyset \notin S$. Thus there exists a Cauchy (for our Cauchy space)
    filter $\mathcal{X} \sqsubseteq \mathcal{F}$ that is $\mathcal{X}
    \times^{\mathsf{RLD}} \mathcal{X} \sqsubseteq \nu$.

    Thus there exists $M \in \mathcal{X}$ such that $M \times M \subseteq D$.
    Let $F$ be a finite subset of $\Ob \nu$. Then $(\Ob \nu)
    \setminus \langle D \rangle F \in \mathcal{F} \sqsupseteq \mathcal{X}$.
    Thus $M \nasymp (\Ob \nu) \setminus \langle D \rangle F$ and so
    there exists a point $x \in M \cap ((\Ob \nu) \setminus \langle D
    \rangle F)$.

    $\langle M \times M \rangle \{ p \} \subseteq \langle D \rangle \{ x \}$
    for every $p \in M$; thus $M \subseteq \langle D \rangle \{ x \}$.

    So $M \subseteq \langle D \rangle (F \cup \{ x \})$. But this means that
    $M \in \mathcal{X}$ does not intersect $(\Ob \nu) \setminus \langle
    D \rangle (F \cup \{ x \}) \in \mathcal{F} \sqsupseteq \mathcal{X}$, what
    is a contradiction (taken into account that $\mathcal{X}$ is proper).
  \end{description}
\end{proof}

\url{http://math.stackexchange.com/questions/104696/pre-compactness-total-boundedness-and-cauchy-sequential-compactness}

\section{Totally bounded funcoids}

\begin{defn}
  A funcoid $\nu$ is totally bounded iff
  \[ \forall X \in \Ob \nu \exists \mathcal{X} \in
     \mathfrak{F}^{\Ob \nu} : (0 \neq \mathcal{X} \sqsubseteq
     \uparrow^{\Ob \nu} X \wedge \mathcal{X}
     \times^{\mathsf{FCD}} \mathcal{X} \sqsubseteq \nu) . \]
\end{defn}

This can be rewritten in elementary terms (without using funcoidal product:

$\mathcal{X} \times^{\mathsf{FCD}} \mathcal{X} \sqsubseteq \nu
\Leftrightarrow \forall P \in \corestar \mathcal{X} : \mathcal{X} \sqsubseteq
\supfun{\nu} P \Leftrightarrow \forall P \in \corestar \mathcal{X}, Q
\in \corestar \mathcal{X} : P \mathrel{[\nu]^{\ast}} Q \Leftrightarrow \forall
P, Q \in \Ob \nu : \left( \forall E \in \mathcal{X} : (E \cap P \neq
\emptyset \wedge E \cap Q \neq \emptyset) \Rightarrow P \mathrel{[\nu]^{\ast}}
Q \right)$.

Note that probably I am the first person which has written the above formula
(for proximity spaces for instance) explicitly.

\section{On principal low spaces}

\begin{defn}
  A low space $\left( U , \mathscr{C} \right)$ is \emph{principal}
  when all filters in $\mathscr{C}$ are principal.
\end{defn}

\begin{prop}
  Having fixed a set $U$, principal reflexive low spaces on $U$
  bijectively correspond to principal reflexive symmetric endoreloids on $U$.
\end{prop}

\begin{proof}
  ??

  http://math.stackexchange.com/questions/701684/union-of-cartesian-squares
\end{proof}

\section{Rest}

\url{https://en.wikipedia.org/wiki/Cauchy\_filter\#Cauchy\_filters}

\url{https://en.wikipedia.org/wiki/Uniform\_space} ``Hausdorff completion of a
uniform space'' here)

\url{http://at.yorku.ca/z/a/a/b/13.htm} : the category $\mathbf{Prox}$ of proximity
spaces and proximally continuous maps (i.e. maps preserving nearness between
two sets) is isomorphic to the category of totally bounded uniform spaces (and
uniformly continuous maps).

\url{https://en.wikipedia.org/wiki/Cauchy\_space}
\url{http://ncatlab.org/nlab/show/Cauchy+space}

\url{http://arxiv.org/abs/1309.1748}

\url{http://projecteuclid.org/download/pdf\_1/euclid.pja/1195521991}

\url{http://www.emis.de/journals/HOA/IJMMS/Volume5\_3/404620.pdf}

\url{\~/math/books/Cauchy\_spaces.pdf}

\url{https://ncatlab.org/nlab/show/Cauchy+space} defines compact Cauchy spaces!

\url{http://www.hindawi.com/journals/ijmms/1982/404620/abs/} (open access article) describes criteria for a Cauchy space to be uniformizable.


\section{Associative Arrays}

\toclesssubsection{Introduction}

\begin{frame}{Associative Arrays}{How do we build a Map?}
  \textbf{Reminder:}
  \begin{itemize}
  \item An associative array is like a normal array, only that
    the indices are not {\color{MainA}$0, 1, 2, \ldots$}, but
    different, e.g. telephone numbers
  \end{itemize}
  \onslide<2->\textbf{Problem:}
  \begin{itemize}
  \onslide<2->\item Quickly find an element with a specific key
  \onslide<3->\item Naive solution: store pairs of key and value
    in a normal array
  \onslide<4->\item For {\color{MainA}n} keys searching requires {\color{MainA} $\Theta(n)$} time
  \onslide<5->\item With a {\color{MainA}hash map} this just requires {\color{MainA} $\Theta(1)$}
    in the best case, ... regardless of how many elements are in the map!
  \end{itemize}
\end{frame}

%% \begin{frame}{Associative Arrays}{How do we build a Map?}
%%   \textbf{Structure:}
%%   \begin{itemize}
%%       \item
%%         Mapping {\color{MainA}keys to values}
%%       \begin{itemize}
%%         \item
%%           Key universe: $\mathbb{U}$
%%         \item
%%           Used keys: $\mathbb{S} \subseteq \mathbb{U}$
%%         \item
%%          The keys / values can have any data type\\
%%       \end{itemize}
%%       \lstinline[
%%         language=Python,
%%         style={python-idle-code},
%%         basicstyle=\small,
%%         mathescape
%%       ]|[key${}_1$: value${}_1$, key${}_2$: value${}_2$, $\dotsc$]|
%%     \item
%%       We are interested in the following operations:\\[0.5em]
%%       \begin{tabularx}{\textwidth}{ll}%
%%         \lstinline[
%%           language=Python,
%%           style={python-idle-code},
%%           basicstyle=\small,
%%           emph={insert},
%%           emphstyle=\color{MainA}
%%         ]|insert(key, value)| & Insert an element with a key and value\\
%%         \lstinline[
%%           language=Python,
%%           style={python-idle-code},
%%           basicstyle=\small,
%%           emph={lookup},
%%           emphstyle=\color{MainA}
%%         ]|lookup(key)| & Retireve the mapped element with a key\\
%%         \lstinline[
%%           language=Python,
%%           style={python-idle-code},
%%           basicstyle=\small,
%%           emph={erase},
%%           emphstyle=\color{MainA}
%%         ]|erase(key)| & Delete the mapping from key to value
%%       \end{tabularx}
%%       \hfill\\
%%   \end{itemize}
%%   \textbf{Task:}
%%   \begin{itemize}
%%     \item
%%       Searching / storing an elemenent the fastest way
%%   \end{itemize}
%% \end{frame}

%--------------------------------------------------------------------------------

%% \begin{frame}{Associative Arrays}{How do we build a Map?}
%%   \textbf{Special case:}
%%   \begin{itemize}
%%     \item
%%       Keys $\mathbb{U}$ are natural numbers from $0$ to
%%       $n - 1$
%%     \item
%%       Runtime:\\[0.5em]
%%       \begin{tabularx}{\textwidth}{lp{1em}l}%
%%         \lstinline[
%%           language=Python,
%%           style={python-idle-code},
%%           basicstyle=\small,
%%           emph={insert},
%%           emphstyle=\color{MainA}
%%         ]|insert(key, value)| & {} & $\mathcal{O}(1)$\\
%%         \lstinline[
%%           language=Python,
%%           style={python-idle-code},
%%           basicstyle=\small,
%%           emph={lookup},
%%           emphstyle=\color{MainA}
%%         ]|lookup(key)| & {} & $\mathcal{O}(1)$\\
%%         \lstinline[
%%           language=Python,
%%           style={python-idle-code},
%%           basicstyle=\small,
%%           emph={erase},
%%           emphstyle=\color{MainA}
%%         ]|erase(key)| & {} & $\mathcal{O}(1)$
%%       \end{tabularx}
%%     \item
%%       Memory usage: $\mathcal{O}(n)$
%% \end{itemize}
%%   \begin{table}[!b]
%%     \caption{Integer map with $n = 10$}
%%     \label{tab:maps:map_example_introduction_integer}
%%     \begin{tabularx}{\textwidth}{l|cccccccccc}
%%       A & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9\\
%%       \midrule
%%       Value &
%%       {} &
%%       value${}_1$ &
%%       {} &
%%       value${}_3$ &
%%       {} &
%%       {} &
%%       {} &
%%       value${}_7$ &
%%       {} &
%%       {}
%%     \end{tabularx}
%%   \end{table}
%% \end{frame}

%% %--------------------------------------------------------------------------------

%% \begin{frame}{Associative Arrays}{How do we build a Map?}
%%   \textbf{Normal case:}
%%   \begin{itemize}
%%     \item
%%       We have a lot less assigned keys $\mathbb{S}$ than possible
%%       ($\mathbb{S} \subset \mathbb{U}$)
%%     \item
%%       We don't have numbers as keys e.g. names / words
%%   \end{itemize}
%%   \textbf{Naive way:}
%%   \begin{itemize}
%%     \item
%%       Store all key value pairs in a normal field (array)
%%     \item
%%       Runtime:\\[0.5em]
%%       \begin{tabularx}{\textwidth}{lp{1em}l}%
%%         \lstinline[
%%           language=Python,
%%           style={python-idle-code},
%%           basicstyle=\small,
%%           emph={insert},
%%           emphstyle=\color{MainA}
%%         ]|insert(key, value)| & {} & $\mathcal{O}(1)$\\
%%         \lstinline[
%%           language=Python,
%%           style={python-idle-code},
%%           basicstyle=\small,
%%           emph={lookup},
%%           emphstyle=\color{MainA}
%%         ]|lookup(key)| & {} & $\mathcal{O}(n)$\\
%%         \lstinline[
%%           language=Python,
%%           style={python-idle-code},
%%           basicstyle=\small,
%%           emph={erase},
%%           emphstyle=\color{MainA}
%%         ]|erase(key)| & {} & $\mathcal{O}(n)$
%%       \end{tabularx}
%%     \item
%%       Memory usage: $\mathcal{O}(n)$
%%   \end{itemize}
%%   \vspace*{-1.0em}
%%   \begin{table}[!b]
%%     \caption{Map T: names mapped to age}%
%%     \label{tab:maps:map_example_introduction}%
%%     \vspace*{-0.5em}%
%%     \begin{tabularx}{0.775\textwidth}{l|cccc}
%%       T & 0 & 1 & 2\\
%%       \midrule
%%       Value &
%%       \lstinline[
%%         language=Python,
%%         style={python-idle-code},
%%         basicstyle=\small
%%       ]|("Karl", 20)| &
%%       \lstinline[
%%         language=Python,
%%         style={python-idle-code},
%%         basicstyle=\small
%%       ]|("Bob", 15)| &
%%       \lstinline[
%%         language=Python,
%%         style={python-idle-code},
%%         basicstyle=\small
%%       ]|("Peter", 18)|
%%     \end{tabularx}
%%   \end{table}
%% \end{frame}


\subsection{Gradient boosting}

Gradient boosting does not iterative change the weights for the learners. Instead, it trains on different errors.

While AdaBoost trains to reduce the absolute error for each weak classifier, gradient boosting trains on the difference between the actual classiffication and the current classification.


\section{Learning with NL* }
\label{section:NL}

The NL* algorithm, described by Benedikt Bollig \textit{et al.} in \cite{NLPaper}, is an algorithm based on L* whose goal is to learn an unknown language $\U$ building potentially smaller automata then the one built by L*. To achieve this goal, NL* outputs a particular type of automaton called \textit{Canonical residual final state automata (cRFSA)}.

\subsection{Residual final state automaton (RFSA)}
\label{sec:RFSA}

% We have seen in \cref{section:L} that L* is able to create a \textit{mDFA} recognizing a regular language where each state is associated to a particular row of the \OT

\begin{theorem}
  Every regular language $L$ has a finite number of residuals.
\end{theorem}

\begin{definition}
  A residual of a language $L$ is a new language $L'$ where $L = \{\omega \cdot v, \text{ for some } \omega \in \Sigma^* \text{ and for } \forall v \in L'\}$. This is commonly noted $\omega^{-1} L = L' \text{ for some } \omega \in \Sigma^*$.
\end{definition}

\begin{example}
  \label{example:residual}
  Let $L = (aa)^*$ and $\Sigma = \{a\}$. $L$ has only two residuals $L_1 = (aa)^*$ and $L_2 = a(aa)^*$\footnotetext{A procedure to find residual of a language is proposed in \cref{algo:find_residuals} }. We can see that there does not exist any other residual because if we pose $E_{ven} = {\omega \in \Sigma^* \mid len(\omega) \equiv 0 \mod 2}$ and $O_{dd} = {\omega \in \Sigma^* \mid len(\omega) \equiv 1 \mod 2}$, we have $E_{ven} \cup O_{dd} = \Sigma^*$ and $E_{eve}^{-1}L = L_1$ and $O_{dd}^{-1}L = L_2$. No other residual is possible since there exists no other word in $\Sigma^* / \{E_{ven} \cup O_{dd}\} = \varnothing$ which can create a new residual.
\end{example}

\begin{remark}
  The set of word $\W$ over an alphabet $\Sigma$ is a syntactic monoid if for every $\omega \in \W$, $\omega^{-1}L$ gives the same residual. Moreover, each residual has a corresponding syntactic monoid.
\end{remark}

\begin{example}
  Turning back to \cref{example:residual}, we can say that $E_{ven}$ is the syntactic monoid generating $\mathcal{R_1} = (aa)^*$ and $O_{dd}$ it the other syntactic monoid generating $\mathcal{R_2} = a(aa)^*$.
\end{example}

\begin{theorem}[mDFA and Residuals]
  A DFA $\A$ is minimum if and only if, for a given language $L$, $\LA = L$ and the number of states of $A$ equals the number of the residual of $L$.
\end{theorem}

\begin{proof}
  $\rightarrow$ Let $\A = \langle \Sigma, \Q, \delta, q_i, F \rangle $ be a \textit{mDFA} and $\A_i$ the automaton $\A$ where $q_I$ is a state $q_i \in \Q$. For every $q_i \in \Q$, $\mathcal{L}(\A_i)$ is a residual $\RE_i$ of $L$. We can also define its syntactic monoid $M$ by all words $\omega$ accepted by $\A$ having $F = {q_i}$.

  $\leftarrow$ Given the set of residuals $\RE = \{\RE_1, \RE_2, \dots, \RE_n\}$ of $L$ and an alphabet $\Sigma$. For every $\RE_i$ there exists an associated monoid $M_i$ such that $\omega^{-1}\RE_i = L$ for all $\omega \in M_i$. We can construct the minimal DFA $\langle$ \alphabet{}, \states{}, \transition{}, \qzero{}, \qend{} $\rangle$ where:
  \begin{itemize}
    \item $\Q = \RE$;
    \item $\delta = \{(\RE_i, \alpha) = \RE_j \text{ for every } \RE_i, \RE_j \in \RE \text{ and } \alpha \in \Sigma \text{ if } \alpha^{-1}L(\RE_i) = L(\RE_j)\}$;
    \item $q_I$ is the residual $R_i$ such that $R_i = L$ (it is the residual whose syntactic monoid contains $\E$);
    \item $F = \{\RE_i \in \RE \text{ such that } \E \in \RE_i\}$.
  \end{itemize}
  The created automaton is minimum since for any state $q_i, q_j, \mathcal{L}(\A_i) \neq \mathcal{L}(\A_j)$.
\end{proof}

Starting from these definitions, we can see that in L* every row is associated to a state of a mDFA and therefore, since every state is associated to a residual, we can deduce by transitivity that every row of the \OT represents a residual of the language.

\begin{definition}
  An \textit{RFSA} is a \textit{non-deterministic} automaton where every state represents a residual of $L$.
\end{definition}

\begin{definition}[Prime Residual]
  Let $\RE$ be the set of residuals a language $L$, then a residual $\RE_i \in \RE$ is \textit{composed} if it exists a subset $\RE' \subseteq \{\RE - \{\RE_i\}\}$ such that $R_i = \bigcup\limits_{r \in \RE'}r$. A residual which is not composed is called \textit{prime}.
\end{definition}

\begin{definition}[Language Covering]
  A language $L'$ is covered by an other language $L$ if $L' \subseteq L$ or equivalently $\forall \omega \in \Sigma^*, \omega \in L' \rightarrow \omega \in L'$
\end{definition}

\begin{definition}
  A \textit{RFSA} is \textit{canonical} if every state is associated to a \textit{prime} residual.
\end{definition}

Let $\RE$ be the set of residual of $L$. A \textit{canonical RFSA (cRFSA)} $\A = \langle \Sigma, \Q, \delta, Q_i, F \rangle$ can be constructed as follow:
\begin{itemize}
  \item $\Q = \{\RE_i \subseteq  \RE \mid \RE_i \text{ is prime}\}$;
  \item $\delta = \{(\RE_i, \alpha) = \RE_j. \forall \RE_i, \RE_j \in \RE \text{ and } \forall \alpha \in \Sigma \text{ if } L(\RE_i) \subseteq \alpha^{-1}L(\RE_j)\}$;
  \item $Q_I = \{\RE_i \in \RE \mid \RE_i \subseteq L\}$\footnote{The initial state may not be unique, it is denoted an upper-case $\Q$};
  \item $F = \{\RE_i \in \RE \mid \E \in \RE_i\}$.
\end{itemize}

\begin{theorem}
  A \textit{cRFSA} can be exponentially smaller then a \textit{mDFA}.
\end{theorem}

\subsection{Closedness and Consistency in NL*}

The NL* algorithm has similar properties as L* since the \OT, the sets $S$, $E$, $SA$ and $S_{ext}$ and the mapping $T$ are defined as in L*. However, the closedness and consistency properties are defined in a different way.

\begin{definition}[Row Covering]
  \label{def:row-covering}
  A row $r_1$ of the \OT is covered ($\sqsubseteq$) by a row $r_2$ if every bit of $r_1$ is less or equal of the corresponding bit in $r_2$.
\end{definition}

\begin{example}
  Given $r_i = [0,1,1,0,1]$ and $r_j = [0,1,1,1,1]$, we have that $r_i \sqsubseteq r_j$.
\end{example}

\begin{definition}[Row Union]
  \label{def:row-union}
  The union ($\sqcup$) of two rows $r_1, r_2$ gives a new row $r_3$ where each bit $b_i$ is obtained as the max of the $i^{th}$ bit of $r_1$ and the $i^{th}$ bit of $r_2$
\end{definition}

\begin{example}
  Given $r_i = [0,1,0,0,1]$ and $r_j = [0,1,0,1,1]$, we have that $r_i \sqcup r_j = [0,1,1,1,1]$.
\end{example}

\begin{definition}[Composed and Prime Rows]
  A row $r$ of the \OT is composed if it exists a subset of rows $R'$ not including $r$ such that $r = \bigsqcup\limits_{i \in R'}i$
\end{definition}

\begin{notation}
  From now on the function $Prime: \omega \rightarrow {True, False}$ is a function returning $True$ if $row(\omega)$ is Prime, $False$ otherwise.
\end{notation}

\begin{definition}[Closedness]
  The \OT is closed if
  \[\forall \omega \in SA, Prime(\omega) \rightarrow \exists \omega' \in S: row(\omega) = row(\omega')\]
\end{definition}

To make the \OT close, the row $\omega$ is promoted and then the \OT is completed.

\begin{definition}[Consistency]
  The \OT is consistent if
  \[
    \forall \omega_1, \omega_2 \in S,
    row(\omega_1) \sqsubseteq row( \omega_2) \rightarrow
    \forall \alpha \in \Sigma,
    row(\omega_1 \cdot \alpha) \sqsubseteq row(\omega_2 \cdot \alpha)
  \]
\end{definition}

If the table is not consistent, $\exists \omega_1, \omega_2 \in S \text{ such that } row(\omega_1) \sqsubseteq row(\omega_2)$ and $row(\omega_1 \cdot \alpha) \not\sqsubseteq row(\omega_2 \cdot \alpha) \text{ for an } \alpha \in \Sigma$. We can restore the consistency by making $\omega_1$ and $\omega_2$ no more RFSA-similar: we find an $e \in E$ such that $T(\omega_1 \cdot \alpha \cdot e) \sqsupset T(\omega_2 \cdot \alpha \cdot e)$ and we add $\alpha \cdot e$ in $E$.

\subsection{NL*: Automaton creation}

When the \OT is closed and consistent, the Learner can send to the Teacher a conjecture of the language that it has understood so far.

The conjecture is the automaton where:
\begin{itemize}
  \item $Q = \{row(\omega), \forall \omega \in S \text{ and } Prime(\omega) \}$;
  \item $\delta = \{ \delta(row(\omega), \alpha) = row(\omega'), \forall \omega \in S, \alpha \in \Sigma, \omega' \in S_{ext} \mid Prime(\omega) \text{ and } row(\omega') \sqsubseteq row(\omega \cdot \alpha)\}$;
  \item $\Q_I = row(\omega), \forall \omega \in S \mid Prime(\omega) \text{ and } row(\omega) \sqsubseteq row(\E) $;
  \item $F = \{row(\omega) \mid \omega \in S \text{ and } T(\omega) = 1 \}$.
\end{itemize}

After sending of the conjecture, if the Teacher answers \textit{Yes} the algorithm stops, otherwise a counter-example $\omega$ is provided. $\omega$ is added to the $E$ set and if needed $E$ is completed to remain suffix-closed.

\begin{remark}
  Notice that L* adds the counter-example in $S$ while NL* adds it in $E$.
\end{remark}

\begin{lemma}
  Let $q_I \in Q_I$ be an initial state of $\A$ and $\omega \in S_{ext}$ then $\delta(q_I, \omega) \sqsubseteq row(\omega)$.
\end{lemma}

The proof is similar to the one of \cref{lemma:L_trans_from_QI} considering that now we do not use the equality relation between states, but the covering ($\sqsubseteq$) one defined in \cref{def:row-covering}.

The word acceptance of \textit{NL*} can be proved similarly to \cref{lemma:L_acceptance}.

We can also note that:
\begin{itemize}
  \item the automaton created is no necessarily deterministic, since the transition function allows multiple successors for a given state and a given symbol;
  \item the automaton may have multiple initial states: all states whose row is covered by $row(\E)$;
  \item $row(\E)$ may not be in $Q_I$ if it is a composed row;
  \item the automaton created is the \textit{cRFSA} since the represented states are only those corresponding to a prime row.
\end{itemize}

\subsection{NL* analysis}
\subsubsection{Correcteness}
As for the L* algorithm, NL* is correct since the solution must be approved by the Teacher before stopping.

\subsubsection{Halting}
As for the L* algorithm, NL* terminates because the number of residual of the language is finite and if the conjecture is not accepted, the counter-example, will allow the Learner to find a new residual until all \textit{prime} residuals are found.

A little precision of why NL* adds the counter-example $\omega$ to $E$ instead of $S$. In general, the given counter-example belongs to a residual that is not correctly represented by the sent automaton. However, while constructing the \OT we only have partial information on the residuals, because $|E|$ may not be big enough to distinguish the between residuals. It may happen that the partial row associated to $\omega$ is not prime and therefore it will not be considered by the algorithm when testing the consistency and the closedness. On the other hand, adding $\omega$ into $E$ is a correct way find directly new information on residuals. This allows NL* to terminate and, therefore, to find the correct conjecture.

\subsubsection{Time complexity}
In the worst case, the \textit{cRFSA} has the same number of state of the \textit{mDFA} and therefore the \OT will have the same size of the \OT of L*. Again the complexity depends on the length of the Teacher's counter-example. At the end we can conclude that the time complexity is in the worst case $O(n^2 \times m)$.

However since the \textit{cRFSA} found by NL* may be smaller then the \textit{mDFA} it happens that NL* finds the solution more quickly then L* and therefore the time needed to understand $\U$ can be smaller.


\hypertarget{group__numpp__differentiation__finite__backward}{}\section{Backward Finite Differentiation}
\label{group__numpp__differentiation__finite__backward}\index{Backward Finite Differentiation@{Backward Finite Differentiation}}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item
{\footnotesize template$<$typename Func , typename T , typename  = std\+::enable\+\_\+if\+\_\+t$<$std\+::is\+\_\+floating\+\_\+point$<$\+T$>$\+::value$>$$>$ }\\C\+O\+N\+S\+T\+E\+X\+PR auto \hyperlink{group__numpp__differentiation__finite__backward_gaf772b22eb473fffdb4c4eb2333d21937}{numpp\+::differentiation\+::finite\+::backward} (Func \&\&f, T x)
\item
{\footnotesize template$<$typename Func , typename T , typename U , typename  = std\+::enable\+\_\+if\+\_\+t$<$      std\+::is\+\_\+floating\+\_\+point$<$\+T$>$\+::value and      std\+::is\+\_\+arithmetic$<$\+U$>$\+::value    $>$$>$ }\\C\+O\+N\+S\+T\+E\+X\+PR auto \hyperlink{group__numpp__differentiation__finite__backward_ga33f8373a02912cf6b680d0d8955bea3a}{numpp\+::differentiation\+::finite\+::backward} (Func \&\&f, T x, U y)
\item
{\footnotesize template$<$typename Func , typename T , typename U $>$ }\\constexpr auto \hyperlink{group__numpp__differentiation__finite__backward_ga3015b47eec3f468c07e5d72e88ea22dc}{numpp\+::differentiation\+::finite\+::backward} (Func \&\&f, T \&\&x, U \&\&y, T \&\&h)
\end{DoxyCompactItemize}

\subsection{Detailed Description}
Calculates backward finite derivative $\frac{f(x-h)-f(x)}{h}$

\begin{DoxyTemplParams}{Template Parameters}
{\em Func} & Function whose finite difference derivative should be calcuated \\
\hline
{\em T} & Argument type (e.\+g. double)\\
\hline
\end{DoxyTemplParams}

\begin{DoxyParams}{Parameters}
{\em f} & Functor or function whose derivative we want to obtain \\
\hline
{\em x} & Point where the derivative is calculated \\
\hline
{\em h} & Disturbtion to x argument, should be around e-\/7 usually\\
\hline
\end{DoxyParams}
\begin{DoxyWarning}{Warning}
If you are unsure about parameter h use function with automatically calculated overload!
\end{DoxyWarning}
Eventual error performed by this calculation is not provided.

For better accuracy and numerical stability see\+:

\hyperlink{group__numpp__differentiation__symbolic}{Symbolic Differentiation} \hyperlink{group__numpp__differentiation__automatic}{Automatic Differentiation}

\begin{DoxyReturn}{Returns}
Derivative at point x
\end{DoxyReturn}

\subsection{Function Documentation}
\mbox{\Hypertarget{group__numpp__differentiation__finite__backward_gaf772b22eb473fffdb4c4eb2333d21937}\label{group__numpp__differentiation__finite__backward_gaf772b22eb473fffdb4c4eb2333d21937}}
\index{Backward Finite Differentiation@{Backward Finite Differentiation}!backward@{backward}}
\index{backward@{backward}!Backward Finite Differentiation@{Backward Finite Differentiation}}
\subsubsection{\texorpdfstring{backward()}{backward()}\hspace{0.1cm}{\footnotesize\ttfamily [1/3]}}
{\footnotesize\ttfamily template$<$typename Func , typename T , typename  = std\+::enable\+\_\+if\+\_\+t$<$std\+::is\+\_\+floating\+\_\+point$<$\+T$>$\+::value$>$$>$ \\
C\+O\+N\+S\+T\+E\+X\+PR auto numpp\+::differentiation\+::finite\+::backward (\begin{DoxyParamCaption}\item[{Func \&\&}]{f,  }\item[{T}]{x }\end{DoxyParamCaption})}

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Automatically calculated disturbtion h to argument x, taken from Numerical Recipees (add source)\mbox{\Hypertarget{group__numpp__differentiation__finite__backward_ga33f8373a02912cf6b680d0d8955bea3a}\label{group__numpp__differentiation__finite__backward_ga33f8373a02912cf6b680d0d8955bea3a}}
\index{Backward Finite Differentiation@{Backward Finite Differentiation}!backward@{backward}}
\index{backward@{backward}!Backward Finite Differentiation@{Backward Finite Differentiation}}
\subsubsection{\texorpdfstring{backward()}{backward()}\hspace{0.1cm}{\footnotesize\ttfamily [2/3]}}
{\footnotesize\ttfamily template$<$typename Func , typename T , typename U , typename  = std\+::enable\+\_\+if\+\_\+t$<$      std\+::is\+\_\+floating\+\_\+point$<$\+T$>$\+::value and      std\+::is\+\_\+arithmetic$<$\+U$>$\+::value    $>$$>$ \\
C\+O\+N\+S\+T\+E\+X\+PR auto numpp\+::differentiation\+::finite\+::backward (\begin{DoxyParamCaption}\item[{Func \&\&}]{f,  }\item[{T}]{x,  }\item[{U}]{y }\end{DoxyParamCaption})}

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Automatically calculated disturbtion h to argument x, taken from Numerical Recipees (add source)
\begin{DoxyParams}{Parameters}
{\em y} & Calculated value of f(x) for improved efficiency\\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{group__numpp__differentiation__finite__backward_ga3015b47eec3f468c07e5d72e88ea22dc}\label{group__numpp__differentiation__finite__backward_ga3015b47eec3f468c07e5d72e88ea22dc}}
\index{Backward Finite Differentiation@{Backward Finite Differentiation}!backward@{backward}}
\index{backward@{backward}!Backward Finite Differentiation@{Backward Finite Differentiation}}
\subsubsection{\texorpdfstring{backward()}{backward()}\hspace{0.1cm}{\footnotesize\ttfamily [3/3]}}
{\footnotesize\ttfamily template$<$typename Func , typename T , typename U $>$ \\
constexpr auto numpp\+::differentiation\+::finite\+::backward (\begin{DoxyParamCaption}\item[{Func \&\&}]{f,  }\item[{T \&\&}]{x,  }\item[{U \&\&}]{y,  }\item[{T \&\&}]{h }\end{DoxyParamCaption})}

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

\begin{DoxyParams}{Parameters}
{\em y} & Calculated value of f(x) for improved efficiency \\
\hline
{\em h} & Specified disturbtion to argument x\\
\hline
\end{DoxyParams}


A type soundness theorem relates the type $\stype_0$ of a well-formed
 expression $\sexpr_0$ to the possible outcomes of evaluation.\footnote{The
  definition considers closed $\sexpr_0$ without loss of generality;
  to study an open expression, wrap it in a closing context or lambda.
  By contrast, prior works that employ an ``open-world'' soundness theorem
  restrict the syntax of mixed-typed programs~\cite{tf-dls-2006, vss-popl-2017}.}
In particular, if the evaluation of $\sexpr_0$ results in
 a value $\svalue_0$, then the surface type $\stype_0$ predicts some properties
 of $\svalue_0$ in the evaluation language.
For each combination of surface typing~($\sWT$) and evaluation typing
  ($\sWT_X$ for $\scriptstyle X \in \eset{\nsym, \tsym, \asym}$) judgments,
  the predictive aspect of a type soundness theorem may be expressed as a
  function $\sXproj$ on types.

% TODO
% - transient needs the heap to establish the type of the value
\begin{definition}[type soundness]
  Let $\sXproj$ be a function from surface types to evaluation types.
  % NOTE: F maybe has type `\vdash -> \vdash_X`
  A reduction relation $\rredX$ satisfies $\propts{\sWTX}{\sXproj}$ iff for all
  $\fwellformed{\sexpr_0}{\stype_0}$ one of the following holds:
  \begin{itemize}
    \itemsep0.5ex
    \item \label{clause:F}
      $\sexpr_0 \rredX \svalue_0$
      and $\sWTX \svalue_0 : \sXproj(\stype_0)$
    \item
      $\sexpr_0 \rredX \sexpr_1$
      and $\sexpr_1 \in \eset{\tagerrorD{}, \divisionbyzeroerror} \cup \boundaryerror{\sbset}{\svalue}$
    \item
      $\fdiverge{\sexpr_0}{\rredX}$
  \end{itemize}
\end{definition}

By implication, type soundness states evaluation does not reach certain
 ``wrong'' states~\cite{m-jcss-1978}: static tag errors ($\tagerrorS{}$)
 and irreducible expressions.

To formulate the type soundness theorem for the three semantics, we
require two functions on types.
The first, $\stagproj$ from \figref{fig:evaluation-metafunctions}, maps a surface type
to its constructor.
The second, $\sidproj$, is the identity function on types.

\begin{theorem}[type soundness]\label{thm:type-soundness}
 \leavevmode
  \begin{enumerate}
    \itemsep0.5ex
    \item $\rredN$ satisfies $\propts{\sWTA}{\sidproj}$
    \item $\rredT$ satisfies $\propts{\sWTT}{\stagproj}$
    \item $\rredA$ satisfies $\propts{\sWTA}{\sidproj}$
  \end{enumerate}
\end{theorem}
\begin{proofsketch}
  By three lemmas per semantics: progress, preservation, and that surface
  typing implies evaluation typing.  The key for the first bullet is that
  the evaluation syntax of \Aname{} extends the one of \Nname{} and the
  type judgment $\sWTA$ extends $\sWTN$; hence the proof can verify the
  theorem for the {\em same\/} type judgment.  See the
  \techreport{} for full proofs.
\end{proofsketch}

% \subsection{Type soundness fails to account for meaningful distinctions}


\documentclass{article}

\usepackage{amsthm} % used for theorem

\newtheorem{thm}{Theorem}
\newtheorem{lem}{Lemma}[section]

\title{Theorem}
\author{Loon Shenglong Zhu}

\begin{document}

\maketitle

\begin{thm}
This is the content of theorem 1
\end{thm}
\begin{proof}
This is the content of the proof of theorem 1
\end{proof}

\section{SECTION}
\begin{lem}
This is the content of Lemma 1.1
\end{lem}

\end{document}