Commit 4d99b36c authored by Han-Miru Kim's avatar Han-Miru Kim
Browse files

CAlg lec 2

parent c59f9295
#+TITLE: Commutative Algebra - README
#+AUTHOR: Han-Miru Kim
#+PROPERTY: header-args :tangle ./header.tex
* About
This file contains general information about the lecture notes aswell as the configuration for my Commutative Algebra notes.
** Structure
This file is an Emacs Org Mode file which is edited and then /tangled/ with the ~header.tex~ file, which I do not touch manually.
The benefit of this is that comments, which would have been written in plaintext inside ~header.tex~ can now be written using Org Mode Formatting, allowing for literate configuration.
For example, I can use headings, use formatted text, insert tables, source code blocks or even images, which would not be possible in LaTeX comments.
I structure my notes as follows:
Instead of a ~main.tex~ file, I have a ~main.org~ file which I then export to latex via ~M-x org-export-dispatch l o~.
Since I have just started using Emacs, my configuration does not quite allow me to take notes in real-time.
This means I still take my notes in Vim by writing ~.tex~ files and putting them in the ~./files~ directory, from where they will be sourced and can be compiled using my existing vim-tex setup.
** How to use
After changing the configuration, place the point at the top of this document (~g g~ in evil-normal mode) and do ~C-c C-c~ to refresh. Then execute ~M-x org-babel-tangle~, which will update ~header.tex~.
It should output ~Tangled n code blocks from README.org~
To use source code blocks without having them exported to ~header.tex~, use the ~:tangle no~ option.
** TODO
- I plan on trying out a language-agnostic solution where I can export this document to ~.html~ format and upload it on my webpage.
- As of now, I use different configuration files for every lecture. This means that there is alot of code redundancy as the configuration only differs by about 5% (if at all) between different lecture notes.
But since the README.org files are only a couple kilobytes in size each, I should be fine.
* Package Imports
** Font Settings
#+BEGIN_SRC latex
\usepackage[utf8]{inputenc}
\usepackage{lmodern} % Latin Modern
\usepackage{fontenc}[t1]
\usepackage{microtype}
#+END_SRC
** Content
#+BEGIN_SRC latex
\usepackage{caption}
\usepackage{enumerate}
\usepackage{hyperref}
%\usepackage{wrapfig}
\usepackage{array}
\newcolumntype{L}{>{$}l<{$}} % math mode l
\usepackage[framemethod=TikZ]{mdframed}
\usepackage[customcolors,norndcorners]{hf-tikz}
#+end_src
** Page Settings
#+BEGIN_SRC latex
\usepackage{geometry}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\hoffset = -0.45 in
\voffset = -0.3 in
\textwidth = 500pt
\textheight = 650pt
\setlength{\headheight}{25.6pt}
\setlength{\headwidth}{500pt}
\setlength{\parindent}{0pt}
\marginparwidth = 0pt
\fancyhead[L]{\rightmark}
\fancyhead[R]{\today}
\fancyfoot[L]{Han-Miru Kim}
\fancyfoot[C]{\href{mailto:kimha@ethz.ch}{kimha@ethz.ch}}
\fancyfoot[R]{\thepage}
#+END_SRC
** Math
The ~amsmath~ and ~amssymb~ form a basic collection of mathematic packages.
Insert more explanations here.
#+BEGIN_SRC latex
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{dsfont}
\usepackage{amsfonts}
\usepackage{mathdots}
\usepackage{mathrsfs}
\usepackage{bm} % bold math
\usepackage{empheq} % colored equations
\usepackage[most]{tcolorbox}
\usepackage{mathtools}
\usepackage{faktor} % Quotients
\usepackage{xcolor}
\usepackage{stmaryrd}
\let\tempphi\phi
\let\phi\varphi % curly
\let\varphi\phi % ugly
#+END_SRC
The last three lines swap the commands ~\phi~ and ~\varphi~.
I do this becuase curly one (now ~\phi~) looks much than the default.
** Graphics
#+BEGIN_SRC latex
\usepackage{graphicx}
\usepackage{tikz}
\usetikzlibrary{cd}
#+END_SRC
** Formatting
Packages for sectioning and positioning.
#+BEGIN_SRC latex
\usepackage{sectsty}
\sectionfont{\LARGE}
\subsectionfont{\Large}
\subsubsectionfont{\large}
\paragraphfont{\large}
%\usepackage{adjustbox} %\adjustbox{scale=2,center}{}
%\usepackage{paracol}
\usepackage{float}
#+END_SRC
* Macros
** Symbols
~\DeclareMathOperator~ defines commands that print out with the standard text-font over the italic math-fonts used for variables etc.
#+BEGIN_SRC latex
\newcommand{\N}{\mathbb{N}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\IS}{\mathbb{S}}
\newcommand{\ID}{\mathbb{D}}
\newcommand{\IT}{\mathbb{T}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\K}{\mathbb{K}}
\newcommand{\F}{\mathbb{F}}
\newcommand{\IP}{\mathbb{P}}
\DeclareMathOperator{\charac}{char}
\DeclareMathOperator{\degree}{deg}
\newcommand{\del}{\partial}
\newcommand{\es}{\text{\o}}
#+END_SRC
** Delimiters
#+BEGIN_SRC latex
\DeclarePairedDelimiter\abs{\vert}{\vert}
\DeclarePairedDelimiter\ceil{\lceil}{\rceil}
\DeclarePairedDelimiter\floor{\lfloor}{\rfloor}
\DeclarePairedDelimiter\Norm{\vert\vert}{\vert\vert}
\DeclarePairedDelimiter\scal{\langle}{\rangle}
\DeclarePairedDelimiter\dbrack{\llbracket}{\rrbracket}
#+END_SRC
** Math Operators
#+BEGIN_SRC latex
% Algebra
\newcommand{\iso}{\cong}
\newcommand{\mono}{\rightarrowtail}
\newcommand{\epi}{\twoheadrightarrow}
\DeclareMathOperator{\Bil}{Bil}
\DeclareMathOperator{\ev}{ev}
\DeclareMathOperator{\Hom}{Hom}
\DeclareMathOperator{\Ker}{Ker}
\DeclareMathOperator{\Image}{Im}
\DeclareMathOperator{\spn}{span}
\DeclareMathOperator{\rank}{rank}
\DeclareMathOperator{\rang}{rang}
\DeclareMathOperator{\id}{id}
\DeclareMathOperator{\End}{End}
\DeclareMathOperator{\Eig}{Eig}
\DeclareMathOperator{\Hau}{Hau}
\DeclareMathOperator{\trace}{tr}
\DeclareMathOperator{\rot}{rot}
\DeclareMathOperator{\ad}{ad}
\DeclareMathOperator{\Mat}{Mat}
\DeclareMathOperator{\GL}{GL}
\DeclareMathOperator{\lcd}{lcd}
\DeclareMathOperator{\ggT}{ggT}
\DeclareMathOperator{\Aut}{Aut}
\DeclareMathOperator{\sgn}{sgn}
% Cat
\newcommand*{\Top}{\text{\sffamily Top}}
\newcommand*{\Htpy}{\text{\sffamily Htpy}}
\newcommand*{\Grp}{\text{\sffamily Grp}}
\renewcommand*{\Vec}{\text{\sffamily Vec}}
\newcommand*{\Set}{\text{\sffamily Set}}
\newcommand*{\Ring}{\text{\sffamily Ring}}
\DeclareMathOperator{\Nat}{Nat}
%\newcommand{\coprod}{\amalg}
% Analysis
\DeclareMathOperator{\grad}{grad}
\DeclareMathOperator{\graph}{graph}
\DeclareMathOperator{\supp}{supp}
% Formatting
\newsavebox\MBox
\newcommand\cunderline[2][red]{ % Colored underline
{\sbox\MBox{$#2$}%
\rlap{\usebox\MBox}\color{#1}\rule[-1.2\dp\MBox]{\wd\MBox}{0.5pt}}
}
#+END_SRC
* Environments
** Default Environemnts
Changing the behaviour of the ~enumerate~ environment to use letters over roman numerals.
#+BEGIN_SRC latex
\renewcommand{\labelenumi}{(\alph{enumi})}
#+END_SRC
** Theorem
Define the environments using the ~amsthm~ package.
They are easy to set up and respect the section numbering, but I prefer the fancy coloured boxes using ~mdframed~.
#+BEGIN_SRC latex
%\newtheorem{thm}{Theorem}[section]
%\newtheorem{cor}{Corollary}[thm]
%\newtheorem{lem}[thm]{Lemma}
%\newtheorem{prop}{Proposition}[thm]
%\theoremstyle{definition}
%\newtheorem{dfn}[thm]{Definition}
%\newtheorem{rem}[thm]{Remark}
%\newtheorem{note}[thm]{Note}
%\newtheorem{ex}[thm]{Example}
#+END_SRC
** Math boxes
From https://tex.stackexchange.com/questions/20575/attractive-boxed-equations:
Requires the the ~empheq~ and ~tcolorbox~ packages.
Makes the cool blue equation boxes.
#+BEGIN_SRC latex
\newtcbox{\bluebase}[1][]{%
nobeforeafter, math upper, tcbox raise base,
enhanced, colframe=black,
colback=blue!20, boxrule=0.5pt,
sharp corners,
#1
}
#+END_SRC
You can then write the equations as follows
#+BEGIN_SRC latex :tangle no
\begin{empheq}[box=\bluebase]{align*}
\nabla \cdot E = \frac{\rho}{\epsilon_0}
\end{empheq}
#+END_SRC
** Fancy Boxes
*** Setup
Taken from this [texblog post](https://texblog.org/2015/09/30/fancy-boxes-for-theorem-lemma-and-proof-with-mdframed/)
Setup numbering system and define a function that creates environment.
~\newenvironment~ takes one optional and three necessary arguments.
- The environment name (that which is put inside ~\begin{###}~)
- The Title name which is printed on the page
- The colour of the box. I use colors in the format ~blue!50!green!50~ etc.
#+BEGIN_SRC latex
\newcounter{theo}[section]
\renewcommand{\thetheo}{\arabic{section}.\arabic{theo}}
\newcommand{\defboxenv}[3]{
\newenvironment{#1}[1][]{
\refstepcounter{theo}
\ifstrempty{##1} { % no Title
\mdfsetup{
frametitle={
\tikz[baseline=(current bounding box.east), outer sep=0pt]
\node[anchor=east,rectangle,fill=#3]
{\strut #2~\thetheo};
}
}
}{ % else: with Title
\mdfsetup{
frametitle={
\tikz[baseline=(current bounding box.east),outer sep=0pt]
\node[anchor=east,rectangle,fill=#3]
{\strut #2~\thetheo:~##1};
}
}
} % either case
\mdfsetup{
linecolor=#3,
innertopmargin=0pt,
linewidth=2pt,
topline=true,
frametitleaboveskip=\dimexpr-\ht\strutbox\relax,
}
\begin{mdframed}[]\relax
}{ % post env command
\end{mdframed}
}
}
#+END_SRC
*** Environments
#+BEGIN_SRC latex
\defboxenv{dfn}{Definition}{orange!50}
\defboxenv{edfn}{(Definition)}{orange!20}
\defboxenv{thm}{Theorem}{blue!40}
\defboxenv{lem}{Lemma}{blue!20}
\defboxenv{cor}{Corollary}{blue!30}
\defboxenv{xmp}{Example}{green!50!blue!30!white}
\defboxenv{exr}{Exercise}{black!30}
\defboxenv{rem}{Remark}{red!20}
#+END_SRC
\section*{About}
The lecture content is mostly guided by Antoine Chamber-Loir's Book (Mostly) Commutative Algebra.
We will not follow it one-to-one, but chapter numbers will be provided on the go.
There will be some extra topics covered that are not in the book.
Definitions and theorems enclosed with parenthesis are not part of the lecture and (mostly) come from the exercise sheets.
\section{Overview}
\subsection{Introduction/Motivation}
\subsubsection*{What is it?}
Commutative Algebra is the study of commutative Rings and related objects such as ideals, modules etc.
We will use the convention that rings, (unless specified otherwise) are all commutative with unit.
We will also require that ring morphisms preserve the unit.
In particular, $2\Z \subseteq \Z$ is not a ring and $\Z \to \Z, x \mapsto 0$ is not a morphism of rings.
\subsubsection*{Why study this?}
One reason to study commutative algebra is that it is the ``local'' side of algebraic geometry, which is the study of geometric objects such as solution sets of systems of polynomial equations.
One reason to study those is that they are a natural generalisation of linear algebra.
However there are other good motivations, such as the tensor product which proves itself as a universally useful construction.
\subsubsection*{What are some results?}
\begin{thm}[Hilbert/Noether]
Let $n \geq 1$ be an integer.
Let $(P_i)_{i \in I}$ be a family of polynomials $P_i \in \C[X_{1}, \ldots, X_{n}]$ with $I$ arbitrary.
There exist finitely many polynomials $Q_{1}, \ldots, Q_{l} \in \C[X_{1}, \ldots, X_{n}$ such that both families shares the same solution set i.e.
\begin{align*}
\left\{x = (x_{1}, \ldots, x_{n}) \in \C^{n} \big\vert \forall i \in I: P_i(x) = 0\right\}
=
\left\{x \in \C^{n} \big\vert \forall j \in \{1, \ldots, l\}: Q_i(x) = 0\right\}
\end{align*}
\end{thm}
\begin{exr}[]
Prove this result if all $P_i$ have degree $\leq 1$.
\end{exr}
Suppose I give you five polynomials in five variables.
The first question one might ask if there exist any solutions.
What Hilbert proved was that if there is not solution, then there has to be an ``obvious'' solution.
By just algebraic manipulation of the equations, we should be able to prove that $1 = 0$ and find the contradiction.
\begin{thm}[Hilbert's Nullstellensatz]
Let $n \geq 1, m \geq 0$ and $P_{1}, \ldots, P_{m} \in \C[X_{1}, \ldots, X_{n}]$.
Then there always exists a $x \in \C^{n}$ suc that $P_i(x) = 0$ for all $i = 1, \ldots, m$
\textbf{unless}
there exist $Q_1,\ldots,Q_m$ such that
$P_1Q_1 + \ldots + P_mQ_m = 1$.
\end{thm}
The contradiction lies in that fact that when we plug in the common solution $x$, we end up with $0 = 1$.
\begin{exr}[]
Prove this result in the case $\deg P_i \leq 1$.
\end{exr}
Hilbert's Nullstellensatz fails for $\R$.
We need to use that $\C$ is algebraically closed.
Consider for example $P = X^{2} + 1 \in \R[X]$.
The following theorem about recurrent sequences was proven in three steps.
\begin{thm}[Skolem-Mahler-Lech]
Let $\left(u_{n}\right)_{n \in \N}$ be a sequence of complex numbers such that there exist some $k \geq 1$ such that
\begin{align*}
\forall n \geq 0: u_{n+k} + a_1 u_{n+k-1} + \ldots + a_k u_n = 0
\end{align*}
with $a_i \in \C$.
Then the set
\begin{align*}
N = \{n \geq 0 \big\vert u_n = 0\}
\end{align*}
is a finite union of sets of the form
\begin{align*}
A_{a,b} = \{am + b \big\vert m \in \N\}
\end{align*}
\end{thm}
An example of such a set would be the set of odd numbers or the numbers with remainder $12$ modulo $17$.
The fibonnaci sequence is such an example as it satisfies $u_{n+1} - u_{n+1} - u_{n} = 0$.
\subsection{Some quick guidelines}
There are many definitions that at by themselves aren't hard to understand, but often seem unmotivated at first sight.
However that is not the case. Many of the concepts we introduce are motivated by the following:
\begin{center}
We want to study more complicated objects using properties of simple ones we understand well.
In the case of Commutative Algebra, we understand linear algebra quite well. For example we know what a dimension of a kernel of a linear map is.
The generalisation is the Krull dimension.
The second object we understand well are PID's such as $K[X]$ or $\Z$.
\end{center}
\subsection{Reminders and Notation}
\begin{itemize}
\item The natural numbers should index the possible dimensions of vector spaces. Since $\{0\}$ is a vector space. $\N$ should contain $0$. $\N = \{0,1,2,\ldots\}$
\item For a ring $R$, we denote the group of units by $R^{\times}$.
\item An element $x \in R$ is \textbf{nilpotent}, if $\exists n \in \N: x^{n} = 0$
\item A ring called \textbf{reduced}, if it has no non-zero nilpotent elements.
\item An $R$-module $M$ is an abelian group $(M,+)$ with ring-multiplication
\begin{align*}
R \times M \to M, (x,m) \mapsto x \cdot m
\end{align*}
such that $1_R \cdot m = m, 0_R \cdot m = 0_M, x \cdot 0_M = 0_M$.
With distributivity and associativity.
\item An ideal $I \subseteq R$ is an $R$-submodule of $R$.
From this point of view, it is more flexible to study modules instead of ideals.
\item Let $I \subseteq R$ be an ideal. The following are equivalent
\begin{itemize}
\item $I$ is \textbf{prime}.
\item $I \neq R$ and $R/I$ is an inegral domain
\item $I \neq R$ and $rs \in I \implies$ $r \in I$ or $s \in I$.
\end{itemize}
\item The following are equivalent:
\begin{itemize}
\item $I \subseteq R$ is \textbf{maximal}
\item $R/I$ is a field.
\item $I \neq R$ and there is no ideal other than $R$ and $I$ itself that contains $I$.
\end{itemize}
\end{itemize}
\subsubsection*{Facts}
\begin{itemize}
\item If $f: R \to S$ is a ring morphism, $P \subseteq S$ is a prime ideal, then $f^{-1}(P)$ is also prime.
To prove it, all we need is to see that $f$ induces an injective map $\faktor{R}{f^{-1}(P)} \stackrel{f}{\hookrightarrow} \faktor{S}{P}$.
This fact is false for maximal ideals. Consider the inclusion map $f: \Z \hookrightarrow \Q$.
As $\Q$ is a field $\{0\}$ is a maximal ideal, but $f^{-1}(\{0\}) = \{0\}$ is not.
\item Krull: Let $I \neq R$ be an ideal of $R$. Then there exists a maximal ideal containing $I$. (See [ACL p. 57]
\end{itemize}
\begin{dfn}[Algebra]
Let $R$ be a ring.
An \textbf{algebra over $R$} (or $R$-algebra) is a ring-morphism $\phi: R \to S$.
Often, we just say that $S$ is an $R$-algebra and call $\phi$ the \emph{structure morphism} of the algebra.
If $R \stackrel{\psi}{\to}T$ is another $R$-algebra, a morphism of $R$-algebras is a ring homomorphism $f: S \to T$ such that the following diagram commmutes
\begin{center}
\begin{tikzcd}[column sep=0.8em]
S \arrow[]{rr}{f}&& T\\
& R \arrow[]{ul}{\phi} \arrow[swap]{ur}{\psi}
\end{tikzcd}
\end{center}
\end{dfn}
In practice: We can multiply elements of $S$ by those of $R$ by writing
\begin{align*}
r \cdot s := \phi(r) s
\end{align*}
using this notion, then $f: S \to T$ is an $R$-algebra morphism if and only if
\begin{align*}
\forall r \in R: \quad
f(r \cdot s) = f( \phi(r) s) = f(\phi(r)) f(s) = \psi(r) f(s) = r \cdot f(s)
\end{align*}
\begin{xmp}[]
\begin{enumerate}
\item Any ring $S$ is a $\Z$-algebra, where the structure morphism $\Z \mapsto S$ is uniquely determined, because
\begin{align*}
1 \mapsto 1_S \implies n \mapsto \underbrace{1_S + \ldots + 1_S}_{n \times}
\end{align*}
What this means in practice is that if some theorem holds for algebras, then it also holds for rings.
\item If $R \subseteq R$ is a subring, then $S$ is an $R$-algebra, where the structure morphism is the inclusion mapping.
In particular, $\C$ is an $\R$-algebra and a $\Q$-algebra. More generally, if $L/K$ is a field extension, then $L$ is a $K$-algebra.
\item Warning! On a given ring $S$, there may be more than on $R$-algebra structure on $S$ (structure morphisms $R \to S$)
For example $\C$ can be seen as $\C$-algebra with the following strucutre morphisms:
\begin{align*}
z \cdot w = zw (\phi(z) = z), \quad z \cdot w = \overline{z} (\phi(z) =\overline{z})
\end{align*}
more generally, every automorphism defines a structure morphism.
\end{enumerate}
\end{xmp}
\section{The language of Categories and Functors [ACL A.3]}
When looking at common features ``mathematical strucutres'' such as Groups, Fields, Top. Spaces, Hilbert spaces, etc., one finds that it is very hard to define them using the common method of specifying properties of subsets of sets, or sets of subsets of sets etc.
The Eilenberg-MacLane notion of a category is as follows:
\begin{dfn}[Category]
A category $\textsf{C}$ consists of the following data:
\begin{itemize}
\item A ``collection'' of \textbf{objects} $X$ of $\textsf{C}$.
\item For any objects $X,Y$ of $\textsf{C}$, we define a \emph{set} $\Hom_{\textsf{C}}(X,Y)$ of \textbf{morphisms} from $X$ to $Y$ in $\textsf{C}$.
Instead of writing $f \in \Hom(X,Y)$, we will usually write $X \stackrel{f}{\to}Y$ or $f: X \to Y$.
\item For every object $X$ of $\textsf{C}$, there exists an \textbf{identity-morphism} $\id_X: X \to X$.
\item Morphisms can be composed. For objects $X,Y,Z$, there exists a map
\begin{align*}
\Hom_{\textsf{C}}(X,Y) \times \Hom_{\textsf{C}}(Y,Z) &\to \Hom_{\textsf{C}}(X,Z)\\
(g,f) &\mapsto f \circ g
\end{align*}
\begin{center}
\begin{tikzcd}[ ]
X \arrow[]{r}{g} \arrow[bend left]{rr}{f \circ g}& Y \arrow[]{r}{f}& Z
\end{tikzcd}
\end{center}
\end{itemize}
This data must respect the following axioms.
\begin{itemize}
\item Identity laws:
$
\id_Y \circ f = f \quad g \circ \id_x = g
$
\item Composition is associative: $f \circ (g \circ h) = (f \circ g) \circ h$
\end{itemize}
\end{dfn}
\begin{rem}[]
We are intentionally being obtuse when talking about ``collection'' of objects.
The reason is that we want to talk about the ``collection'' of \emph{all} sets.
Using the normal set theory we know from the first semester, we quickly run into problems as there is no such thing as a set of all sets.
There are a number of solutions to this though.
\begin{itemize}
\item There are set theories that make use of \emph{classes} to enlarge the notion of set.
\item Restrict what sets we are allowed to talk about. For example using \emph{Grothendieck universes}.
\item Ignore the problem.
\end{itemize}
We will chose the third option.
If you still feel unfomfortable, one can say that there is some logical formuale $\Phi_{\textsf{C}}(X)$ in one variable, which evaluates to \texttt{true}, if $X$ is an object in the category $\textsf{C}$.
\end{rem}
\begin{xmp}[]
When we say that something is a category, we usually specify what the objects are and what the morphisms (and composition) look like.
Feel free to skip those you are not familiar with.
\begin{itemize}
\item The category of sets $\Set$, where the objects are sets and morphisms are functions.
\item The category $\Grp$, where the objects are groups and morphisms are group homomorphisms.
\item $\Top$ the category of topological spaces, where the objects are topological spaces (with their topology) and where the morphisms are \emph{continuous} functions.
\item $\Top_{\ast}$, with Topological spaces with a basepoint $(X,\tau,x_0)$ as objects and where the morphisms are continous, base-point preserving functions.
\item $\Ring$ with Rings as objects and ring homomorphisms as morphisms.
\item Given a fixed ring $R$, the category $R-\textsf{Mod}$ of $R$-modules and linear maps.
\item \textsf{Graph} has graphs as objects and graph homomorphisms as morphisms.
\item For a fixed field $K$, the category $\textsf{Vec}_K$ has $K$-vector spaces as objects with linear maps as morphisms.
\item One rather weird category is the category of fields with field homomomorphisms.
\end{itemize}
The examples above are categories were objects were \emph{sets with structure} and the morphisms were \emph{structure preserving} maps.
But the objects need not be sets, and morphisms need not be functions!
\begin{itemize}
\item The trivial category, which consists of a single object $\ast$ and its identity morphism $\ast \stackrel{\id}{\to} \ast$.
\item A group (or monoid) $(G,\cdot,e)$ can be viewed as a category with a single object $\ast$, where the morphisms $g: \ast \to \ast$ are the elements $g \in G$ and where composition of morphisms is defined as the multiplication in $G$: $g \circ h := g \cdot h$.
\item A poset $(P,\leq)$ is a category where the objects are the elements of $P$ and there exist unique morphisms $x \to y$ if and only if $x \leq y$.
\item \textsf{Hask}, the idealized cateogory of Haskell types and functions.
\item Given a category $\textsf{C}$, we can talk about its \textbf{arrow category}, where the objects are morphisms $(X \stackrel{f}{\to} Y)$ in $\textsf{C}$ and a morphism between objects $(X \stackrel{f}{\to} Y), (X' \stackrel{g}{\to}Y')$ are pairs of $\textsf{C}$-morphisms $\alpha: X \to X'$ and $\beta: Y \to Y'$ such that the following diagram commutes:
\begin{center}
\begin{tikzcd}[ ] %\arrow[bend right,swap]{dr}{F}
X \arrow[]{r}{f} \arrow[]{d}{\alpha}& Y \arrow[]{d}{\beta}\\
X' \arrow[]{r}{g}& Y'
\end{tikzcd}
\end{center}
i.e. such that $g \circ \alpha = \beta \circ f$.
\end{itemize}
\end{xmp}
In general, always specify what category you are working in.
The real numbers $\R$ are a Set, Topological space, Group, Field, Poset etc.
\begin{rem}[]
We say that a triangle
\begin{tikzcd}[column sep=0.8em]
& \cdot \arrow[]{dr}{h}\\
\cdot \arrow[]{ur}{g}
\arrow[]{rr}{f}
& & \cdot
\end{tikzcd}
\textbf{commutes}, if $g \circ h = f$.
A diagram is commutative, if every triangle of that diagram commutes.
This includes non-obvious triangles, such as those formed by morphisms obtained through composition or the identity morphisms.
\end{rem}
\subsection{Functors and Natural transformations}
\begin{dfn}[Functor]
Let $\textsf{C},\textsf{D}$ be categories.
A \textbf{functor} $F$ from $\textsf{C}$ to $\textsf{D}$, denoted $F: \textsf{C} \to \textsf{D}$ is a rule assigning
\begin{enumerate}
\item an object $F(X)$ of $\textsf{D}$ for any objects $X$ of $\textsf{C}$
\item A morphism $F(f): F(X) \to F(Y)$ to any morphism $f: X \to Y$.