\documentclass[../Main.tex]{subfiles}
\begin{document}
\begingroup
\renewcommand*{\E}{\ensuremath{\mathrm{E}}\xspace}
\newcommand*{\LF}{\ensuremath{\mathrm{L}}\xspace}
\newcommand*{\RF}{\ensuremath{\mathrm{R}}\xspace}
\renewcommand*{\d}{\ensuremath{\mathbf{d}}\xspace}
\section{Algebraic Weak Factorization Systems}
In this section, we will revisit the basic ideas of algebraic weak factorization systems (awfs).
We won't use them much explicitly through this paper, but we need one major result about them.
Also, while we don't talk about them explicitly, their ideas permeate through most of the arguments.
We will only repeat the most basic definitions and ideas, which will be enough to understand
this document. For a much more complete and in depth discussion, see
\cites{riehlAlgebraicModelStructures2011}{bourkeAlgebraicWeakFactorisation2016}{bourkeAlgebraicWeakFactorisation2016a}.
This introduction follows the approach of \cite[Section 2]{riehlAlgebraicModelStructures2011}.
If the reader is already familiar with this concept, they might safely skip this section.

We start this section with some observations about regular functorial weak factorization systems (wfs).
For the remainder of this section we write \({\E : \A^→ → \A^𝟛}\) as the factorization functor of some functorial
wfs \((\L,\R)\). We are going to write \(\d^0 , \d^2 : \A^𝟛 → A^→\) for the functors induced by \(d_0, d_2 : 𝟚 → 𝟛\).
\LF and \RF for the endofunctors \(\A^→ → \A^→\) that are given by
\(\d^2\E\) and \(\d^0\E\), the projection to the left or right factor of the factorization.
For a given \(f : X → Y\), we call the factoring object \(\E_f\).
\begin{eqcd*}[column sep =small]
	& \E_f \arrow[rd,"\RF(f)"] & \\
	X \arrow[rr,"f"] \arrow[ru,"\LF(f)"] & & Y
\end{eqcd*}

