\paragraph{}
The main objective of this chapter is to introduce a way that can develop an adaptive mesh automatically based on the posteriori error estimator.
Most of the unnecessary refinement in the region which contributes few to the improvement of the accuracy will be prevented.
The expressions related to the eigenvalues of the SBFEM formulation representing the quantity of the error in the interpolation are adopted as one of the error indicators, together with the area and other geometric properties of the Scaled Boundary Finite Element.
A machine learning model using the Multilayer Perceptron (MLP) is trained to determine whether a Scaled Boundary Finite Element needs refinement or not based on all these information based on all error estimators mentioned above.

\paragraph{}
The proposed method enhances the SBFEM with quad-tree mesh introduced in Sec.~\ref{qdt_sec:main} and the outstanding features of the method are:
\begin{itemize}
    \item No human effort involvement in mesh refinement
    \item Smart refinement detection
    \item Highly extensible criteria, any other error indicators can be added to the existing framework
\end{itemize}

\paragraph{}
This chapter is organized as follows.
The error indicators used in the proposed method will be introduced first.
After that, a machine learning algorithm that can be trained to determine the necessity of the refinement of a cell based on these indicators is presented.
Furthermore, a triangle merging algorithm is developed to bypass the lack of eigenvalue error indicators in first order triangular element in the SBFEM.
Finally, the matrix representation of NURBS curves is introduced to improve the computational efficiency and the robustness of the NURBS related calculation.
The accuracy and the convergence properties of the proposed techniques are demonstrated with benchmark problems in the context of linear elasticity, followed by concluding remarks in the last section.


\section{World Map}
\label{sec:worldMap}

The world map is one of the basic requirements needed for both localization and path finding.
In this project the world map is used to do fictive particle measurements for the particle filter, and provide a read map containing obstacles for the A* algorithm.
The world map class is containing the length and width of the world, and a list of objects in the world.
It has been decided to only use squares objects in the world map, and these are modelled as a set of 4 lines.
Each square object is defined by 4 parameters, a corner position, length, width and an orientation offset of the x axis in degrees.
A useful geometry library called \emph{MathNet.Spatial} is used to easy modulation of points, lines and angles, along easy access to geometry algebra as line length and the intersect point of two lines.

\subsection{Particle measurements}

The robot is measuring the distance to surrounding objects as the means of localization, and the particles therefore needs the ability to do the same action in the world map.
This is implemented by creating a line from the particle in the particle orientation direction, and calculate the intersect points with the world edge lines and object lines, as seen on figure \ref{fig:particleMeasurement}.
The distance to the closest intersect point from the particle is chosen as the fictive distance measurement of that particle.

\myFigure{Implementation/WorldMap/particleMeasurement}{The principle of particle distance measurements in the world map.}{fig:particleMeasurement}{1}

\subsection{A* road map generation}

The A* algorithm needs a grid based map, where each tile is marked as free or blocked, to be able to plan a driving route.
For simplicity it has been decided to have the world map and road map at the same scale, this means a 100 by 100 cm world map, will be a 100*100 tiles road map.
It is necessary to determined whether each of the tiles is inside one of the world objects or not, to draw a correct read map.

This is done by area calculation as seen on figure \ref{fig:ReadMapAreaCalc}.
Four triangles is created from the tile coordinate to each of the object corners, marked A to D on figure \ref{fig:ReadMapAreaCalc}.
The area sum of these four triangles is compared to the area of the object, if the triangle area sum is equal to the object area, the tile is inside the object and is marked as block, else it is marked free.

\myFigure{Implementation/WorldMap/ReadMapAreaCalc}{The principle of calculating area to determined if a point is inside a square.}{fig:ReadMapAreaCalc}{0.6}

Figure \ref{fig:BlockPlot} show a print out of a test read map containing three obstacles that the A* algorithm have to navigate around.

\myFigure{Implementation/WorldMap/BlockPlot}{A plot of the read map, with three obstacles placed at various positions. All blocked tiles is marked as black.}{fig:BlockPlot}{0.4}

\pagebreak


\subsection{Broadcasting}

Loosen standards, can do addition subtraction if one matrix is \(1\times n\).


\chapter{Higher group theory}\label{chap:higher_groups}

In this section I describe joint work with Ulrik Buchholtz and Floris van Doorn \cite{BuchholtzDoornRijke}.

\section{Higher groups}
\label{sec:higher-groups}

Recall that types in HoTT may be viewed as $\infty$-groupoids:
elements are objects, paths are morphisms, higher paths are higher
morphisms, etc.

It follows that \emph{pointed connected} types $B$ may be viewed as higher
groups, with \define{carrier} $\loopspacesym B$.
The neutral element is the identity path,
the group operation is given by path composition,
and higher paths witness the unit and associativity laws.
Of course, these higher paths are themselves subject to further laws,
etc., but the beauty of the type-theoretic definition is
that we don't have to worry about that:
all the (higher) laws follow from the rules of the identity types.
Writing $G$ for the carrier $\loopspacesym B$, it is common to write $BG$ for the pointed
connected type $B$, which comes equipped with an identification $G = \loopspacesym BG$.
We call $BG$ the \define{delooping} of $G$.

The type of pointed types is
$\UU_\pt \defeq  \sm{A:\UU} A$. The type of $n$-truncated types is
$\UU^{\le n} \defeq  \sm{A:\UU}\istrunc{n}{A}$ and for $n$-connected types it is
$\UU^{>n} \defeq  \sm{A:\UU}\mathsf{is\usc{}conn}_n(A)$. We will combine these notations as needed.

\begin{defn}
We define the type of \define{higher groups}, or \define{$\infty$-groups}, to be
\begin{equation*}
\infty\mathsf{Grp}\defeq \sm{G:\UU}{BG:\UU_\pt^{>0}} \eqv{G}{\loopspacesym BG}.
\end{equation*}
When $G$ is an $\infty$-group, we also write $G$ for its first projection, called the \define{carrier} of $G$.
\end{defn}

\begin{rmk}
Note that we have equivalences
\begin{align*}
  \infty\mathsf{Grp}
  &\jdeq   \sm{G:\UU}{BG:\UU_\pt^{>0}} \eqv{G}{\loopspacesym BG} \\
  &\eqvsym \sm{G:\UU_\pt}{BG:\UU_\pt^{>0}} G \eqvsym_\pt \loopspacesym BG \\
  &\eqvsym \UU_\pt^{>0}
\end{align*}
for the type of higher groups.
\end{rmk}

Automorphism groups form a major class of examples of $\infty$-groups.
Given \emph{any} type $A$ and any object $a : A$, the automorphism group at $a$ is defined as
\define{automorphism group} $\Aut a\defeq (a=a)$.
This is indeed an $\infty$-group, because it is the loop space of the connected component of $A$ at $a$, i.e. we define~$\BAut a \defeq  \im(a : 1 \to A) = (x : A) \times \trunc{-1}{a=x}$.
From this definition it is immediate that $\Aut a=\loopspacesym\BAut a$, so we see that $\Aut a$ is indeed an example of an $\infty$-group.

If we take $A = \mathsf{Set}$, we get the usual symmetric groups
$\Sym_n \defeq  \Aut(\Fin(n))$, where $\Fin(n)$ is a set with $n$
elements. (Note that $\BS_n = \BAut(\Fin (n))$ is the type of all
$n$-element sets.)

We recover the ordinary set-level groups by requiring that $G$ is a $0$-type, or equivalently, that $BG$
is a $1$-type. This leads us to introduce:

\begin{defn}
We define the type of \define{groupal $(n-1)$-gropuoids}, or \define{$n$-groups}, to be
\begin{equation*}
n\mathsf{Grp} \defeq \sm{G:\UU_\pt^{<n}}{BG :\UU_\pt^{>0}} G \eqvsym_\pt \loopspacesym BG.
\end{equation*}
We write $\mathsf{Grp}$ for the type of $1$-groups.
\end{defn}

The type of $n$-groups is therefore equivalent to the type of pointed connected $(n+1)$-types. Note that if $A$ is an $(n+1)$-type, then $\Aut a$ is an $(n+1)$-group because $\Aut a$ is $n$-truncated.

For example, the integers $\mathbb{Z}$ as an additive group are from this
perspective represented by their delooping $\mathop{\mathrm{B}\mathbb{Z}}=\bS^1$, i.e., the circle.
Indeed, any set-level group $G$ is represented as its delooping $BG\defeq K(G,1)$.

Moving across the homotopy hypothesis, for every pointed type $(X,x)$
we have the \define{fundamental $\infty$-group of $X$},
$\Pi_\infty(X,x)\defeq \Aut x$. Its $(n-1)$-truncation (an instance of
decategorification, see \cref{sec:stabilization}) is the
\define{fundamental $n$-group of $X$}, $\Pi_n(X,x)$,
with corresponding delooping $\mathrm{B}\Pi_n(X,x) = \trunc{n}{\BAut x}$.

Double loop spaces are more well-behaved than mere loop
spaces. For example, they are commutative up to homotopy
by the Eckmann-Hilton argument~\cite[Theorem~2.1.6]{hottbook}.
Triple loop spaces are even better behaved than double loop spaces, and so on.

\begin{defn}
A type $G$ is said to be \define{$k$-tuply groupal} if it comes equipped with a \define{$k$-fold delooping}, i.e.~ a pointed $k$-connected
$B^kG : \UU_\pt^{\ge k}$ and an equivalence $G \eqvsym \loopspacesym^kB^kG$.

