\documentclass{article}
\usepackage{amssymb, mathrsfs, enumitem}
\usepackage{tikz-cd}
\usepackage{multicol}
\usepackage{graphicx}
\usepackage{color}
\usepackage{amsthm}
\usepackage{hyperref}
\usepackage{verbatim}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{amsmath, epsfig, colortbl}
\usepackage[breakable, skins]{tcolorbox}
\setlength{\parskip}{8pt}

\newtheorem{theorem}{Theorem}
\newtheorem{lemma}{Lemma}
\newtheorem{cor}{Corollary}
\theoremstyle{definition}
\newtheorem{prop}{Proposition}
\newtheorem{fact}{Fact}
\newtheorem{example}{Example}
\newtheorem{definition}{Definition}
\newenvironment{solution} {\paragraph{Solution.}}{\hfill$\square$}
\renewenvironment{proof} {\paragraph{Proof.}}{\hfill$\square$}
\renewcommand{\today}{}
\captionsetup{margin=.7in, format=hang}

\newtcolorbox{examplebox}{ breakable, enhanced}
\newtcolorbox{gptbox}{ breakable, enhanced,  colback  = blue!10}

\addtolength{\topmargin}{-.875in}
\addtolength{\oddsidemargin}{-.8in}
\addtolength{\textwidth}{1.6in}
\addtolength{\textheight}{1.75in}

