\documentclass[11pt]{article}
\usepackage{amsmath, alltt, amssymb, xspace, times, epsfig}

\setlength{\evensidemargin}{0in} \setlength{\oddsidemargin}{0in}
\setlength{\textwidth}{6.5in} \setlength{\textheight}{8.5in}
\setlength{\topmargin}{0in} \setlength{\headheight}{0in}

\newcommand{\halmos}{\rule{1ex}{1.4ex}}
\newcommand{\eop}{\hspace*{\fill}$\halmos$}
\newenvironment{proof}{\noindent {\bf Proof}.}{\eop\medskip}

\newcommand{\ZZ}{\ensuremath{\mathbb{Z}}\xspace}

\newcommand{\Zn}{\ensuremath{\mathbb{Z}_n}\xspace}
\newcommand{\Zns}{\ensuremath{\mathbb{Z}_n^*}\xspace}
\newcommand{\Zp}{\ensuremath{\mathbb{Z}_p}\xspace}
\newcommand{\Zps}{\ensuremath{\mathbb{Z}_p^*}\xspace}
\newcommand{\Zq}{\ensuremath{\mathbb{Z}_q}\xspace}

\renewcommand{\Pr}{\ensuremath{\mathbf{Pr}}\xspace}

\newcommand{\PT}{\ensuremath{\mathsf{PT}}\xspace}
\newcommand{\CT}{\ensuremath{\mathsf{CT}}\xspace}
\newcommand{\Key}{\ensuremath{\mathsf{Key}}\xspace}

\newcommand{\CC}{\ensuremath{\mathcal{C}}\xspace}
\newcommand{\KK}{\ensuremath{\mathcal{K}}\xspace}
\newcommand{\MM}{\ensuremath{\mathcal{M}}\xspace}

\newcommand{\E}{\ensuremath{\mathbb{E}}\xspace}
\newcommand{\D}{\ensuremath{\mathbb{D}}\xspace}
\newcommand{\K}{\ensuremath{\mathbb{K}}\xspace}

\newcommand{\EE}{\ensuremath{\mathcal{E}}\xspace}
\newcommand{\DD}{\ensuremath{\mathcal{D}}\xspace}

\newcommand{\smod}{\ensuremath{\mathrm{mod}\;}}
\newcommand{\mmod}{\ensuremath{\;\mathrm{mod}\;}}