Mixing the two directions, we also define
\begin{align*}
  (n,k)\GType
  &\defeq  \sm{G : \UU_\pt^{\le n}}{B^kG : \UU_\pt^{\ge k}}
    G \eqvsym_\pt \loopspacesym^kB^kG \\
  & \phantom{:}\eqvsym \UU_\pt^{\ge k,\le n+k}
\end{align*}
for the type of \define{$k$-tuply groupal $n$-groupoids}\footnote{This
  is called $n\UU_k$ in \cite{BaezDolan1998}, but here we give equal
  billing to $n$ and $k$,
  and we add the ``G'' to indicate group-structure.}.
We allow taking $n=\infty$, in which case the truncation requirement
is simply dropped.
\end{defn}

Note that $n\mathsf{Grp} = (n-1,1)\GType$. This shift in indexing is slightly
annoying, but we keep it to stay consistent with the literature.

Note that for each $k\geq 0$ there is a forgetful map
\begin{equation*}
(n,k+1)\GType \to (n,k)\GType,
\end{equation*}
given by $B^{k+1}G\mapsto \loopspacesym B^{k+1}G$, defining a sequence
\begin{equation*}
\begin{tikzcd}
\cdots \arrow[r] & (n,2)\GType \arrow[r] & (n,1)\GType \arrow[r] & (n,0)\GType.
\end{tikzcd}
\end{equation*}
Thus we define $(n,\infty)\GType$ as the limit of this sequence:
\begin{align*}
(n,\infty)\GType & \defeq  \lim_k{}(n,k)\GType \\
&\phantom{:}\eqvsym \sm{B^{\blank}G : \prd{k : \bN}\UU_\pt^{\ge k,\le n+k}}\prd{k : \bN} B^kG \eqvsym_\pt \loopspacesym B^{k+1}G.
\end{align*}
In \cref{sec:stabilization} we prove the stabilization theorem
(\cref{thm:stabilization}), from which it follows that
$(n,\infty)\GType=(n,k)\GType$ for $k\geq n+2$.

The type $(\infty,\infty)\GType$ is the type of \define{stably groupal $\infty$-groups},
also known as \define{connective spectra}. If we also relax the
connectivity requirement, we get the type of all spectra, and we can
think of a spectrum as a kind of $\infty$-groupoid with $k$-morphisms
for all $k\in\mathbb{Z}$.

The double hierarchy of higher groups is summarized in~\cref{tab:periodic}.
We shall prove the correctness of the $n=0$ column in~\cref{sec:n=0}.
\begin{table}
  \caption{\label{tab:periodic}Periodic table of $k$-tuply groupal $n$-groupoids.}
  \centering
  \begin{tabular}{clllll} \toprule
    $k\setminus n$ & $0$ & $1$ & $2$ & $\cdots$ & $\infty$ \\
    \midrule
    $0$ & pointed set & pointed groupoid & pointed $2$-groupoid & $\cdots$ & pointed $\infty$-groupoid \\
    $1$ & group & $2$-group & $3$-group & $\cdots$ & $\infty$-group \\
    $2$ & abelian group & braided $2$-group & braided $3$-group & $\cdots$ & braided $\infty$-group \\
    $3$ & \ditto & symmetric $2$-group & sylleptic $3$-group & $\cdots$ & sylleptic $\infty$-group \\
    $4$ & \ditto & \ditto & symmetric $3$-group & $\cdots$ & ?? $\infty$-group \\
    $\vdots$ & \mbox{}\quad$\vdots$ & \mbox{}\quad$\vdots$ & \mbox{}\quad$\vdots$ & $\ddots$ & \mbox{}\quad$\vdots$ \\
    $\loopspacesym$ & \ditto & \ditto & \ditto & $\cdots$ & connective spectrum \\
    \bottomrule
  \end{tabular}
\end{table}

A homomorphism between higher groups is any
function that can be suitably delooped.

\begin{defn}
For $G,H : (n,k)\GType$, we define
\begin{align*}
\hom_{(n,k)}(G,H) & \defeq
\sm{h: G \to_\pt H}{B^k h: B^kG \to_\pt B^kH} \loopspacesym^k(B^k h) \sim_\pt h \\
&\phantom{:}\eqvsym (B^k h: B^kG \to_\pt B^kH).
\end{align*}
For (connective) spectra we need
pointed maps between all the deloopings and pointed homotopies showing
they cohere.
\end{defn}

Note that if $h,k : G \to H$ are homomorphisms between set-level
groups, then $h$ and $k$ are \define{conjugate} if $Bh, Bk : BG \to_\pt BH$ are
\define{freely} homotopic (i.e., equal as maps $BG \to BH$).

Also observe that
\begin{align*}
\pi_j(B^kG \to_\pt B^kH) & \eqvsym \trunc{0}{B^kG \to_\pt \loopspacesym^jB^kH} \\
& \eqvsym \trunc{0}{\Sigma^jB^kG \to_\pt B^kH} \\
& \eqvsym 0
\end{align*}
for $j>n$, which suggests that $\hom_{(n,k)}(G,H)$ is $n$-truncated. To prove this, we deviate slightly from the approach in \cite{BuchholtzDoornRijke} and use the following intermediate result.

\begin{prp}
Consider a pointed $(k+1)$-connected type $X$, and a family $Y:X\to\UU^{\le n+k}$ of $(n+k)$-truncated types over $X$. Then the map
\begin{equation*}
\evpt : \Big(\prd{x:X}Y(x)\Big) \to Y(\pt)
\end{equation*}
induced by the point inclusion $\unit\to X$, is an $(n-2)$-truncated map.
\end{prp}

