-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStone_Duality_Proofs.tex
745 lines (548 loc) · 44.4 KB
/
Stone_Duality_Proofs.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[margin=1.5in]{geometry}
\usepackage {xcolor}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{hyperref}
\usepackage{nameref, cleveref}
\newtheorem{proposition}{Proposition}[section]
\newtheorem{theorem}[proposition]{Theorem}
\newtheorem{lemma}[proposition]{Lemma}
\newtheorem{definition}[proposition]{Definition}
\crefname{proposition}{proposition}{propositions}
\Crefname{proposition}{Proposition}{Propositions}
\crefname{theorem}{theorem}{theorems}
\Crefname{theorem}{Theorem}{Theorems}
\crefname{lemma}{lemma}{lemmas}
\Crefname{lemma}{Lemma}{Lemmas}
\crefname{definition}{definition}{definitions}
\Crefname{definition}{Definition}{Definitions}
\numberwithin{equation}{section}
\setlength\parindent{0pt}
\usepackage{tikz}
\usepackage{tikz-cd}
\hypersetup{
colorlinks=true,
linkcolor=blue,
filecolor=blue,
urlcolor=blue,
pdftitle={Introduction to Stone Duality},
pdfpagemode=FullScreen,
}
\newcommand{\meet}{\wedge}
\newcommand{\join}{\vee}
\newcommand{\bigmeet}{\bigwedge}
\newcommand{\bigjoin}{\bigvee}
\newcommand{\cat}[1]{{\mathbf{#1}}}
\newcommand{\ob}{\mathrm{ob}}
\newcommand{\dom}{\mathrm{dom}}
\newcommand{\cod}{\mathrm{cod}}
\newcommand{\id}{\mathrm{id}}
\newcommand{\Id}{\mathrm{Id}}
\newcommand{\Nat}{\mathrm{Nat}}
\newcommand{\op}{\mathrm{op}}
% Function restriction, from https://tex.stackexchange.com/questions/22252/how-to-typeset-function-restrictions
\newcommand\restr[2]{{% we make the whole thing an ordinary symbol
\left.\kern-\nulldelimiterspace % automatically resize the bar with \right
#1 % the function
\vphantom{\big|} % pretend it's a little taller at normal size
\right|_{#2} % this is the delimiter
}}
\title{Introduction to Stone Duality}
\author{Sri Pranav Kunda}
\date{}
\begin{document}
\maketitle
These notes come from \href{https://hackmd.io/@alexhkurz/S1W8SC0Tc}{"A Short Introduction to Stone Duality"} by Dr. Alexander Kurz. Proofs of propositions are provided, and remarks on the content are added for additional background.
% Section 1 - Structure Preserving Maps and Duality
\section{Structure Preserving Maps and Duality}
\begin{definition}
Let $f : X \to Y$. Then $f^* : 2^Y \to 2^X$ defined by, for $b \in 2^Y$,
$$f^*(b) = \{x \in X: f(x) \in b\}$$
is called the \textbf{inverse image function} of $f$.
\end{definition}
\textbf{Remark: } The inverse image function is also called the preimage and can be denoted by $f^{-1}(x)$ on other writings.
\begin{proposition}\label{thm:inv-image-preserves-structure}
Given a function $f : X \to Y$, the inverse image function $f^*$ preserves unions, intersections, and complements.
\end{proposition}
\begin{proof}
Let $S \subseteq 2^Y$ and suppose $x \in \bigcup_{s \in S} f^*(s)$. This means $x$ is in at least one of $f^*(s)$ so that, by definition, $f(x)$ is in at least one $s$ and $x \in f^*(\bigcup_{s \in S} s)$. \\
Since the converse follows similarly, $f^*(\bigcup_{s \in S} s) = \bigcup_{s \in S} f^*(s)$. It is easy to see that $f^*$ preserves intersections in the same way. \\
Finally, $x \in f^*(\neg a) \Longleftrightarrow f(x) \not\in a \Longleftrightarrow x \not\in f^*(a) \Longleftrightarrow x \in \neg f^*(a)$, completing the proof.
\end{proof}
\begin{definition}[Adjoints]
Let $R : 2^Y \to 2^X$. Then $L : 2^X \to 2^Y$ is \textbf{left-adjoint} to $R$ (and $R$ is \textbf{right-adjoint} to $L$) if for all $a \in 2^X$ and $b \in 2^Y$,
\begin{equation} \label{eq:ajdoints}
L(a) \subseteq b \Longleftrightarrow a \subseteq R(b).
\end{equation}
\end{definition}
\textbf{Remark:} The phrases $L$ is a left adjoint and $L$ has a right adjoint are equivalent.
\begin{lemma}\label{lem:inv-img-adjoint-lem-1}
If $L$ is left-adjoint to $R$, $a \subseteq R(L(a))$ and $L(R(b)) \subseteq b$.
\end{lemma}
\begin{proof}
Since $L(a) \subseteq L(a)$, $a \subseteq R(L(a))$ by (\ref{eq:ajdoints}). Similar reasoning shows that $L(R(b)) \subseteq b$.
\end{proof}
\begin{definition}[Monotone Function]\label{def:monotone-function}
A function $F : 2^X \to 2^Y$ is \textbf{monotone} if for any $a, a' \in 2^X$, $a \subseteq a' \Rightarrow F(a) \subseteq F(a')$.
\end{definition}
\begin{lemma}\label{lem:inv-image-adjoints-monotone}
If $F : 2^X \to 2^Y$ has a left or right adjoint, $F$ is monotone.
\end{lemma}
\begin{proof}
For concreteness we assume that $F$ has a right adjoint $R$. We show that both $F$ and $R$ are monotone. Define $a, a'$ as in \cref{def:monotone-function}.\\
By \Cref{lem:inv-img-adjoint-lem-1}, $a \subseteq a' \subseteq R(F(a'))$. From (\ref{eq:ajdoints}) we see that if $a \subseteq R(F(a'))$, $F(a) \subseteq F(a')$. A similar argument invoking the latter portion of \Cref{lem:inv-img-adjoint-lem-1} shows that $R$ is monotone.
\end{proof}
\begin{lemma}
Let $L : 2^X \to 2^Y$ and $R : 2^Y \to 2^X$. If $L$ and $R$ are monotone and $a \subseteq R(L(a))$ and $L(R(b)) \subseteq b$ for all $a \in 2^X$ and $b \in 2^Y$, then $L$ is left-adjoint to $R$.
\end{lemma}
\begin{proof}
Suppose $L(a) \subseteq b$. Since $L$ is monotone, $a \subseteq R(L(a)) \subseteq R(b)$. Conversely, suppose $a \subseteq R(b)$. Because $R$ is monotone, $L(a) \subseteq L(R(b)) \subseteq b$. Thus $L$ is left-adjoint to $R$ (and $R$ is right-adjoint to $L$).
\end{proof}
\begin{lemma}\label{lem:inv-img-adjoint-unique}
Left and right adjoints are unique.
\end{lemma}
\begin{proof}
We omit the proof for right adjoints because it is similar to the proof for left adjoints. Let $F : 2^X \to 2^Y$ and suppose $L, L'$ are left-adjoint to $F$. Then $a \subseteq R(L'(a))$ by \Cref{lem:inv-img-adjoint-lem-1}. It follows from (\ref{eq:ajdoints}) that $L(a) \subseteq L'(a)$. Likewise, $a \subseteq R(L(a)) \Rightarrow L'(a) \subseteq L(a)$. Thus $L = L'$.
\end{proof}
\begin{proposition}\label{prop:inv-image-has-adjoints}
Any function $g : 2^Y \to 2^X$ which preserves intersections and unions has a left adjoint $g_\exists : 2^X \to 2^Y$ and a right adjoint $g_\forall : 2^X \to 2^Y$. Moreover, $g_\exists$ and $g_\forall$ preserve unions and intersections respectively.
\end{proposition}
\begin{proof}
We prove more generally that (i) $g$ has a left adjoint $g_\exists$ if and only if $g$ preserves intersections and that (ii) $g$ has a right adjoint $g_\forall$ if and only if $g$ preserves unions. The proof of (ii) is excluded for brevity since it is similar to (i). \\
Define $g_\exists(a) = \bigcap \{y : a \subseteq g(y)\}$ and suppose $g$ preserves intersections. Let $a \subseteq a'$. Then $g(a \cap a') = g(a) = g(a) \cap g(a') \Rightarrow g(a) \subseteq g(a')$. Thus $g$ is monotone. Hence, $g_\exists(a) \subseteq b \Rightarrow g(b) \supseteq g(g_\exists(a)) \supseteq a$ since $g$ preserves intersections and $a \subseteq g(b) \Rightarrow g_\exists(a) \subseteq b$. It is easy to see that $g_\exists$ preserves unions from the definition, completing the proof. \\
It is useful to note that if $g$ preserves both unions and intersections, then we may write equivalently that $g_\exists(a) = \{y \in Y \mid \exists x \in g(\{y\}) : x \in a \}$.
\end{proof}
\begin{definition}[Atom]
$a \subseteq X$ is an \textbf{atom} if for all $S \subseteq 2^X$, $a \subseteq \bigcup S$ implies that there exists an $a' \in S$ such that $a \subseteq a'$.
\end{definition}
\begin{proposition}\label{prop:powset-atoms-are-singletons}
$a \in 2^X$ is an atom if and only if there exists $x \in X$ s.t. $a = \{x\}$.
\end{proposition}
\begin{proof}
Suppose there exists $x \in X$ s.t. $a = \{x\}$. Then for any $S \subseteq 2^X$, we have that if $a \subseteq \bigcup S$, there exists some $a' \in S$ s.t. $x \in a'$. Then $a \subseteq a'$ since $a$ is a singleton containing $x$. \\
For the converse, suppose $a$ is an atom. First, observe that $a$ is nonempty, otherwise we may choose $S = \emptyset$ so that there exists no $a' \in S$ s.t. $a \subseteq a'$ although $a \subseteq \bigcup S$. \\
For a contradiction, suppose $|a| > 1$. Choosing $S = \{\{x\} : x \in a\}$, we see that $a \subseteq \bigcup S$. However, $a$ is not contained in any $a' \in S$. Thus $|a| = 1$ and the proof is complete.
\end{proof}
\begin{lemma}\label{lem:left-adjoint-maps-atoms-to-atoms}
Let $g : 2^Y \to 2^X$ preserve unions and intersections. Then the left adjoint of $g$ (which exists and is unique by \Cref{prop:inv-image-has-adjoints} and \Cref{lem:inv-img-adjoint-unique}) maps atoms to atoms.
\end{lemma}
\begin{proof}
Let $a \in 2^X$ be an atom, let $S \subseteq 2^Y$ s.t. $g_\exists(a) \subseteq \bigcup S$, and let $T = \{g(s) : s \in S\}$. Then $a \subseteq g(\bigcup S) = \bigcup T$ by the definition of the adjoint. Since $a$ is an atom and $T \subseteq 2^X$, there exists $a' \in T$ s.t. $a \subseteq a'$. Because $a' = g(s)$ for some $s \in S$, we have that $g_\exists(a) \subseteq g_\exists(g(s)) \subseteq s$ by \Cref{lem:inv-img-adjoint-lem-1,lem:inv-image-adjoints-monotone}
\end{proof}
\begin{proposition} \label{prop:powset-morphism-is-inv-image}
Every function $g : 2^Y \to 2^X$ that preserves unions and intersections is the inverse image function for a unique $g_* : X \to Y$.
\end{proposition}
\begin{proof}
By \Cref{lem:left-adjoint-maps-atoms-to-atoms}, $g$ has a unique left adjoint $g_\exists$ which maps atoms to atoms. Define $g_*(x) = g_\exists(\{x\})$. We show that $(g_*)^*$ is right adjoint to $g_\exists$ so that $g$ is the inverse image function of $g_* : X \to Y$ by the uniqueness of adjoints. \\
It has already been shown that both $g_\exists$ and $(g_*)^*$ are monotone and preserve unions. Hence, $(g_*)^*(g_\exists(a)) = \bigcup_{x \in a} (g_*)^*(g_\exists(\{x\})) \supseteq a$ and $g_\exists((g_*)^*(b)) = \bigcup_{y \in b} g_\exists((g_*)^*(\{y\})) \subseteq b$. \\
We retain the notation $g_*$ to denote the function for which $g$ is the inverse image function.
\end{proof}
\begin{theorem} \label{thm:bijection-set-morphisms-to-powset-morphisms}
There is a bijection between functions $2^Y \to 2^X$ which preserve unions and intersections and functions $X \to Y$.
\end{theorem}
\begin{proof}
By \Cref{prop:powset-morphism-is-inv-image}, there exists a unique $g_* : X \to Y$ for every union/intersection preserving $g : 2^Y \to 2^X$ so that $(g_*)^* = g$. Similarly, every $f : X \to Y$ has a unique inverse image function $f^*$ by definition. Hence we have a bijection.
\end{proof}
\pagebreak
% Section 2 - Algebraic Duality
\section{Algebraic Duality}
\subsection{Algebraic Preliminaries}
There are two equivalent definitions of a lattice, one which uses partially ordered sets and another which defines a lattice as an algebraic structure. Only the latter is below, but the former can be found on \href{https://en.wikipedia.org/wiki/Lattice_(order)}{the Wikipedia page}.
\begin{definition}[Lattice]
A \textbf{lattice} is a structure $(A, \meet, \join)$, where $A$ is a set and $\meet$ and $\join$ are binary, commutative, and associative operations on $A$ which satisfy the following (called absorption laws) for all $x, y \in A$:
\begin{enumerate}
\item[L1.]{$x \join (x \meet y) = x$}
\item[L2.]{$x \meet (x \join y) = x$.}
\end{enumerate}
$\meet$ is read "meet" and $\join$ is read "join."
\end{definition}
\begin{lemma}[Idempotence]
Let $(A, \meet, \join)$ be a lattice. For any $x \in A$, $$x \meet x = x \text{ and } x \join x = x.$$
\end{lemma}
\begin{proof}
Choose $y = x \join x$ from Definition 5. Then $x \meet y = x$ by (L2), meaning $$x \join (x \meet y) = x \join x = x$$ by (L1). The argument for $\meet$ follows similarly.
\end{proof}
\begin{definition}[Partial Order on Lattices]
We may define a partial order $\leq$ on a lattice $A$, which generalizes $\subseteq$ from the previous section. For $x, y \in A$, define
\begin{align*}
x \leq y \text{ if } x \meet y = x, & \text{ or } \\
x \leq y \text{ if } x \join y = y.
\end{align*}
\end{definition}
\begin{definition}[Bounded Lattice]
A lattice $A$ is \textbf{bounded} (or is a bounded lattice) if there exist $0, 1 \in A$ such that $$0 \leq x \leq 1 \text{ for all } x \in A.$$ When there are multiple bounded lattices involved, we avoid confusion by using $1_A$ and $0_A$ to denote the maximum and minimum elements of the lattice $A$.
\end{definition}
\begin{definition}[Complete Lattice]
A lattice $A$ is \textbf{complete} (or is a complete lattice) if every $T \subseteq A$ has a supremum and infimum, respectively denoted $\sup T, \inf T \in A$ (see \href{https://en.wikipedia.org/wiki/Infimum_and_supremum}{infimum and supremum}).
\end{definition}
\begin{lemma}
Every complete lattice $A$ is bounded. Note that the converse is not necessarily true.
\end{lemma}
\begin{proof}
Since $A$ is complete, there exists $0_A \in A$ (resp. $1_A \in A$) such that for every lower bound (resp. upper bound) $y \in \emptyset \subseteq A,$ $1_A \geq y$ (resp. $0_A \leq y$). Since every $y \in A$ is vacuously a lower bound and an upper bound, the proof is complete.
\end{proof}
\begin{lemma}
Every finite lattice $A$ is complete. As a corollary, we have shown that all finite lattices are bounded.
\end{lemma}
\begin{proof}
The proof follows easily from the definition of a complete lattice.
\end{proof}
\begin{lemma}
Let $A$ be a lattice. For $x, y, z \in A$, the following identities are equivalent:
\begin{enumerate}
\item[D1.]{$x \meet (y \join z) = (x \meet y) \join (x \meet z)$}
\item[D2.]{$x \join (y \meet z) = (x \join y) \meet (x \join z)$}
\end{enumerate}
\end{lemma}
\begin{proof}
Assume (D1) holds. Then
\begin{align*}
(x \join y) \meet (x \join z) &= ((x \join y) \meet x) \join ((x \join y) \meet z)
\\ &= x \join ((x \join y) \meet z)
\\ &= (x \join (z \meet x)) \join (y \meet z)
\\ &= x \join (y \meet z)
\end{align*}
by associativity/commutativity of $\join$ and $\meet$. The converse follows similarly.
\end{proof}
\begin{definition}[Distributive Lattice]
A lattice $A$ is \textbf{distributive} if (D1) (or (D2), equivalently) holds for $x, y, z \in A$.
\end{definition}
\begin{definition}[Complemented Lattice]
A lattice $A$ is \textbf{complemented} if for every $x \in A$, there exists some $x' \in A$ such that $x \meet x' = 0_A$ and $x \join x' = 1_A$. We call $x'$ a complement of $x$.
\end{definition}
\begin{definition}[Finite Boolean Algebra]
A \textbf{finite Boolean algebra} is a finite complemented distributive lattice.
\end{definition}
The following lemma allows us to speak of complements in finite Boolean algebras with reference to exactly one element. Hence, we denote the complement of $x$ by $\neg x$.
\begin{lemma} \label{lem:finite-ba-complements-are-unique}
Complements of elements in a finite Boolean algebra $C$ are unique.
\end{lemma}
\begin{proof}
Let $x, x', x'' \in C$, where $x'$ and $x''$ are complements of $x$. Then $x' = x' \join (x \meet x'') = (x' \join x) \meet (x' \join x'') = x' \join x''$. This means $x'' \leq x'$. Interchanging $x'$ and $x''$ shows that $x' \leq x''$, completing the proof.
\end{proof}
\begin{lemma}[De Morgan's Laws] \label{lem:de-morgans-laws}
Let $C$ be a finite Boolean algebra and let $x, y \in C$. Then $\neg (x \meet y) = \neg x \join \neg y$ and $\neg (x \join y) = \neg x \meet \neg y$.
\end{lemma}
\begin{proof}
The proof follows easily from the fact that $C$ is distributive.
\end{proof}
\begin{proposition} \label{prop:powset-is-bool-alg}
Let $X$ be a finite set. By setting the bottom (resp. top) element to be $\emptyset$ (resp. $X$) and meets (resp. joins) to be intersections (resp. unions), $2^X$ forms a finite Boolean algebra.
\end{proposition}
\begin{proof}
The proof follows easily from the properties of elementary set operations.
\end{proof}
\subsection{Properties of Lattice Morphisms}
For the remainder of this section, $A$ and $B$ are assumed to be finite (hence bounded) lattices.
\begin{definition}[Lattice Morphism]
$f : A \to B$ is a \textbf{lattice (homo)morphism} if for $x, y \in A$ if $$f(0_A) = 0_B$$ $$f(1_A) = 1_B$$ $$f(x \meet y) = f(x) \meet f(y)$$ $$f(x \join y) = f(x) \join f(y)$$
\end{definition}
\begin{lemma}
Lattice morphisms of Boolean algebras preserve complements.
\end{lemma}
\begin{proof}
The proof follows easily from the fact that lattice morphisms preserve top and bottom elements.
\end{proof}
\begin{definition}[Adjoints of Lattice Morphisms]
Let $R : B \to A$. Then $L : A \to B$ is \textbf{left-adjoint} to $R$ (and $R$ is \textbf{right-adjoint} to $L$) if for all $a \in A$ and $b \in B$,
\begin{equation*}
L(a) \leq b \Longleftrightarrow a \leq R(b).
\end{equation*}
\end{definition}
\begin{definition}[Monotone Lattice Morphisms]
A lattice morphism $f : A \to B$ is \textbf{monotone} if for $a, a' \in A$ such that $a \leq a'$ $f(a) \leq f(a')$.
\end{definition}
The following lemmas are also presented without proof since they are nearly identical to the proofs of \hyperref[lem:inv-img-adjoint-lem-1]{Lemmas 1.4-1.8}. The main difference is the use of the partial order $\leq$ instead of $\subseteq$.
\begin{lemma}
If $L$ is left-adjoint to $R$, $a \leq R(L(a))$ and $L(R(b)) \leq b$.
\end{lemma}
\begin{lemma}
If $f : A \to B$ has a left or right adjoint, $f$ is monotone.
\end{lemma}
\begin{lemma}
Let $L : A \to B$ and $R : B \to A$. If $L$ and $R$ are monotone and $a \leq R(L(a))$ and $L(R(b)) \leq b$ for all $a \in A$ and $b \in B$, then $L$ is left-adjoint to $R$.
\end{lemma}
\begin{lemma}
Left and right adjoints (of lattice morphisms) are unique.
\end{lemma}
\begin{proposition}
Recall that $A$ and $B$ are finite lattices. Then any lattice morphism $g : B \to A$ has a left adjoint $g_\exists : A \to B$ and a right adjoint $g_\forall : A \to B$. Moreover, $g_\exists$ and $g_\forall$ preserve joins and meets respectively.
\end{proposition}
\begin{proof}
Like \Cref{prop:inv-image-has-adjoints}, we prove more generally that (i) $g$ has a left adjoint $g_\exists$ if and only if $g$ preserves $\meet, 1_B$, and (ii) that $g$ has a right adjoint $g_\forall$ if and only if $g$ preserves $\join, 0_B$. The proof of (ii) is excluded for brevity since it is similar to (i). \\
Suppose $g$ preserves meets. For any $a \in A$, let $S = \{b : a \leq g(b)\}$ and define $g_\exists(a) = \bigmeet S$. Let $b \leq b'$ for $b, b' \in B$. Since $g(b \meet b') = g(b) \meet g(b') = g(b)$, $g(b) \leq g(b')$, meaning $g$ is monotone. Hence, $g_\exists(a) \leq b \Rightarrow g(b) \geq g(g_\exists(a)) \geq a$ since $g$ preserves meets. The fact that $a \leq g(b) \Rightarrow g_\exists(a) \leq b$ and that $g_\exists$ preserves joins is clear from the definition of $g_\exists$.
\end{proof}
\textbf{Remark:} This generalizes to infinite lattices if we assume that $A$ and $B$ are complete.
\begin{definition}[Completely Join-Prime]
We say that $x \in A \setminus \{0_A\}$ is \textbf{prime} (or \textbf{completely join-prime}) if for all $y, z \in A$, $x \leq y \join z$ implies that $x \leq z$ or $x \leq y.$ Let $\mathcal{J}_A$ denote the set of join-prime elements of $A$.
\end{definition}
\textbf{Remark:} Similarly, we can say more generally that for a complete lattice $L,$ $x \in L \setminus \{0_L\}$ is completely join-prime if $x \leq \bigjoin T$ for any $T \subseteq L$ implies that $x \leq t$ for some $t \in T.$
\begin{lemma} \label{lem:left-adjoint-maps-primes-to-primes}
The left adjoint $g_\exists : A \to B$ of a lattice morphism $g : B \to A$ maps prime elements of $A$ to prime elements of $B$.
\end{lemma}
\begin{proof}
Let $a \in A$ be prime, let $b_1, b_2 \in B$ s.t.\ $g_\exists(a) \leq b_1 \join b_2$, and let $t_i = g(b_i)$. Then $a \leq g(b_1 \join b_2) = t_1 \join t_2$ by the definition of the adjoint. Since $a$ is prime and $t_1, t_2 \in B$, $a \leq t_k$ for some $k \in \{1, 2\}$. Because $t_k = g(b_k)$, we have that $g_\exists(a) \leq g_\exists(g(b_k)) \leq b_k$.
\end{proof}
\subsection{Finite Boolean Algebras and Power Sets}
We now turn our attention to Boolean algebras to describe isomorphisms between lattice morphisms of Boolean algebras and maps of sets. Unless specified otherwise, $C, D$ and $X, Y$ will denote finite Boolean algebras and finite sets, respectively, for the remainder of this section. \\
The following lemma shows how primes correspond to atoms (i.e.\ singletons) in the previous section.
\begin{lemma} \label{lem:primes-are-atoms}
$p \in C$ is prime if and only if $z \leq p$ implies $z = 0_C$ or $z = p$. Moreover, for every $x \in C \setminus \{0_C\}$, there exists a prime element $p \in C$ such that $p \leq x$.
\end{lemma}
\begin{proof}
Suppose $p$ is prime. If $y < p$, $p \leq \neg y$ since $p \leq y \meet \neg y$. Then $y = 0_C$ since $y < p \leq \neg y$ and $y = y \meet \neg y = 0_C$. \\
For the converse, let $a, b \in C$ and suppose $p \leq a \join b$, $p \not\leq a$, and $p \not\leq b$. If $p > a$ or $p > b$, a contradiction is reached since $a = 0_C$ or $a = p$ (and similarly for $b$). Hence $p \join a \neq a$ and $p \join b \neq b$. Then $p \join a > a$ and $p \join b > b$. However, this means that $$p \join a \join p \join b = p \join a \join b > a \join b,$$ a contradiction. \\
Now, for any $x \in C \setminus \{0_C\}$ choose some $y < x$. If $0_C$ is the only such $y$, $x$ is prime and we are done. Setting $x = y$ and repeating this process completes the proof.
\end{proof}
\begin{proposition} \label{prop:repr-bool-alg-with-primes}
For every $x \in C \setminus \{0_C\}$, there exists exactly one nonempty set $S_x \subseteq \mathcal{J}_C$ such that $x = \bigjoin S_x$. That is, every element of a finite Boolean algebra can be uniquely represented as a finite join of its prime elements.
\end{proposition}
\begin{proof}
Let $x \in C \setminus \{0_C\}$. Define $S_x = \{p \mid p \leq x : p \text{ is prime}\}$. By \Cref{lem:primes-are-atoms}, $S_x$ defined in this way is nonempty. Let $y = \bigjoin S_x$. If $x \meet \neg y = 0_C$, $x = y$ since complements are unique in finite Boolean algebras by \Cref{lem:finite-ba-complements-are-unique}. Suppose $x \meet \neg y \neq 0_C$. Then there exists a prime element $p$ such that $p \leq x \meet \neg y \leq x$. However, this contradicts \Cref{lem:de-morgans-laws}, since this means that $p \in S_x$ and $p \leq \neg y$. \\
For uniqueness, suppose there existed another nonempty set of primes $S'_x$ such that $x = \bigjoin S'_x$. Then $p \leq x$ for every $p \in S'_x$, meaning $S'_x \subseteq S_x$. Suppose $S'_x \neq S$. Then there exists some $p_0 \in S_x$ such that $p_0 \not\in S'_x$ and $\bigjoin S'_x \join p_0 = \bigjoin S'_x$. However, this means that $p_0 < s$ for some $s \in S'_x$, a contradiction. Hence $S_x = S'_x$.
\end{proof}
\begin{proposition}
There exists a bijection $C \to 2^X$ for some set $X$. This also shows that the cardinality of every finite Boolean algebra is a power of two.
\end{proposition}
\begin{proof}
We may let $0_C$ correspond (bijectively) to $\emptyset \in 2^X$ regardless of the choice of $X$. By \Cref{prop:repr-bool-alg-with-primes}, for every $x \in C \setminus \{0_C\}$ there exists a unique $S_x$ such that $x = \bigjoin S_x$. Define $X = \mathcal{J}_C$. Then let each $x \in C \setminus \{0_C\}$ correspond to the set $S_x \in 2^X$ so that $\bigjoin S_x = x$. Similarly, let each $T \in 2^X$ correspond to $\bigjoin T$. Thus we have constructed a bijection and the proof is complete.
\end{proof}
\begin{lemma} \label{lem:inv-image-is-lattice-morphism}
Recall that $2^X, 2^Y$ are finite Boolean algebras as defined in \Cref{prop:powset-is-bool-alg}. Then the inverse image function of a map $X \to Y$ is a lattice morphism.
\end{lemma}
\begin{proof}
The proof follows from \Cref{thm:inv-image-preserves-structure}.
\end{proof}
\begin{theorem} \label{thm:ba-set-bijection}
There exists a bijection between:
\begin{enumerate}
\item{finite Boolean algebras and finite sets}
\item{lattice morphisms $D \to C$ and maps $X \to Y$}
\end{enumerate}
(2) provides a result more general to \Cref{thm:bijection-set-morphisms-to-powset-morphisms} by removing the assumption that the elements of $C, D$ are themselves sets.
\end{theorem}
\begin{proof}
For (1), we let every Boolean algebra $C$ correspond with the finite set $\mathcal{J}_C$ and let every finite set $X$ correspond with the Boolean algebra formed by $2^X$. \\
For (2), we let every lattice morphism $g : D \to C$ correspond to $\restr{g_\exists}{\mathcal{J}_C}$ (the restriction of the left adjoint to primes) and let every map $f: X \to Y$ correspond to the inverse image function $f^* : 2^Y \to 2^X$, which is a lattice morphism by \Cref{lem:inv-image-is-lattice-morphism}. $(f^*)_\exists$ restricted to primes is a unique map $f : \{\{x\} : x \in X\} \to \{\{y\} : y \in Y\}$ and $\restr{g_\exists}{\mathcal{J}_C}$ is a unique map $g : \mathcal{J}_C \to \mathcal{J}_D$ by \Cref{lem:left-adjoint-maps-primes-to-primes}. \\
Since $\mathcal{J}_{2^X} = \{\{x\} : x \in X\}$ by \Cref{lem:primes-are-atoms} and there exists an obvious bijection $X \to \{\{x\} : x \in X\}$, the proof is complete.
\end{proof}
\pagebreak
\section{Introducing Category Theory}
To more easily discuss the relationships between the areas of mathematics we wish to relate, it is useful to introduce some ideas in Category Theory.
\subsection{Categories, Functors, and Natural Transformations}
The following are definitions and propositions that are fundamental in describing additional categorical concepts.
\begin{definition}[Category]
A \textbf{category} $\cat{C}$ consists of:
\begin{enumerate}
\item{A collection of objects $\ob(\cat{C})$}
\item{A collection of morphisms (or arrows), where an arrow $f$ consists of a source object $\dom(f)$ and a target object $\cod(f).$ The collection of morphisms from object $A$ to object $B$ is denoted $\hom_\cat{C}(A, B)$}
\item{An associative composition operation $\hom_\cat{C}(B, C) \times \hom_\cat{C}(A, B) \to \hom_\cat{C}(A, C)$ denoted $f \circ g$ or $fg$}
\item{An identity morphism $\id_A : A \to A$ for every object $A,$ $f : A \to B,$ and $g : B \to A$ such that $f \circ \id_A = f$ and $\id_A \circ g = g$}
\end{enumerate}
\end{definition}
\begin{definition}[Functor]
Let $\cat{C}, \cat{D}$ be categories and let $X, Y$ be objects in $\cat{C}.$ A \textbf{functor} $F$ is a type of homomorphism between categories, consisting of
\begin{enumerate}
\item{A map $\ob(\cat{C}) \to \ob(\cat{D})$}
\item{A map $\hom_\cat{C}(X, Y) \to \hom_\cat{D}(F(X), F(Y))$}
\end{enumerate}
which satisfy
\begin{enumerate}
\item{$F(\id_X) = \id_{F(X)}$}
\item{$F(f \circ g) = F(f) \circ F(g)$ for arrows $f, g$ in $\cat{C}.$}
\end{enumerate}
We may denote $F(X)$ by $FX.$
\end{definition}
\begin{definition}[Natural Transformation]
Let $F, G : \cat{C} \to \cat{D}$ be functors. A \textbf{natural transformation} is a mapping $\eta : F \to G$ which assigns, for every object $X$ in $\cat{C},$ a morphism $\eta_X : FX \to GX$ such that for every $f : X \to Y,$ $$\eta_Y \circ Ff = Gf \circ \eta_X.$$ Alternatively, the following diagram commutes.
$$
\begin{tikzcd}
FX && GX \\
\\
FY && GY
\arrow["{\eta_X}", from=1-1, to=1-3]
\arrow["{Ff}"', from=1-1, to=3-1]
\arrow["{Gf}", from=1-3, to=3-3]
\arrow["{\eta_Y}"', from=3-1, to=3-3]
\end{tikzcd}
$$
We may define the composition operation on natural transformations by $$(\eta\eta')_X = \eta_X\eta'_X.$$
\end{definition}
\begin{definition}[Epimorphism and Monomorphism]
A morphism $f : X \to Y$ is said to be an \textbf{epimorphism} if, for all $\alpha_1, \alpha_2 : Z \to X,$ $$\alpha_1f = \alpha_2f \Rightarrow \alpha_1 = \alpha_2.$$
Similarly, $f$ is a \textbf{monomorphism} if $$f\alpha_1 = f\alpha_2 \Rightarrow \alpha_1 = \alpha_2.$$
\end{definition}
\begin{definition}[$\cat{Set}, \cat{BA}, \cat{Set}_\omega, \cat{BA}_\omega$]
We define the category $\cat{Set}$ to be the category for which the objects are sets and the arrows are functions. Likewise, $\cat{BA}$ is defined such that the objects are Boolean algebras and the arrows are Boolean algebra morphisms. We define $\cat{Set}_\omega$ and $\cat{BA}_\omega$ similarly, considering only finite sets and finite Boolean algebras respectively.
\end{definition}
\begin{lemma}
In $\cat{Set},$ $f : X \to Y$ is surjective if and only if it is an epimorphism, and injective if and only if it is a monomorphism.
\end{lemma}
\begin{proof}
The proof is straightforward and follows quickly from the definitions of injective and surjective functions.
\end{proof}
\begin{definition}[Isomorphism]
An \textbf{isomorphism} is a morphism $h : X \to Y$ for which there exists $h^{-1} : Y \to X$ which is a left and right inverse of $h.$ We call $h^{-1}$ the inverse of $h.$
\end{definition}
\begin{definition}[Functor Category]
Let $\cat{C}, \cat{D}$ be categories. Then $[\cat{C}, \cat{D}]$ is called a \textbf{functor category}, where the objects are functors and the arrows are natural transformations. For functors $F, G : \cat{C} \to \cat{D},$ we define $$\Nat(F, G) = \hom_{[\cat{C}, \cat{D}]}(F, G).$$
\end{definition}
\begin{definition}[Natural Isomorphism]
An isomorphism in the functor category is called a \textbf{natural isomorphism}.
\end{definition}
\begin{lemma} \label{lem:natural-isomorphism-alternate-definition}
Let $F, G : \cat{C} \to \cat{D}$ be functors and $\eta : F \to G$ be natural. Then $\eta$ is a natural isomorphism if and only if $\eta_X : FX \to GX$ for every $X$ is an isomorphism in $\cat{D}.$
\end{lemma}
\begin{proof}
The forward direction follows easily from the definition of a natural isomorphism (a natural transformation with a left and right inverse) and the composition of natural transformations. \\
Define $\eta^{-1} : G \to F$ by $\eta^{-1}_X = (\eta_X)^{-1}.$ Since $\eta$ is natural, $Gf \circ \eta_X = \eta_Y \circ Ff$ for $f : X \to Y$ in $\cat{C}$ and hence $$Ff \circ \eta^{-1}_X = \eta^{-1}_Y \circ (\eta_Y \circ Ff) \circ \eta^{-1}_X = \eta^{-1}_Y \circ Gf.$$ Thus, $\eta^{-1}$ is natural and the proof is complete.
\end{proof}
\begin{definition}[Small and Locally Small Categories]
A category $\cat{C}$ is said to be \textbf{small} if $\ob(\cat{C})$ and $\hom(A, B)$ are both sets (and not proper classes) for all objects $A, B$. A category is said to be \textbf{locally small} if it has a class of objects and $\hom(A, B)$ is a set for all objects $A, B.$
\end{definition}
\begin{lemma}
The categories $\cat{Set}, \cat{BA}, \cat{Set}_\omega,$ and $\cat{BA}_\omega$ are locally small.
\end{lemma}
\begin{proof}
The proof follows from the fact that a function $X \to Y$ can be seen as a subset of $2^{X \times Y}.$
\end{proof}
\begin{definition}[Hom Functor]
Let $\cat{C}$ be a locally small category. Then for each object $A$ we may define the \textbf{hom functor} $h_A : \cat{C} \to \cat{Set}$ by $$h_A(B) = \hom(A, B) \textit{ for each object } B$$ $$h_A(f) = f \circ - \textit{ for each arrow } f : B \to C$$ where $f \circ - : h_A(B) \to h_A(C)$ is the function mapping an arrow $g : A \to B$ to $f \circ g : A \to C.$
\end{definition}
% TODO Prove one of the exercises with and without Yoneda Lemma.
\begin{lemma}[Yoneda Lemma]
Let $\cat{C}$ be a locally small category and let $F : \cat{C} \to \cat{Set}.$ For every object $A$ there exists a bijection $\varphi : \Nat(h_A, F) \to FA.$
\end{lemma}
\begin{proof}
Define $\varphi(\eta) = \eta_A(\id_A).$ We first show that $\varphi$ is injective. Let $\eta, \eta' : h_A \to F$ be natural and suppose $\eta \neq \eta'.$ Since $\eta$ is natural, the following diagram commutes:
$$
\begin{tikzcd}
A && {\hom(A, A)} && FA \\
\\
B && {\hom(A, B)} && FB
\arrow["f", from=1-1, to=3-1]
\arrow["{h_Af}"', from=1-3, to=3-3]
\arrow["{\eta_A}", from=1-3, to=1-5]
\arrow["{\eta_B}"', from=3-3, to=3-5]
\arrow["Ff", from=1-5, to=3-5]
\end{tikzcd}
$$
Hence, we may conclude that $$\eta_B(f) = (Ff \circ \eta_A)(\id_A)$$ since it follows from the diagram that $$(Ff \circ \eta_A)(\id_A) = (\eta_Bh_A)(\id_A)$$ and $h_A(\id_A) = f \circ \id_A = f$ by the definition of the hom functor. Because $\eta \neq \eta',$ there exists an $X$ such that $\eta_X \neq \eta'_X.$ However, since $\eta_X(f) = (Ff \circ \eta_A)(\id_A),$ $$\eta_A(\id_A) = \varphi(\eta) \neq \varphi(\eta') = \eta'_A(\id_A).$$ We now complete the proof by showing that $\varphi$ is surjective. In particular, we show that for every $a \in FA,$ there exists $\eta$ such that $\varphi(\eta) = a.$ Fix $a$ and define $\eta_B(f) = (Ff)a$ for every object $B$ and $a \in FA.$ Since $F$ is a functor, $$(Ff \circ \eta_B)(g) = (Ff \circ Fg)a = F(f \circ g)(a) = \eta_C(fg) = (\eta_C \circ h_Af)(g),$$ so that $\eta$ defined in this way is natural and $\varphi(\eta) = \eta_A(\id_A) = \id_{FA}(a) = a.$
\end{proof}
\subsection{Categorical Equivalence and Duality}
We can now discuss "duality" and reformulate \Cref{thm:ba-set-bijection} as our "finite duality theorem."
\begin{definition}[Equivalence of Categories]
Categories $\cat{C}$ and $\cat{D}$ are said to be \textbf{equivalent} if there exist functors $F : \cat{C} \to \cat{D},$ $G : \cat{D} \to \cat{C},$ and natural isomorphisms $\Id_\cat{C} \cong GF,$ $\Id_\cat{D} \cong FG,$
\end{definition}
\begin{definition}[$\cat{C}^\op$]
The \textbf{dual category} (or \textbf{opposite category}) $\cat{C}^\op$ of a category $\cat{C}$ is the category whose objects are the same as $\cat{C}$ such that we define $$\hom_{\cat{C}^\op}(A, B) = \hom_\cat{C}(B, A).$$ It is clear from this definition that $$(\cat{C}^\op)^\op = \cat{C}.$$
\end{definition}
\begin{definition}[Contravariant and Covariant Functors]
A \textbf{contravariant functor} is a functor $\cat{C}^\op \to \cat{D}$ or, equivalently, a functor $\cat{C} \to \cat{D}^\op.$ An ordinary functor may be called a \textbf{covariant functor}.
\end{definition}
\begin{lemma}
If $\cat{C}$ and $\cat{D}$ are equivalent, $\cat{C}^\op$ and $\cat{D}^\op$ are equivalent.
\end{lemma}
\begin{proof}
Since $\cat{C}$ and $\cat{D}$ are equivalent, there exist functors $F : \cat{C} \to \cat{D}$ and $G : \cat{D} \to \cat{C}$ such that $\Id_\cat{C} \cong GF$ and $Id_\cat{D} \cong FG$ are natural. The proof follows from defining the \textbf{opposite functor} $F^\op : \cat{C}^\op \to \cat{D}^\op$ by $F^\op A = FA$ and $F^\op f = Ff$ and considering functors $F^\op$ and $G^\op.$
\end{proof}
\begin{definition}[Categorical Duality]
Categories $\cat{C}$ and $\cat{D}$ are \textbf{dually equivalent} if $\cat{C}^\op$ and $\cat{D}$ are equivalent. Alternatively, we may replace the covariant functors in the definition of categorical equivalence with contravariant functors.
\end{definition}
\begin{definition}[Boolean algebra morphism]
A \textbf{Boolean algebra morphism} is an arrow in $\cat{BA}$ (or $\cat{BA}_\omega$) (i.e. a lattice morphism among Boolean algebras).
\end{definition}
\begin{theorem}
\label{thm:fin-ba-set-duality-cat-theoretic}
$\cat{Set}_\omega$ and $\cat{BA}_\omega$ are dually equivalent.
\end{theorem}
\begin{proof}
We first define a functor $F : \cat{Set}_\omega \to \cat{BA}^\op_\omega$ by letting $FS$ be the Boolean algebra $2^S$ with joins as unions and meets as intersections, and $Ff$ for a map $S \to T$ be the inverse image function $2^T \to 2^S.$ Similarly, we define a functor $G : \cat{BA}^\op_\omega \to \cat{Set}_\omega$ by $GX = \mathcal{J}_X$ and $Gf$ for a Boolean algebra morphism $Y \to X$ as the map $\restr{g_\exists}{\mathcal{J}_X} : \mathcal{J}_X \to \mathcal{J}_Y$ (recall that $\mathcal{J}_X$ is the set of completely join-prime elements of Boolean algebra $X$). \\
We now show that there exist natural isomorphisms $\Id_{\cat{Set}_\omega} \cong GF$ and $\Id_{\cat{BA}_\omega} \cong FG.$ Define $\alpha : \Id_{\cat{Set}_\omega} \to GF$ by $\alpha_S(s) = \{s\}$ for every finite set $S$ and $s \in S.$ Let $f : S \to T$ so that $$(GFf \circ \alpha_S)(s) = (\alpha_T \circ \Id_{\cat{Set}_\omega}f)(s) = \{f(s)\}$$ by the definition of the identity functor and $\restr{g_\exists}{\mathcal{J}_X}.$ By \Cref{lem:natural-isomorphism-alternate-definition}, $\alpha$ is a natural isomorphism since we may define $(\alpha_S)^{-1}(\{t\}) = t,$ which is a left and right inverse of $\alpha_S.$ \\
The proof that $\Id_{\cat{BA}_\omega} \cong FG$ is natural follows similarly by considering $\beta : \Id_{\cat{BA}_\omega} \to FG$ defined by $\beta_X(x) = \{\{x\}\}.$
\end{proof}
\subsection{Adjoint Functors}
Adjoints functors in category theory are immensely important and generalize the notion of "left and right adjoints" which were discussed in the previous sections.
% TODO change objects to C and D
\begin{definition}[Adjunction]
Suppose $\cat{C}$ and $\cat{D}$ are locally small categories. Let $L : \cat{C} \to \cat{D}$ and $R : \cat{D} \to \cat{C}$ be (covariant) functors and let $X$ and $Y$ be a fixed objects in $\cat{C}$ and $\cat{D}$ respectively. Define the pairs of functors $$\cat{C}(X, R-), \cat{D}(LX, -) : \cat{D} \to \cat{Set} \text{ and } \cat{C}(-, RY), \cat{D}(L-, Y) : \cat{C} \to \cat{Set}$$ in a similar fashion to the hom functor. Then $L$ is said to be the \textbf{left adjoint} of $R$ (and $R$ is said to be the \textbf{right adjoint} of $L$) if there is an isomorphism $$\hom_\cat{C}(X, RY) \cong \hom_\cat{D}(LX, Y)$$ natural in $X$ and $Y,$ which gives rise to natural isomorphisms $$\alpha: \cat{C}(X, R-) \to \cat{D}(LX, -) \text{ and } \beta : \cat{C}(-, RY) \to \cat{D}(L-, Y).$$ If such functors $L, R$ exist, we say that there is an $\textbf{adjunction}$ between categories $\cat{C}$ and $\cat{D}.$ In symbols, we write $L \dashv R$ to say that $L$ is left-adjoint to $R.$
\end{definition}
\textbf{Remark:} We can also define adjunctions without the assumption that $\cat{C}$ and $\cat{D}$ are locally small, but it is not needed for these notes and would require additional work to ensure that discussing hom functors is sensible. \\
The following theorems provide very useful conditions for the existence of a right/left adjoint functor, as well as an intuition for constructing adjunctions. We prove both theorems simultaneously.
\begin{theorem}[Unit of an Adjunction]\label{thm:unit-of-adjunction}
Let $R : \cat{D} \to \cat{C}$ be a functor. The following are equivalent for $X$ in $\cat{C}$ and $Y$ in $\cat{D}$:
\begin{enumerate}
\item{The functor $R$ has a left adjoint $L : \cat{C} \to \cat{D}.$}
\item{There exist a map $L_0 : \ob(\cat C) \to \ob(\cat D)$ and $\eta_X : X \to RL_0X$ such that for every $f : X \to RY,$ there exists a unique $f^\sharp : L_0X \to Y$ which satisfies $Rf^\sharp \circ \eta_X = f.$}
\end{enumerate}
We call $\eta$ a \textbf{unit} of the adjunction $L \dashv R.$
\end{theorem}
\begin{theorem}[Counit of an Adjunction]
\label{thm:counit-of-adjunction}
Let $L : \cat{C} \to \cat{D}$ be a functor. The following are equivalent for $X$ in $\cat{C}$ and $Y$ in $\cat{D}$:
\begin{enumerate}
\item{The functor $L$ has a right adjoint $R : \cat{D} \to \cat{C}.$}
\item{There exists a map $R_0 : \ob(\cat D) \to \ob(\cat C)$ and $\epsilon_Y : LR_0Y \to Y$ such that for every $g : LX \to Y,$ there exists a unique $g^\flat : X \to R_0Y$ which satisfies $\epsilon_Y \circ Lg^\flat = g.$}
\end{enumerate}
We call $\epsilon$ a \textbf{counit} of the adjunction $L \dashv R.$
\end{theorem}
\begin{proof}
We will begin by proving \Cref{thm:unit-of-adjunction}. The "only if" direction of this proof is adapted from \href{https://hackmd.io/@alexhkurz/HyT3zuR8h}{Dr. Alexander Kurz's notes} on this theorem. Suppose (1) and fix $X,$ $Y,$ and $f : X \to RY.$ Since $L \dashv R,$ there exist natural isomorphisms $$\alpha: \cat{C}(X, R-) \to \cat{D}(LX, -) \text{ and } \beta : \cat{C}(-, RY) \to \cat{D}(L-, Y).$$ Define $L_0C = LC$ for every $C$ in $\cat C$ and $f^\sharp = \alpha_Y(f).$ Then let $g : L_0X \to Y$ and observe the following diagram:
\[\begin{tikzcd}
{\hom_\textbf C(X, RL_0X)} && {\hom_\textbf D (L_0X, L_0X)} \\
\\
{\hom_\textbf C(X, RY)} && {\hom_\textbf D (L_0X, Y)}
\arrow["{\alpha_Y}"', from=3-1, to=3-3]
\arrow["{\alpha_{L_0X}}", from=1-1, to=1-3]
\arrow["{\textbf C(X, Rg)}"', from=1-1, to=3-1]
\arrow["{\textbf D(L_0X, g)}", from=1-3, to=3-3]
\end{tikzcd}\]
Then defining $\eta_X = \alpha_{L_0X}^{-1}(\id_{L_0X})$ yields $$(Rg \circ \eta_X)^\sharp = (\alpha_Y^{-1}(g))^\sharp = g$$ by observing that $\alpha$ is a natural isomorphism. Choosing $g = f^\sharp$ then gives the desired equality $$(Rf^\sharp \circ \eta_X)^\sharp = (f)^\sharp \implies Rf^\sharp \circ \eta_X = f$$ since $\alpha_Y$ is an isomorphism and hence $(-)^\sharp$ is injective. The uniqueness of $f^\sharp$ follows easily from observing that $(Rg \circ \eta_X)^\sharp = f^\sharp$ if $Rg \circ \eta_X = f.$ \\
For the reverse direction, we first construct the functor $L$ and show that $\eta : \id_{\cat C} \to RL$ is natural. Let $X'$ in $\cat C,$ let $h : X \to X',$ and choose $Y = L_0X'.$ Then for $f = \eta_{X'} \circ h : X \to RY,$ there exists $f^\sharp : LX \to LX'$ such that the following diagram commutes:
\[\begin{tikzcd}
X && RLX \\
\\
{X'} && {RLX'}
\arrow["{\eta_{X'}}"', from=3-1, to=3-3]
\arrow["{Rf^\sharp}", from=1-3, to=3-3]
\arrow["h"', from=1-1, to=3-1]
\arrow["{\eta_X}", from=1-1, to=1-3]
\end{tikzcd}\]
Define $LC = L_0C$ and $$Lh = f^\sharp : LX \to LX'.$$ It is easy to verify from the above diagram and the uniqueness of $f^\sharp$ that $L$ defined in this way is a functor. Thus, $\eta$ is natural. \\
We now define the isomorphism $$\hom_\cat{C}(X, RY) \cong \hom_\cat{D}(LX, Y)$$ and show that it is natural in $X$ and $Y.$ For any $g : LX \to Y,$ define $\alpha^{-1}_Y(g) = \beta^{-1}_X(g) = Rg \circ \eta_X.$ Let $u : Y \to Y'$ and $v : X' \to X.$ Since $R$ is a functor, equation (3.1) yields $$\alpha_{Y'}^{-1}(u \circ g) = Ru \circ Rg \circ \eta_X = Ru \circ \alpha_Y^{-1}(g).$$ Similarly, since $\eta$ is natural we have $$\beta^{-1}_{X}(g \circ Lv) = Rg \circ RLv \circ \eta_X = Rg \circ \eta_{X'} \circ v = u \circ \beta_{X'}^{-1}(g).$$ Thus, the following diagrams commute:
\[\begin{tikzcd}[column sep=scriptsize,row sep=2.25em]
{\hom_\textbf D (LX, Y)} && {\hom_\textbf C(X, RY)} && {\hom_\textbf D (LX, Y)} && {\hom_\textbf C(X, RY)} \\
\\
{\hom_\textbf D (LX', Y)} && {\hom_\textbf C(X', RY)} && {\hom_\textbf D (LX, Y')} && {\hom_\textbf C(X, RY')}
\arrow["{\beta^{-1}_X}"', from=3-1, to=3-3]
\arrow["{\beta^{-1}_{X'}}", from=1-1, to=1-3]
\arrow["{\textbf D(Lv, Y)}"', from=1-1, to=3-1]
\arrow["{\textbf C(v, RY)}", from=1-3, to=3-3]
\arrow["{\alpha^{-1}_{Y'}}"', from=3-5, to=3-7]
\arrow["{\textbf D(LX, u)}"', from=1-5, to=3-5]
\arrow["{\textbf D(LX, Ru)}", from=1-7, to=3-7]
\arrow["{\alpha^{-1}_{Y}}", from=1-5, to=1-7]
\end{tikzcd}\]
The proof is then completed by \Cref{lem:natural-isomorphism-alternate-definition} and the fact that $\alpha_Y(f) = \alpha_X(f) = f^\sharp,$ since defining $\alpha, \beta$ in this way satisfies $$\alpha_Y(\alpha^{-1}_Y(g)) = g \text{ and } \alpha^{-1}_Y(\alpha_Y(f)) = f$$ and similarly for $\beta.$
\end{proof}
\textbf{Remark:} The above proof shows that the naturality of $\beta$ and $\beta^{-1}$ is implied by the naturality of $\alpha$ and $\alpha^{-1}$. \href{https://hackmd.io/@alexhkurz/HyT3zuR8h#Literature-Review}{Dr. Kurz's Notes} provide more information on the acknowledgement of this fact in literature.
\begin{lemma}
Adjoints are unique up to (natural) isomorphism.
\end{lemma}
\begin{proof}
Suppose the functor $R : \cat{D} \to \cat{C}$ has two left adjoints $L, L' : \cat{C} \to \cat{D}$ and let $X$ in $\cat C$. We will show that there exists a natural isomorphism $\phi : L \to L.$ Define natural transformations $\eta : X \to RLX, \eta' : X \to RL'X$ as in \Cref{thm:unit-of-adjunction}, and define $\phi_X = (\eta'_X)^\sharp$ for $Y = L'X$ so that $R\phi_X \circ \eta_X = \eta'_X.$ Since $R$ is a functor and $\eta, \eta'$ are natural, $$R(L'h \circ \phi_X) \circ \eta_X = RL'h \circ R\phi_X \circ \eta_X = RL'h \circ \eta'_{X} = \eta'_{X'} \circ h$$ Similarly, $$R(\phi_{X'} \circ Lh) \circ \eta_X = R\phi_{X'} \circ RLh \circ \eta_X = R\phi_{X'} \circ \eta_{X'} \circ h = \eta'_{X'} \circ h.$$ Choosing instead $Y = L'X',$ the naturality of $\phi$ follows from the uniqueness of $(\eta'_{X'} \circ h)^\sharp.$ Then $(\phi^{-1})_X = (\eta_X)^\sharp$ for $Y
= LX,$ from which the proof is completed by \Cref{lem:natural-isomorphism-alternate-definition}. To see this, apply a similar argument to the fact that $$R((\eta_X)^\sharp \circ (\eta'_X)^\sharp) \circ \eta_X = R(\eta_X)^\sharp \circ \eta'_X = \eta_X = R(\id_{L'X}) \circ \eta_X$$ and likewise for $(\eta'_X)^\sharp \circ (\eta_X)^\sharp.$
\end{proof}
\section{Topological Duality}
The goal of this section is to now remove the assumption of finiteness on our Boolean algebras and to find the structure necessary to construct a duality theorem similar to \Cref{thm:fin-ba-set-duality-cat-theoretic}
\subsection{Free Algebras}
This section discusses the notion of an "algebra" and its associated "free algebra."
\begin{definition}[Algebra]
An \textbf{algebra} is a set $X$, whose elements are called \textbf{generators}, a collection of \textbf{operations}, and \textbf{equations} which the operations satisfy. \\
This collection of operations can be formalized by assigning a set of functions $f_n : A^n \to A$ (each called an \textbf{$n$-ary operation}) for each $n \in \mathbb{N}.$ The set of $n$-ary operations is denoted by $\Sigma(n).$ \\
thFurthermore, the collection of operations can be formalized through
\end{definition}
\end{document}