\newcommand{\tuple}[1]{\ensuremath{\langle #1 \rangle}}

\newcommand{\comment}[1]{}

\title{A Note on Order and Lattices}

\begin{document}

\maketitle

In this note, when we say a relation $R$, we mean a binary relation over
a certain non-empty set $X$, i.e., $R\subseteq X \times X$.  When
$\tuple{x, y} \in R$, we also write $R(x,y)$; when $\tuple{x,y} \not\in
R$, we also write $\neg R(x,y)$.  We use $\rightarrow$ to denote logical
implication and $\leftrightarrow$ to denote logical equivalence.

\begin{description}
 \item[Definition.]
A relation $R$ is \textbf{transitive} if $\; \forall x\forall y \forall
z (R(x,y) \wedge R(y,z) \rightarrow R(x,z))$.

 \item[Definition.]
A relation $R$ is \textbf{reflexive} if $\; \forall x R(x,x)$.

 \item[Definition.]
A relation $R$ is \textbf{irreflexive} if $\; \forall x (\neg R(x,x))$.

 \item[Exercise.]
Give a relation that is neither reflexive nor irreflexive.

 \item[Definition.]
A relation $R$ is \textbf{symmetrical} if $\; \forall x \forall y
(R(x,y) \leftrightarrow R(y,x))$.

 \item[Definition.]
A relation $R$ is \textbf{asymmetrical} if $\forall x \forall y (R(x,y)
\rightarrow \neg R(y,x))$.

 \item[Definition.]
A relation $R$ is \textbf{anti-symmetrical} if $\forall x \forall y
(R(x,y) \wedge R(y,x) \rightarrow x=y)$.

 \item[Classroom Exercise.]
Prove that an asymmetrical relation is irreflexive.

 \item[Classroom Exercise.]
Draw the relationship of the symmetrical relation, asymmetrical,
anti-symmetrical relations.  Use a big circle for all relations, and
three small circles inside the big one to denote the three kinds of
relations.

 \item[Exercise.]
Give an example for each of the case in the graph.

 \item[Definition.]
A \textbf{strict partial order} is irreflexive, transitive, and
asymmetrical.

Ex1: the less than relation ($<$) over any subset of real numbers.

Ex2: the subset relation ($\subset$) over a set of sets, e.g., the
powerset of a fixed set.

 \item[Definition.]
A \textbf{partial order} is reflexive, transitive, and anti-symmetric.

Ex1: the less than and equal to relation over any subset of real
numbers.

Ex2: the $\subseteq$ relation over a set of sets, e.g., the powerset of
a fixed set.

 \item[Fact.]
If $R$ is a partial ordering of a set $X$, then $R - \{\langle
x,x\rangle: x\in X\}$ is a strict partial ordering of $X$.

 \item[Definition.]
A relation $R$ is a \textbf{strict total order} if it is a strict
partial order and $\forall x y (x\ne y \rightarrow (R(x,y) \vee
R(y,x))$.

 \item[Definition.]
A relation $R$ is a \textbf{total order} if it is a partial order and
$\forall xy (R(x,y) \vee R(y,x))$.

 \item[Notation.]
We often use $\leq$ to denote a partial order $R$.  When $(x,y)\in R$,
we write $x\leq y$ or $y\geq x$.  Note that while $\leq$ is often used
to denote the numerical less than or equal to relation over numbers, we
use $\leq$ to denote other partial orders as well.

 \item[Definition.]
A \textbf{poset} (partially ordered set) $\langle X, \leq \rangle$ is a
set $X$ with a partial ordering $\leq$.


 \item[Definition.]
Given a poset $\tuple{X,\leq}$, and $x_1,x_2,y\in X$, $y$ is an
\textbf{upper bound} of $x_1, x_2$ if $x_1\leq y$ and $x_2 \leq y$; $y$
is the \textbf{least upper bound (lub)} of $x_1,x_2$ if $y$ is an upper
bound of $x_1,x_2$ and for every $z$ that is an upper bound of
$x_1,x_2$, $y\leq z$.  The lub of $x_1,x_2$ is often denoted $x_1 \vee
x_2$, and is also known as the \textbf{join} of $x_1,x_1$ and the
\textbf{supremum (sup)} of $x_1,x_2$.  (Note that we overload $\vee$ to
denote both logical or and the join operator; its meaning should be
clear from context.)

 \item[Exercise.]
Give an example poset such that two elements in it have upper bounds,
but no least upper bound.

 \item[Exercise.]
Prove that $x_1\vee x_2$, if exists, is unique.

 \item[Definition.]
A \textbf{upper semilattice} is a poset $\tuple{X,\leq}$ such that for
every $x_1,x_2 \in X$, $x_1 \vee x_2$ exists.

 \item[Exercise.]
Given a poset $\tuple{X,\leq}$, one can extend naturally the definition
of upper bound and least upper bound (i.e. join, supremum, sup) to any
subset of $X$.

Prove that in an upper semilattice $\tuple{X,\leq}$, for every
\emph{finite} non-empty subset $X'$ of $X$, the sup of $X'$ uniquely
exists. \textbf{Hint: Use induction.}

 \item[Definition.]
Given a poset $\tuple{X,\leq}$, and $x_1,x_2,y\in X$, $y$ is a
\textbf{lower bound} of $x_1,x_2$ if $x_1\geq y$ and $x_2 \geq y$; $y$
is the \textbf{greatest lower bound (glb)} of $x_1,x_2$ if $y$ is an
lower bound of $x_1,x_2$ and for every $z$ that is a lower bound of
$x_1,x_2$, $y\geq z$.  The glp of $x_1,x_2$ is often denoted $x_1 \wedge
x_2$, and is also known as the \textbf{meet} of $x_1,x_1$ and the
infimum (inf) of $x_1,x_2$.

Given $x_1,x_2 \in X$, $x_1 \wedge x_2$ may not exist; but is unique if
exists.

 \item[Definition.]
A \textbf{lower semilattice} is a poset $\tuple{X,\leq}$ such that for
every $x_1,x_2 \in X$, $x_1 \wedge x_2$ exists.

 \item[Definition.]
A \textbf{lattice} is a poset $\tuple{X,\leq}$ that is both an upper
semilattice and a lower semilattice.

 \item[Exercise.]
Given a lattice $\tuple{X,\leq}$ and $x_0\in X$.  Let $X'=\{x\in X \mid
x\geq x_0\}$.  Prove that $\tuple{X',\leq}$ is a lattice.

 \item[Definition.]
A \textbf{complete} upper (resp. lower) semilattice is an upper (resp.
lower) semilattice $\tuple{X,\leq}$ where every sub $X'$ of $X$ (not
just finite ones) has a sup (resp. inf).  We write these subs and infs
as $\bigvee X'$ and $\bigwedge X'$.

A \textbf{complete lattice} is poset $\tuple{X,\leq}$ that is both a
complete upper semilattice and a complete lower semilattice.

 \item[Fact.]
A finite lattice is a complete lattice.

 \item[Notation.]
Given a complete lattice $\tuple{X,\leq}$, we use $1$ (or $\top$) to
denote the element $\bigvee X$ and $0$ (or $\bot$) to denote the element
$\bigwedge X$.


 \item[Definition.]
A \textbf{monotone function} from a poset $\langle A, \leq_X \rangle$ to
a poset $\langle B, \leq_B \rangle$ is a function $f: A \longrightarrow
B$ such that $\forall x y (x \leq_A y \rightarrow f(x) \leq_B f(y))$.

 \item[Theorem.] \textit{(Tarski-Knaster Theorem)
Let $\tuple{X,\leq}$ be a complete lattice and $f: X \longrightarrow X$
be a monotone function.  Then $f$ has a fixed point, i.e., there exists
$x\in X$ such that $f(x)=x$.}

Proof: Let $A=\{ x\in X \mid f(x)\leq x \}$.  $A$ is nonempty because
$\bigvee X \in A$.  Let $a=\bigwedge A$.  For every $x\in A$, we know
that $f(x) \leq x$.  As $a\leq x$ and $f$ is monotone, $f(a)\leq f(x)$.
By transitivity, $f(a)\leq x$.  Therefore, $f(a)$ is also a lower bound
of $A$. Because $a$ is the greatest lower bound of $A$, $f(a)\leq a$.
Therefore, $a\in A$.  Furthermore, by monotonicity, $f(f(a)) \leq f(a)$;
thus $f(a)\in A$.  As $a=\bigwedge A$, $a\leq f(a)$.  Therefore
$a=f(a)$.

 \item[Classroom Exercise.]
Show that the fixpoint constructed in the proof above is the least
fixpoint of $f$.

\end{description}
\end{document}