\begin{proof}
Note that we have a commuting triangle
\begin{equation*}
\begin{tikzcd}[column sep=-1em]
& \Big(\prd{x:X}Y(x)\Big) \arrow[dl,swap,"\blank\circ \mathsf{const}_\pt"] \arrow[dr,"\evpt"] & \phantom{\Big(\prd{t:\unit} Y(\pt)\Big)} \\
\Big(\prd{t:\unit} Y(\pt)\Big) \arrow[rr,swap,"\evpt","\eqvsym"'] & & Y(\pt),
\end{tikzcd}
\end{equation*}
so the map on the left is an $(n-2)$-truncated map if and only if the map on the right is. For the map on the left, the claim follows immediately from Lemma 8.6.1 of \cite{hottbook}, since the point inclusion $\mathsf{const}_\pt:\unit\to X$ is a $k$-connected map by \cref{cor:ptd_connected}.
\end{proof}

\begin{defn}
  If $X : \UU_\pt$ and $Y : X \to \UU_\pt$, then we introduce the
  type of \define{pointed sections},
\begin{equation*}
\textstyle{\prod_{(x:X)}^\ast Y(x)} \defeq \sm{s:\prd{x:X}Y(x)}s(\pt)=\pt
\end{equation*}
  This type is itself pointed by the trivial section $\lam{x}\pt$.
\end{defn}

\begin{cor}
Consider a pointed $k$-connected type $X$, and a family $Y:X\to\UU_\pt^{\le n+k}$ of pointed $(n+k)$-truncated types over $X$. Then the type $\prod_{(x:X)}^\ast Y(x)$ is $(n-1)$-truncated.
\end{cor}

\begin{proof}
Note that we have a pullback square
\begin{equation*}
\begin{tikzcd}
\textstyle{\prod_{(x:X)}^\ast Y(x)} \arrow[r] \arrow[d] & \unit \arrow[d] \\
\prd{x:X}Y(x) \arrow[r,swap,"\evpt"] & Y(\ast),
\end{tikzcd}
\end{equation*}
so the claim follows from the fact that $\evpt$ is an $(n-1)$-truncated map.
\end{proof}

\begin{thm}
  The type $\hom_{(n,k)}(G,H)$ is an $n$-type for any $G,H:(n,k)\GType$.
\end{thm}

\begin{proof}
  If $X$ is $(k-1)$-connected, and $Y$ is $(n+k)$-truncated, then the type of pointed maps $X \to_\pt Y$ is $n$-truncated.
\end{proof}

\begin{cor}
  The type $(n,k)\GType$ is $(n+1)$-truncated.
\end{cor}
\begin{proof}
  This follows immediately from the preceding corollary, as the type
  of equivalences $G \eqvsym H$ is a subtype of the homomorphisms from
  $G$ to $H$.
\end{proof}

If $k\ge n+2$ (so we're in the stable range), then $\hom_{(n,k)}(G,H)$
becomes a stably groupal $n$-groupoid. This generalizes the
fact that the homomorphisms between abelian groups form an abelian
group.

\begin{cor}
The automorphism group $\Aut G$ of a higher group $G:(n,k)\GType$ is a $1$-groupal $(n+1)$-group, equivalent to the automorphism group of the pointed type $B^kG$.
\end{cor}

\section{Stabilization}
\label{sec:stabilization}

\begin{defn}
The \define{decategorification} $\Decat G$ of a $k$-tuply groupal $(n+1)$-group is defined to be the $k$-tuply groupal $n$-group $\trunc{n-1}{G}$, which has delooping $\trunc{n+k-1}{B^kG}$. Thus, decategorification is an operation
\begin{equation*}
\Decat : (n,k)\GType \to (n-1,k)\GType.
\end{equation*}
The functorial action of $\Decat$ is defined in the expected way. We also define the \define{$\infty$-decategorification} $\iDecat G$ of a $k$-tuply groupal $\infty$-group as the $k$-tuply groupal $n$-group $\trunc{n}{G}$, which has delooping $\trunc{n+k}{B^k G}$.
\end{defn}

\begin{defn}
The \define{discrete categorification} $\Disc G$ of a $k$-tuply-groupal $(n+1)$-group is defined to be the same $\infty$-group $G$, now considered as a $k$-tuply groupal $(n+2)$-group. Thus, the discrete categorification is an operation
\begin{equation*}
\Disc : (n,k)\GType \to (n+1,k)\GType.
\end{equation*}
Similarly, the \define{discrete $\infty$-decategorification} $\iDisc G$ of a $k$-tuply groupal $(n+1)$-group is defined to be the same group, now considered as a $k$-tuply groupal $\infty$-group.
\end{defn}

\begin{rmk}
The decategorification and discrete categorification functors make the $(n+1)$-category $(n,k)\GType$ a reflective sub-$(\infty,1)$-category of $(n+1,k)\GType$. That is, there is an adjunction ${\Decat} \dashv {\Disc}$. These properties are straightforward consequences of the universal property of truncation.
Similarly, we have ${\iDecat} \dashv {\iDisc}$ such that the counit induces an isomorphism ${\iDecat} \circ {\iDisc} = \idfunc$.
\end{rmk}

For the next constructions, we need the following properties.
\begin{defn}
  For $A : \UU_\pt$ we define the \define{$n$-connected cover} of $A$ to be
  $A{\angled n} \defeq  \fibf{A \to \trunc{n}{A}}$. We have the projection $p_1: A{\angled n} \to_\pt A$.
\end{defn}

\begin{lem} \label{lem:connected-cover-univ}
  The universal property of the $n$-connected cover states the following. For any $n$-connected pointed type $B$, the pointed map
  $$(B \to_\pt A{\angled n}) \to_\pt (B \to_\pt A),$$
  given by postcomposition with $p_1$, is an equivalence.\\
\end{lem}

\begin{proof}
  Given a map $f:B\to_\pt A$, we can form a map $\widetilde f: B \to A{\angled n}$. First note that for $b:B$ the type $\truncunit{fb}_n=_{\trunc{n}{A}}\truncunit{\pt}_n$ is $(n-1)$-truncated and inhabited for $b=\pt$. Since $B$ is $n$-connected, the universal property for connected types shows that we can construct a $qb:\truncunit{fb}_n=\truncunit{\pt}_n$ for all $b$ such that $q_0:qb_0\cdot\mathsf{ap}_{\truncunit{\blank}_n}(f_0)=1$. Then we can define the map $\widetilde f(b)\defeq (fb, qb)$. Now $\widetilde f$ is pointed, because $(f_0,q_0):(fb_0,qb_0)=(a_0,1)$.

  Now we show that this is indeed an inverse to the given map. On the one hand, we need to show that if $f: B \to_\pt A$, then $\proj 1 \circ \widetilde f=f$. The underlying functions are equal because they both send $b$ to $f(b)$. They respect points in the same way, because
  $\mathsf{ap}{p_1}(\widetilde f_0)=f_0$. The proof that the other composite is the identity follows from a computation using fibers and connectivity, which we omit here, but can be found in the formalization.
\end{proof}

The next reflective sub-$(\infty,1)$-category is formed by looping and delooping.
\begin{description}
\item[looping] $\loopspacesym : (n,k)\GType \to (n-1,k+1)\GType$ \\
  $\angled{G,B^kG} \mapsto \angled{\loopspacesym G,B^kG{\angled k}}$
\item[delooping] $\B : (n,k)\GType \to (n+1,k-1)\GType$ \\
  $\angled{G,B^kG} \mapsto \angled{\loopspacesym^{k-1}B^kG,B^kG}$
\end{description}
We have ${\B} \dashv {\loopspacesym}$, which follows from Lemma \ref{lem:connected-cover-univ} %note: autoref writes "Theorem"
and $\loopspacesym\circ{\B} = \idfunc$, which follows from the fact that $A{\angled n}=A$ if $A$ is $n$-connected.

The last adjoint pair of functors is given by stabilization and forgetting. This does not form a reflective sub-$(\infty,1)$-category.
\begin{description}
\item[forgetting] $F : (n,k)\GType \to (n,k-1)\GType$ \\
  $\angled{G,B^kG} \mapsto \angled{G,\loopspacesym B^kG}$
\item[stabilization] $S : (n,k)\GType \to (n,k+1)\GType$ \\
  $\angled{G,B^kG} \mapsto \angled{SG,\trunc{n+k+1}{\susp B^kG}}$,\\
  where $SG = \trunc{n}{\loopspacesym^{k+1}\susp B^kG}$
\end{description}
We have the adjunction ${S} \dashv {F}$ which follows from the suspension-loop adjunction $\Sigma\dashv\loopspacesym$ on pointed types.

The next main goal in this section is the stabilization theorem,
stating that the ditto marks in~\cref{tab:periodic} are justified.

The following corollary is almost \cite[Lemma~8.6.2]{hottbook}, but
proving this in Book HoTT is a bit tricky. See the
formalization for details.
\begin{lem}[Wedge connectivity]
  \label{lem:wedge-connectivity}
  If $A : \UU_\pt$ is $n$-connected and $B: \UU_\pt$ is
  $m$-connected, then the map $A \vee B \to A \times B$ is
  $(n+m)$-connected.
\end{lem}

Let us mention that there is an alternative way to prove the wedge
connectivity lemma: Recall that if $A$ is $n$-connected and $B$ is
$m$-connected, then $A \ast B$ is
$(n+m+2)$-connected~\cite[Theorem~6.8]{joinconstruction}. Hence the
wedge connectivity lemma is also a direct consequence of the following lemma.
\begin{lem}
Let $A$ and $B$ be pointed types.
The fiber of the wedge inclusion $A\vee B\to A\times B$ is equivalent to
$\loopspacesym{A}\ast\loopspacesym{B}$.
\end{lem}
\begin{proof}
Note that the fiber of $A\to A\times B$ is $\loopspacesym B$, the fiber of $B\to A\times B$ is $\loopspacesym A$, and of course the fiber of $1\to A\times B$ is $\loopspacesym A\times \loopspacesym B$. We get a commuting cube
\begin{equation*}
\begin{tikzcd}
& \loopspacesym A\times \loopspacesym B \arrow[dl] \arrow[d] \arrow[dr] \\
\loopspacesym B \arrow[d] & 1 \arrow[dl] \arrow[dr] & \loopspacesym A \arrow[dl,crossing over] \arrow[d] \\
A \arrow[dr] & 1 \arrow[d] \arrow[from=ul,crossing over] & B \arrow[dl] \\
& A\times B
\end{tikzcd}
\end{equation*}
in which the vertical squares are pullback squares.

By the descent theorem for pushouts it now follows that $\loopspacesym A\ast \loopspacesym B$ is the fiber of the wedge inclusion.
\end{proof}

The second main tool we need for the stabilization theorem is:
\begin{thm}[Freudenthal]
  If $A : \UU_\pt^{>n}$ with $n\ge 0$, then the map
  $A \to \loopspacesym\susp A$ is $2n$-connected.
\end{thm}
This is \cite[Theorem~8.6.4]{hottbook}.

The final building block we need is:
\begin{lem}
  There is a pullback square
  \[
    \begin{tikzcd}
      \susp\loopspacesym A \ar[d,"\varepsilon_A"']\ar[r] & A \vee A \ar[d] \\
      A \ar[r,"\Delta"'] & A \times A
    \end{tikzcd}
  \]
  for any $A : \UU_\pt$.
\end{lem}

\begin{proof}
Note that the pullback of $\Delta:A\to A\times A$ along either inclusion $A\to A\times A$ is contractible. So we have a cube
\begin{equation*}
\begin{tikzcd}
& \loopspacesym A \arrow[dl] \arrow[d] \arrow[dr] \\
1 \arrow[d] & 1 \arrow[dl] \arrow[dr] & 1 \arrow[dl,crossing over] \arrow[d] \\
A \arrow[dr] & A \arrow[d,"\Delta"] \arrow[from=ul,crossing over] & A \arrow[dl] \\
& A\times A
\end{tikzcd}
\end{equation*}
in which the vertical squares are all pullback squares. Therefore, if we pull back along the wedge inclusion, we obtain by the descent theorem for pushouts that the square in the statement is indeed a pullback square.
\end{proof}

\begin{thm}[Stabilization]
  \label{thm:stabilization}
  If $k\ge n+2$, then $S : (n,k)\GType \to (n,k+1)\GType$ is an
  equivalence, and any $G : (n,k)\GType$ is an infinite loop space.
\end{thm}
\begin{proof}
  We show that $F\circ S=\idfunc=S\circ F : (n,k)\GType \to (n,k)\GType$
  whenever $k\ge n+2$.

  For the first, the unit map of the adjunction factors as
  \[
    B^kG \to \loopspacesym\susp B^kG \to \loopspacesym\trunc{n+k+1}{\susp B^kG}
  \]
  where the first map is $2k-2$-connected by Freudenthal, and the
  second map is $n+k$-connected. Since the domain is $n+k$-truncated,
  the composite is an equivalence whenever $2k-2 \ge n+k$.

  For the second, the counit map of the adjunction factors as
  \[
    \trunc{n+k}{\susp\loopspacesym B^kG} \to \trunc{n+k}{B^kG} \to B^kG,
  \]
  where the second map is an equivalence. By the two lemmas above, the
  first map is $2k-2$-connected.
\end{proof}
For example, for $G : (0,2)\GType$ an abelian group, we have
$B^nG = K(G,n)$, an Eilenberg-MacLane space.

The adjunction ${S} \dashv {F}$ implies that the free group on a
pointed set $X$ is $\loopspacesym\trunc{1}{\susp X}=\pi_1(\susp X)$.  If $X$
has decidable equality, $\susp X$ is already $1$-truncated. It is an
open problem whether this is true in general.

Also, the abelianization of a set-level group $G : 1\mathsf{Grp}$ is
$\pi_2(\susp BG)$. If $G : (n,k)\GType$ is in the stable range ($k \ge
n+2$), then $SFG=G$.

\section{Group actions}
\label{sec:actions}

In this section we consider a fixed group $G : \GType$ with delooping
$BG$.

\begin{defn}
Consider a type $A$. A \define{$G$-action} on $a:A$ is simply a function $X : BG \to A$ such that $X(\pt)=a$. If $a$ comes equipped with a $G$-action, we also say that $a$ is a \define{$G$-object}.

For any $a:A$, the $G$-object $a^{\mathrm{triv}}$ consists of $a$ equipped with the \define{trivial action}, i.e. the constant function $\mathsf{const}_a:BG\to A$.
\end{defn}

\begin{rmk}
Clearly, an action of $G$ on $a:A$ is the same as a homomorphism $G \to \Aut a$.
\end{rmk}

\begin{defn}
A \define{$G$-type} is a type $X:\UU$ equipped with a $G$-action, and a \define{map of $G$-types} from $X$ to $Y$ is just a fiberwise transformation
\begin{equation*}
\alpha : \prd{t:BG} X(t)\to Y(t).
\end{equation*}
\end{defn}

\begin{defn}
Consider a type $X$ equipped with the structure of a $G$-type. The type of \define{invariants} of $X$ is defined to be
\begin{equation*}
X^{hG} \defeq  \prd{t:BG} X(t).
\end{equation*}
The type of \define{coinvariants} of $X$ is defined to be
\begin{equation*}
X_{hG} \defeq \sm{t:BG}X(t)
\end{equation*}
We also write $X \dblslash G$ for the type of coinvariants of $X$.
\end{defn}

\begin{rmk}
The type of invariants of a $G$-type $X$ is also known as the type of \define{homotopy fixed points}. The type of coinvariants is also known as the \define{homotopy orbit space}, or the \define{homotopy quotient}.
\end{rmk}

It is easy to see that these constructions are respectively the right and left
adjoints of the functor that sends a type $X$ to the trivial
$G$-action on $X$, $X^{\mathrm{triv}} : BG \to \UU$, which is just
the constant family at $X$. Indeed, the adjunctions are just the usual argument
swap and (un)currying equivalences, for $Y:\UU$,
\begin{align*}
  \hom(Y, X^{hG})
  & \jdeq  X \to \prd{z:BG}Y(z) \\
  & \eqvsym \prd{z:BG} X \to Y(z) \\
  & \jdeq \hom(X^{\mathrm{triv}}, Y), \\
  \hom(X_{hG}, Y)
  & \jdeq \Big(\sm{z:BG}X(z)\Big) \to Y \\
  & \eqvsym \prd{z:BG} X(z) \to Y \\
  & \jdeq \hom(X, Y^{\mathrm{triv}}).
\end{align*}
If we think of an action $X : BG\to \UU$
as a type-valued diagram on $BG$, this means that the homotopy fixed
points and the homotopy orbit space form the homotopy limit and
homotopy colimit of this diagram, respectively.

\begin{prp}
  \label{prop:action-hom-pullback}
  Let $f : H \to G$ be a homomorphism of higher groups with delooping
  $Bf : BH \to_\pt BG$, and let $\alpha : \hom(X,Y)$ be a map of
  $G$-types. By composing with $f$ we can also view $X$ and $Y$ as
  $H$-types, in which case we get a homotopy pullback square:
  \[
    \begin{tikzcd}
      X_{hH} \ar[r]\ar[d] & Y_{hH}\ar[d] \\
      X_{hG} \ar[r]       & Y_{hG}.
    \end{tikzcd}
  \]
\end{prp}
\begin{proof}
  The vertical maps are induced by $Bf$, and the horizontal maps are
  induced by $\alpha$. The homotopy pullback corner type $C$ is calculated as\index{fix this notation}
  \begin{align*}
    C
    &\eqvsym (z : BG) \times (x : X\,z)
      \times (w : BH) \times (y : Y(Bf\,w)) \\
    &\qquad \times (z = Bf\,w) \times (y = \alpha\,z\,x) \\
    &\eqvsym (w : BH) \times (x : X(Bf\,w))
      = X_{hH},
  \end{align*}
  and under this equivalence the top and the left maps are the
  canonical ones.
\end{proof}

Every group $G$ carries two canonical actions on itself:
\begin{description}
\item[the right action] $G : BG \to \UU$, $G(x) = (\pt = x)$, and the
\item[the adjoint action] $G^{\mathrm{ad}} : BG \to \UU$,
  $G^{\mathrm{ad}}(x) = (x = x)$ (by conjugation).
\end{description}

We have $1 \dblslash G = BG$,
$G \dblslash G = 1$ and $G^{\mathrm{ad}} \dblslash G = LBG \defeq
(\bS^1 \to BG)$, the free loop space of $BG$. Recalling that $\mathop{\mathrm{B}\mathbb{Z}} =
\bS^1$, we see that $G^{\mathrm{ad}} = (\mathop{\mathrm{B}\mathbb{Z}} \to BG)$, i.e., the
conjugacy classes of homomorphisms from $\mathbb{Z}$ to $G$. Since the
integers are the free (higher) group on one generator, this is just
the conjugacy classes of elements of $G$. But that is exactly what we
should get for the homotopy orbits of $G$ under the conjugation
action.

The above proposition has an interesting corollary:
\begin{cor}
  \label{cor:hfiber-hom}
  If $f : H \to G$ is a homomorphism of higher groups,
  then $G \dblslash H$ is equivalent to the homotopy
  fiber of the delooping $Bf : BH \to_\pt BG$,
  where $H$ acts on $G$ via the $f$-induced right action.
\end{cor}
\begin{proof}
  We apply Proposition~\ref{prop:action-hom-pullback} with $\alpha : G \to 1$
  being the canonical map from the right action of $G$ to the action
  of $G$ on the unit type. Then the square becomes:
  \[
    \begin{tikzcd}[baseline=(O.base)]
      G \dblslash H \ar[r]\ar[d] & BH\ar[d] \\
      |[alias=O]| 1 \ar[r]       & BG
    \end{tikzcd}\qedhere
  \]
\end{proof}

By definition, $BG$ classifies \define{principal $G$-bundles}: pullbacks
of the right action of $G$. That is, a principal $G$-bundle over a
type $A$ is a family $F : A \to \UU$ represented by a map $\chi:A
\to BG$ such that $F(x) \eqvsym (\pt = \chi(x))$ for all $x : A$.

For example, for every higher group $G$ we have the corresponding Hopf
fibration $\Sigma G \to \UU$ represented by the map $\chi_H : \Sigma
G \to BG$ corresponding under the loop-suspension adjunction to the
identity map on $G$. (This particular fibration can be defined using
only the induced $H$-space structure on $G$.)

This perspective underlies the construction of the first and the third
named author of the real projective spaces in homotopy type
theory~\cite{realprojective}. The fiber sequences $\bS^0 \to \bS^n \to
\RP^n$ are principal bundles for the $2$-elements group
$\bS^0=\Sym_2$ with delooping $\BS_2\eqvsym \RP^\infty$,
the type of $2$-element types.

\subsection{The center of a group}
\label{sec:center}

Given a $k$-tuply groupal $(n+1)$-group $G$, we can also consider the automorphism group
$\aut_c G$ of $B^kG:\UU^{\ge k,\le n+k}$ at an arbitrary base point $c:B^kG$.

\begin{defn}
We define the \define{generalized
  center} of $G$ to be $ZG \defeq  \loopspacesym^k\aut_c G : (n,k+1)\GType$. Thus, $G$ acts on the center by \define{conjugation}.
\end{defn}

Indeed, if $G:1\mathsf{Grp}$ is a set-level group, then an element of
$ZG$ corresponds to an element of $\loopspacesym^2\BAut_cG$, or equivalently,
a map from the $2$-sphere $\bS^2$ to $\UU$
sending the basepoint to $BG$.
By the universal property of
$\bS^2$ as a HIT, this again corresponds to a homotopy from the
identity on $BG$ to itself, $c : \prd{z:BG} z=z$.
This is precisely a homotopy fixed point of the adjoint action of
$G$ on itself, i.e., a central element.

\subsection{Equivariant homotopy theory}
\label{sec:equivariant}

Fix a group $G : \GType$. Suppose that $G$ is actually the (homotopy)
type of a topological group. Consider the
type $BG \to \UU$ of (small) \emph{types with a $G$-action}. Naively,
one might think that this represents $G$-equivariant homotopy types,
i.e., sufficiently nice\footnote{Sufficiently nice means the
  $G$-CW-spaces. The same homotopy category arises by taking all
  spaces with a $G$-action, but then the weak equivalences are the
  $G$-maps $f : X \to Y$ that induce weak equivalences on $H$-fixed
  point spaces $f^H : X^H \to Y^H$ for all closed subgroups $H$ of $G$.}
topological spaces with a $G$-action considered up to $G$-equivariant
homotopy equivalence. But this is not so.

By Elmendorf's theorem~\cite{Elmendorf1983}, this homotopy theory is
rather that of presheaves of (ordinary) homotopy types on the
\define{orbit category} $\mathcal{O}_G$ of $G$. This is the full
subcategory of the category of $G$-spaces spanned by the homogeneous
spaces $G/H$, where $H$ ranges over the closed subgroups of $G$.

Inside the orbit category we find a copy of the group $G$, namely as
the endomorphisms of the object $G/1$ corresponding to the trivial
subgroup $1$. Hence, a $G$-equivariant homotopy type gives rise to
type with a $G$-action by restriction along the inclusion $BG
\hookrightarrow \mathcal{O}_G$. (Here we consider $BG$ as a (pointed
and connected) topological groupoid on one object.)

As remarked by Shulman~\cite{shulman:inverseEI}, when $G$ is a \emph{compact} Lie
group, then $\mathcal{O}_G$ is an inverse EI $\infty$-category, and
hence we know how to model type theory in the presheaf $\infty$-topos
over $\mathcal{O}_G$. And in certain simple cases we can even define
this model internally. For instance, if $G=\mathbb{Z}/p\mathbb{Z}$ is a cyclic group
of prime order, then a small $G$-equivariant type consists of a type with a
$G$-action, $X : BG \to \UU$ together with another type family $X^G : X^{hG}
\to \UU$, where $X^G$ gives for each homotopy fixed point a type of
proofs or ``special reasons'' why that point should be considered
fixed~\cite[7.6]{shulman:inverseEI}. Hence the total space of $X^G$ is the
type of actual fixed points,
and the projection to $X^{hG}$ implements the map from actual fixed
points to homotopy fixed points.

Even without going to the orbit category, we can say something about
topological groups through their classifying types in type theory. For
example~\cite{Camarena}, if $f : H \to G$ is injective, then the
homotopy fiber of $Bf$ is by Corollary~\ref{cor:hfiber-hom}
is the homotopy orbit space $G \dblslash H$, which in this case is
just the coset space $G/H$, and hence in type
theory represents the homotopy type of this coset space. And if
\[
  1 \to K \to G \to H \to 1
\]
is a short exact sequence of topological groups,
then $BK \to BG \to BH$ is a fibration sequence,
i.e., we can recover the delooping $BK$ of $K$ as the homotopy fiber
of the map $BG \to BH$.

\subsection{The semi-direct product and the wreath product}
\label{sec:elementary-constructions}

If we are given a homomorphism $\varphi : H \to \Aut(N)$, represented
by a pointed map
$B\varphi : BH \to_\pt \BAut_\pt(BN)$ where $\BAut_\pt(BN)$ is the
type of pointed types merely equivalent to $BN$,
we can build a new group, the
\define{semidirect product}, $G \defeq  N \mathbin{\rtimes_\varphi} H$
with classifying type $BG \defeq  (z : BH) \times (B\varphi\,z)$.
The type $BG$ is indeed pointed (by the pair of the basepoint $\pt$ in $BG$
and the basepoint in the pointed type $B\varphi(\pt)$), and
connected, and hence presents a higher group $G$.
An element of $g$ is given by a pair of an element $h : H$ and an
identification $g\cdot\pt = \pt$ in $B\varphi(\pt) \eqvsym_\pt BN$. But
since the action is via pointed maps, the second component is
equivalently an identification $\pt = \pt$ in $BN$, i.e., an element of
$N$. Under this equivalence, the product of $(h,n)$ and $(h',n')$ is
indeed $(h\cdot h', n\cdot \varphi(h)(n'))$.

As a special case we obtain the \define{direct product} when $\varphi$
is the trivial action. Here, $B(H \times N) \eqvsym BH \times BN$.

As another special case we obtain the \define{wreath products} $N \wr
\Sym_n$ of a group $N$ and a symmetric group $\Sym_n$. Here,
$\Sym_n$ acts on the direct power $N^{\Fin n}$ by permuting the
factors. Indeed, using the representation of $\BS_n$ as the type of
$n$-element types, the map $B\varphi$ is simply $A \mapsto (A \to
BN)$. Hence the delooping of the wreath product $G \defeq  N \wr \Sym_n$
is just $BG\defeq (A:BS_n) \times (A \to BN)$.

\section{\texorpdfstring{$1$}{1}-groups}
\label{sec:n=0}

\begin{defn}
A \define{$1$-group} $G$ is a set $G$ equipped with a unit $1:G$, a multiplication $x,y\mapsto xy$ on $G$, and an inverse operation $x\mapsto x^{-1}$, satisfying the usual group laws.
\end{defn}

We recall that the \define{homotopy groups} of a pointed type $A$ are defined to be $\pi_k A\defeq
\trunc{0}{\loopspacesym^k A}$. These are groups in the usual sense when
$k\ge 1$, with neutral element $\truncunit{\refl{\ast}}$ and group
operation induced by path concatenation.

Since the subuniverse of $n$-types is a reflective subuniverse for any univalent universe closed under homotopy pushouts, it follows from Theorem 5.4 of \cite{FinsterLicata} that the Eilenberg-Mac Lane spaces $K(G,n)$ can be constructed for any abelian group $G$, and any $g\geq 1$, and moreover $K(G,n)$ is essentially small whenever $G$ is. Following \cite{FinsterLicata}, we define $K(A,n+1)\defeq \trunc{n+1}{\Sigma K(A,n)}$ inductively. Then we have the following result.

\begin{prp}[Theorem 5.4 of \cite{FinsterLicata}]\label{thm:EM-spaces}
  Let $G$ be a group and $n\geq 1$, and assume that $G$ is abelian
  when $n>1$. The space $K(G,n)$ is $(n-1)$-connected and
  $n$-truncated and there is a group isomorphism $\pi_nK(G,n) \cong G$.\qed
\end{prp}

In this section we give a proof that the $n=0$ column of~\cref{tab:periodic} is correct.
Note that for $n=0$ the hom-types $\hom_{(0,k)}(G,H)$ are sets, which means that $(0,k)\GType$ forms a 1-category. % (F) should we define precategory/category here? I use the word "category" for a not necessarily univalent category.
Let $\Group$ be the category of ordinary set-level groups (a set with multiplication, inverse and unit satisfying the group laws) and $\AbGroup$ the category of abelian groups.
\begin{thm}\label{theorem:catofgroups}
  We have the following equivalences of categories
  {\normalfont(}\/for $k\geq2${\normalfont):}
  \begin{align*}
    % (0,0)\GType &\eqvsym \mathsf{Set}_\pt\\
    (0,1)\GType &\eqvsym \Group;&&\\
    (0,k)\GType &\eqvsym \AbGroup.&&
  \end{align*}
\end{thm}
Since this theorem has been formalized we will not give all details of the proof.
\begin{proof}
  Let $k\ge1$ and $G$ be a group which is abelian if $k>1$ and let $X:\UU_\pt^{\ge k,\le k}$. If we have a group homomorphism $\phi : G \to \loopspacesym^k X$ we get a map $e_\phi^k:K(G,k)\to_\pt X$. For $k=1$ this follows directly from the induction principle of $K(G,1)$. For $k>1$ we can define the group homomorphism $\widetilde\phi$ as the composite $G \xrightarrow{\phi} \loopspacesym^k X \eqvsym \loopspacesym^{k-1}(\loopspacesym X)$, and apply the induction hypothesis to get a map
  $e_{\widetilde\phi}^{k-1}:K(G,k-1)\to_\pt \loopspacesym X$. By the adjunction $\Sigma\dashv\loopspacesym$ we get a pointed map $\Sigma K(G,k-1)\to_\pt X$, and by the elimination principle of the truncation we get a map $K(G,k)=\trunc{k}{\Sigma K(G,k-1)}\to_\pt X$.

  We can now show that $\loopspacesym^k e_\phi^k$ is the expected map, that is, the following diagram commutes, but we omit this proof here.
\begin{equation*}
\begin{tikzcd}[column sep=0]
\loopspacesym^nK(G,k) \arrow[rr,"\eqvsym"] \arrow[dr,swap,"\loopspacesym^n e_\phi^k"] & & G \\
& \loopspacesym^n X \arrow[ur,swap,"\phi"] & \phantom{\loopspacesym^nK(G,k)}
\end{tikzcd}
\end{equation*}
  Now if $\phi$ is a group isomorphism, by Whitehead's Theorem for truncated types \cite[Theorem 8.8.3]{hottbook} we know that $e_\phi^k$ is an equivalence, since it induces an equivalence on all homotopy groups (trivially on the levels other than $k$). We can also show that $e_\phi^k$ is natural in $\phi$.

  Note that if we have a group homomorphism $\psi:G\to G'$, we also get a group homomorphism $G\to\loopspacesym^k K(G',k)$, and by the above construction we get a pointed map $K(\psi,k):K(G,k)\to_\pt K(G',k)$. This is functorial, which follows from naturality of $e_\phi^k$.

  Finally, we can construct the equivalence explicitly. We have a functor
  $\pi_k:(0,k)\GType \to \AbGroup$ which sends $G$ to $\pi_k BG$. Conversely, we have the functor $K({-},k):\AbGroup\to (0,k)\GType$. We have natural isomorphisms
  $\pi_k K(G,k)\eqvsym G$ by~\cref{thm:EM-spaces} and $K(\pi_k X,k)\eqvsym_\pt X$ by the application of Whitehead described above. The construction is exactly the same for $k=1$ after replacing $\AbGroup$ by $\Group$.
\end{proof}

From the symmetric groups $\Sym_n$, we can get other finite groups using
the constructions of~\cref{sec:elementary-constructions}. Other
groups can be constructed more directly. For example,
$BA_n$, the classifying type of the alternating group, can be taken to
be the type of $n$-element sets $X$ equipped with a \define{sign
  ordering}: this is an equivalence class of an ordering
$\Fin n \eqvsym X$ modulo even permutations. Indeed, there are only two
possible sign orderings, so this definition corresponds to
first considering the short exact sequence
\[
  1 \to A_n \to \Sym_n \xrightarrow{\mathrm{sgn}}{} \Sym_2 \to 1
\]
where the last map is the sign map, then realizing the sign map
as given by the map $\mathrm{Bsgn} : \BS_n \to \BS_2$ that takes
an $n$-element set to its set of sign orderings, and finally
letting $BA_n$ be the homotopy fiber of $\mathrm{Bsgn}$.

Similarly, $BC_n$, the classifying type of the cyclic group on $n$
elements, can be taken to be the type of $n$-elements sets $X$
equipped with a \define{cyclic ordering}: an equivalence class of an
ordering $\Fin n \eqvsym X$ modulo cyclic permutations. But unlike
the above, where we had the coincidence that $\Aut(\Sym_2) \eqvsym
\Sym_2$,
this doesn't correspond to a short exact sequence. Rather,
it corresponds to a sequence
\[
  1 \to C_n \to \Sym_n \to \Aut(\Fin(n-1)) \eqvsym \Sym_{(n-1)!}
\]
where the delooping of the last map is the map from $\BS_n$ to
$\BS_{(n-1)!}$ that maps an $n$-element set to the set of cyclic
orderings, of which there are $(n-1)!$ many -- since once we fix the
position in the ordering of a particular element,
we are free to permute the rest.

As another example,
consider the map $p : \BS_4 \to_\pt \BS_3$ that maps a 4-element set
$X$ to its set of 2-by-2 partitions, of which there $3$. Using this
construction, we can realize some famous semidirect and wreath product identities,
such as $A_4 \cong S_2^2 \rtimes A_3$, $S_4 \cong S_2^2 \rtimes
S_3$, and, for the octahedral group, $O_h \cong S_2^3 \rtimes S_3
\cong S_2 \wr S_3$.

\smallskip

Let us turn to a different way of getting new groups from old, namely
via covering space theory.

\subsection{\texorpdfstring{$1$}{1}-groups and covering spaces}
\label{sec:covering}

The connection between covering spaces of a pointed connected type
$X$ and sets with an action of the fundamental group of $X$ has
already been established in homotopy type
theory~\cite{FavoniaHarper2016}. Let us recall this connection and
expand a bit upon it.

For us, a pointed connected type $X$ is equivalently
an $\infty$-group $G:\infty\mathsf{Grp}$
with delooping $BG \defeq  X$.
A covering space over $BG$ is simply a type family $C : BG \to \mathsf{Set}$
that lands in the universe of sets.
Hence by our discussion of actions in~\cref{sec:actions}
it is precisely a set with a $G$-action.
Since $\mathsf{Set}$ is a 1-type, $C$ extends uniquely to a type family
$C' : \trunc{1}{BG} \to \mathsf{Set}$,
but $\trunc{1}{BG}$ is the delooping of the fundamental group
of $X$, and hence $C'$ is the uniquely determined
choice of a set with an action of the fundamental group.

The universal covering space is the simply connected cover of $BG$,
\[
  \widetilde{BG} : BG \to \mathsf{Set}, \quad
  z \mapsto \trunc{0}{\pt = z}.
\]
Note that the total space of $\widetilde{BG}$ is indeed the
$1$-connected cover $BG\angled1$,
since $\trunc{0}{\pt =_{BG} \pt} \eqvsym (\truncunit{\pt} =_{\trunc{1}{BG}} \truncunit{\pt})$.
Also note that if $G$ is already a 1-group, then this is just the right
action of $G$ on itself, and in general, it is the right action of $G$
on the fundamental group
(i.e., the decategorification of $G$)
via the truncation homomorphism from $G$ to $\pi_1(BG)$,
where we can also view $\pi_1(BG)$ as the $1\mathsf{Grp}$ decategorification
of $G$.

In general, there is a Galois correspondence between connected covers
of $BG$ and conjugacy classes of subgroups of the fundamental group.
Indeed, if $C : BG \to \mathsf{Set}$ has a connected total space,
then the space $(g : \trunc{1}{BG}) \times C'(g)$
is itself a connected, 1-truncated type,
and the projection to $\trunc{1}{BG}$
induced an inclusion of fundamental groups
once a point $\pt : C'(\pt)$ has been chosen.

\begin{thm}[Fundamental theorem of Galois theory for covering spaces]
  \label{thm:galois-zero}
  $\phantom{42}$
  \begin{enumerate}
  \item  The automorphism group of the universal covering space
    $\widetilde{BG}$ is isomorphic to
    the $1$-group decategorification of $G$,
    \[
      \Aut(\widetilde{BG}) \eqvsym \Decat_1(G) \eqvsym \pi_1(BG).
    \]
  \item Furthermore, there is a contravariant correspondence between
    conjugacy classes of subgroups of $\Decat_1(G)$ and connected
    covers of $BG$.
  \item This lifts to a Galois correspondence between subgroups of
    $\Decat_1(G)$ and pointed, connected covers of $BG$.  The normal
    subgroups correspond to Galois covers.
  \end{enumerate}
\end{thm}
Note that the universal covering space
and the trivial covering space
(constant at the unit type)
are canonically pointed,
reflecting the fact that
the two trivial subgroups are normal.

The first part of the fundamental theorem has a clear generalization to
higher groups:
\begin{thm}[Fundamental theorem of Galois theory for $n$-covers,
  part one]
  The automorphism group of the universal $n$-type cover $U_n(BG)$,
  \[
    U_n(BG) : BG \to \UU^{\le n},
    \quad
    z \mapsto \trunc{n}{\pt = z}
  \]
  of $BG$ is
  isomorphic to the $(n+1)$-group decategorification of $G$,
  \[
    \Aut(U_n(BG)) \eqvsym \Decat_{n+1}(G) \eqvsym \Pi_{n+1}(BG).
  \]
\end{thm}
\begin{proof}
  Note that
  $\BAut(U_n(BG))$ is the image of the map $1 \to (BG \to \UU^{\le
    n})$ that sends the canonical element to $U_n(BG)$. Since $BG$ is
  connected, this image is exactly $\trunc{n+1}{BG}$ by
  \cite[Theorem~7.1]{joinconstruction}. Then we are done,
  since $\B\Pi_{n+1}(BG) \eqvsym \trunc{n+1}{BG}$, by definition.
\end{proof}
It is possible to use the other parts
of~\cref{thm:galois-zero} in order to \emph{define} the notions of
subgroup and normal subgroup for $n$-groups, which then become
\emph{structure on} rather than a \emph{property of} a homomorphism $f
: K \to G$.
Explicitly, the structure of a \define{normal subgroup} on such an $f$
is a delooping $B(G \dblslash K)$ of the type $G \dblslash K$
together with a map $Bq : BG \to_\pt B(G \dblslash K)$ giving rise to a
fiber sequence
\begin{equation}\label{eq:normal-fiber-sequence}
  G \dblslash K \to BK \xrightarrow{Bf}{} BG
  \xrightarrow{Bq}{} B(G \dblslash K).
\end{equation}

\subsection{Central extensions and group cohomology}
\label{sec:group-cohomology}

The cohomology of a higher group $G$ is simply the cohomology of its
delooping $BG$. Indeed, for any spectrum $A$, we define
\[
  H_{\mathrm{Grp}}^k(G, A) \defeq  \trunc{0}{BG \to_\pt B^kA}.
\]
Of course, to define the $k$'th cohomology group, we only need the
$k$-fold delooping $B^kA$.

If $A:(\infty,2)\GType$ is a braided $\infty$-group, then
we have the second cohomology group $H_{\mathrm{Grp}}^2(G, A)$, and an
element $c:BG \to_\pt B^2A$ gives rise to a \define{central extension}
\[
  BA \to BH \to BG \xrightarrow{c}{} B^2A,
\]
where $BH$ is the homotopy fiber of $c$.  This lifts to the world of
higher groups the usual result that isomorphism classes of central
extensions of a $1$-group $G$ by an abelian $1$-group $A$
are given by cohomology classes in $H_{\mathrm{Grp}}^2(G, A)$.

\smallskip

In the Spectral repository there is full formalization of the Serre
spectral sequence for cohomology \cite{SerreSpectralSequence}.
If we have any normal subgroup fiber sequence for $\infty$-groups as
in~\eqref{eq:normal-fiber-sequence}, then we get a corresponding
spectral sequence with $E_2$-page
\[
  H_{\mathrm{Grp}}^p(G \dblslash K, H_{\mathrm{Grp}}^q(K, A))
\]
and converging to $H_{\mathrm{Grp}}^n(G, A)$, where $A$ is any
truncated, connective spectrum, which could even be a left $G$-module,
in which case we reproduce the \define{Hochschild-Serre spectral
  sequence}.

\section{From RPn to higher groups}

\marginnote{Need to find a place for this}
\begin{defn}
For any type $X$, we define \define{the connected component of $X$ in $\UU$} to be the type \[\UU_X\defeq\sm{A:\UU}\brck{A=X}.\] In particular, we have the type \[\UU_{\sphere{0}}\jdeq\sm{A:\UU}\brck{A={\sphere{0}}}\] of $2$\nobreakdash-element sets.

An \define{$X$\nobreakdash-bundle} over a type $A$ is defined to be a type family $B:A\to\UU_X$.
\end{defn}

A term of type $\UU_X$ is formally a pair of a small type $A:\UU$ together with a term of type $\brck{A=X}$, but since the latter is a mere proposition we usually omit it, and consider the term itself as a small type.


\documentclass{article}
\usepackage{amsmath, amssymb, tikz, xcolor, sfmath, systeme, tcolorbox}
\renewcommand{\familydefault}{\sfdefault}
\usepackage[margin = 0.5in]{geometry}
\tikzset{>=stealth}
\pagestyle{empty}
\raggedright

\begin{document}

\subsection*{Systems of Equations: $\mathbf{2 \times 2}$}

\begin{tcolorbox}[colframe=orange!70!white, coltitle=black, title=\textbf{Summary}]
\begin{enumerate}
    \item Multiplying by a matrix $A$ transforms the coordinate plane.
    \item Using our new coordinate system, we want to get to the point using vector arithmetic.
    \item If it is impossible to get to that point using vector arithmetic, we have no solution.
    \item If there is more than one vector combination to get to that point, we have an infinite number of solutions.
    \item Inverse matrices allow us to find the solution via a process.
\end{enumerate}
\end{tcolorbox}
\vfill

In Algebra 1, you learned about solving systems of equations:
\begin{center}
\systeme{x+y=2, 2x+y=1}
\end{center}
\vspace{1.5in}
% \begin{tcolorbox}[colback=white!50!green, title=\textbf{Solution to a System of Equations}]
% A \textbf{solution} to a system of equations is an ordered pair, $(x,y)$, such that substituting the values of $x$ and $y$ into each equation
% \end{tcolorbox}
% \bigskip

One method for solving a system of equations is to find the intersection point of the graphs of each equation:
\begin{center}
\begin{tikzpicture}[scale=0.65]
\draw[gray!50] (-4,-4) grid (5,5);
\draw[<->, thick] (-4.5,0) -- (5.5,0) node [right] {$x$};
\draw[<->, thick] (0,-4.5) -- (0,5.5) node [above] {$y$};
\draw[<->, very thick, red] (4.5,-2.5) node [right] {$x+y=2$} -- (-2.5,4.5);
\draw[<->, very thick, blue, domain=-2:2.5] plot (\x, -2*\x+1) node [below right] {$2x+y=1$};
\draw[color=violet,fill=violet] (-1,3) circle [radius=3pt];
\end{tikzpicture}
\end{center}

\newpage

Previously, we looked at matrix multiplication. The system of equations
\begin{center}
    \systeme{x+y=2, 2x+y=1}
\end{center}
in matrix form is
\[
\begin{bmatrix}
1 & 1 \\
2 & 1
\end{bmatrix}
\begin{bmatrix}
x \\ y
\end{bmatrix}
=
\begin{bmatrix}
2 \\ 1
\end{bmatrix}
\qquad \text{or} \qquad
x\begin{bmatrix} 1 \\ 2 \end{bmatrix} + y \begin{bmatrix} 1 \\ 1 \end{bmatrix} = \begin{bmatrix} 2 \\ 1 \end{bmatrix}
\]

\vspace{1.5in}

Transforming $\hat{\imath}$ and $\hat{\jmath}$ by the matrix $\begin{bmatrix} 1 & 1 \\ 2 & 1 \end{bmatrix}$, we get
\begin{center}
\begin{tikzpicture}[scale=0.6]
\draw[gray!50] (-5,-5) grid (5,5);
\draw[<->, thick] (-5.5,0) -- (5.5,0) node [right] {$x$};
\draw[<->, thick] (0,-5.5) -- (0,5.5) node [above] {$y$};
\draw[->, very thick, red] (0,0) -- (1,2) node [below right] {$\hat{\imath}'$};
\draw[->, very thick, blue] (0,0) -- (1,1) node [below right] {$\hat{\jmath}'$};
\end{tikzpicture}
\end{center}

\vfill

\newpage

\underline{Using these vectors}, we want to get to the point $(2,1)$:
\begin{center}
\begin{tikzpicture}[scale=0.6]
\draw[gray!50] (-5,-5) grid (5,5);
\draw[<->, thick] (-5.5,0) -- (5.5,0) node [right] {$x$};
\draw[<->, thick] (0,-5.5) -- (0,5.5) node [above] {$y$};
\draw[->, very thick, red] (0,0) -- (1,2) node [below right] {$\hat{\imath}'$};
\draw[->, very thick, blue] (0,0) -- (1,1) node [below right] {$\hat{\jmath}'$};
\draw[fill=black] (2,1) circle [radius=3pt];
\end{tikzpicture}
\end{center}

\vspace{1.5in}

Knowing our solution is $(-1,3)$:
\[
-1\begin{bmatrix} 1 \\ 2 \end{bmatrix} + 3 \begin{bmatrix} 1 \\ 1 \end{bmatrix} = \begin{bmatrix} 2 \\ 1 \end{bmatrix}
\]

\vfill
Visually, we get
\begin{center}
\begin{tikzpicture}[scale=0.7]
\draw[gray!50] (-5,-5) grid (5,5);
\draw[<->, thick] (-5.5,0) -- (5.5,0) node [right] {$x$};
\draw[<->, thick] (0,-5.5) -- (0,5.5) node [above] {$y$};
\draw[->, very thick, red] (0,0) -- (1,2);
\draw[->, very thick, blue] (0,0) -- (1,1);
\draw[fill=black] (2,1) circle [radius=3pt];
% \draw[->, very thick, dashed, red] (0,0) -- (-1,-2) node [above left] {$-1\hat{\imath}'$};
% \draw[->, very thick, dashed, blue] (-1,-2) -- (0,-1);
% \draw[->, very thick, dashed, blue] (0,-1) -- (1,0);
% \draw[->, very thick, dashed, blue] (1,0) -- (2,1) node [below right] {$3\hat{\jmath}'$};
\pgftransformcm{1}{2}{1}{1}{\pgfpoint{0cm}{0cm}}
\draw[violet] (-2,-3) grid (2,3);
\end{tikzpicture}
\end{center}

\newpage

{\color{red}\textbf{Example 1.}} Using the new basis vectors $\hat{\imath} = \begin{bmatrix} 1 \\ 2 \end{bmatrix}$ and $\hat{\jmath} = \begin{bmatrix} 1 \\ 1 \end{bmatrix}$ \newline\\ show that $(2,-1)$ is the solution to  \systeme{x+y=1, 2x+y=3}
\bigskip

\begin{tikzpicture}[scale=0.7]
\draw[gray!50] (-5,-5) grid (5,5);
\draw[<->, thick] (-5.5,0) -- (5.5,0) node [right] {$x$};
\draw[<->, thick] (0,-5.5) -- (0,5.5) node [above] {$y$};
\draw[->, very thick, red] (0,0) -- (1,2);
\draw[->, very thick, blue] (0,0) -- (1,1);
\draw[fill=black] (1,3) circle [radius=3pt];
\end{tikzpicture}

\vfill

\newpage

Like single equations, some systems of equations have special answers
\begin{itemize}
    \item No solution: $\varnothing$
    \item Infinite number of solutions
\end{itemize}
\vfill

{\color{red}\textbf{Example 2.}} Using the new basis vectors $\hat{\imath} = \begin{bmatrix} 1 \\ 2 \end{bmatrix}$ and $\hat{\jmath} = \begin{bmatrix} 1 \\ 2 \end{bmatrix}$ show that the system below has no solution.    \newline\\
\systeme{x+y=2, 2x+2y=1}

\begin{tikzpicture}[scale=0.7]
\draw[gray!50] (-5,-5) grid (5,5);
\draw[<->, thick] (-5.5,0) -- (5.5,0) node [right] {$x$};
\draw[<->, thick] (0,-5.5) -- (0,5.5) node [above] {$y$};
% \draw[->, very thick, red] (0,0) -- (1,2);
% \draw[->, very thick, blue] (0,0) -- (1,2);
\draw[fill=black] (2,1) circle [radius=3pt];
\end{tikzpicture}
\vfill

\newpage

$\begin{bmatrix}1 & 1 \\ 2 & 2\end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} 2 \\ 1 \end{bmatrix}$  \newline\\

\begin{tikzpicture}[scale=0.7]
\draw[gray!50] (-5,-5) grid (5,5);
\draw[<->, thick] (-5.5,0) -- (5.5,0) node [right] {$x$};
\draw[<->, thick] (0,-5.5) -- (0,5.5) node [above] {$y$};
% \draw[->, very thick, red] (0,0) -- (1,2);
% \draw[->, very thick, blue] (0,0) -- (1,2);
\draw[fill=black] (2,1) circle [radius=3pt];
% \draw[->, very thick, dashed, red] (0,0) -- (-1,-2) node [above left] {$-1\hat{\imath}'$};
% \draw[->, very thick, dashed, blue] (-1,-2) -- (0,-1);
% \draw[->, very thick, dashed, blue] (0,-1) -- (1,0);
% \draw[->, very thick, dashed, blue] (1,0) -- (2,1) node [below right] {$3\hat{\jmath}'$};
\pgftransformcm{1}{2}{1}{2}{\pgfpoint{0cm}{0cm}}
\draw[dashed, violet] (-1,-1) grid (1,1);
\end{tikzpicture}

\vfill

If we graph the equations $x + y = 2$ and $2x + 2y = 1$, we find that the graphs do not intersect:
\begin{center}
\begin{tikzpicture}[scale=0.7]
\draw[gray!50] (-5,-5) grid (5,5);
\draw[<->, thick] (-5.5,0) -- (5.5,0) node [right] {$x$};
\draw[<->, thick] (0,-5.5) -- (0,5.5) node [above] {$y$};
\draw[<->, red, very thick, domain=-3:5] plot (\x, 2 - \x);
\draw[<->, blue, very thick, domain=-4:4.5] plot (\x, 0.5-\x);
\end{tikzpicture}
\end{center}

\vfill

\newpage

{\color{red}\textbf{Example 3.}} Show that the system below has an infinite number of solutions.    \newline\\

\systeme{2x-y=1, 4x-2y=2}

\begin{tikzpicture}[scale=0.7]
\draw[gray!50] (-5,-5) grid (5,5);
\draw[<->, thick] (-5.5,0) -- (5.5,0) node [right] {$x$};
\draw[<->, thick] (0,-5.5) -- (0,5.5) node [above] {$y$};
\draw[fill=black] (1,2) circle [radius=3pt];
\end{tikzpicture}

\vfill

$\begin{bmatrix} 2 & -1 \\ 4 & -2 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} 1 \\ 2 \end{bmatrix}$ \newline\\

\begin{tikzpicture}[scale=0.7]
\draw[gray!50] (-5,-5) grid (5,5);
\draw[<->, thick] (-5.5,0) -- (5.5,0) node [right] {$x$};
\draw[<->, thick] (0,-5.5) -- (0,5.5) node [above] {$y$};
% \draw[->, very thick, red] (0,0) -- (1,2);
% \draw[->, very thick, blue] (0,0) -- (1,1);
\draw[fill=black] (1,2) circle [radius=3pt];
% \draw[->, very thick, dashed, red] (0,0) -- (-1,-2) node [above left] {$-1\hat{\imath}'$};
% \draw[->, very thick, dashed, blue] (-1,-2) -- (0,-1);
% \draw[->, very thick, dashed, blue] (0,-1) -- (1,0);
% \draw[->, very thick, dashed, blue] (1,0) -- (2,1) node [below right] {$3\hat{\jmath}'$};
\pgftransformcm{2}{4}{-1}{-2}{\pgfpoint{0cm}{0cm}}
\draw[dashed, violet] (-1,-1) grid (1,1);
\end{tikzpicture}

\vfill

\newpage

\subsubsection*{Matrix Methods for Solving a System of Equations}

If we graph the equations $2x-y=1$ and $4x-2y=2$, we find that they are equations for the same line:  \newline\\

\begin{center}
\begin{tikzpicture}[scale=0.7]
\draw[gray!50] (-5,-5) grid (5,5);
\draw[<->, thick] (-5.5,0) -- (5.5,0) node [right] {$x$};
\draw[<->, thick] (0,-5.5) -- (0,5.5) node [above] {$y$};
\draw[<->, very thick, violet, domain=-2.5:2.5] plot (\x, 2*\x);
\end{tikzpicture}
\end{center}

In the intro, we saw that the system of equations
\begin{center}\systeme{x+y=2, 2x+y=1}\end{center}
in matrix form is
\[
\begin{bmatrix} 1 & 1 \\ 2 & 1 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} 2 \\ 1 \end{bmatrix}
\]

\vspace{0.75in}

We were able to get a solution $(-1,3)$.

\vfill

In matrix form, this is
\begin{flalign*}
\begin{bmatrix}
1 & 0 \\ 0 & 1
\end{bmatrix}
\begin{bmatrix} x \\ y \end{bmatrix}
=
\begin{bmatrix} -1 \\ 3 \end{bmatrix}   &&\\
\end{flalign*}

\vfill

So, if we can transform
\begin{flalign*}
\begin{bmatrix} 1 & 1 \\ 2 & 1 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix}
\text{ into }
\begin{bmatrix}
1 & 0 \\ 0 & 1
\end{bmatrix}
\begin{bmatrix} x \\ y \end{bmatrix}
&&\\
\end{flalign*}
that will transform the right side (point) we are starting with, $\begin{bmatrix} 2 \\ 1\end{bmatrix}$, to our solution of $\begin{bmatrix} -1 \\ 3 \end{bmatrix}$

\newpage

Another way to look at this is, given $\hat{\imath}'$ and $\hat{\jmath}'$, how can we get back to our original vectors $\hat{\imath}$ and $\hat{\jmath}$

\emph{**while using the rules for $\hat{\imath}'$ and $\hat{\jmath}'$**}? \newline\\

\begin{minipage}{0.45\textwidth}
\begin{tikzpicture}[scale=0.65]
\draw[gray!50] (-3,-3) grid (3,3);
\draw[<->, thick] (-3.5,0) -- (3.5,0) node [right] {$x$};
\draw[<->, thick] (0,-3.5) -- (0,3.5) node [above] {$y$};
\draw[->, very thick, red] (0,0) -- (1,2) node [above right] {$\hat{\imath}'$};
\draw[->, very thick, blue] (0,0) -- (1,1) node [below right] {$\hat{\jmath}'$};
\end{tikzpicture}
\end{minipage}
\hspace{-1.25in}
TO $\rightarrow$ \qquad
\begin{minipage}{0.4\textwidth}
\begin{tikzpicture}[scale=0.65]
\draw[gray!50] (-3,-3) grid (3,3);
\draw[<->, thick] (-3.5,0) -- (3.5,0) node [right] {$x$};
\draw[<->, thick] (0,-3.5) -- (0,3.5) node [above] {$y$};
\draw[->, ultra thick, red] (0,0) -- (1,0) node [below right] {$\hat{\imath}$};
\draw[->, ultra thick, blue] (0,0) -- (0,1) node [above right] {$\hat{\jmath}$};
\end{tikzpicture}
\end{minipage}

\vfill

Multiplying $\hat{\imath}'$ by the vector $\begin{bmatrix} -1 \\ 2 \end{bmatrix}$ gives us the following picture:
\begin{center}
\begin{tikzpicture}[scale=0.65]
\draw[gray!50] (-3,-3) grid (3,3);
\draw[<->, thick] (-3.5,0) -- (3.5,0) node [right] {$x$};
\draw[<->, thick] (0,-3.5) -- (0,3.5) node [above] {$y$};
\draw[->, very thick, red] (0,0) -- (1,2);
\draw[->, very thick, blue] (0,0) -- (1,1);
\draw[->, very thick, red, dashed] (0,0) -- (-1,-2) node [above left] {$-1\hat{\imath}'$};
\draw[->, very thick, blue, dashed] (-1,-2) -- (0,-1);
\draw[->, very thick, blue, dashed] (0,-1) -- (1,0) node [below right] {$2\hat{\jmath}'$};
\end{tikzpicture}
\end{center}

\vfill

Multiplying $\hat{\jmath}'$ by the vector $\begin{bmatrix} 1 \\ -1 \end{bmatrix}$ gives us the following picture:

\begin{center}
\begin{tikzpicture}[scale=0.65]
\draw[gray!50] (-3,-3) grid (3,3);
\draw[<->, thick] (-3.5,0) -- (3.5,0) node [right] {$x$};
\draw[<->, thick] (0,-3.5) -- (0,3.5) node [above] {$y$};
\draw[->, very thick, red] (0,0) -- (1,2);
\draw[->, very thick, blue] (0,0) -- (1,1);
\draw[->, very thick, blue, dashed] (1,2) -- (0,1) node [above left] {$-1\hat{\jmath}'$};
\end{tikzpicture}
\end{center}

\vfill

\newpage

Putting these ideas together gives us the \textbf{inverse matrix}
\[
\begin{bmatrix} -1 & 1 \\ 2 & -1 \end{bmatrix}
\]

of $\begin{bmatrix} 1 & 1 \\ 2 & 1 \end{bmatrix}$ which we can then use to solve our system of equations:  \vspace{1in}

\begin{flalign*}
    \begin{bmatrix} -1 & 1 \\ 2 & -1 \end{bmatrix}
    \begin{bmatrix} 1 & 1 \\ 2 & 1 \end{bmatrix}
    \begin{bmatrix} x \\ y \end{bmatrix} &=
    \begin{bmatrix} -1 & 1 \\ 2 & -1 \end{bmatrix}
    \begin{bmatrix} 2 \\ 1 \end{bmatrix} &&\\
    \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}
    \begin{bmatrix} x \\ y \end{bmatrix} &=
    \begin{bmatrix} -1 \\ 3 \end{bmatrix}   &&\\
    \begin{bmatrix} x \\ y \end{bmatrix} &=
    \begin{bmatrix} -1 \\ 3 \end{bmatrix} &&\\
\end{flalign*}

Which gives us our solution $(-1, 3)$.  \vfill

Working with higher dimension matrices may be more difficult to apply the previous visual techniques. \newline\\

Thus, we can alternatively work with the \emph{rows} of the matrix as well to find our solution. \vfill

To do this, we have 3 \textit{elementary row operations}:
\begin{itemize}
    \item We can interchange 2 rows
    \item We can multiply a row by a nonzero number
    \item We can add (or subtract) two rows
\end{itemize}

\vfill

\newpage

{\color{red}\textbf{Example 4.}} Using elementary row operations, transform the matrix $\begin{bmatrix} 1 & 1 \\ 2 & 1 \end{bmatrix}$ to $\begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}$   \vfill

{\color{red}\textbf{Example 5.}} Apply the same elementary row operations from the previous example to the matrix $\begin{bmatrix} 2 \\ 1 \end{bmatrix}$   \vfill

\newpage

{\color{red}\textbf{Example 6.}} Using elementary row operations, transform the matrix $\begin{bmatrix} 1 & 1 \\ 2 & 1 \end{bmatrix}$ to $\begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}$

\vfill

{\color{red}\textbf{Example 7.}} Apply the same elementary row operations from the previous example to the matrix $\begin{bmatrix} 2 \\ 1 \end{bmatrix}$

\vfill

\newpage

{\color{red}\textbf{Example 8.}} Using elementary row operations, transform the matrix $\begin{bmatrix} 2 & -1 \\ 4 & -2 \end{bmatrix}$ to $\begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}$
\vfill

{\color{red}\textbf{Example 9.}} Apply the same elementary row operations from the previous example to the matrix $\begin{bmatrix} 1 \\ 2 \end{bmatrix}$

\vfill

% While graphing methods may be easier for $2 \times 2$ systems of equations, graphing methods get more difficult for larger systems such as $3 \times 3$, $4 \times 4$, etc. We will use elementary row operations and matrices for those.

\end{document}