\newcommand{\mc}{\mathcal}
\newcommand{\abs}[1]{\left| #1\right|}
\newcommand{\la}{\Leftarrow}
\newcommand{\ra}{\Rightarrow}
\renewcommand{\iff}{\Leftrightarrow}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\floor}[1]{\left\lfloor #1\right\rfloor}
\newcommand{\ceil}[1]{\left\lceil #1\right\rceil}
\renewcommand{\phi}{\varphi}

\newcommand{\ex}[1]{\begin{examplebox}\begin{example} #1 \end{example}\end{examplebox}}

\newcommand{\eps}{\epsilon}
\newcommand{\N}{\mathbb{N}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\inv}[1]{#1^{-1}}
\newcommand{\ba}{\backslash}
\DeclareMathOperator{\Mod}{mod}
\renewcommand{\mod}[1]{\ (\Mod #1)}
\newcommand{\p}{\mathcal{P}}



\begin{document}
\title{Math 127: Posets}
\author{Mary Radcliffe}
\maketitle

In previous work, we spent some time discussing a particular type of relation that helped us understand modular arithmetic, namely, an equivalence relation. In this last set of notes, let's consider another type of relation that helps us understand order: a poset.

While we do not really have time to delve deeply into the uses of posets, here I want to sketch one application of understanding posets that can help us understand the world: namely, I want to give just enough about posets to understand or at least sketch an understanding of the Lindenbaum-Tarski algebra. Understanding this structure could be useful to the development of computer-assisted proof programs.

\section{Basic Definitions}

\begin{definition}
A {\it partially ordered set} or {\it poset} $P=(P, \leq)$ is a set $P$ together with a relation $\leq$ on $P$ that is reflexive, transitive, and antisymmetric.
\end{definition}

\ex{$(\R, \leq)$ is a poset. This is, of course, our standard notion of understanding order. Note the three properties:
\begin{itemize}
\item Reflexivity: $\forall x\in\R, x\leq x$
\item Transitivity: $\forall x, y, z\in\R$, $x\leq y\wedge y\leq z\ra x\leq z$
\item Antisymmetry: $\forall x, y\in\R$, $x\leq y\wedge y\leq x \ra x=y$
\end{itemize}
}

\ex{\label{E:powex}Let $X$ be a set. Then $(\p(X), \subseteq)$ is a poset. Let's show the three properties:
\begin{itemize}
\item Reflexivity: Certainly, $\forall A\in\p(X)$, $A\subseteq A$.
\item Transitivity: Let $A, B, C\in\p(X)$. If $A\subseteq B$ and $B\subseteq C$, then for all $x\in A$, we have $x\in B$, and therefore $x\in C$. Thus $A\subseteq C$, as desired.
\item Antisymmetry: For $A, B\in \p(X)$, we have that if $A\subseteq B$ and $B\subseteq A$, then $A=B$ by double containment.
\end{itemize}
}

The poset defined above on the power set of a set $X$ is a classic example of a poset where not every two elements can be compared. This doesn't happen in the reals; every two real numbers $x$ and $y$ can be related under $\leq$, with either $x\leq y$ or $y\leq x$. But in the poset defined in Example \ref{E:powex}, this doesn't happen.

\ex{\label{E:powincom}
Let $X=\{1, 2, 3\}$, and consider the poset on $\p(X)$ defined in Example \ref{E:powex}. Consider $A=\{1, 2\}$, $B=\{2, 3\}\in \p(X)$. Notice that $A\not\subseteq B$ and $B\not \subseteq A$.
}

This is why such a structure is called a {\it partially} ordered set. It does not order all the elements, necessarily.

\begin{definition}
Let $(P, \leq)$ be a poset. Elements $x, y\in P$ are said to be {\it comparable} if either $x\leq y$ or $y\leq x$. Elements that are not comparable are said to be {\it incomparable}. A poset for which all pairs of elements are comparable is called a {\it total order}.
\end{definition}

So in Example \ref{E:powex}, we have a poset that is not a total order.

\ex{The relation of divisibility on $\N$ is a poset relation that is not a total order.
\begin{itemize}
\item Reflexivity: Certainly for any $a\in\N$, $a|a$ 
\item Transitivity: For any $a, b, c\in\N$, if $a|b$ and $b|c$, then we know that $a|c$
\item Antisymmetry: For any $a, b\in\N$, if $a|b$ and $b|a$, then $a=b$
\end{itemize}
However, there are many incomparable elements. Taking $a, b$ to be distinct primes, for example, gives an incomparable pair.
}

\begin{definition}
Let $(P, \leq)$ be a poset. Given a subset $S\subseteq P$, we say that $s\in P$ is a {\it lower bound} for $S$ if $\forall a\in S$, $s\leq a$. Define the infimum of $S$, if it exists, to be an element $s=\inf(S)$ such that 
\begin{itemize}
\item $s$ is a lower bound for $S$.
\item if $s'$ is a lower bound for $S$, then $s'\leq s$.
\end{itemize}
We define upper bound and supremum symmetrically.
\end{definition}

Note that this definition of lower/upper bound and infimum/supremum is identical to the definition given for the real numbers previously. We further note that these numbers may not exist, as with the real numbers; sometimes there is no infimum or supremum for a set. 

In the above definition, we use the operators $\inf$ and $\sup$ to denote infimum and supremum. In many places, the symbols $\wedge$ and $\vee$ are used to indicate infimum and supremum. That is to say, $\displaystyle\bigwedge_{a\in A} a = \inf(A)$ and $\displaystyle\bigvee_{a\in A} a =\sup(A)$. This is especially common when considering the infimum and supremum of individual elements: $x\wedge y$ denotes the greatest lower bound for a pair of elements $x$ and $y$, frequently called the {\it meet} of $x$ and $y$, and $x\vee y$ denotes the least upper bound for a pair of elements $x$ and $y$, frequently called the {\it join} of $x$ and $y$.

As perhaps an explanation for the use of this notation, consider the following example, the proof of which is left as an exercise.

\ex{Let $X$ be a set, and consider the poset defined on $\p(X)$ as in Example \ref{E:powex}. Let $S\subseteq \p(X)$. Then 
\begin{itemize}
\item $\inf(S) = \displaystyle\bigwedge_{A\in S} A = \displaystyle\bigcap_{A\in S} A$.
\item $\sup(S) = \displaystyle\bigvee_{A\in S} A = \displaystyle\bigcup_{A\in S} A$.
\end{itemize}
}

From here on out, we will use the $\wedge$ and $\vee$ notation to write infimum and supremum.

\begin{definition}
Let $(P, \leq)$ be a poset. We say that $\bot$ is a {\it minimum} for $P$ if $\bot = \displaystyle\bigwedge_{x\in P}x$. We say that $\top$ is a {\it maximum} for $P$ if $\top = \displaystyle\bigvee_{x\in P}x$. We note that such elements may not exist.
\end{definition}

\begin{prop}
Let $(P, \leq)$ be a poset. If $\bot$ and/or $\top$ exist in $P$, then they are unique.
\end{prop}

\begin{proof}
We prove only that $\bot$ is unique; the proof for $\top$ is symmetric.

Suppose that $\bot_1$ and $\bot_2$ are both minima for $P$. Since $\bot_1, \bot_2\in P$ and $\bot_1\leq a$ for all $a\in P$ by definition of minimum, we must have that $\bot_1\leq \bot_2$. Likewise, $\bot_2\leq \bot_1$. By antisymmetry, then, $\bot_1=\bot_2$.

Hence, a minimum, if it exists, is unique.
\end{proof}

\section{Lattices}

\begin{definition}
A poset $(P, \leq)$ is called a {\it lattice} if $\forall x, y\in P$, both $x\wedge y$ and $x\vee y$ exist.
\end{definition}

\ex{Let $P=\{a, b, c, d\}$, where $a\leq c, d$ and $b\leq c, d$, but there are no other comparability relations. Then neither $a\vee b$ nore $a\wedge b$ exist. Thus, $P$ is not a lattice.
}

From here on out, we will restrict ourselves to considering lattices; that is, posets for which infima and suprema always exist. In these posets, we have that $\vee$ and $\wedge$ operate in a similar way as our basic arithmetic operations on other kinds of sets (like propositional formulae, sets of sets, numerical arithmetic). In particular:

\begin{prop}
Let $(P, \leq)$ be a lattice. Then both $\wedge$ and $\vee$ are commutative; that is, for all $x, y\in P$,
\begin{itemize}
\item $x\wedge y = y\wedge x$
\item $x\vee y=y\vee x$
\end{itemize}

We leave the proof here as an exercise.

\end{prop}

\begin{prop}
Let $(P, \leq)$ be a lattice. Then both $\wedge$ and $\vee$ are associative; that is, for all $x, y, z\in P$,
\begin{itemize}
\item $x\wedge(y\wedge z) = (x\wedge y)\wedge z$
\item $x\vee(y\vee z) = (x\vee y)\vee z$
\end{itemize}
\end{prop}

\begin{proof}
We prove the result only for $\wedge$, the proof for $\vee$ is symmetric.

Put $t=x\wedge(y\wedge z)$ and $s=(x\wedge y)\wedge z$. Then in particular, $t$ is a lower bound for $x$ and $y\wedge z$. Then $t\leq x$ and $t\leq y\wedge z$. By definition, $y\wedge z\leq y$ and $y\wedge z\leq z$, and thus by transitivity, $t\leq y$ and $t\leq z$. Since $t\leq x$ and $t\leq y$, we therefore have that $t\leq x\wedge y$. But then since $t\leq x\wedge y$ and $t\leq z$, we have $t\leq(x\wedge y)\wedge z=s$.

Then $s\leq x\wedge y$ and $s\leq z$, and therefore $s\leq x$, $s\leq y$, and $s\leq z$. Then as above, we obtain $s\leq x\wedge(y\wedge z)=t$.

By antisymmetry, then, $s=t$.
\end{proof}

However, one important arithmetic property can fail. Specifically, distributivity, as we see in the following example.
\newpage

\ex{Let $P=\{a, b, c, d, e\}$ be a poset, where $x\leq y$ in $P$ if and only if there is an arrow pointing from $x$ to $y$ in Figure \ref{F:nondistrib}. Notice that $P$ is a lattice, since any pair of elements certainly has a least upper bound and greatest lower bound. However, consider:
\[b\wedge(c\vee d) = b\wedge a = b, \hbox{ and }\]
\[(b\wedge c)\vee (b\wedge d) = e\vee e = e.\]
Therefore, we do not have the property that $b\wedge (c\vee d) = (b\wedge c)\vee (b\wedge d)$; that is, we do not have a distributive property for $P$.
}

\begin{figure}[htp]\centering
\includegraphics[scale=.5]{nondistrib.pdf}
\caption{A nondistributive lattice.}
\label{F:nondistrib}
\end{figure}

Since not every lattice has a distributive property, we will define a lattice that does have this property as a distributive lattice. That is:

\begin{definition}
Let $(P, \leq)$ be a lattice. We say that $P$ is a {\it distributive lattice} if for all $x, y, z\in P$,
\begin{itemize}
\item $x\vee(y\wedge z) = (x\vee y)\wedge(x\vee z)$, and
\item $x\wedge (y\vee z)=(x\wedge y)\vee (x\wedge z)$.
\end{itemize}
\end{definition}

Finally, the last thing we want for an arithmetic is a way to invert an element. In lattice world, this is referred to as complementing.

\begin{definition}
Let $(P, \leq)$ be a lattice having both $\bot$ and $\top$. We say that $P$ is {\it complemented} if for every $x\in P$, there exists a $y\in P$, called the {\it complement} of $x$, such that $x\wedge y=\bot$ and $x\vee y=\top$. We denote the complement of $x$ by $\neg x$.

A {\it Boolean algebra} is a complemented distributive lattice. 
\end{definition}

Note that in order that a lattice be complemented, it must contain both $\bot$ and $\top$. Hence, a Boolean algebra by definition contains both $\bot$ and $\top$.

Here is an exercise to verify an understanding of the definitions involved here.

\begin{theorem}
Let $X$ be a set, and define $P=(\p(X), \subseteq)$ to be the poset defined in Example \ref{E:powex}. Then $P$ is a Boolean algebra.
\end{theorem}

\section{The Lindenbaum-Tarski Algebra}

You may have noticed that our poset notation closely mirrors our notation for propositional logic. This is definitely not an accident. In this, our final section of the class, we take a look at why. Here, we define the Lindenbaum-Tarski Algebra, using pieces of everything we have studied this semester.

First, define $P$ to be a set of propositional variables. Define $L(P)$ to be the set of all possible finite length logical formulae that can be written using the variables in $P$ and the operators $\wedge, \vee, \neg$ (for propositions).

Now, we know that some logical formulae are equivalent. For example, from De Morgan's Laws, we know that $\neg(x_1\wedge x_2)\equiv \neg x_1 \vee \neg x_2$. As currently defined, $\neg(x_1\wedge x_2)$ and $\neg x_1 \vee \neg x_2$ are separate elements of $L(P)$, though, since technically they are different combinations of symbols. To rectify that, we define an equivalence relation $\sim$ on $L(P)$, where we take $p\sim q$ if and only if $p\equiv q$ as logical formulae. This way, under $\sim$, things like $\neg(x_1\wedge x_2)$ and $\neg x_1 \vee \neg x_2$ fall into the same equivalence class.

Now, let's take $L(P)/\sim=A$, the set of equivalence classes under this equivalence relation. Pause a moment to consider what this is: we have the set of all possible propositions that can be built from $P$, where we have identified as ``the same'' any two propositions that are logically equivalent. This seems like a reasonable way to approach the idea of trying to write down all the statements that can be made, since we don't need to count the same statement more than once in different forms.

Now, here comes the good part. Let's use posets to represent how we do mathematics on these propositions. Specifically, define a poset $(A, \vdash)$ on $A$ by $[s]_\sim \vdash [t]_\sim$ if and only if $s\ra t$ is a tautology. In this way, we can capture the set of things we can prove mathematically in the poset structure on $A$. The poset identifies all the true implications among the logical formulae that can be built over $P$. Moreover:

\begin{theorem}
The poset $(A, \vdash)$ defined above is a Boolean algebra.
\end{theorem}

The proof of this theorem is, actually, not that difficult, but there are many pieces. I leave it as an exercise to the interested reader.

This algebra is referred to as the Lindenbaum-Tarski Algebra. This forms the basis for an algebraic model of logic. This type of logical structure can be used to further study logic and develop machines that can perform it. 

\end{document}