forked from BartoszMilewski/Publications
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAlgebrasNotes.tex
173 lines (157 loc) · 4.79 KB
/
AlgebrasNotes.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
\documentclass[11pt]{amsart}
\usepackage[a4paper,verbose]{geometry}
\geometry{top=3cm,bottom=3cm,left=3cm,right=3cm,textheight=595pt}
\setlength{\parskip}{0.3em}
% ==============================
% PACKAGES
% ==============================
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{caption}
\usepackage[inline]{enumitem}
\setlist{itemsep=0em, topsep=0em, parsep=0em}
\setlist[enumerate]{label=(\alph*)}
\usepackage{etoolbox}
\usepackage{stmaryrd}
\usepackage[dvipsnames]{xcolor}
\usepackage[]{hyperref}
\hypersetup{
colorlinks,
linkcolor=blue,
citecolor=blue,
urlcolor=blue}
\usepackage{graphicx}
\graphicspath{{assets/}}
\usepackage{mathtools}
\usepackage{tikz-cd}
\usepackage{minted}
\usepackage{float}
\usetikzlibrary{
matrix,
arrows,
shapes
}
\setcounter{tocdepth}{1} % Sets depth for table of contents.
% ======================================
% MACROS
%
% Add your own macros below here
% ======================================
\newcommand{\rr}{{\mathbb{R}}}
\newcommand{\nn}{{\mathbb{N}}}
\newcommand{\iso}{\cong}
\newcommand{\too}{\longrightarrow}
\newcommand{\tto}{\rightrightarrows}
\newcommand{\To}[1]{\xrightarrow{#1}}
\newcommand{\Too}[1]{\To{\;\;#1\;\;}}
\newcommand{\from}{\leftarrow}
\newcommand{\From}[1]{\xleftarrow{#1}}
\newcommand{\Cat}[1]{\mathbf{#1}}
\newcommand{\cat}[1]{\mathcal{#1}}
\newtheorem*{remark}{Remark}
\renewcommand{\ss}{\subseteq}
\newcommand{\hask}[1]{\mintinline{Haskell}{#1}}
\newenvironment{haskell}
{\VerbatimEnvironment
\begin{minted}[escapeinside=??, mathescape=true,frame=single, framesep=5pt, tabsize=1]{Haskell}}
{\end{minted}}
% ======================================
% FRONT MATTER
% ======================================
\author{Bartosz Milewski}
\title{Random Notes}
\begin{document}
\section{Random things}
\subsection{Initial algebra structure map}
\[j \colon f (\mu f) \to \mu f\]
\[C\Big(f (\mu f), \int_b b^{C(f b, b)}\Big)\]
is a member of
\[\int_b C\Big(f (\mu f), b^{C(f b, b)}\Big)\]
Using the definition of the power
\[ C(x, a^s) \cong Set(s, C(x, a)) \]
we get
\[\int_b Set\Big(C(f b, b), C\big( f (\mu f), b\big) \Big)\]
Using Yoneda lemma we replace $b$ with $f (\mu f)$ (not really!)
\[C(f (f (\mu f)), f (\mu f)) \]
\subsection{Terminal coalgebra structure map}
\[k \colon \nu f \to f (\nu f)\]
is a member of
\[ C\Big( \int^a C(a, f a) \cdot a, f (\nu f) \Big)\]
\[ \int_a C\Big( C(a, f a) \cdot a, f (\nu f) \Big)\]
Using the definition of the copower
\[ C(s \cdot a, x) \cong Set(s, C(a, x))\]
we get
\[ \int_a Set\Big( C(a, f a), C\big( a, f (\nu f) \big) \Big)\]
Yoneda lemma (not really!)
\[ C(f(\nu f), f ( f (\nu f))) \]
\subsection{Kan extensions}
\[\mu f = \int_a a^{C(f a, a)}\]
\[\nu f = \int^a C(a, f a) \cdot a \]
These formulas are reminiscent of Kan extensions.
For comparison, the right Kan extension of $g$ along $f$ is given by
\[(Ran_f g) c = \int_a (g a)^{C(c, f a)}\]
The left Kan extension is
\[(Lan_f g) c = \int^a C(f a, c) \cdot g a \]
If $f$ has left and right adjoints, they are given by
\[Ran_f Id \dashv f \dashv Lan_f Id\]
In particular, using the adjunction
\[(Lan_f Id) c = \int^a C(a, (Lan_f Id) c) \cdot a\]
This shows that $(Lan_f Id) c$ is a fixed point of the functor
\[ \Phi(x) = \int^a C(a, x) \cdot a \]
\subsection{Ends as limits}
Twisted arrow category on $\textit{Tw}(\Cat C)$ has, as objects, morphisms in $\Cat C$ (or, strictly speaking, triples $(a, b, f \colon a \to b)$). A morphism from $f \colon a \to b$ to $g \colon a' \to b'$ is a pair of morphisms
\[(h \colon a' \to a, h' \colon b \to b')\]
For every profunctor $p \colon C^{op} \times C \to \Cat{Set}$ define a functor $\bar p \colon \textit{Tw}(\Cat C) \to Set$. On objects
\[\bar p (a, b, f) = p a b\]
and on morphisms, it's just profunctor lifting.
It can be shown that the end is just a limit over the twisted arrow category
\[\int_c p c c \cong \lim_{Tw(C)} \bar p\]
Similarly, the coend is a colimit over $Tw(C^{op} )^{op}$
\[\int^c p c c \cong \underset {Tw(C^{op})^{op}} { \mbox{colim}} \bar p\]
\subsection{Iterative solution}
Terminal coalgebra is a limit, and initial algebra is a colimit of these two chains
\begin{figure}[H]
\centering
\begin{tikzcd}
f (\nu f)
\\
\nu f
\arrow[u, "k"]
\arrow[d, "\pi_1"]
\arrow[dr, "\pi_{(f 1)}"]
\arrow[drr, bend left, "\pi_{(f^2 1)}"]
\\
1
& f 1
\arrow[l, "\mbox{!`}"]
& f^2 1
\arrow[l, "f \mbox{!`}"]
& ...
\arrow[l, dashed]
\\
0
\arrow[u, "!"]
\arrow[r, "!"]
\arrow[d, ""]
\arrow[d, "\iota_0"]
&f 0
\arrow[u, "f !"]
\arrow[r, "f !"]
\arrow[dl, "\iota_{(f 0)}"]
&f^2 0
\arrow[u, "f^2 !"]
\arrow[r, dashed]
\arrow[dll, bend left, "\iota_{(f^2 0)}"]
& ...
\\
\mu f
\arrow[uuu, bend left, "\varphi"]
\\
f (\mu f)
\arrow[u, "j"]
\end{tikzcd}
\end{figure}
\end{document}
\maketitle{}