For now, we are interested in witnessing if some map is in the right class (or dually left class). Or in other words,
attaching some kind of data to a right map from which we could deduce all solutions of the required lifting
problem. This is indeed possible. Assume that \(f\) is a right map, then a retraction \(r_f\) of \(\LF(f)\) would suffice.
Assume we had some left map \(f'\) and a lifting problem given by \((g,h)\). We can then factor this with the help of \E.
\begin{eqcd*}[row sep=huge, column sep=huge]
	X' \arrow[dd,"f'"', bend right] \arrow[d,"\LF(f')"] \arrow[r,"g"] & X \arrow[d,"\LF(f)"] \arrow[dd,"f",bend left=50]\\
	\E_{f'} \arrow[d,"\RF(f')"] \arrow[r, "ϕ_{g,h}"] & \E_f \arrow[d,"\RF(f)"] \arrow[u, "r_f", bend left]\\
	Y' \arrow[r,"h"] \arrow[ur, dashed] & Y
\end{eqcd*}
And then compose the solution for the whole lifting problem from the lifting of the problem \((g L(f), h)\) with
\(r_f\). That this is a solution is guaranteed by \(r_f\) being a retract \(r_f L(f) = \id\). Dually we can
witness \(f'\) being a left map by supplying a split \(s_{f'}\) of \(R(f')\). If we did both at the same time
we automatically get a canonical choice of lifts.
\begin{eqcd}[row sep=huge, column sep=huge] \label{eq:coalgebraliftsalgebra}
	X' \arrow[dd,"f'"', bend right=50] \arrow[d,"\LF(f')"] \arrow[r,"g"] & X \arrow[d,"\LF(f)"] \arrow[dd,"f",bend left=50]\\
	\E_{f'} \arrow[d,"\RF(f')"'] \arrow[r, "ϕ_{g,h}"] & \E_f \arrow[d,"\RF(f)"'] \arrow[u, "r_f", bend left]\\
	Y' \arrow[r,"h"] \arrow[u, bend right, "s_{f'}"'] & Y
\end{eqcd}
Namely for a lifting problem \((g,h)\) the map \(r_f ϕ_{g,h} s_{f'}\), and if we make \(r_f\) and \(s_{f'}\) part of the
data of a right- (left-) map the chosen lifts are even functorial.
The next question one might rightfully ask, if we can always find such a witness. And the answer is happily yes.
We just need to make up the right lifting problem.
\begin{equation*}
	\begin{tikzcd}[ampersand replacement=\&,column sep = large, row sep = large]
		X' \arrow[d,"f'"'] \arrow[r,"\LF(f')"]\& \E_{f'} \arrow[d, "\RF(f')"] \& \& X \arrow[r,equal] \arrow[d,"\LF(f)"'] \& X \arrow[d,"f"] \\
		Y' \arrow[r,equal] \arrow[ru, "s_{f'}", dashed] \& Y' \& \& \E_f \arrow[r,"\RF(f)"] \arrow[ru,dashed,"r_f"] \& Y
	\end{tikzcd}
\end{equation*}
We can also repack this information in a slightly different way, \(f\) is a right map exactly if \(f\) is a retract of
\(\R(f)\) in \(\faktor{\A}{Y}\). And \(f'\) is a left map precisely if \(f'\) is a retract of \(\LF(f)\) in \(\faktor{X'}{\A}\).
\begin{eqcd*}
		X
			\arrow[d,"f"]
			\arrow[r, "\LF(f)"]
		&	E_f
			\arrow[d, "\RF(f)"]
			\arrow[r, "r_f", dashed]
		& X
			\arrow[d, "f"]
		&
		& X'
			\arrow[d,"f'"]
			\arrow[r, equal]
		& X'
			\arrow[r, equal]
			\arrow[d, "\LF(f)"]
		& X'
			\arrow[d, "f'"]
	\\
		Y
			\arrow[r,equal]
		& Y
			\arrow[r, equal]
		& Y
		&
		& Y'
			\arrow[r, "s_{f'}", dashed]
		& E_{f'}
			\arrow[r, "\RF(f')"]
		& Y'
\end{eqcd*}
If we focus on the diagram at the left-hand side, we can also see it as a morphism \(η_f : f → \RF(f)\) in \(\A^→\), completely dictated
by \(\E\) and thus natural in \(f\), and a morphism \(α : \RF(f) → f\), such that \(αη_f = \id\). 
If we reformulate what we have just observed, we get to the following.
\begin{observation}
	In a functorial wfs \((\L,\R)\) on \A, \(\LF : \A → \A \) is a copointed endofunctor and \RF is pointed endofunctor,
	where the counit \(ε : \LF → \Id\)  is given by the squares \(ε_f ≔
	\begin{tikzcd}
		\cdot \arrow[d,"\LF(f)"] \arrow[r,equal] & \cdot \arrow[d,"f"]\\
		\cdot \arrow[r,"\RF(f)"] & \cdot
	\end{tikzcd}
	\)
	and the unit \(η : \Id → \RF\) by \( η_f ≔
	\begin{tikzcd}
		\cdot \arrow[d,"f"] \arrow[r,"\LF(f)"'] & \cdot \arrow[d,"\RF(f)"'] \\
		\cdot \arrow[r,equal] & \cdot
	\end{tikzcd}
	\). \L is precisely the class of \LF-coalgebras and \R the class of \RF-algebras.
\end{observation}%
One should think of these (co)algebras as morphism with a choice of liftings.
At this point, we might try to get rid of the wfs \((\L,\R)\) as input data and might to try to recover it from the
factorization functor. And that works described by the methods above, but only if we know that this factorization
functor comes from a wfs. If we just start with an arbitrary factorization functor, we still get that all
\RF-algebras right lift to all \LF-algebras and vice versa,
but in general \(\RF(f)\) will not be a \RF-algebra.
One way to solve this problem is by adding a second natural transformation \(\RF\RF → \RF\), such that
the neccessary data commute, making \RF a monad (and dually \LF a comand).

\begin{definition}\label{def:awfs:awfs}
	An \emph{algebraic weak factorization system (awfs)} is given by a functor \(\E : \A^→ → \A^𝟛\) and two natural transformations
	\(δ\) and \(μ\). We write \((\LF,ε)\) where \(\LF ≔ \d^2\E\) and \((\RF,η)\) where \(\RF ≔ \d^0\E\) for the two induced
	pointed endofunctors \(\A^→ → \A^→\). We require that \((\LF,ε,δ)\) is a comonad and \((\RF,η,μ)\) is a monad.\footnote{%
	Most modern definitions require additionaly that a certain induced natural transformation to be a distributive law of the comonad
	over the monad. While we recognise its technical important,but we feel that it is distracting from our goal to get the
	general ideas across.}
\end{definition} \todo{this definition is terrible but i can't get it into nice sounding sentence}
\begin{notation}
	If the rest of the data is clear from context we will only specify the comonad and monad and say \((\LF,\RF)\) to be an
	algebraic weak factorization system.
\end{notation}

\begin{remark}\label{rem:awfs:retractClosure}
	Neither the \LF-coalgebras nor the \RF-algebras are in general closed under retracts, if we think of them
	as comonad and monad. But we get a full wfs by taking the \LF-coalgebras and \RF-algebras if we only
	regard them as the pointed endofunctor, which is the same as the retract closure of the algebras in the (co)monad sense. 
\end{remark}

In light of this remark we can pass back from any awfs to a wfs. We can think of this operation as forgetting the choice
of liftings.
\begin{definition}
	Let \(\LF,\RF\) be an awfs. We will call \((\L,\R)\) the underlying wfs of \((\LF,\RF)\), where \L is the class
	of \LF-coalgebras (as a pointed endofunctor) and \R is the class of \RF-algebras (as a pointed endofunctor).
\end{definition}
\begin{remark}
	Dropping the algebraic structure is not a lossless operation. Even though the (co)pointed endofunctors and (co)algebras
	with respect to those endofunctors
	can be recovered (with enough classical principles), the unit and counit might not have been unique. And thus also
	not the category of (co)algebras regarding the (co)monad structure.
\end{remark}

We will end this discussion with a few definitions and a theorem that we will later need. While we think the reader
is now well prepared to understand the statements and their usefulness, we are aware that we didn't cover
enough theory to understand its inner workings.\todo{is this wording ok? should I not do it? I don't want to scare
people}

\begin{definition}\label{def:awfs:rightMaps}
	Let \J be category and \(J : \J → \A^→\) be a functor. Then an object of the category \(J^⧄\) of \emph{right \(J\)-maps}
	is a pair \((f,j)\) with \(f\) in
	\(\A^→\) and \(j\) a function that assigns for every object \(i\) in \J, and for every
	lifting problem
	\begin{equation*}
		\begin{tikzcd}[column sep=huge,row sep=huge]
			L \arrow[r,"α"] \arrow[d, "J(i)"']  & X \arrow[d,"f"] \\
			M \arrow[r,"β"] \arrow[ur, dashed,"{j(i,α,β)}"] & Y
		\end{tikzcd}
	\end{equation*}
	a specified lift \(j(i,α,β)\), such that for every \((a,b) : k → i\) in \J, the diagram
  \begin{equation*}
		\begin{tikzcd}[column sep=huge, row sep = huge]
		  L' \arrow[r,"a"] \arrow[d,"J(k)"'] & L \arrow[r,"α"] \arrow[d,"J(i)", near end] & X \arrow[d,"f"] \\
		  M' \arrow[urr, dashed, near start, "{j(i,αa,βb)}"] \arrow[r,"b"] & M \arrow[ur, dashed, "{j(i,α,β)}"'] \arrow[r,"β"] & Y
		\end{tikzcd}
  \end{equation*}
  commutes. And morphisms are morphisms in \(\A^→\) that preserve these liftings.
\end{definition}
\begin{remark}
	This is even a functor \((−)^⧄ : \faktor{\mathbf{Cat}}{\A^→} → \left(\faktor{\mathbf{Cat}}{\A^→}\right)^\op\)
\end{remark}
\begin{remark}
	There is an adjoint notion of left lifting.
\end{remark}
\begin{remark}
This is a strong generalization from the usual case, where one talks about sets (or classes) that lift against each other.
If one believes in strong enough choice principles, then the usual case is equivalent
to \(\J\) beeing a discrete category and \(J\) some monic functor.
\end{remark}
We will now turn to a theorem that will provide us with awfs that are right lifting to some functor \(J\).
It is (for obvious reasons) known as Garners small object argument.

\begin{theorem}[{Garner \cites{garnerUnderstandingSmallObject2009}[Theorem 2.28, Lemma 2.30]{riehlAlgebraicModelStructures2011}}]\label{awfs:smallObject}
	Let \(\A\) be a cocomplete category satisfying either of the following conditions.
	\begin{itemize}
		\item[(\(*\))] Every \(X ∈ \A\) is \(α_X\)-presentable for some regular cardinal \(α_X\).
		\item[(\dagger)] Every \(X ∈ \A\) is \(α_X\)-bounded with respect to some proper, well-copowered
		orthogonal factorization system on \(\A\), for some regular cardinal \(α_X\).
	\end{itemize}
	Let \( J : \mathcal{J} → \A^→\) be a category over \(\A^→\), with \(\mathcal{J}\) small. Then the free awfs on \(\mathcal{J}\) exists,
	its category of \RF algebras is isomorphic to \(J^⧄\), and the category of \RF-algebras is retract closed.
\end{theorem}

\endgroup
\end{document}
