text:
\section{\label{sec:intro}Introduction and summary}
Understanding quantum Yang-Mills theory is one of the most important
and challenging open problems in mathematical physics. While approaching
this problem in a fully non-perturbative fashion seems to be out of reach
within the near future, there are recent developments in classical and
quantum field theory which make it plausible that quantum Yang-Mills theory
could relatively soon be constructed within a perturbative approach
that treats the coupling constant non-perturbatively, but Planck's constant $\hbar$
as a formal deformation parameter. See \cite{Cahiers,syntvar,Collini} and the next paragraph for further details.
The advantage of such an approach
compared to standard perturbative (algebraic) quantum field theory,
see e.g.\ \cite{Kasia} for a recent monograph, is that by treating
the coupling constant non-perturbatively the resulting quantum field theory
is sensitive to the global geometry of the field configuration spaces.
This is particularly interesting and rich in gauge theories, where the global geometry of
the space of gauge fields encodes various topological features such as
characteristic classes of the underlying principal bundles, holonomy groups
and other topological charges.
\vspace{2mm}

Loosely speaking, the construction of a quantum field theory within this non-standard
perturbative approach consists of the following three steps:
1.)~Understand the smooth structure and global geometry of
the space of solutions of the field equation of interest.
2.)~Use the approach of \cite{Zuckerman} to equip the solution space
with a symplectic form and construct a corresponding Poisson algebra of smooth functions on it.
(The latter should be interpreted as the Poisson algebra of classical observables of our field theory.)
3.)~Employ suitable techniques from formal deformation quantization
to quantize this Poisson algebra.
Even though stating these three steps in a loose language is very simple,
performing them rigorously is quite technical and challenging.
The reason behind this is that the configuration and solution spaces
of field theories are typically infinite-dimensional, hence the standard techniques of
differential geometry do not apply. In our opinion, the most
elegant and powerful method to study the smooth spaces appearing in field theories
is offered by sheaf topos techniques: In this approach a smooth space
$X$ is defined by coherently specifying {\em all} smooth maps $U \to X$ from
{\em all} finite-dimensional manifolds $U$ to $X$. More precisely,
this means that $X$ is a (pre)sheaf on a suitable site $\mathsf{C}$,
which we may choose as the site of all finite-dimensional manifolds $U$
that are diffeomorphic to some $\mathbb{R}^n$, $n\in\mathbb{Z}_{\geq 0}$.
In particular, the maps from $U=\mathbb{R}^0$ determine the points of $X$ and the maps from
$U = \mathbb{R}^1$ the smooth curves in $X$. Employing such techniques, the first two steps of the program
sketched above have been successfully solved in \cite{Cahiers} and \cite{syntvar}
for the case of non-linear field theories without gauge symmetry. Concerning step 3.),
Collini \cite{Collini} obtained very interesting and promising results showing that Fedosov's construction
of a $\star$-product applies to the Poisson algebra of $\Phi^4$-theory in $4$ spacetime dimensions,
leading to a formal deformation quantization of this theory that is non-perturbative
in the coupling constant. Collini's approach is different from ours as it
describes the infinite-dimensional spaces of fields and solutions by
locally-convex manifolds, which are less flexible.
It would be an interesting problem to reformulate and generalize
his results in our more elegant and powerful sheaf theoretic approach \cite{Cahiers,syntvar}.
\vspace{2mm}

The goal of this paper is to address and solve step 1.)~of the program sketched above for the case
of Yang-Mills theory with a possibly non-Abelian structure group $G$ on globally hyperbolic Lorentzian manifolds.
A crucial observation is that, due to the presence of gauge symmetries, the sheaf topos approach
of \cite{Cahiers} and \cite{syntvar} is no longer sufficient and has to be generalized to
``higher sheaves'' ({\em stacks}) and the ``higher toposes'' they form.
We refer to \cite{Schreiber} for an overview of recent developments at the interface of higher topos theory
and mathematical physics, and also to \cite{Eggertsson} for a gentle introduction to the role of stacks in gauge theory.
See also \cite{StackyCS} for a formulation of Chern-Simons theory in this framework.
The basic idea behind this is as follows: The collection of all gauge fields on a manifold $M$
naturally forms a groupoid and not a set. The objects $(A,P)$ of this groupoid are principal $G$-bundles
$P$ over $M$ equipped with a connection $A$ and the morphisms
$h : (A,P) \to (A^\prime,P^\prime)$
are gauge transformations, i.e.\ bundle isomorphisms preserving the connections.
There are two important points we would like to emphasize:
i)~This groupoid picture is essential to capture all the topological
charge sectors of the gauge field (i.e.\ non-isomorphic principal bundles).
In particular, it is intrinsically non-perturbative as one does not have to fix
a particular topological charge sector to perturb around.
ii)~Taking the quotient of the groupoid of gauge fields, i.e.\ forming ``gauge orbits'',
one loses crucial information that is encoded in the automorphism groups of objects of
the groupoid, i.e.\ the stabilizer groups of bundles with connections.
This eventually would destroy the important descent properties (i.e.\ gluing connections
up to a gauge transformation) that are enjoyed by the groupoids of gauge fields, but
not by their corresponding sets of ``gauge orbits''.
It turns out that gauge fields on a manifold $M$ do not only form a groupoid but even a smooth groupoid.
The latter may be described by groupoid-valued presheaves on our site $\mathsf{C}$,
i.e.\ objects of the category $\mathsf{H} := \mathrm{PSh}(\mathsf{C},\mathsf{Grpd})$.
Following the seminal work by K.~Brown, J.~F.~Jardine and others,
in a series of papers \cite{Hollander, Hollander2, Hollander3} Hollander
developed the abstract theory of presheaves of groupoids
by using techniques from model category theory/homotopical algebra,
see e.g.\ \cite{Dwyer} for a concise introduction.
One of her main insights was that the usual theory of {\em stacks} \cite{DM,Giraud}
can be formalized very elegantly and efficiently in this framework by employing homotopical
techniques. In short, stacks can be identified as those presheaves of groupoids satisfying a
notion of descent, which can be phrased in purely model categorical terms.
With these techniques and developments in mind, we now can state more precisely the two main
problems we address in this paper:
{\bf (I)}~Understand and describe the stack of Yang-Mills fields
in the framework of \cite{Hollander, Hollander2, Hollander3}.
{\bf (II)}~Understand what it means for the stacky version of the Yang-Mills Cauchy problem to be well-posed.
\vspace{2mm}

The present paper is part of a longer term research program of two of us (M.B.\ and A.S.)
on {\em homotopical algebraic quantum field theory}. The aim of this program is to develop
a novel and powerful framework for quantum field theory on Lorentzian manifolds
that combines ideas from locally covariant quantum field theory \cite{Brunetti}
with homotopical algebra \cite{Hovey, Dwyer}. This is essential to capture structural properties of quantum
gauge theories that are lost at the level of gauge invariant observables.
In previous works, we could confirm for toy-models
that our homotopical framework is suitable to perform local-to-global
constructions for gauge field observables \cite{hocolim} and
we constructed a class of toy-examples of homotopical algebraic quantum field
theories describing a combination of classical gauge fields and quantized matter fields \cite{horan}.
Based on the results of the present paper, we will be able to address steps 2.)\ and 3.)\
of the program outlined above for gauge theories and in particular for Yang-Mills theory.
We expect that this will allow us to obtain first examples of homotopical algebraic quantum field theories
which describe quantized gauge fields.
\vspace{2mm}

The outline of the remainder of this paper is as follows:
In Section \ref{sec:prelim} we provide a rather self-contained
introduction to presheaves of groupoids and their model category structures.
This should allow readers without much experience with this subject
to understand our statements and constructions.
In particular, we review the main results of \cite{Hollander}
which show that there are two model structures on the category $\mathsf{H} = \mathrm{PSh}(\mathsf{C},\mathsf{Grpd})$,
called the global and the local model structure.
The local model structure, which is obtained by localizing the global one,
is crucial for detecting stacks in a purely model categorical fashion
as those are precisely the {\em fibrant} objects for this model structure.
We then provide many examples of stacks that are important in gauge theory,
including the stack represented by a manifold and some relevant classifying stacks, e.g.\
$\mathrm{B}G_\mathrm{con}$ which classifies principal $G$-bundles with connections.
This section is concluded by explaining homotopy fiber products for stacks
and (derived) mapping stacks, which are homotopically meaningful constructions on
stacks that will be frequently used in our work.
\vspace{2mm}

In Section \ref{sec:gaugefields} we construct and explicitly describe the stack
of gauge fields $G\mathbf{Con}(M)$ on a manifold $M$. Our main guiding principle
is the following expectation of how the stack $G\mathbf{Con}(M)$ is supposed to look:
Via the functor of points perspective, the groupoid $G\mathbf{Con}(M)(U)$ obtained by evaluating
the stack $G\mathbf{Con}(M)$ on an object $U$ in $\mathsf{C}$ should be interpreted as
the groupoid of smooth maps $U \to G\mathbf{Con}(M)$. Because $G\mathbf{Con}(M)$ is supposed to
describe principal $G$-bundles with connections, any such smooth map will describe a smoothly
$U$-parametrized family of principal $G$-bundles with connections on $M$, and
the corresponding morphisms are smoothly $U$-parametrized gauge transformations.
We shall obtain a precise and intrinsic definition of $G\mathbf{Con}(M)$ by concretifying
the mapping stack from (a suitable cofibrant replacement of) the manifold $M$
to the classifying stack $\mathrm{B}G_\mathrm{con}$. Our concretification prescription (cf.\ Definition \ref{defi:diffconcret}) improves
the one originally proposed in \cite{Fiorenza,Schreiber}. In fact, as we explain in
more detail in Appendix \ref{app:concretification}, the original concretification does
not produce the desired result (sketched above) for the stack of gauge fields,
while our improved concretification fixes this issue.
We then show that assigning to connections their curvatures
may be understood as a natural morphism $\mathbf{F}_M : G\mathbf{Con}(M)\to \mathbf{\Omega}^2(M,\mathrm{ad}(G))$
between concretified mapping stacks.
\vspace{2mm}

Section \ref{sec:YM} is devoted to formalizing the Yang-Mills equation on globally
hyperbolic Lorentzian manifolds $M$ in our model categorical framework.
After providing a brief review of some basic aspects of
globally hyperbolic Lorentzian manifolds, we shall show that, similarly to the curvature,
the Yang-Mills operator may be formalized as a natural morphism
$\mathbf{YM}_M : G\mathbf{Con}(M) \to \mathbf{\Omega}^1(M,\mathrm{ad}(G))$ between concretified mapping stacks.
This then allows us to define abstractly the stack of solutions to the Yang-Mills equation $G\mathbf{Sol}(M)$
by a suitable homotopy fiber product of stacks (cf.\ Definition \ref{defi:solstack}).
We shall explicitly work out the Yang-Mills stack $G\mathbf{Sol}(M)$ and give
a simple presentation up to weak equivalence in $\mathsf{H}$.
This solves our problem {\bf (I)} listed above.
\vspace{2mm}

Problem {\bf (II)} is then addressed in Section \ref{sec:Cauchy}.
After introducing the stack of initial data $G\mathbf{Data}(\Sigma)$
on a Cauchy surface $\Sigma\subseteq M$ and the morphism of stacks
 $\mathrm{data}_\Sigma : G\mathbf{Sol}(M) \to G\mathbf{Data}(\Sigma)$ that assigns to
solutions of the Yang-Mills equation their initial data,
we formalize a notion of well-posedness for the stacky Yang-Mills Cauchy problem
in the language of model categories (cf.\ Definition \ref{def:stackycauchypbl}).
Explicitly, we say that the stacky Cauchy problem is well-posed
if $\mathrm{data}_\Sigma $ is a weak equivalence in the local model structure on $\mathsf{H}$.
We will then unravel this abstract condition and obtain that well-posedness of
the stacky Cauchy problem is equivalent to well-posedness
of a whole family of smoothly $U$-parametrized Cauchy problems (cf.\ Proposition \ref{propo:cauchy}).
A particular member of this family
(given by the trivial parametrization by a point $U=\mathbb{R}^0$) is the ordinary Yang-Mills Cauchy problem,
which is known to be well-posed in dimension $m=2,3,4$ \cite{CSYM,CBYM}.
To the best of our knowledge, smoothly $U$-parametrized Cauchy problems
of the kind we obtain in this work have not been studied in the PDE theory literature yet.
Because of their crucial role in understanding Yang-Mills theory,
we believe that such problems deserve the attention of the PDE community.
It is also interesting to notice that Yang-Mills theory, which is of primary interest to physics,
provides a natural bridge connecting two seemingly distant branches of pure mathematics,
namely homotopical algebra and PDE theory.
\vspace{2mm}

In Section \ref{sec:Lorenz} we make the interesting observation that
gauge fixings may be understood in our framework as weakly equivalent descriptions
of the same stack. For the sake of simplifying our arguments,
we focus on the particular example of Lorenz gauge fixing, which is
often used in applications to turn the Yang-Mills equation into a hyperbolic PDE.
We define a stack $G\mathbf{Sol}_{\mathrm{g.f.}}(M)$ of gauge-fixed Yang-Mills fields,
which comes together with a morphism $G\mathbf{Sol}_{\mathrm{g.f.}}(M) \to G\mathbf{Sol}(M)$
to the stack of all Yang-Mills fields. Provided certain smoothly $U$-parametrized PDE
problems admit a solution (cf.\ Proposition \ref{propo:fixing}), this morphism is a weak equivalence in $\mathsf{H}$,
which means that the gauge-fixed Yang-Mills stack $G\mathbf{Sol}_{\mathrm{g.f.}}(M)$ is
an equivalent description of $G\mathbf{Sol}(M)$.
\vspace{2mm}

The paper contains four appendices. In the first three appendices
we work out some relevant aspects of the model category $\mathsf{H}$ of presheaves of groupoids
that were not discussed by Hollander in her series a papers \cite{Hollander, Hollander2, Hollander3}.
In Appendix \ref{app:monoidal} we show that $\mathsf{H}$ is
a monoidal model category, which is essential for our construction of mapping stacks. In Appendix \ref{app:cofibrep} we
obtain functorial cofibrant replacements
of manifolds in $\mathsf{H}$, which are needed for computing our mapping stacks explicitly.
In Appendix \ref{app:truncation} we develop very explicit techniques to compute fibrant
replacements in the $(-1)$-truncation (cf.\ \cite{Barwick,Rezk,ToenVezzosi} and also \cite{Lurie})
of the canonical model structure on over-categories $\mathsf{H}/K$,
which are crucial for the concretification of our mapping stacks.
The last Appendix \ref{app:concretification} compares our concretification prescription
with the original one proposed in \cite{Fiorenza,Schreiber}. In particular, we show that the latter
does not lead to the desired stack of gauge fields, i.e.\ the stack describing smoothly parametrized
principal $G$-bundles with connections, which was our motivation to develop and propose
an improved concretification prescription in Definition \ref{defi:diffconcret}.

\section{\label{sec:prelim}Preliminaries}
We fix our notations and review some aspects of the theory of presheaves
of groupoids which are needed for our work. Our main reference for this section
is \cite{Hollander} and references therein. A good introduction
to model categories is \cite{Dwyer}, see also \cite{Hovey,Hirschhorn} for more details.
We shall use presheaves of groupoids as a model for stacks which are, loosely speaking,
generalized smooth spaces whose `points' may have non-trivial automorphisms.

\subsection{\label{subsec:Grpd}Groupoids}
Recall that a groupoid $G$ is a (small) category in which every morphism is an isomorphism.
For $G$ a groupoid, we denote its objects by symbols like $x$
and its morphisms by symbols like $g : x\to x^\prime$. A morphism $F : G\to H$ between
two groupoids $G$ and $H$ is a functor between their underlying categories.
We denote the category of groupoids by $\mathsf{Grpd}$.
\vspace{2mm}

The category $\mathsf{Grpd}$ is closed symmetric monoidal: The product $G\times H$ of two groupoids
is the groupoid whose object (morphism) set is the product of the object (morphism) sets
of $G$ and $H$. The monoidal unit is the groupoid $\{\ast\}$ with only one object and its identity morphism.
The functor $G\times (-) : \mathsf{Grpd} \to \mathsf{Grpd}$ has a right adjoint functor, which we denote by
$\mathsf{Grpd}(G,-) : \mathsf{Grpd} \to \mathsf{Grpd}$. We call $\mathsf{Grpd}(G,H)$ the  internal hom-groupoid
from $G$ to $H$. Explicitly, the objects of $\mathsf{Grpd}(G,H)$ are all
functors $F : G\to H$ and the morphisms from $F: G\to H$ to $F^\prime : G\to H$
are all natural transformations $\eta : F\to F^\prime$. It is easy to see that
a morphism in $\mathsf{Grpd}(G,H)$ may be equivalently described by a functor
\begin{flalign}\label{eqn:homgrpd}
U : G\times \Delta^1\longrightarrow H~,
\end{flalign}
where $\Delta^1$ is the groupoid with two objects, say $0$ and $1$, and a unique isomorphism $0\to 1$
between them. (The source and target of the morphism $U$ is obtained by restricting
$U$ to the objects $0$ and $1$ in $\Delta^1$, and their identity morphisms, and the natural transformation $\eta$
is obtained by evaluating $U$ on the morphism $0\to 1$ in $\Delta^1$.)
This latter perspective on morphisms in $\mathsf{Grpd}(G,H)$ will be useful later when we discuss presheaves of groupoids.
\vspace{2mm}

The category $\mathsf{Grpd}$ can be equipped with a model structure, i.e.\ one can do
homotopy theory with groupoids. For a proof of the theorem below we refer to \cite[Section~6]{Strickland}.
 Recall that a {\em model category}
is a complete and cocomplete category with three distinguished classes of morphisms
-- called {\em fibrations}, {\em cofibrations} and {\em weak equivalences} -- that have to satisfy a list of axioms,
see e.g.\ \cite{Dwyer} or \cite{Hovey,Hirschhorn}.
\begin{theo}\label{theo:groupoids}
Define a morphism $F : G\to H$ in $\mathsf{Grpd}$ to be
\begin{itemize}
\item[(i)] a weak equivalence if it is fully faithful and essentially surjective;

\item[(ii)] a fibration if for each object $x$ in $G$ and each morphism
$h : F(x)\to y$ in $H$ there exists a morphism $g : x \to x^\prime$
in $G$ such that $F(g)=h$; and

\item[(iii)] a cofibration if it is injective on objects.
\end{itemize}
With these choices $\mathsf{Grpd}$ is a model category.
\end{theo}

In the following, we will need a simple and tractable
model for the {\em homotopy limit} $\mathrm{holim}_{\mathsf{Grpd}}^{}$
of a cosimplicial diagram in $\mathsf{Grpd}$. See e.g.\ \cite{Dwyer}
for a brief introduction to homotopy limits and colimits.
Such a model was found by Hollander in \cite{Hollander} in terms of the descent category.
\begin{propo}\label{propo:descentcat}
Let $G^\bullet$ be any cosimplicial diagram in $\mathsf{Grpd}$, i.e.\
\begin{flalign}
\xymatrix@C=1.1pc{
G^\bullet := \bigg(
G^0  \ar@<0.5ex>[r]^-{\mathrm{d}^0}\ar@<-0.5ex>[r]_-{\mathrm{d}^1}~&~
G^1 \ar@<1ex>[r]\ar@<-1ex>[r]\ar[r]~&~ G^2
\ar@<0.5ex>[r]\ar@<-0.5ex>[r]\ar@<1.5ex>[r]\ar@<-1.5ex>[r]~&~    \cdots\bigg)
}~,
\end{flalign}
where $G^n$ are groupoids, for all $n \in\mathbb{Z}_{\geq 0}$, and
we suppressed as usual the codegeneracy maps $\mathrm{s}^i$ in this cosimplicial diagram.
Then the homotopy limit $\mathrm{holim}_{\mathsf{Grpd}}^{} G^\bullet$ is the groupoid whose
\begin{itemize}
\item objects are pairs $(x , h )$, where $x$ is an object in $G^0$
and $h :  \mathrm{d}^1(x) \to \mathrm{d}^0(x) $ is a morphism in $G^1$, such that
$\mathrm{s}^0(h) = \mathrm{id}_{x}$ and $\mathrm{d}^0(h)\circ \mathrm{d}^2(h) = \mathrm{d}^1(h)$ in $G^2$; and

\item morphisms $ g : (x,h)\to (x^\prime,h^\prime)$ are morphisms $g : x\to x^\prime$
in $G^0$, such that the diagram
\begin{flalign}
\xymatrix{
\ar[d]_-{h}\mathrm{d}^1(x) \ar[rr]^-{\mathrm{d}^1(g)}&& \mathrm{d}^1(x^\prime)\ar[d]^-{h^\prime}\\
\mathrm{d}^0(x) \ar[rr]_-{\mathrm{d}^0(g)}&&\mathrm{d}^0(x^\prime)
}
\end{flalign}
in $G^1$ commutes.
\end{itemize}
\end{propo}

\subsection{\label{subsec:H}Presheaves of groupoids and stacks}
Let $\mathsf{C}$ be the category with objects given by all
(finite-dimensional and paracompact) manifolds $U$ that are
diffeomorphic to a Cartesian space $\mathbb{R}^n$, $n\in \mathbb{Z}_{\geq 0}$,
and morphisms given by all smooth maps $\ell : U\to U^\prime$.
Notice that $U$ and $U^\prime$ are allowed to have different dimensions.
We equip $\mathsf{C}$ with the structure of a site by declaring
a family of morphisms
\begin{flalign}
\big\{\ell_i : U_i \longrightarrow U\big\}
\end{flalign}
in $\mathsf{C}$ to be a covering family whenever $\{U_i\subseteq U\}$ is a good open cover of $U$
and $\ell_i : U_i \to U$ are the canonical inclusions. As usual, we denote
intersections of the $U_i$ by $U_{i_1\dots i_n} := U_{i_1}\cap \cdots \cap U_{i_n}$.
By definition of good open cover, these intersections are either empty
or open subsets diffeomorphic to some $\mathbb{R}^n$, i.e.\ objects in $\mathsf{C}$.
We note that our site $\mathsf{C}$ is equivalent to the site $\mathsf{Cart}$ of Cartesian spaces
used in \cite{Fiorenza,Schreiber}. We however prefer to work with $\mathsf{C}$ instead of
$\mathsf{Cart}$, because covering families $\{\ell_i : U_i = \mathbb{R}^m \to U=\mathbb{R}^m\}$
in $\mathsf{Cart}$ are less intuitive as the $\ell_i$ are in general {\em not} subset inclusions.
In practice, see e.g.\ the examples in Section \ref{subsec:examples},
this would complicate the notations for cocycle conditions,
where, instead of the familiar restrictions $\vert_{U_i}$ of functions or forms
to $U_i\subseteq U$ (as it is the case for the site $\mathsf{C}$),
pullbacks along more general smooth maps $\ell_i$ would appear.
\vspace{2mm}

Let us denote by
\begin{flalign}
\mathsf{H} := \mathrm{PSh}(\mathsf{C},\mathsf{Grpd})
\end{flalign}
the category of presheaves on $\mathsf{C}$ with values in $\mathsf{Grpd}$.
(At this point our site structure on $\mathsf{C}$ does not yet play a role, but it will enter later
when we introduce a model structure on $\mathsf{H}$.)
An object in $\mathsf{H}$ is a functor $X : \mathsf{C}^\mathrm{op} \to \mathsf{Grpd}$
from the opposite category of $\mathsf{C}$ to the category of groupoids.
A morphism in $\mathsf{H}$ is a natural transformation $f : X \to Y$
between functors $X,Y : \mathsf{C}^\mathrm{op} \to \mathsf{Grpd}$.
\vspace{2mm}

Let us recall the fully faithful Yoneda embedding
\begin{flalign}\label{eqn:Yoneda}
\underline{(-)} : \mathsf{C}\longrightarrow \mathsf{H}~.
\end{flalign}
It assigns to an object $U$ in $\mathsf{C}$ the functor
$\underline{U} : \mathsf{C}^\mathrm{op}\to \mathsf{Grpd}$ that acts on objects as
\begin{subequations}
\begin{flalign}
\underline{U}(U^\prime) := \mathrm{Hom}_{\mathsf{C}}^{}(U^\prime,U)~,
\end{flalign}
where $\mathrm{Hom}^{}_{\mathsf{C}}$ are the morphism sets in $\mathsf{C}$ which we regard
as groupoids with just identity morphisms, and on
morphisms $\ell^\prime : U^\prime\to U^{\prime\prime}$ as
\begin{flalign}
\underline{U}(\ell^\prime) : \underline{U}(U^{\prime\prime}) \longrightarrow \underline{U}(U^\prime)~,~~
\big(\ell : U^{\prime\prime}\to U\big)\longmapsto \big(\ell\circ \ell^\prime : U^{\prime} \to U\big)~.
\end{flalign}
\end{subequations}
To a morphism $\ell : U\to U^{\prime}$ in $\mathsf{C}$ the Yoneda
embedding assigns the morphism $\underline{\ell} : \underline{U}\to \underline{U^\prime}$
in $\mathsf{H}$ whose stages are
\begin{flalign}
\underline{\ell} : \underline{U}(U^{\prime\prime})\longrightarrow \underline{U^\prime}(U^{\prime\prime})
~,~~\big(\ell^\prime : U^{\prime\prime}\to U\big)\longmapsto \big(\ell\circ \ell^\prime : U^{\prime\prime} \to U^{\prime}\big)~,
\end{flalign}
for all objects $U^{\prime\prime}$ in $\mathsf{C}$.
\vspace{2mm}

Given two objects $X$ and $Y$ in $\mathsf{H}$, their product
$X\times Y$ in $\mathsf{H}$ is given by the functor $X\times Y : \mathsf{C}^\mathrm{op}\to \mathsf{Grpd}$ that acts on objects as
\begin{subequations}
\begin{flalign}
(X\times Y) (U) := X(U)\times Y(U)~,
\end{flalign}
where on the right-hand side the product is the one in $\mathsf{Grpd}$,
and on morphisms $\ell : U\to U^\prime$ as
\begin{flalign}
(X\times Y) (\ell) :=X(\ell)\times Y(\ell) :  (X\times Y)(U^\prime) \longrightarrow (X\times Y)(U)~.
\end{flalign}
\end{subequations}
The product $\times$ equips $\mathsf{H}$ with the structure of a symmetric monoidal category.
The unit object is the constant presheaf of groupoids defined by the groupoid $\{\ast\}$,
i.e.\ the functor $\mathsf{C}^\mathrm{op} \to\mathsf{Grpd}$ that assigns $U\mapsto \{\ast\}$ and $(\ell: U\to U^\prime)\mapsto
\mathrm{id}_{\{\ast\}}$. In the following we denote groupoids and their corresponding constant
presheaves of groupoids by the same symbols. Explicitly, when $G$ is a groupoid
we also denote by $G$ the presheaf of groupoids specified by $U\mapsto G$ and $
(\ell : U\to U^\prime)\mapsto \mathrm{id}_{G}$. For example, we denote the unit object in $\mathsf{H}$
simply by $\{\ast\}$.
\vspace{2mm}

The symmetric monoidal category $\mathsf{H}$ has internal homs, i.e.\ it is closed symmetric monoidal.
To describe those explicitly, we first have to introduce mapping groupoids
$\mathsf{Grpd}(X,Y)$ between two objects $X$ and $Y$ in $\mathsf{H}$.
Recalling \eqref{eqn:homgrpd}, we define $\mathsf{Grpd}(X,Y)$ to be the groupoid
with objects given by all  $\mathsf{H}$-morphisms
\begin{subequations}
\begin{flalign}
f : X\longrightarrow Y
\end{flalign}
and morphisms given by all $\mathsf{H}$-morphisms
\begin{flalign}
u : X\times \Delta^1\longrightarrow Y~,
\end{flalign}
\end{subequations}
where $\Delta^1$ is the groupoid from \eqref{eqn:homgrpd} regarded as a constant presheaf of groupoids.
The internal hom-object $Y^X$ in $\mathsf{H}$ is then given by the functor
$Y^X : \mathsf{C}^\mathrm{op} \to \mathsf{Grpd}$ that acts on objects as
\begin{flalign}
Y^X(U) := \mathsf{Grpd}(\underline{U} \times X,Y)~.
\end{flalign}
On morphisms $\ell : U\to U^\prime$ in $\mathsf{C}$, we define
\begin{flalign}
Y^X(\ell) : Y^X(U^\prime)\longrightarrow Y^X(U)~
\end{flalign}
as follows: It is the functor that assigns to an object
$f : \underline{U}^\prime\times X\to Y$ of the groupoid $ Y^X(U^\prime)$
the object $Y^X(\ell)(f) : \underline{U}\times X\to Y$ of the groupoid
$Y^X(U)$ that is defined by the composition
$Y^X(\ell)(f) := f \circ (\underline{\ell}\times \mathrm{id}_X)$.
To a morphism $u : \underline{U^\prime}\times X\times \Delta^1\to Y$
of the groupoid $ Y^X(U^\prime)$ it assigns the morphism $Y^X(\ell)(u) :
\underline{U}\times X\times\Delta^1\to Y$ of the groupoid
$Y^X(U)$ that is defined by the composition
$Y^X(\ell)(u):=u \circ (\underline{\ell}\times\mathrm{id}_X\times \mathrm{id}_{\Delta^1})$.
For the terminal object $\mathbb{R}^0$ in $\mathsf{C}$, we have that $Y^X(\mathbb{R}^0) = \mathsf{Grpd}(X,Y)$ is the mapping groupoid.
\vspace{2mm}

Our category $\mathsf{H}$ can be equipped with (at least) two model structures.
To define them, let us recall that a
morphism $f : X\to Y$ in $\mathsf{H}$ is said to have the {\em left lifting property}
with respect to a morphism $f^\prime : X^\prime\to Y^\prime$ in $\mathsf{H}$
if all commutative squares of the form
\begin{flalign}
\xymatrix{
\ar[d]_-{f}\ar[rr] X && \ar[d]^-{f^\prime}X^\prime\\
\ar@{-->}[rru]_-{f^{\prime\prime}}Y \ar[rr] && Y^\prime
}
\end{flalign}
admit a lift $f^{\prime\prime}$, i.e.\ the two triangles commute.
Vice versa, one says that a morphism $f^\prime : X^\prime\to Y^\prime$ in $\mathsf{H}$
has the {\em right lifting property} with respect to a morphism $f : X\to Y$ in $\mathsf{H}$
if all commutative squares of the form above admit a lift $f^{\prime\prime}$.
\begin{lem}[Global model structure on $\mathsf{H}$ \cite{Hollander}]\label{lem:globmod}
Define a morphism $f : X\to Y$ in $\mathsf{H}$ to be
\begin{itemize}
\item[(i)] a weak equivalence if each stage $f : X(U)\to Y(U)$ is a weak equivalence in $\mathsf{Grpd}$;

\item[(ii)] a fibration if each stage $f : X(U)\to Y(U)$ is a fibration in $\mathsf{Grpd}$;

\item[(iii)] a cofibration if it has the left lifting property with respect to all acyclic fibrations (i.e.\ all morphisms
in $\mathsf{H}$ that are both fibrations and weak equivalences).
\end{itemize}
With these choices $\mathsf{H}$ becomes a model category. This is called the global
model structure on $\mathsf{H}$.
\end{lem}

The global model structure on $\mathsf{H} = \mathrm{PSh}(\mathsf{C},\mathsf{Grpd})$
is not yet the correct one as it does not encode any information about our site structure on $\mathsf{C}$.
It was shown in \cite{Hollander} that one can localize the global model structure
to obtain what is called the local model structure on $\mathsf{H}$. See also \cite{Hirschhorn}
or \cite[Section 5]{Dugger} for details on localizations of model categories.
The set of $\mathsf{H}$-morphisms with respect to which one localizes is given by
\begin{flalign}\label{eqn:locmorph}
S := \big\{ \mathrm{hocolim}_{\mathsf{H}}^{}\, \underline{U_{\bullet}} \longrightarrow \underline{U} \, : \, \{U_i\subseteq U\} \text{ good open cover}\, \big\}~.
\end{flalign}
As before, $\underline{U}$ is the object in $\mathsf{H}$ that is represented by the object
$U$ in $\mathsf{C}$ via the Yoneda embedding.
By $\underline{U_{\bullet}} $ we denote the simplicial diagram in $\mathsf{H}$ given by
\begin{flalign}\label{eqn:simplicaldiag}
\underline{U_\bullet} := \bigg(
\xymatrix@C=1.1pc{
\coprod\limits_{i} \underline{U_i} ~&~ \ar@<0.5ex>[l]\ar@<-0.5ex>[l] \coprod\limits_{ij} \underline{U_{ij}} ~&~\ar@<1ex>[l]\ar@<-1ex>[l]\ar[l] \coprod\limits_{ijk}\underline{U_{ijk}}
~&~ \ar@<0.5ex>[l]\ar@<-0.5ex>[l]\ar@<1.5ex>[l]\ar@<-1.5ex>[l]   \cdots
}  \bigg)~,
\end{flalign}
where $\coprod$ denotes the coproduct in $\mathsf{H}$ and we suppressed as usual the degeneracy maps.
Moreover, $\mathrm{hocolim}_{\mathsf{H}}^{}\, \underline{U_{\bullet}} $ denotes the homotopy
colimit of the simplicial diagram \eqref{eqn:simplicaldiag} in $\mathsf{H}$.
\vspace{2mm}

To describe the weak equivalences in the local model structure
on $\mathsf{H}$ it is useful to assign sheaves of homotopy groups to
presheaves of groupoids, cf.\ \cite[Section 5]{Hollander}.
\begin{defi}\label{def:sheavesofhomgroups}
Let $X : \mathsf{C}^\mathrm{op}\to\mathsf{Grpd}$ be an object in $\mathsf{H}$.
\begin{itemize}
\item[a)] Then $\pi_0 (X) : \mathsf{C}^\mathrm{op}\to\mathsf{Set}$ is the presheaf of sets defined by
$\pi_0 (X)(U) := \pi_0(X(U))$, for all objects $U$ in $\mathsf{C}$. (Here $\pi_0 (H)$ denotes the set
of isomorphism classes of objects of a groupoid $H$.)

\item[b)] Given any object $x$ in $X(U)$, then $\pi_1(X,x) : (\mathsf{C}/U)^\mathrm{op} \to \mathsf{Group}$ is the presheaf of groups
on the over-category $\mathsf{C}/U$ defined by
\begin{flalign}
\pi_1(X,x)\big(\ell  \big) := \pi_1\big(X(U^\prime), X(\ell)(x)\big)~,
\end{flalign}
for all objects $\ell : U^\prime\to U$ in  $\mathsf{C}/U$. (Here $\pi_1(H,y)$ denotes the automorphism group
of an object $y$ of a groupoid $H$.)
\end{itemize}
The sheafifications of $\pi_0 (X)$ and $\pi_1(X,x)$, for all objects $x$ in $X(U)$
and all objects $U$ in $\mathsf{C}$, are called the {\em sheaves of homotopy groups}
associated to an object $X$ in $\mathsf{H}$.
\end{defi}

The following theorem summarizes the relevant aspects of the local model structure on $\mathsf{H}$.
\begin{theo}[Local model structure on $\mathsf{H}$ \cite{Hollander}]\label{theo:localH}
There exists a model structure on $\mathsf{H}$ which is the localization of the global model structure
on $\mathsf{H}$ (cf.\ Lemma \ref{lem:globmod}) with respect to the set of morphisms \eqref{eqn:locmorph}.
It is called the local model structure on $\mathsf{H}$.  The following holds true:
\begin{itemize}
\item[(i)] A morphism $f : X\to Y$ in $\mathsf{H}$ is a weak equivalence in
the local model structure if and only if it induces an isomorphism on the associated sheaves of homotopy groups.

\item[(ii)] A morphism $f : X\to Y$ in $\mathsf{H}$ is a cofibration in
the local model structure if and only if it is a cofibration in the global model structure.

\item[(iii)] A morphism $f : X\to Y$ in $\mathsf{H}$ is a fibration in
the local model structure if and only if it has the right lifting property with respect
to all acyclic cofibrations in the local model structure. See also \cite[Proposition 4.2]{Hollander3}
or Proposition \ref{propo:localfibration} for a more explicit characterization.

\item[(iv)] An object $X$ in $\mathsf{H}$ is fibrant in the local model structure,
i.e.\ the canonical morphism $X\to\{\ast\}$ to the terminal object in $\mathsf{H}$
is a fibration, if and only if for all good open covers $\{U_i\subseteq U\}$ the canonical morphism
\begin{flalign}\label{eqn:stack}
\xymatrix@C=1.1pc{
X(U) ~\ar[rr] &&~ \mathrm{holim}_{\mathsf{Grpd}}^{}\bigg(
\prod\limits_{i} X(U_i)  \ar@<0.5ex>[r]\ar@<-0.5ex>[r]~&~
\prod\limits_{ij} X(U_{ij}) \ar@<1ex>[r]\ar@<-1ex>[r]\ar[r]~&~ \prod\limits_{ijk} X(U_{ijk})
\ar@<0.5ex>[r]\ar@<-0.5ex>[r]\ar@<1.5ex>[r]\ar@<-1.5ex>[r]~&~    \cdots\bigg)
}
\end{flalign}
is a weak equivalence in $\mathsf{Grpd}$, where $\mathrm{holim}_{\mathsf{Grpd}}^{}$ denotes the homotopy
limit of cosimplicial diagrams in $\mathsf{Grpd}$.

\item[(v)] A morphism $f : X\to Y$ in $\mathsf{H}$ between two fibrant objects $X$ and $Y$
in the local model structure is a weak equivalence in the local model structure if and only if
each stage $f : X(U)\to Y(U)$ is a weak equivalence in $\mathsf{Grpd}$.
\end{itemize}
\end{theo}
\begin{rem}\label{rem:simplenotation}
To simplify notations, we denote the cosimplicial diagram of groupoids
in \eqref{eqn:stack} also by
\begin{flalign}
X(U_{\bullet}) := \bigg(
\xymatrix@C=1.1pc{\prod\limits_{i} X(U_i)  \ar@<0.5ex>[r]\ar@<-0.5ex>[r]~&~
\prod\limits_{ij} X(U_{ij}) \ar@<1ex>[r]\ar@<-1ex>[r]\ar[r]~&~ \prod\limits_{ijk} X(U_{ijk})
\ar@<0.5ex>[r]\ar@<-0.5ex>[r]\ar@<1.5ex>[r]\ar@<-1.5ex>[r]~&~    \cdots }\bigg)~.
\end{flalign}
Then the homotopy limit in \eqref{eqn:stack} simply reads as $\mathrm{holim}_{\mathsf{Grpd}}^{}\,X(U_{\bullet})$.
\end{rem}

Unless otherwise stated, we will always work with the local model structure
on $\mathsf{H}$. The reason for this will be explained below.
Hence, by fibration, cofibration and weak equivalence in $\mathsf{H}$
we always mean the ones in the local model structure on $\mathsf{H}$.
\vspace{2mm}

Of particular relevance for us will be the fibrant objects in $\mathsf{H}$ (in the local model structure).
It was shown by Hollander \cite{Hollander} that the fibrant condition \eqref{eqn:stack} captures
the notion of descent for stacks. In particular, fibrant presheaves of groupoids
provide us with an equivalent, but simpler, model for stacks than the traditional models
based on lax presheaves of groupoids or categories fibered in groupoids,
see e.g.\  \cite{DM,Giraud}. In our work we hence shall use the following definition of a stack
\cite{Hollander}.
\begin{defi}
A {\em stack} is a fibrant object $X$ in the local model structure on $\mathsf{H}$. More concretely,
a stack is a presheaf of groupoids $X : \mathsf{C}^\mathrm{op}\to \mathsf{Grpd}$ such that the canonical morphism
\eqref{eqn:stack} is a weak equivalence in $\mathsf{Grpd}$, for all good open covers $\{U_i\subseteq U\}$.
\end{defi}
We will later need the following standard
\begin{lem}\label{lem:fibrationlocfibrant}
Let $X$ and $Y$ be fibrant objects in the local model structure on $\mathsf{H}$, i.e.\ stacks.
Then an $\mathsf{H}$-morphism $f: X \to Y$ is a fibration in the local model structure
if and only if it is a fibration in the global model structure, i.e.\  a stage-wise
fibration in $\mathsf{Grpd}$.
\end{lem}
\begin{proof}
This is \cite[Proposition 3.3.16]{Hirschhorn} applied to
$\mathsf{H}$ with the global model structure (cf.\ Lemma \ref{lem:globmod})
and to its localization with respect to \eqref{eqn:locmorph},
i.e.\ the local model structure of Theorem \ref{theo:localH}.
\end{proof}

\subsection{\label{subsec:examples}Examples of stacks}
We collect some well-known examples of stacks that will play a major role in our work.
We also refer to \cite{Fiorenza2,Fiorenza,Schreiber} for a description of some
of these stacks in the language of $\infty$-stacks.
All of our stacks are motivated by the structures arising in gauge theories.

\begin{ex}[Manifolds]\label{ex:manifolds}
To any (finite-dimensional and paracompact) manifold $M$ we may assign
an object $\underline{M}$ in $\mathsf{H}$. It is given by the functor $\underline{M} : \mathsf{C}^\mathrm{op}\to\mathsf{Grpd}$
that acts on objects as
\begin{flalign}
\underline{M}(U) := C^\infty(U,M)~,
\end{flalign}
where $C^\infty(U,M)$ is the set of smooth maps regarded as a groupoid with just identity morphisms,
and on morphisms $\ell : U\to U^\prime$ as
\begin{flalign}
\underline{M}(\ell) : \underline{M}(U^\prime)\longrightarrow \underline{M}(U)~,~~\big( \rho : U^\prime\to M \big)\longmapsto
\big(\rho\circ \ell : U \to M\big)~.
\end{flalign}
Note the similarity to the Yoneda embedding \eqref{eqn:Yoneda}, which is our motivation to use
the same notation by an underline. Notice further that, when $M = U$
is diffeomorphic to some $\mathbb{R}^n$,
then $\underline{M}$ coincides with the Yoneda embedding $\underline{U}$ of the object $U$ in $\mathsf{C}$.
\vspace{2mm}

Let us confirm that $\underline{M}$ is a stack, i.e.\ that \eqref{eqn:stack} is
a weak equivalence in $\mathsf{Grpd}$ for all good open covers $\{U_i\subseteq U\}$.
In the notation of Remark \ref{rem:simplenotation}, we have to compute the
homotopy limit $\mathrm{holim}_{\mathsf{Grpd}}^{} \, \underline{M}(U_\bullet)$ of the cosimplicial diagram
$\underline{M}(U_\bullet)$ in $\mathsf{Grpd}$.
Using Proposition \ref{propo:descentcat}, we find that
$\mathrm{holim}_{\mathsf{Grpd}}^{} \, \underline{M}(U_\bullet)$ is the groupoid whose
objects are families $\{ \rho_i\in C^\infty(U_i,M)\}$ satisfying
$\rho_i\vert_{U_{ij}}^{} = \rho_{j}\vert_{U_{ij}}^{}$, for all $i,j$, and whose morphisms are just the identities.
The canonical morphism $\underline{M}(U) \to \mathrm{holim}_{\mathsf{Grpd}}^{} \, \underline{M}(U_\bullet)$
assigns to $\rho\in C^\infty(U,M)$ the family $\{\rho\vert_{U_i}^{}\}$, hence it is an isomorphism
(and thus also a weak equivalence) because $C^\infty(-,M)$ is a sheaf on $\mathsf{C}$.\vspace{2mm}

Denoting by $\mathsf{Man}$ the category of (finite-dimensional and paracompact) manifolds,
it is easy to see that our constructions above define a fully faithful functor $\underline{(-)} : \mathsf{Man}\to \mathsf{H}$
that takes values in stacks. Hence, manifolds can be equivalently described in terms of stacks.
\end{ex}

\begin{ex}[Classifying stack of principal $G$-bundles]\label{ex:BG}
Let $G$ be a Lie group. The object $\mathrm{B}G$ in $\mathsf{H}$ is defined by the following functor
$\mathrm{B}G : \mathsf{C}^\mathrm{op}\to \mathsf{Grpd}$: To an object $U$ in $\mathsf{C}$ it assigns the groupoid $\mathrm{B}G(U)$ that has just one object, say $\ast$,
with automorphisms $C^\infty(U,G)$ given by the set of smooth maps from $U$ to the Lie group $G$.
The composition of morphisms in $\mathrm{B}G(U)$ is given by the opposite point-wise product $g^\prime\circ g := g\, g^\prime$
of $g,g^\prime \in C^\infty(U,G)$. (We take the opposite product because we will be
interested later in group representations of $C^\infty(U,G)$ from the right.)
Moreover, the identity morphism in $\mathrm{B}G(U)$ is the constant map  $e\in C^\infty(U,G)$ from $U$
to the unit element in $G$.
To any morphism $\ell : U\to U^\prime$ in $\mathsf{C}$ the functor $\mathrm{B}G$ assigns
the groupoid morphism  $\mathrm{B}G(\ell) : \mathrm{B}G(U^\prime)\to\mathrm{B}G(U)$ that acts on objects as $\ast\mapsto \ast$
and on morphisms as $C^\infty(U^\prime,G)\ni g \mapsto \ell^\ast g := g \circ\ell \in C^\infty(U,G)$.
\vspace{2mm}

Let us confirm that $\mathrm{B}G$ is a stack. Let $\{U_i\subseteq U\}$ be any good open cover.
Using Proposition \ref{propo:descentcat}, we find that $\mathrm{holim}_{\mathsf{Grpd}}^{}\,\mathrm{B}G(U_\bullet)$
is the groupoid whose objects are families $\{g_{ij}\in C^\infty(U_{ij},G)\}$
satisfying $g_{ii}=e\in C^\infty(U_{i},G)$, for all $i$,
and the cocycle condition $g_{ij}\vert_{U_{ijk}}^{}~g_{jk}\vert_{U_{ijk}}^{} = g_{ik}\vert_{U_{ijk}}^{}$, for all $i,j,k$.
The morphisms of $\mathrm{holim}_{\mathsf{Grpd}}^{}\,\mathrm{B}G(U_\bullet)$ from $\{g_{ij}\}$ to $\{g^\prime_{ij}\}$
are families $\{h_i\in C^\infty(U_i,G)\}$  satisfying
$g^{\prime}_{ij} = h_i^{-1}\vert_{U_{ij}}^{} ~ g_{ij}~h_j\vert_{U_{ij}}^{}$, for all $i,j$.
The canonical morphism $\mathrm{B}G(U) \to \mathrm{holim}_{\mathsf{Grpd}}^{}\,\mathrm{B}G(U_\bullet)$
assigns to the object $\ast$ in $\mathrm{B}G(U)$ the object $\{ g_{ij} =e \in C^\infty(U_{ij},G)  \}$, i.e.\ the trivial cocycle,
and to a morphism $g\in C^\infty(U,G)$ in $\mathrm{B}G(U)$ the isomorphism
$\{ g\vert_{U_i}^{} \in C^\infty(U_i,G)\} $ of the trivial cocycle.
The canonical morphism is a weak equivalence in $\mathsf{Grpd}$
(cf.\ Theorem \ref{theo:groupoids}) because of the following reasons:
1.)~It is fully faithful because $C^\infty(-,G)$ is a sheaf on $\mathsf{C}$.
2.)~It is essentially surjective because all cocycles are trivializable on manifolds diffeomorphic to $\mathbb{R}^n$
($U$ in this case), i.e.\ one can find $\{h_i\in C^\infty(U_i,G)\}$
such that $g_{ij} = h_i^{-1}\vert_{U_{ij}}^{} ~h_j\vert_{U_{ij}}^{}$, for all $i,j$.
Hence, we have shown that $\mathrm{B}G$ is a stack.
It is called the {\em classifying stack of principal $G$-bundles}, see also \cite[Section 3.2]{Fiorenza2}.
\vspace{2mm}

Our classifying stack $\mathrm{B}G$ is a smooth and stacky analog of the usual classifying space
of a topological group $G$ \cite[Section 3]{Segal},
which is the topological space obtained as the
geometric realization of the simplicial topological space
\begin{flalign}\label{eqn:BGtopological}
\xymatrix@C=1.1pc{
\{\ast\} ~&~ \ar@<0.5ex>[l]\ar@<-0.5ex>[l] G ~&~\ar@<1ex>[l]\ar@<-1ex>[l]\ar[l] G^2
~&~ \ar@<0.5ex>[l]\ar@<-0.5ex>[l]\ar@<1.5ex>[l]\ar@<-1.5ex>[l]   \cdots
}  ~.
\end{flalign}
Notice that \eqref{eqn:BGtopological} may be obtained by equipping the
nerve of the groupoid $\mathrm{B}G(\{\ast\})$ with the topologies induced by
$G$.
\end{ex}

\begin{ex}[Classifying stack of principal $G$-bundles with connections]\label{ex:BGcon}
Let again $G$ be a Lie group, which we assume to be a matrix Lie group in order to simplify some formulas below.
Let $\mathfrak{g}$ denote the Lie algebra of $G$.
The object $\mathrm{B}G_\mathrm{con}$ in $\mathsf{H}$ is defined by the following functor $\mathrm{B}G_\mathrm{con} : \mathsf{C}^\mathrm{op} \to \mathsf{Grpd}$:
To an object $U$ in $\mathsf{C}$ it assigns the groupoid $\mathrm{B}G_\mathrm{con}(U)$ whose set of objects is $\Omega^1(U,\mathfrak{g})$, i.e.\  the
set of Lie algebra valued $1$-forms on $U$, and whose set of morphisms is $\Omega^1(U,\mathfrak{g})\times C^\infty(U,G)$.
The source and target of a morphism $(A,g)\in \Omega^1(U,\mathfrak{g})\times C^\infty(U,G)$ is as follows
\begin{flalign}
\xymatrix@C=1.1pc{
A~\ar[rr]^-{(A,g)} &&~ A\triangleleft g := g^{-1}\,A\,g + g^{-1}\,\mathrm{d} g
}~,
\end{flalign}
where $\mathrm{d}$ denotes the de Rham differential and $A\triangleleft g$ is the usual right action
of gauge transformations $g\in C^\infty(U,G)$ on gauge fields $A\in \Omega^1(U,\mathfrak{g})$.
The identity morphism is $(A,e) : A\to A$ and composition of two
composable morphisms in $\mathrm{B}G_\mathrm{con}(U)$ is given by
\begin{flalign}
\xymatrix@C=1.1pc{
\ar@/_1pc/[rrrr]_-{(A,g\,g^\prime)}  A~\ar[rr]^-{(A,g)} &&~ A\triangleleft g ~ \ar[rr]^-{(A\triangleleft g,g^\prime)} && ~ A\triangleleft(g\,g^\prime)
}~.
\end{flalign}
To any morphism $\ell : U\to U^\prime$ in $\mathsf{C}$ the functor $\mathrm{B}G_\mathrm{con}$ assigns
the groupoid morphism $\mathrm{B}G_\mathrm{con}(\ell) : \mathrm{B}G_\mathrm{con}(U^\prime)\to \mathrm{B}G_\mathrm{con}(U)$ that acts on objects
as $A\mapsto \ell^\ast A$ (i.e.\ via pullback of differential forms) and on morphisms
as $(A,g) \mapsto (\ell^\ast A , \ell^\ast g)$.
\vspace{2mm}

Let us confirm that $\mathrm{B}G_\mathrm{con}$ is a stack. Let $\{U_i\subseteq U\}$ be any good open cover.
Using Proposition \ref{propo:descentcat}, we find that $\mathrm{holim}_{\mathsf{Grpd}}^{}\,\mathrm{B}G_\mathrm{con}(U_\bullet)$
is the groupoid whose objects are pairs of families $(\{A_i\in\Omega^1(U_i,\mathfrak{g}) \} , \{g_{ij}\in C^\infty(U_{ij},G)\})$,
such that $A_j\vert_{U_{ij}}^{} = A_i\vert_{U_{ij}}^{} \triangleleft g_{ij}$, for all $i,j$,
$g_{ii}=e$, for all $i$, and $g_{ij}\vert_{U_{ijk}}^{}~g_{jk}\vert_{U_{ijk}}^{} = g_{ik}\vert_{U_{ijk}}^{}$, for all $i,j,k$.
The morphisms of  $\mathrm{holim}_{\mathsf{Grpd}}^{}\,\mathrm{B}G_\mathrm{con}(U_\bullet)$ from
$(\{A_i \} , \{g_{ij}\})$ to $(\{A^\prime_i \} , \{g^\prime_{ij}\})$ are families $\{h_i\in C^\infty(U_i,G)\}$
satisfying $A_i^\prime = A_i\triangleleft h_i$, for all $i$, and $g_{ij}^{\prime} = h_i^{-1}\vert_{U_{ij}}^{}~g_{ij}~h_j\vert_{U_{ij}}^{}$,
for all $i,j$. The canonical morphism $\mathrm{B}G_\mathrm{con}(U) \to \mathrm{holim}_{\mathsf{Grpd}}^{}\,\mathrm{B}G_\mathrm{con}(U_\bullet)$
assigns to an object $A\in\Omega^1(U,\mathfrak{g})$ of $\mathrm{B}G_\mathrm{con}(U)$ the pair of families
$( \{ A\vert_{U_i}^{} \}, \{ g_{ij} =e \} )$, with the trivial cocycle, and to a morphism
$(A,g)\in\Omega^1(U,\mathfrak{g})\times C^\infty(U,G)$ in $\mathrm{B}G_\mathrm{con}(U)$ the family $\{ g\vert_{U_i}^{}\}$.
With a similar argument as in Example \ref{ex:BG} we find that the canonical morphism
is a weak equivalence in $\mathsf{Grpd}$ and hence that $\mathrm{B}G_\mathrm{con}$ is a stack. It is called
the {\em classifying stack of principal $G$-bundles with connections}, see also \cite[Section 3.2]{Fiorenza2}.
\end{ex}

\begin{ex}[Classifying stack of principal $G$-bundles with adjoint bundle valued $p$-forms]\label{ex:Liealgforms}
Let $G$ be a matrix Lie group and $\mathfrak{g}$ its Lie algebra.
For $p\in\mathbb{Z}_{\geq 0}$, we define the object $\mathrm{B}G_{\Omega^p_{\mathrm{ad}}}$ in $\mathsf{H}$
by the following functor $\mathrm{B}G_{\Omega^p_{\mathrm{ad}}} : \mathsf{C}^\mathrm{op}\to \mathsf{Grpd}$:
To an object $U$ in $\mathsf{C}$ it assigns the groupoid $\mathrm{B}G_{\Omega^p_{\mathrm{ad}}} (U)$ whose set
of objects is the set of $\mathfrak{g}$-valued $p$-forms $\Omega^p(U,\mathfrak{g})$ and whose set of
morphisms is $\Omega^p(U,\mathfrak{g})\times C^\infty(U,G)$. The source
and target of a morphism $(\omega,g)\in \Omega^p(U,\mathfrak{g})\times C^\infty(U,G)$ is, similarly to Example \ref{ex:BGcon},
given by
\begin{flalign}
\xymatrix@C=1.1pc{
\omega~\ar[rr]^-{(\omega,g)} &&~ \mathrm{ad}_g(\omega) := g^{-1}\,\omega\,g
}~,
\end{flalign}
where $\mathrm{ad}_g(\omega)$ is the usual right adjoint
action of gauge transformations $g\in C^\infty(U,G)$ on $\mathfrak{g}$-valued $p$-forms $\omega\in\Omega^p(U,\mathfrak{g})$.
The identity morphism is $(\omega,e) : \omega\to\omega$ and the composition of two composable
morphisms in $\mathrm{B}G_{\Omega^p_{\mathrm{ad}}}(U)$ is given by
\begin{flalign}
\xymatrix@C=2pc{
\ar@/_1pc/[rrrr]_-{(\omega , g\,g^\prime)} \omega~\ar[rr]^-{(\omega , g)} &&~ \mathrm{ad}_{g}(\omega) ~ \ar[rr]^-{(\mathrm{ad}_g(\omega) , g^\prime)} && ~ \mathrm{ad}_{g\,g^\prime}(\omega)
}~.
\end{flalign}
To any morphism $\ell : U\to U^\prime$ in $\mathsf{C}$ the functor $\mathrm{B}G_{\Omega^p_{\mathrm{ad}}}$ assigns
the groupoid morphism $\mathrm{B}G_{\Omega^p_{\mathrm{ad}}}(\ell) : \mathrm{B}G_{\Omega^p_{\mathrm{ad}}}(U^\prime)\to \mathrm{B}G_{\Omega^p_{\mathrm{ad}}}(U)$
that acts on objects and
morphisms  via pullback, i.e.\  $\omega \mapsto \ell^\ast \omega$
and $(\omega ,g) \mapsto (\ell^\ast \omega , \ell^\ast g)$. The fact that $\mathrm{B}G_{\Omega^p_{\mathrm{ad}}}$ is a stack
can be proven analogously to Examples \ref{ex:BG} and \ref{ex:BGcon}. We call it the {\em classifying stack
of principal $G$-bundles with adjoint bundle valued $p$-forms}. We will later use
$\mathrm{B}G_{\Omega^p_{\mathrm{ad}}}$ to describe, for example, the curvatures of connections.
\end{ex}

\subsection{Fiber product of stacks and mapping stacks}
Our constructions in this paper will use a variety of techniques
to produce new stacks out of old ones, e.g.\ out of the stacks described in Section \ref{subsec:examples}.
Of particular relevance for us will be fiber products of stacks and mapping stacks.
\vspace{2mm}

The following observation is standard in homotopy theory, however it
is crucial to understand the definitions below:
Given a pullback diagram
\begin{flalign}\label{eqn:pullback}
\xymatrix{
X\ar[r]^-{f_1} & Z &\ar[l]_-{f_2} Y
}
\end{flalign}
in $\mathsf{H}$, we may of course compute the fiber product $X\times_Z^{} Y$
in the usual way by taking the limit of this diagram. (Recall that $\mathsf{H}$ is complete, hence all
limits exist in $\mathsf{H}$.) The problem with this construction is that it does not preserve weak equivalences in $\mathsf{H}$,
i.e.\ replacing the pullback diagram by a weakly equivalent one in general leads to a fiber product that
is not weakly equivalent to $X\times_Z^{} Y$. These problems are avoided by replacing
the limit with the {\em homotopy limit}, which is a derived functor of the limit functor \cite{Dwyer}.
We denote the homotopy limit of the diagram \eqref{eqn:pullback} by
$X\times_Z^{h} Y$ and call it the {\em homotopy fiber product} in $\mathsf{H}$.
A similar problem arises when we naively use the internal hom-object
$Y^X$ in $\mathsf{H}$ in order to describe an ``object of mappings'' from $X$ to $Y$;
replacing $X$ and $Y$ by weakly equivalent objects in $\mathsf{H}$ in general
leads to an internal hom-object that is not weakly equivalent to $Y^X$.
These problems are avoided by replacing the internal-hom functor with its derived functor.
\vspace{2mm}

We now give rather explicit models for the homotopy fiber product and the derived internal hom.
The following model for the homotopy fiber product in $\mathsf{H}$ was obtained in \cite{Hollander2}.
\begin{propo}\label{propo:homfibprod}
The homotopy fiber product $X\times_Z^{h} Y$ in $\mathsf{H}$, i.e.\ the
homotopy limit of the pullback diagram \eqref{eqn:pullback},
is the presheaf of groupoids defined as follows: For all objects $U$ in $\mathsf{C}$,
\begin{itemize}
\item the objects of $(X\times_Z^{h} Y)(U)$ are triples $(x,y,k)$, where $x$ is an object in $X(U)$,
$y$ is an object in $Y(U)$ and $k : f_1(x)\to f_2 (y)$ is a morphism in $Z(U)$; and

\item the morphisms of $(X\times_Z^{h} Y)(U)$ from $(x,y,k)$ to $(x^\prime,y^\prime,k^\prime)$
are pairs $(g,h)$, where $g: x\to x^\prime$ is a morphism in $X(U)$ and
$h : y\to y^\prime$ is a morphism in $Y(U)$, such that the diagram
\begin{flalign}
\xymatrix{
\ar[d]_-{k} f_1(x) \ar[rr]^-{f_1(g)} && f_1(x^\prime)\ar[d]^-{k^\prime}\\
f_2(y) \ar[rr]_-{f_2(h)} && f_2(y^\prime)
}
\end{flalign}
in $Z(U)$ commutes.
\end{itemize}
If $X$, $ Y$ and $Z$ in \eqref{eqn:pullback} are stacks, then $X\times_Z^{h} Y$ is a stack too.
\end{propo}

Our model for the derived internal hom-functor is the standard one resulting from
the theory of derived functors, see \cite{Dwyer} and also \cite{Hovey} for details.
For the theory of derived functors to apply to our present situation,
it is essential that $\mathsf{H}$ (with the local model structure)
is a monoidal model category, see Appendix \ref{app:monoidal} for a proof.
\begin{propo}\label{propo:derivedhoms}
The derived internal hom-functor in $\mathsf{H}$ is
\begin{flalign}
R(-)^{Q(-)} : \mathsf{H}^\mathrm{op}\times \mathsf{H}\longrightarrow \mathsf{H}~,
\end{flalign}
where $Q : \mathsf{H}\to \mathsf{H}$ is any cofibrant replacement
functor and $R :\mathsf{H}\to\mathsf{H}$ is any fibrant replacement functor.
The following holds true:
\begin{itemize}
\item[(i)]
If $X$ is any object in $\mathsf{H}$ and $Y$ is a stack, then $R(Y)^{Q(X)}$
is weakly equivalent to the object  $Y^{Q(X)}$ in $\mathsf{H}$.

\item[(ii)] If $X$ is a cofibrant object in $\mathsf{H}$ and $Y$ is a stack, then $R(Y)^{Q(X)}$
is weakly equivalent to the ordinary internal hom-object  $Y^X$ in $\mathsf{H}$.

\item[(iii)] If $X$ is any object in $\mathsf{H}$ and $Y$ is a stack,
then $Y^{Q(X)}$  is a stack too. (This follows from \cite[Remark 4.2.3]{Hovey}.)

\end{itemize}
\end{propo}

\begin{rem}
In our work we shall only need derived internal hom-objects $R(Y)^{Q(X)}$
for the case where $Y$ is a stack and $X=\underline{M}$ is the stack represented by
a manifold $M$, cf.\ Example \ref{ex:manifolds}. We develop in Appendix \ref{app:cofibrep}
a suitable cofibrant replacement functor $\widecheck{(-)} : \mathsf{Man}_{\hookrightarrow}\to \mathsf{H}$
on the category $\mathsf{Man}_{\hookrightarrow}$ of (finite-dimensional and paracompact) manifolds
with morphisms given by open embeddings. Proposition \ref{propo:derivedhoms}
then implies that we can compute, up to a weak equivalence,
such derived internal hom-objects by $Y^{\widecheck{M}}$.
\end{rem}

\section{\label{sec:gaugefields}Gauge fields on a manifold}
Let $G$ be a matrix Lie group and $M$ a (finite-dimensional and paracompact) manifold.
The goal of this section is to construct and study the stack $G\mathbf{Con}(M)$
of principal $G$-bundles with connections on $M$, which we shall also call the
{\em stack of gauge fields} on $M$. Let us recall our main guiding principle:
The stack $G\mathbf{Con}(M)$ is supposed to describe smoothly parametrized
families of principal $G$-bundles with connections on $M$, which is motivated
by the functor of points perspective. More precisely, this means that evaluating
the stack $G\mathbf{Con}(M)$ on an object $U$ in $\mathsf{C}$, we would like to
discover (up to weak equivalence) the groupoid describing smoothly
$U$-parametrized principal $G$-bundles with connections on $M$
and their smoothly $U$-parametrized gauge transformations.
We shall obtain the stack $G\mathbf{Con}(M)$ by an intrinsic construction in $\mathsf{H}$
that is given by a concretification of the derived mapping stack
from $M$ to the classifying stack $\mathrm{B}G_\mathrm{con}$ of principal $G$-bundles with connections
(cf.\ Example \ref{ex:BGcon}). Using Proposition \ref{propo:derivedhoms},
we may compute (up to a weak equivalence) the derived mapping stack in
terms of the ordinary internal-hom ${\mathrm{B}G_\mathrm{con}}_{~}^{\widecheck{M}}$, where
$\widecheck{M}$ is the canonical cofibrant replacement of $M$ (cf.\ Appendix \ref{app:cofibrep}).
It is important to emphasize that our concretification prescription improves the one
originally proposed in \cite{Fiorenza,Schreiber}, which fails to give the desired result,
i.e.\ a stack describing smoothly parametrized families of principal $G$-bundles with connections,
together with smoothly parametrized gauge transformations, see
Appendix \ref{app:concretification} for details.
\vspace{2mm}

By construction, our model ${\mathrm{B}G_\mathrm{con}}_{~}^{\widecheck{(-)}} : \mathsf{Man}_{\hookrightarrow}^\mathrm{op} \to \mathsf{H}$
for the derived mapping stacks is functorial on the category of (finite-dimensional and paracompact)
manifolds with morphisms given by open embeddings. The same holds true
for the stacks of gauge fields, i.e.\ we will obtain a functor
$G\mathbf{Con} : \mathsf{Man}_{\hookrightarrow}^\mathrm{op} \to \mathsf{H}$.
This is an advantage compared to the usual approach to construct the stack of gauge fields by
using a (necessarily non-functorial) {\em good} open cover to obtain a cofibrant
replacement for $M$, see e.g.\ \cite{Fiorenza2}.

\subsection{\label{subsec:mapstack}Mapping stack}
We now compute the object ${\mathrm{B}G_\mathrm{con}}_{~}^{\widecheck{M}}$ in $\mathsf{H}$,
which by Proposition \ref{propo:derivedhoms} is a weakly equivalent model for
the derived internal-hom object from $M$ to $\mathrm{B}G_\mathrm{con}$.
Its underlying functor ${\mathrm{B}G_\mathrm{con}}_{~}^{\widecheck{M}} : \mathsf{C}^\mathrm{op} \to \mathsf{Grpd}$
assigns to an object $U$ in $\mathsf{C}$ the mapping groupoid
\begin{flalign}\label{eqn:mappingstackU}
{\mathrm{B}G_\mathrm{con}}_{~}^{\widecheck{M}}(U) = \mathsf{Grpd}(\underline{U}\times \widecheck{M}, \mathrm{B}G_\mathrm{con})~.
\end{flalign}
By definition, an object in this groupoid is a morphism $f : \underline{U}\times \widecheck{M} \to \mathrm{B}G_\mathrm{con}$
in $\mathsf{H}$ and a morphism in this groupoid
is a morphism $u: \underline{U}\times \widecheck{M} \times\Delta^1 \to \mathrm{B}G_\mathrm{con}$ in $\mathsf{H}$.
We would like to describe the objects and morphisms of the groupoid \eqref{eqn:mappingstackU}
by more familiar data related to gauge fields and gauge transformations.
To achieve this goal, we have to explicate the stages of the $\mathsf{H}$-morphisms
$f$ and $u$.
\vspace{2mm}

Let us start with $f$ and consider the associated groupoid morphism
$f : \underline{U}(U^\prime)\times \widecheck{M}(U^\prime) \to \mathrm{B}G_\mathrm{con}(U^\prime) $
at stage $U^\prime$ in $\mathsf{C}$. Using the explicit description of $\widecheck{M}(U^\prime) $
given in Appendix \ref{app:cofibrep}, we may visualize the objects in
$ \underline{U}(U^\prime)\times \widecheck{M}(U^\prime)$ by diagrams
\begin{flalign}
(\ell,(V,\nu)) := \Big(\xymatrix{
M & \ar[l]_-{\rho_V}V & \ar[l]_-{\nu}U^\prime  \ar[r]^-{\ell}& U
}\Big)~
\end{flalign}
of smooth maps, where $V$ runs over all open subsets of $M$ that are diffeomorphic to $\mathbb{R}^{\mathrm{dim}(M)}$
and the last arrow points to the right.
Morphisms in $ \underline{U}(U^\prime)\times \widecheck{M}(U^\prime)$ may be visualized
by commutative diagrams
\begin{flalign}\label{eqn:mappingstackUmor}
\xymatrix@R=0.1pc{\\ (\ell,(V,\nu),(V^\prime,\nu^\prime)) ~:=~ \Bigg( \\}
\xymatrix@R=0.6pc{
&\ar[ld]_-{\rho_V}~V~&&\\
M ~&& \ar[lu]_-{\nu}\ar[ld]^-{\nu^\prime} ~U^\prime ~ \ar[r]^-{\ell} & ~U\\
&\ar[lu]^-{\rho_{V^\prime}} ~V^\prime~&&
}
\xymatrix@R=0.1pc{\\ \Bigg) \\}
\end{flalign}
of smooth maps.
The groupoid morphism
$f : \underline{U}(U^\prime)\times \widecheck{M}(U^\prime) \to \mathrm{B}G_\mathrm{con}(U^\prime) $
is then given by an assignment
\begin{flalign}
\nonumber f ~:~\qquad\qquad  (\ell, (V,\nu)) ~~&\longmapsto~~ A_{(\ell, (V,\nu))}\in\Omega^1(U^\prime,\mathfrak{g})~,\\
(\ell,(V,\nu),(V^\prime,\nu^\prime))~~ &\longmapsto~~ g_{(\ell,(V,\nu),(V^\prime,\nu^\prime)) } \in C^\infty(U^\prime,G)~,\label{eqn:mappingstackUfunc}
\end{flalign}
satisfying the following compatibility conditions: 1.)\ For all morphisms $(\ell,(V,\nu),(V^\prime,\nu^\prime))$
in $ \underline{U}(U^\prime)\times \widecheck{M}(U^\prime)$,
\begin{subequations}
\begin{flalign}
A_{(\ell, (V^\prime,\nu^\prime))} = A_{(\ell, (V,\nu))}\triangleleft g_{(\ell,(V,\nu),(V^\prime,\nu^\prime)) }~.
\end{flalign}
2.)\ For all  objects $(\ell,(V,\nu))$ in $ \underline{U}(U^\prime)\times \widecheck{M}(U^\prime)$,
$g_{(\ell,(V,\nu),(V,\nu))} = e$. 3.)\ For all composable morphisms $(\ell,(V,\nu),(V^\prime,\nu^\prime))$
and $(\ell,(V^\prime,\nu^\prime),(V^{\prime\prime},\nu^{\prime\prime}))$
in $ \underline{U}(U^\prime)\times \widecheck{M}(U^\prime)$,
\begin{flalign}
g_{(\ell,(V,\nu),(V^\prime,\nu^\prime))}~g_{(\ell,(V^\prime,\nu^\prime),(V^{\prime\prime},\nu^{\prime\prime}))}
= g_{(\ell,(V,\nu),(V^{\prime\prime},\nu^{\prime\prime}))}~.
\end{flalign}
\end{subequations}
The property of $f : \underline{U}(U^\prime)\times \widecheck{M}(U^\prime) \to \mathrm{B}G_\mathrm{con}(U^\prime) $
being the stages of an $\mathsf{H}$-morphism (i.e.\ natural transformation of functors $\mathsf{C}^\mathrm{op}\to \mathsf{Grpd}$)
leads to the following coherence conditions:
For all morphisms $\ell^\prime : U^\prime\to U^{\prime\prime}$ in $\mathsf{C}$
and all objects $(\ell,(V,\nu))$ in $ \underline{U}(U^{\prime\prime})\times \widecheck{M}(U^{\prime\prime})$,
\begin{subequations}
\begin{flalign}
A_{(\ell\circ\ell^\prime,(V,\nu\circ \ell^\prime))} = {\ell^\prime}^\ast A_{(\ell,(V,\nu))}~,
\end{flalign}
and, for all morphisms $\ell^\prime : U^\prime\to U^{\prime\prime}$ in $\mathsf{C}$
and all morphisms $(\ell,(V,\nu),(V^\prime,\nu^\prime))$
in $ \underline{U}(U^{\prime\prime})\times \widecheck{M}(U^{\prime\prime})$,
\begin{flalign}
g_{(\ell\circ\ell^\prime,(V,\nu\circ \ell^\prime),(V^\prime,\nu^\prime\circ \ell^\prime) )}
={\ell^\prime}^\ast g_{(\ell,(V,\nu),(V^\prime,\nu^\prime) )}~.
\end{flalign}
\end{subequations}
These coherences constrain the amount of independent data described by
\eqref{eqn:mappingstackUfunc}: Given any object $(\ell, (V,\nu))$
in $ \underline{U}(U^\prime)\times \widecheck{M}(U^\prime)$,
we notice that there is a factorization
\begin{flalign}
\xymatrix{
M ~ &~\ar[l]_-{\rho_V} V ~&~\ar[l]_-{\mathrm{pr}_V} V \times U~\ar[r]^-{\mathrm{pr}_{U}} & ~U\\
&&U^\prime\ar[u]_-{(\nu,\ell)}&
}
\end{flalign}
which implies that
\begin{flalign}
A_{(\ell,(V,\nu))} = (\nu,\ell)^\ast A_{(\mathrm{pr}_U,(V,\mathrm{pr}_V))}~.
\end{flalign}
In words, this means that the $A$ of the form $A_{(\mathrm{pr}_U,(V,\mathrm{pr}_V))} \in \Omega^1(V\times U,\mathfrak{g})$,
for all open subsets $V\subseteq M$ diffeomorphic to $\mathbb{R}^{\mathrm{dim}(M)}$, determine all the others.
As there are no further coherences between $A$'s of the form $A_{(\mathrm{pr}_U,(V,\mathrm{pr}_V))}$,
it follows that the action of the functor \eqref{eqn:mappingstackUfunc} on objects is uniquely specified by choosing
\begin{flalign}\label{eqn:AV}
A_{V}:= A_{(\mathrm{pr}_U,(V,\mathrm{pr}_V))} \in \Omega^1(V\times U,\mathfrak{g})~,
\end{flalign}
for all open subsets $V\subseteq M$ diffeomorphic to $\mathbb{R}^{\mathrm{dim}(M)}$.
A similar argument applies to the morphisms assigned by \eqref{eqn:mappingstackUfunc},
which are determined by
\begin{flalign}
g_{VV^\prime} := g_{(\mathrm{pr}_U,(V,\mathrm{pr}_V),(V^\prime,\mathrm{pr}_{V^\prime}))} \in C^\infty((V\cap V^\prime) \times U,G)~,
\end{flalign}
for all open subsets $V\subseteq M$ and $V^\prime\subseteq M$ diffeomorphic to $\mathbb{R}^{\mathrm{dim}(M)}$,
and the coherences
\begin{flalign}
g_{(\ell,(V,\nu),(V^\prime,\nu^\prime))} = (\nu,\nu^\prime,\ell)^\ast g_{(\mathrm{pr}_U,(V,\mathrm{pr}_V),(V^\prime,\mathrm{pr}_{V^\prime}))} ~,
\end{flalign}
for all morphisms $(\ell,(V,\nu),(V^\prime,\nu^\prime))$ in $ \underline{U}(U^\prime)\times \widecheck{M}(U^\prime)$.
The morphisms of the groupoid \eqref{eqn:mappingstackU} can be analyzed analogously.
In summary, we obtain
\begin{lem}\label{lem:BGconcheckM}
The objects of the groupoid \eqref{eqn:mappingstackU}
are pairs of families
\begin{flalign}
\Big(\big\{ A_V  \in\Omega^1(V\times U,\mathfrak{g})  \big\},
\big\{ g_{VV^\prime} \in C^\infty((V\cap V^\prime)\times U , G)\big\}\Big)~,
\end{flalign}
where $V\subseteq M$ and $V^\prime \subseteq M$ run over all
open subsets diffeomorphic to $\mathbb{R}^{\mathrm{dim}(M)}$,
which satisfy the following conditions:
\begin{itemize}
\item For all open subsets $V\subseteq M$ and $V^\prime \subseteq M$ diffeomorphic to $\mathbb{R}^{\mathrm{dim}(M)}$,
\begin{flalign}
A_{V^\prime}\vert_{(V\cap V^\prime)\times U}^{} ~=~ A_V\vert_{(V\cap V^\prime)\times U}^{} \triangleleft g_{VV^\prime}~.
\end{flalign}
\item For all open subsets $V\subseteq M$ diffeomorphic to $\mathbb{R}^{\mathrm{dim}(M)}$, $g_{VV} =e$.
\item For all open subsets $V\subseteq M$,
$V^\prime \subseteq M$ and $V^{\prime\prime} \subseteq M$ diffeomorphic to $\mathbb{R}^{\mathrm{dim}(M)}$,
\begin{flalign}
g_{VV^\prime}\vert_{(V\cap V^\prime\cap V^{\prime\prime})\times U}^{}~
g_{V^\prime V^{\prime\prime}}\vert_{(V\cap V^\prime\cap V^{\prime\prime})\times U}^{}
~=~
g_{VV^{\prime\prime}}\vert_{(V\cap V^\prime\cap V^{\prime\prime})\times U}^{}~.
\end{flalign}
\end{itemize}
The morphisms of the groupoid \eqref{eqn:mappingstackU}
from $(\{A_V\},\{g_{VV^\prime}\})$ to $(\{A_{V}^\prime\}, \{g^\prime_{VV^\prime}\})$
are families
\begin{flalign}
\big\{ h_{V} \in C^\infty(V\times U,G)  \big\}~,
\end{flalign}
where $V\subseteq M$ runs over all open subsets diffeomorphic to $\mathbb{R}^{\mathrm{dim}(M)}$,
which satisfy the following conditions:
\begin{itemize}
\item For all open subsets $V\subseteq M$ diffeomorphic to $\mathbb{R}^{\mathrm{dim}(M)}$,
\begin{flalign}
A_{V}^\prime ~=~ A_V \triangleleft h_V~.
\end{flalign}
\item For all open subsets $V\subseteq M$ and $V^\prime \subseteq M$ diffeomorphic to $\mathbb{R}^{\mathrm{dim}(M)}$,
\begin{flalign}
g_{VV^\prime}^\prime ~=~ h_V^{-1}\vert^{}_{(V\cap V^\prime)\times U}~~g_{VV^\prime}~~h_{V^\prime}\vert^{}_{(V\cap V^\prime)\times U}~.
\end{flalign}
\end{itemize}
\end{lem}

Moreover, the functor
${\mathrm{B}G_\mathrm{con}}_{~}^{\widecheck{M}} : \mathsf{C}^\mathrm{op}\to\mathsf{Grpd}$
assigns to a morphism $\ell : U\to U^\prime$ in $\mathsf{C}$  the groupoid morphism
${\mathrm{B}G_\mathrm{con}}_{~}^{\widecheck{M}}(\ell) : {\mathrm{B}G_\mathrm{con}}_{~}^{\widecheck{M}}(U^\prime) \to {\mathrm{B}G_\mathrm{con}}_{~}^{\widecheck{M}}(U)$
specified by
\begin{flalign}
\nonumber {\mathrm{B}G_\mathrm{con}}_{~}^{\widecheck{M}}(\ell) ~:~ \big(\{A_V\},\{g_{VV^\prime}\}\big) ~&\longmapsto~ \big(\{(\mathrm{id}_V\times \ell)^\ast \,A_V\} , \{(\mathrm{id}_{V\cap V^\prime}\times\ell)^\ast\,g_{VV^\prime}\}\big)~,\\
\{h_{V} \} ~&\longmapsto ~ \{(\mathrm{id}_{V}\times\ell)^\ast\, h_{V}\}~.
\end{flalign}
This completes our description of the mapping stack
${\mathrm{B}G_\mathrm{con}}_{}^{\widecheck{M}}$.
\begin{rem}\label{rem:mappinstackfunctor}
As a consequence of our functorial cofibrant replacement of manifolds (cf.\ Corollary \ref{cor:functorialcofibrepMan}),
the mapping stacks ${\mathrm{B}G_\mathrm{con}}_{~}^{\widecheck{(-)}} : \mathsf{Man}_{\hookrightarrow}^{\mathrm{op}}\to \mathsf{H}$ are functorial
on the category of manifolds with open embeddings. Explicitly, given any open embedding
$f : M\to M^\prime$, the stages of the associated $\mathsf{H}$-morphism
${\mathrm{B}G_\mathrm{con}}_{~}^{\widecheck{f}} : {\mathrm{B}G_\mathrm{con}}_{~}^{\widecheck{M^\prime}} \to {\mathrm{B}G_\mathrm{con}}_{~}^{\widecheck{M}}$
are given by
\begin{flalign}
\nonumber {\mathrm{B}G_\mathrm{con}}_{~}^{\widecheck{f}} ~:~\big(\{A_W\},\{g_{WW^\prime}\}\big)~&\longmapsto~\big(\{ (f\vert_V\times \mathrm{id}_U)^\ast \,A_{f(V)}\},\{(f\vert_{V\cap V^\prime}\times \mathrm{id}_U)^\ast \,g_{f(V)f(V^\prime)}\}\big)~,\\
\{h_{W}\} ~&\longmapsto ~\{(f\vert_V\times \mathrm{id}_U)^\ast\, h_{f(V)}\}~,
\end{flalign}
where $W \subseteq M^\prime$, $W^\prime \subseteq M^\prime$, $V \subseteq M$
and $V^\prime \subseteq M$ are open subsets diffeomorphic to $\mathbb{R}^{\mathrm{dim}(M)}=\mathbb{R}^{\mathrm{dim}(M^\prime)}$
and $f\vert_V : V\to f(V)$ denotes the restriction of $f: M\to M^\prime$ to $V$ and its image $f(V)$.
(The smooth map $f\vert_{V \cap V^\prime} : V \cap V^\prime\to f(V) \cap f(V^\prime)$ is defined similarly.)
\end{rem}

\subsection{\label{subsec:concrete}Concretification}
The mapping stack ${\mathrm{B}G_\mathrm{con}}_{~}^{\widecheck{M}}$ we described in the previous
subsection (see in particular Lemma \ref{lem:BGconcheckM})
is not yet the correct stack of gauge fields on the manifold $M$.
Even though the groupoid of {\em global} points ${\mathrm{B}G_\mathrm{con}}_{~}^{\widecheck{M}}(\mathbb{R}^0)$
correctly describes the gauge fields and gauge transformations on $M$,
the smooth structure on ${\mathrm{B}G_\mathrm{con}}_{~}^{\widecheck{M}}$, which is encoded
in the groupoids ${\mathrm{B}G_\mathrm{con}}_{~}^{\widecheck{M}}(U)$ for all other objects $U$ in $\mathsf{C}$,
is not the desired one yet. In fact,
the groupoid ${\mathrm{B}G_\mathrm{con}}_{~}^{\widecheck{M}}(U)$  describes by construction gauge fields
and gauge transformations on the product manifold $M\times U$, while
the correct stack of gauge fields on $M$, when evaluated on $U$, should be the groupoid
of smoothly $U$-parametrized gauge fields and gauge transformations on $M$. Hence,
the problem is that ${\mathrm{B}G_\mathrm{con}}_{~}^{\widecheck{M}}(U)$ includes also gauge fields
along the parameter space $U$ and not only along $M$.
\vspace{2mm}

This problem has already been observed in \cite{Fiorenza,Schreiber},
where a solution in terms of {\em concretification} was proposed. The goal of this subsection
is to work out explicitly the concretification of our mapping stack ${\mathrm{B}G_\mathrm{con}}_{~}^{\widecheck{M}}$.
This is achieved by using the results on fibrant replacements in the $(-1)$-truncation
of the model structure on over-categories $\mathsf{H}/K$
that we develop in Appendix \ref{app:truncation}. As we explain in more detail in Appendix \ref{app:concretification},
the original concretification prescription of \cite{Fiorenza,Schreiber} fails to produce the desired result, i.e.\ a stack
which describes smoothly parametrized families of principal $G$-bundles with connections,
together with smoothly parametrized
gauge transformations. Hence, we propose an improved concretification prescription
that is valid for the case of interest in this paper,
namely principal bundles and connections on manifolds $M$.
A general concretification prescription for the $\infty$-stacks of higher bundles and connections
is beyond the scope of this paper and will be developed elsewhere.
\vspace{2mm}

Crucial for concretification is existence of the following Quillen adjunction
\begin{flalign}\label{eqn:flatsharpadj}
\xymatrix{
\flat : \mathsf{H} ~\ar@<0.5ex>[r]&\ar@<0.5ex>[l]  ~\mathsf{H} : \sharp
}~.
\end{flalign}
The left adjoint functor $\flat : \mathsf{H} \to \mathsf{H}$
assigns to an object $X$ in $\mathsf{H}$
the object given by the following presheaf of groupoids $\flat X : \mathsf{C}^\mathrm{op}\to\mathsf{Grpd}$:
To any object $U$ in $\mathsf{C}$, it assigns $\flat X(U) = X(\mathbb{R}^0)$, i.e.\ the groupoid of global points of $X$,
and to any $\mathsf{C}$-morphism $\ell : U\to U^\prime$ it assigns the identity morphism
$\flat X(\ell) = \mathrm{id}_{X(\mathbb{R}^0)}$. The action of $\flat$ on morphisms in $\mathsf{H}$ is the obvious one.
Loosely speaking, $\flat X$ is something like a `discrete space'
as it forgot all the smooth structure on $X$.
The right adjoint functor $\sharp : \mathsf{H}\to \mathsf{H}$
assigns to an object $X$ in $\mathsf{H}$ the object $\sharp X$ defined as follows:
To any object $U$ in $\mathsf{C}$, it assigns the groupoid
\begin{flalign}
\sharp X(U) = \prod_{p\in U} X(\mathbb{R}^0)~,
\end{flalign}
where the product goes over all points $p\in U$,
and to any $\mathsf{C}$-morphism $\ell : U\to U^\prime$ it assigns the groupoid morphism
defined by universality of products and the commutative diagrams
\begin{flalign}
\xymatrix{
\ar[dr]_-{\mathrm{pr}_{\ell(p)}}\sharp X(U^\prime) \ar[rr]^-{\sharp X(\ell)} && \sharp X(U) \ar[dl]^-{\mathrm{pr}_{p}}\\
&X(\mathbb{R}^0)&
}~
\end{flalign}
for all points $p\in U$, where $\mathrm{pr}$ denote the projection $\mathsf{Grpd}$-morphisms
associated to the products.
The action of $\sharp$ on morphisms in $\mathsf{H}$ is the obvious one.
It is easy to prove that $\flat \dashv \sharp$ is a Quillen adjunction by using the explicit characterization
of fibrations in $\mathsf{H}$ (in the local model structure) given by \cite[Proposition 4.2]{Hollander3},
see also Proposition \ref{propo:localfibration}.
The conceptual interpretation of $\sharp X$ is as follows:
For any object $U$ in $\mathsf{C}$, there exist isomorphisms of groupoids
\begin{flalign}
\sharp X(U) \simeq \mathsf{Grpd}(\underline{U}, \sharp X) \simeq \mathsf{Grpd}(\flat \underline{U},X)~,
\end{flalign}
where we make use of the Yoneda lemma and the adjunction property of $\flat \dashv \sharp$. This shows that,
loosely speaking, the groupoid $\sharp X(U)$ is given by `evaluating' $X$ on
the discrete space $\flat \underline{U}$. The key idea behind concretification
is, again loosely speaking, to make use of the passage
to discrete spaces $\flat \underline{U}$ to avoid gauge fields along the parameter spaces $U$.
\vspace{2mm}

Let us now focus on our explicit example. Consider the object $\sharp ({\mathrm{B}G_\mathrm{con}}_{~}^{\widecheck{M}})$
in $\mathsf{H}$, which is a stack because ${\mathrm{B}G_\mathrm{con}}_{~}^{\widecheck{M}}$ is a stack and $\sharp$
is a right Quillen functor. The objects (respectively morphisms) of the groupoid  $\sharp ({\mathrm{B}G_\mathrm{con}}_{~}^{\widecheck{M}})(U)$
describe by construction families of gauge fields (respectively gauge transformations)
on $M$ that are labeled by the points  $p\in U$. In particular, there appear no gauge fields
along the parameter space $U$.
Unfortunately, there is no smoothness requirement on such families.
To solve this problem, consider the canonical $\mathsf{H}$-morphism
\begin{subequations}\label{eqn:zetaall}
\begin{flalign}\label{eqn:zeta}
\zeta_{\mathrm{con}} \,:\, {\mathrm{B}G_\mathrm{con}}_{~}^{\widecheck{M}}~\longrightarrow~ \sharp \big({\mathrm{B}G_\mathrm{con}}_{~}^{\widecheck{M}}\big)~.
\end{flalign}
Explicitly, the stages
$\zeta_{\mathrm{con}} : {\mathrm{B}G_\mathrm{con}}_{~}^{\widecheck{M}}(U) \to \sharp ({\mathrm{B}G_\mathrm{con}}_{~}^{\widecheck{M}})(U)$
are the following groupoid morphisms:
To any object $(\{A_V\},\{g_{VV^\prime}\})$ of the source groupoid (cf.\ Lemma \ref{lem:BGconcheckM}),
it assigns
\begin{flalign}\label{eqn:zetaobjects}
\zeta_{\mathrm{con}}\big(\{A_V\},\{g_{VV^\prime}\}\big) =
\Big( \big\{ (\mathrm{id}_V\times p)^\ast \, A_{V} \big\}  ,\big\{ (\mathrm{id}_{V\cap V^\prime} \times p)^\ast \,g_{VV^\prime} \big\}\Big)~,
\end{flalign}
where we regarded points $p\in U$ as $\mathsf{C}$-morphisms $p : \mathbb{R}^0\to U$.
To any morphism $\{h_V\}$ of the source groupoid (cf.\ Lemma \ref{lem:BGconcheckM}),
it assigns
\begin{flalign}\label{eqn:zetamorphisms}
\zeta_{\mathrm{con}}\big(\{h_V\}\big) = \big\{ (\mathrm{id}_V\times p)^\ast\, h_{V} \big\}~.
\end{flalign}
\end{subequations}
Notice that the naive image of this groupoid morphism would solve our problem: It describes
families of gauge fields and gauge transformations on $M$
which are smoothly parametrized by $U$
because they arise as pullbacks along the point embeddings
$\mathrm{id}_M\times p : M\times \mathbb{R}^0 \to M\times U$ of smooth
gauge fields and gauge transformations on $M\times U$.
Unfortunately, the stage-wise naive image of $\zeta_{\mathrm{con}}$ is in general not a homotopically
meaningful construction in the sense that it does not preserve weak equivalences.
We thus have to solve our problem in a more educated manner to ensure that its solution
is homotopically meaningful.
\vspace{2mm}

For this let us consider the following pullback diagram
\begin{flalign}\label{eqn:pullbackconcret}
\xymatrix{
\sharp\big({\mathrm{B}G_\mathrm{con}}_{~}^{\widecheck{M}}\big) \ar[rr]^-{\sharp (\mathrm{forget}^{\widecheck{M}})} ~&&~ \sharp\big({\mathrm{B}G}_{~}^{\widecheck{M}}\big) ~&&~\ar[ll]_-{\zeta} {\mathrm{B}G}_{~}^{\widecheck{M}}
}
\end{flalign}
in $\mathsf{H}$. Here ${\mathrm{B}G}_{~}^{\widecheck{M}}$ is the mapping stack from $\widecheck{M}$ to the classifying
stack $\mathrm{B}G$ of principal $G$-bundles (cf.\ Example \ref{ex:BG}), $\zeta$ is a canonical $\mathsf{H}$-morphism
similar to \eqref{eqn:zetaall} and $\mathrm{forget} : {\mathrm{B}G_\mathrm{con}} \to {\mathrm{B}G}$
is the $\mathsf{H}$-morphism that forgets the connections. (The mapping stack ${\mathrm{B}G}_{~}^{\widecheck{M}}$ is
similar to ${\mathrm{B}G_\mathrm{con}}_{~}^{\widecheck{M}}$, cf.\ Lemma \ref{lem:BGconcheckM},
however without the connection data.) Note that there exists a canonical $\mathsf{H}$-morphism
\begin{flalign}
\xymatrix{
 {\mathrm{B}G_\mathrm{con}}_{~}^{\widecheck{M}}\ar[r]~&~ \sharp\big({\mathrm{B}G_\mathrm{con}}_{~}^{\widecheck{M}}\big)\times^h_{ \sharp({\mathrm{B}G}_{~}^{\widecheck{M}})} {\mathrm{B}G}_{~}^{\widecheck{M}}
 }
\end{flalign}
to the homotopy fiber product associated to  \eqref{eqn:pullbackconcret}.
We shall use the following abstract
\begin{defi}\label{defi:diffconcret}
The {\em differential concretification} of the mapping stack $ {\mathrm{B}G_\mathrm{con}}_{~}^{\widecheck{M}}$,
which we will also call the {\em stack of gauge fields} on $M$, is defined by
\begin{flalign}
G\mathbf{Con}(M) ~:=~\mathrm{Im}_1\Big(\xymatrix{
 {\mathrm{B}G_\mathrm{con}}_{~}^{\widecheck{M}}\ar[r]~&~ \sharp\big({\mathrm{B}G_\mathrm{con}}_{~}^{\widecheck{M}}\big)\times^h_{ \sharp({\mathrm{B}G}_{~}^{\widecheck{M}})} {\mathrm{B}G}_{~}^{\widecheck{M}}
 }\Big) ~,
\end{flalign}
where $\mathrm{Im}_1$ denotes the $1$-image,
i.e.\ the fibrant replacement in the $(-1)$-truncation of the canonical model structure on the over-category
$\mathsf{H}\big/\sharp({\mathrm{B}G_\mathrm{con}}_{~}^{\widecheck{M}})\times^h_{ \sharp({\mathrm{B}G}_{~}^{\widecheck{M}})} {\mathrm{B}G}_{~}^{\widecheck{M}}$,
see Appendix \ref{app:truncation}.
\end{defi}

We shall now explicitly compute $G\mathbf{Con}(M)$ in order to confirm that our abstract definition
leads to the desired stack of gauge fields on $M$, i.e.\ the stack describing smoothly parametrized
gauge fields and gauge transformations on $M$. It is practically very convenient
to compute instead of $G\mathbf{Con}(M)$ defined in Definition \ref{defi:diffconcret}
a weakly equivalent object of $\mathsf{H}$ that has a simpler and more familiar explicit description.
\vspace{2mm}

As a first step towards a simplified description of $G\mathbf{Con}(M)$,
we notice that we actually do not have to compute the homotopy fiber
product in Definition \ref{defi:diffconcret} by using the explicit construction
of Proposition \ref{propo:homfibprod}. The reason is as follows:
Using Proposition \ref{propo:localfibration} it is easy to prove that the morphism
$\mathrm{forget} : {\mathrm{B}G_\mathrm{con}} \to {\mathrm{B}G}$ is a fibration (in the local model structure on $\mathsf{H}$).
Because $(-)^{\widecheck{M}} : \mathsf{H}\to \mathsf{H}$ and $\sharp : \mathsf{H}\to \mathsf{H}$ are right Quillen functors,
it follows that the right-pointing arrow in the pullback diagram \eqref{eqn:pullbackconcret} is
a fibration too. Using that $\mathsf{H}$ is a right proper model category (cf.\ \cite[Corollary 5.8]{Hollander}),
the statement in \cite[Corollary 13.3.8]{Hirschhorn} implies that the canonical $\mathsf{H}$-morphism
\begin{flalign}
\xymatrix{
P ~:=~  \sharp\big({\mathrm{B}G_\mathrm{con}}_{~}^{\widecheck{M}}\big)\times^{~}_{ \sharp({\mathrm{B}G}_{~}^{\widecheck{M}})} {\mathrm{B}G}_{~}^{\widecheck{M}} ~~\ar[rr]  &&~~\sharp\big({\mathrm{B}G_\mathrm{con}}_{~}^{\widecheck{M}}\big)\times^h_{ \sharp({\mathrm{B}G}_{~}^{\widecheck{M}})} {\mathrm{B}G}_{~}^{\widecheck{M}}
}
\end{flalign}
from the {\em ordinary} fiber product to the homotopy fiber product is a weak equivalence.
Hence, we may replace the homotopy fiber product in  Definition \ref{defi:diffconcret}
by the ordinary fiber product $P$ in order to find a weakly equivalent description of $G\mathbf{Con}(M)$.
The ordinary fiber product $P$ is much easier to compute: For any object $U$ in $\mathsf{C}$,
the groupoid $P(U)$ has as objects all pairs of families
\begin{flalign}
\Big(\big \{A_{p;\,V} \in \Omega^1(V,\mathfrak{g})\big\} , \big\{g_{VV^\prime} \in C^\infty((V\cap V^\prime)\times U,G)\big\}\Big)~,
\end{flalign}
where $V \subseteq M$, $V^\prime \subseteq M$ run over all open subsets diffeomorphic to $\mathbb{R}^{\mathrm{dim}(M)}$ and $p\in U$ runs over all points of $U$,
such that $(\{A_{p;\,V} \} , \{ (\mathrm{id}_{V\cap V^\prime} \times p)^\ast\, g_{VV^\prime}\})$
is an object in $ \sharp({\mathrm{B}G_\mathrm{con}}_{~}^{\widecheck{M}})(U)$.
The morphisms in $P(U)$ from $( \{A_{p;\,V}\} , \{g_{VV^\prime} \})$
to $( \{A^\prime_{p;\,V}\} , \{g^\prime_{VV^\prime} \})$
are all families
\begin{flalign}
\big\{h_{V} \in C^\infty(V \times U,G)\big\}~,
\end{flalign}
where $V \subseteq M$ runs over all open subsets diffeomorphic to $\mathbb{R}^{\mathrm{dim}(M)}$,
such that $\{(\mathrm{id}_V\times p)^\ast\, h_{V}\}$ is a morphism
in $ \sharp({\mathrm{B}G_\mathrm{con}}_{~}^{\widecheck{M}})(U)$
from $(\{A_{p;\,V} \} , \{ (\mathrm{id}_{V\cap V^\prime} \times p)^\ast\, g_{VV^\prime}\})$
to $(\{A^\prime_{p;\,V} \} , \{ (\mathrm{id}_{V\cap V^\prime} \times p)^\ast\, g^\prime_{VV^\prime}\})$.
For a morphism $\ell : U\to U^\prime$ in $\mathsf{C}$, the associated
$\mathsf{Grpd}$-morphism $P(\ell ) : P(U^\prime) \to P(U)$
is given by
\begin{flalign}
\nonumber P(\ell) ~:~ \big( \big\{A_{p^\prime;\,V}\big\} , \big\{g_{VV^\prime} \big\}\big) ~ &\longmapsto ~
 \big( \big\{  \,A_{\ell(p);\,V} \big\} , \big\{(\mathrm{id}_{V\cap V^\prime}\times \ell)^\ast\,g_{VV^\prime} \big\}\big)~,\\
 \big\{h_{V} \big\} ~&\longmapsto ~ \big\{(\mathrm{id}_V\times \ell)^\ast\,h_{V}\big\}~.
\end{flalign}
As a side remark, notice that $P(U)$ has the desired morphisms, however
the gauge fields are not smoothly $U$-parametrized yet.
\vspace{2mm}

As a further simplification in our explicit description of $G\mathbf{Con}(M)$,
we may combine Proposition \ref{propo:easyfibrepH/K} and Proposition \ref{propo:basechange}
to compute (again up to weak equivalence) the $1$-image in
Definition \ref{defi:diffconcret} by the full image sub-presheaf of groupoids corresponding
to the canonical morphism $ {\mathrm{B}G_\mathrm{con}}_{~}^{\widecheck{M}}\to P$ to the {\em ordinary} fiber product $P$.
This defines the following object in $\mathsf{H}$, which is weakly equivalent to $G\mathbf{Con}(M)$ given
in Definition \ref{defi:diffconcret}.
\begin{propo}\label{propo:GCon}
Up to weak equivalence in $\mathsf{H}$, the stack of gauge fields $G\mathbf{Con}(M)$
defined in Definition \ref{defi:diffconcret} has the following explicit description:
For all objects $U$ in $\mathsf{C}$, the objects of the groupoid $G\mathbf{Con}(M)(U)$ are pairs of families
\begin{flalign}
\big(\mathbf{A},\mathbf{P}\big) := \Big(\big\{A_{V} \in \Omega^{1,0}(V\times U,\mathfrak{g})\big\},\big\{ g_{VV^\prime}\in C^\infty((V\cap V^\prime)\times U,G) \big\}\Big)~,
\end{flalign}
where  $V\subseteq M$ and $V^\prime \subseteq M$ run over all
open subsets diffeomorphic to $\mathbb{R}^{\mathrm{dim}(M)}$
and $\Omega^{1,0}$ denotes the vertical $1$-forms on $V\times U\to U$,
which satisfy the following  conditions:
\begin{itemize}
\item For all open subsets $V\subseteq M$ and $V^\prime \subseteq M$ diffeomorphic to $\mathbb{R}^{\mathrm{dim}(M)}$,
\begin{flalign}
A_{V^\prime}\vert_{(V\cap V^\prime)\times U}^{}~=~
A_{V}\vert_{(V\cap V^\prime)\times U}^{} \triangleleft^{\mathrm{vert}} g_{VV^\prime}~,
\end{flalign}
where $A \triangleleft^{\mathrm{vert}} g := g^{-1}\, A\, g + g^{-1}\, \mathrm{d}^{\mathrm{vert}} g$
is the vertical action of gauge transformations that is
defined by the vertical de Rham differential $\mathrm{d}^{\mathrm{vert}}$  on $V\times U\to U$.

\item  For all open subsets $V\subseteq M$ diffeomorphic to $\mathbb{R}^{\mathrm{dim}(M)}$, $g_{VV} = e$.

\item  For all open subsets $V\subseteq M$, $V^\prime \subseteq M$
and $V^{\prime\prime} \subseteq M$ diffeomorphic to $\mathbb{R}^{\mathrm{dim}(M)}$,
\begin{flalign}
g_{VV^\prime}\vert_{(V\cap V^\prime\cap V^{\prime\prime})\times U}^{}
~~g_{V^\prime V^{\prime\prime}}\vert_{(V\cap V^\prime\cap V^{\prime\prime})\times U}^{}
~=~
g_{VV^{\prime\prime}}\vert_{(V\cap V^\prime\cap V^{\prime\prime})\times U}^{}~.
\end{flalign}
\end{itemize}
The morphisms of the groupoid $G\mathbf{Con}(M)(U)$ from $(\mathbf{A},\mathbf{P}) =(\{A_V\},\{g_{VV^\prime}\})$
to  $(\mathbf{A}^\prime,\mathbf{P}^\prime) = (\{A^\prime_V\},\{g^\prime_{VV^\prime}\})$ are families
\begin{flalign}
\mathbf{h}:= \big\{h_{V} \in C^\infty(V\times U,G)\big\} \,:\, \big(\mathbf{A},\mathbf{P}\big)~\longrightarrow ~\big(\mathbf{A}^\prime,\mathbf{P}^\prime\big)~,
\end{flalign}
where $V\subseteq M$ runs over all open subsets diffeomorphic to $\mathbb{R}^{\mathrm{dim}(M)}$,
which satisfy the following conditions:
\begin{itemize}
\item For all open subsets $V\subseteq M$ diffeomorphic to $\mathbb{R}^{\mathrm{dim}(M)}$,
\begin{flalign}
A_{V}^\prime ~=~ A_V \triangleleft^{\mathrm{vert}} h_V~.
\end{flalign}

\item For all open subsets $V\subseteq M$ and $V^\prime \subseteq M$ diffeomorphic to $\mathbb{R}^{\mathrm{dim}(M)}$,
\begin{flalign}
g_{VV^\prime}^\prime ~=~ h_V^{-1}\vert^{}_{(V\cap V^\prime)\times U}~~g_{VV^\prime}~~h_{V^\prime}\vert^{}_{(V\cap V^\prime)\times U}~.
\end{flalign}
\end{itemize}
For all morphisms $\ell : U\to U^\prime$ in $\mathsf{C}$,  the groupoid morphism
$G\mathbf{Con}(M)(\ell) : G\mathbf{Con}(M)(U^\prime) \to G\mathbf{Con}(M)(U)$ is given by
\begin{flalign}
\nonumberG\mathbf{Con}(M)(\ell)~:~ \big(\mathbf{A},\mathbf{P}\big) ~&\longmapsto~ \big(\ell^\ast\mathbf{A},\ell^\ast\mathbf{P}\big) := \big(\{(\mathrm{id}_V\times \ell)^\ast \,A_V\} , \{(\mathrm{id}_{V\cap V^\prime}\times\ell)^\ast\,g_{VV^\prime}\}\big)~,\\
\mathbf{h} ~&\longmapsto ~ \ell^\ast\mathbf{h} := \{(\mathrm{id}_{V}\times\ell)^\ast\, h_{V}\}~.
\end{flalign}
\end{propo}
\begin{defi}\label{defi:Ugaugefield}
Let $U$ be an object in $\mathsf{C}$. We call an object $(\mathbf{A},\mathbf{P})$
of the groupoid $G\mathbf{Con}(M)(U)$ a {\em smoothly $U$-parametrized gauge field} on $M$.
More precisely, we call $\mathbf{P}$ a {\em smoothly $U$-parametrized principal $G$-bundle} on $M$ and
$\mathbf{A}$ a {\em smoothly $U$-parametrized connection} on $\mathbf{P}$.
A morphism $\mathbf{h} :(\mathbf{A},\mathbf{P})\to(\mathbf{A}^\prime,\mathbf{P}^\prime)$
of the groupoid  $G\mathbf{Con}(M)(U)$ is called a {\em smoothly $U$-parametrized gauge transformation}.
\end{defi}
\begin{rem}\label{rem:concmappinstackfunctor}
Similarly to Remark \ref{rem:mappinstackfunctor},
our explicit model for the stack of gauge fields
presented in Proposition \ref{propo:GCon}
provides a functor $G\mathbf{Con} : \mathsf{Man}_{\hookrightarrow}^{\mathrm{op}}\to \mathsf{H}$
on the category of manifolds with open embeddings. Given any open embedding
$f : M\to M^\prime$, we also use the simplified notation
\begin{flalign}
\nonumber G\mathbf{Con}(f)\big( \mathbf{A},\mathbf{P} \big)&:= \big(f^\ast\mathbf{A},f^\ast\mathbf{P}\big) := \big(\{ (f\vert_V\times \mathrm{id}_U)^\ast \,A_{f(V)}\},\{(f\vert_{V\cap V^\prime}\times \mathrm{id}_U)^\ast \,g_{f(V)f(V^\prime)}\}\big)~,\\
 G\mathbf{Con}(f)\big(\mathbf{h}\big) &:= f^\ast\mathbf{h} := \{(f\vert_V\times \mathrm{id}_U)^\ast\, h_{f(V)}\}~,
\end{flalign}
for any stage $U$ in $\mathsf{C}$ of the $\mathsf{H}$-morphism $G\mathbf{Con}(f) : G\mathbf{Con}(M^\prime) \to G\mathbf{Con}(M)$.
\end{rem}
\begin{rem}\label{rem:GConisstack}
The abstract description of $G\mathbf{Con}(M)$ provided in Definition \ref{defi:diffconcret}
is automatically a stack, i.e.\ a fibrant object in $\mathsf{H}$. This is a consequence of the following facts:
1.)\ All three objects entering the homotopy fiber product are stacks, hence the homotopy fiber product
is a stack too, see Proposition \ref{propo:homfibprod}.
2.)\ $G\mathbf{Con}(M)$ is constructed by a fibrant replacement in the
$(-1)$-truncation of the corresponding over-category
(see Appendix \ref{app:truncation} for the relevant terminology), hence
the induced $\mathsf{H}$-morphism from $G\mathbf{Con}(M)$ to the homotopy fiber product is
a fibration in $\mathsf{H}$. (Recall that fibrant objects in the $(-1)$-truncation
of the over-category, i.e.\ $S_{-1}$-local objects, are by Definition \ref{defi:S-1local}
in particular fibrations in $\mathsf{H}$.) Combining
1.)\ and 2.), it follows that $G\mathbf{Con}(M)$ is a stack because the morphism $G\mathbf{Con}(M) \to \{\ast\}$ to
the terminal object factorizes over the homotopy fiber product in terms of two
fibrations in $\mathsf{H}$, and thus is a fibration too.
\vspace{2mm}

This unfortunately {\em does not} automatically imply that our weakly equivalent simplified
description of $G\mathbf{Con}(M)$ given in Proposition \ref{propo:GCon} is a stack too.
One can, however, verify explicitly that the stack condition \eqref{eqn:stack}
holds true for the presheaf of groupoids $G\mathbf{Con}(M)$ presented in Proposition \ref{propo:GCon}.
This is a straightforward, but rather tedious, calculation using Proposition \ref{propo:descentcat}
to compute the relevant homotopy limits. As this calculation is not very
instructive, we shall not write it out in full detail and just mention that it uses arguments similar to those in
Example \ref{ex:BGcon}. (In particular, it uses that all cocycles on manifolds diffeomorphic to
some $\mathbb{R}^n$ may be trivialized, and that $G$-valued functions and $\mathfrak{g}$-valued forms are sheaves.)
\end{rem}

We introduce the following
notation for the mapping stack $\mathrm{B}G^{\widecheck{M}}$ in
order to match the notations established
in Proposition \ref{propo:GCon} and Definition \ref{defi:Ugaugefield}.
\begin{defi}\label{defi:GBun}
We call $G\mathbf{Bun}(M):= \mathrm{B}G^{\widecheck{M}}$ the {\em stack of principal $G$-bundles} on $M$.
For any object $U$ in $\mathsf{C}$, we denote the objects of $G\mathbf{Bun}(M)(U)$ by symbols
like $\mathbf{P} := \{g_{VV^\prime}\}$ and the morphisms of $G\mathbf{Bun}(M)(U)$ by symbols
like $\mathbf{h} :=\{h_V\} : \mathbf{P}\to \mathbf{P}^\prime$.
\end{defi}

\subsection{\label{subsec:curvature}Curvature morphism}
Recalling the definition of the classifying stack $\mathrm{B}G_{\Omega^2_{\mathrm{ad}}}$ of
principal $G$-bundles with adjoint bundle valued $2$-forms (cf.\ Example \ref{ex:Liealgforms}),
we consider the canonical curvature $\mathsf{H}$-morphism
\begin{flalign}
F:\mathrm{B}G_\mathrm{con} \longrightarrow \mathrm{B}G_{\Omega^2_{\mathrm{ad}}}~,
\end{flalign}
whose stages $F: \mathrm{B}G_\mathrm{con}(U) \to \mathrm{B}G_{\Omega^2_{\mathrm{ad}}}(U)$ are
the groupoid morphisms given by
\begin{flalign}
\nonumber F\,:\qquad A~&\longmapsto~ F(A) := \mathrm{d} A + A \wedge A~,\\
 (A,g)~&\longmapsto ~(F(A),g)~.
\end{flalign}
Given any manifold $M$, we have an induced $\mathsf{H}$-morphism
$F^{\widecheck{M}}:{\mathrm{B}G_\mathrm{con}}^{\widecheck{M}} \to {\mathrm{B}G_{\Omega^2_{\mathrm{ad}}}}^{\widecheck{M}}$
between mapping stacks. We shall now construct the
counterpart of this morphism on concretified mapping stacks.
This will later be used to formalize the Yang-Mills equation on $G\mathbf{Con}(M)$.
\vspace{2mm}

As a first step, we explicitly describe the mapping stack
from $\widecheck{M}$ to $\mathrm{B}G_{\Omega^p_{\mathrm{ad}}}$, $p\in\mathbb{Z}_{\geq0}$, following the lines
of Section \ref{subsec:mapstack}. Up to weak equivalence in $\mathsf{H}$, the associated presheaf of groupoids
\begin{flalign}
{\mathrm{B}G_{\Omega^p_{\mathrm{ad}}}}_{~}^{\widecheck{M}} : \mathsf{C}^\mathrm{op} \longrightarrow \mathsf{Grpd}~
\end{flalign}
has a description similar to Lemma \ref{lem:BGconcheckM}: For any object $U$ in $\mathsf{C}$,
the objects of the groupoid ${\mathrm{B}G_{\Omega^p_{\mathrm{ad}}}}^{\widecheck{M}}(U)$ are pairs of families
\begin{flalign}
\Big(\big\{ \omega_V  \in\Omega^p(V\times U,\mathfrak{g})  \big\},
\big\{ g_{VV^\prime} \in C^\infty((V\cap V^\prime)\times U , G)\big\}\Big)~,
\end{flalign}
where $V\subseteq M$ and $V^\prime \subseteq M$ run over all
open subsets diffeomorphic to $\mathbb{R}^{\mathrm{dim}(M)}$, which satisfy
\begin{subequations}\label{eqn:formcomp}
\begin{flalign}
\omega_{V^\prime}\vert_{(V\cap V^\prime)\times U}^{} ~&=~
\mathrm{ad}_{g_{VV^\prime}} \big(\omega_V\vert_{(V\cap V^\prime)\times U}^{}\big)~, \\
 g_{VV} ~&=~e~, \\
g_{VV^\prime}\vert_{(V\cap V^\prime\cap V^{\prime\prime})\times U}^{}~~
g_{V^\prime V^{\prime\prime}}\vert_{(V\cap V^\prime\cap V^{\prime\prime})\times U}^{}
~&=~ g_{VV^{\prime\prime}}\vert_{(V\cap V^\prime\cap V^{\prime\prime})\times U}^{}~,
\end{flalign}
\end{subequations}
for all open subsets $V\subseteq M$, $V^\prime \subseteq M$ and $V^{\prime\prime} \subseteq M$
diffeomorphic to $\mathbb{R}^{\mathrm{dim}(M)}$.
The morphisms of the groupoid ${\mathrm{B}G_{\Omega^p_{\mathrm{ad}}}}^{\widecheck{M}}(U)$ from
$(\{\omega_V\},\{g_{VV^\prime}\})$ to $(\{\omega_{V}^\prime\}, \{g^\prime_{VV^\prime}\})$
are families
\begin{flalign}
\big\{ h_{V} \in C^\infty(V\times U,G)  \big\}~,
\end{flalign}
where $V\subseteq M$ runs over all open subsets  diffeomorphic to $\mathbb{R}^{\mathrm{dim}(M)}$,
which satisfy
\begin{subequations}\label{eqn:formcomp2}
\begin{flalign}
\omega_{V}^\prime ~&=~ \mathrm{ad}_{h_V} (\omega_V) ~,\\
g_{VV^\prime}^\prime ~&=~ h_V^{-1}\vert^{}_{(V\cap V^\prime)\times U}~~g_{VV^\prime}~~h_{V^\prime}\vert^{}_{(V\cap V^\prime)\times U}~,
\end{flalign}
\end{subequations}
for all open subsets $V\subseteq M$ and $V^\prime \subseteq M$ diffeomorphic to $\mathbb{R}^{\mathrm{dim}(M)}$.
Moreover, the functor ${\mathrm{B}G_{\Omega^p_{\mathrm{ad}}}}^{\widecheck{M}}: \mathsf{C}^\mathrm{op} \to \mathsf{Grpd}$
assigns to a morphism $\ell: U \to U^\prime$ in $\mathsf{C}$ the groupoid morphism
${\mathrm{B}G_{\Omega^p_{\mathrm{ad}}}}^{\widecheck{M}}(\ell): {\mathrm{B}G_{\Omega^p_{\mathrm{ad}}}}^{\widecheck{M}}(U^\prime)
\to {\mathrm{B}G_{\Omega^p_{\mathrm{ad}}}}^{\widecheck{M}}(U)$ specified by
\begin{flalign}
\nonumber {\mathrm{B}G_{\Omega^p_{\mathrm{ad}}}}_{~}^{\widecheck{M}}(\ell) ~:~ \big(\{\omega_V\},\{g_{VV^\prime}\}\big) ~&\longmapsto~ \big(\{(\mathrm{id}_V\times \ell)^\ast \,\omega_V\} , \{(\mathrm{id}_{V\cap V^\prime}\times\ell)^\ast\,g_{VV^\prime}\}\big)~,\\
\{h_{V} \} ~&\longmapsto ~ \{(\mathrm{id}_{V}\times\ell)^\ast\, h_{V}\}~.
\end{flalign}

The stages of the $\mathsf{H}$-morphism
\begin{flalign}
F^{\widecheck{M}} \, :\, {\mathrm{B}G_\mathrm{con}}^{\widecheck{M}} ~\longrightarrow~ {\mathrm{B}G_{\Omega^2_{\mathrm{ad}}}}_{~}^{\widecheck{M}}~
\end{flalign}
are by construction the groupoid morphisms from
${\mathrm{B}G_\mathrm{con}}^{\widecheck{M}}(U) = \mathsf{Grpd}(\underline{U}\times \widecheck{M}, \mathrm{B}G_\mathrm{con})$
to ${\mathrm{B}G_{\Omega^2_{\mathrm{ad}}}}^{\widecheck{M}}(U) = \mathsf{Grpd}(\underline{U}\times \widecheck{M}, \mathrm{B}G_{\Omega^2_{\mathrm{ad}}})$
resulting from post-composition by $F: \mathrm{B}G_\mathrm{con} \to \mathrm{B}G_{\Omega^2_{\mathrm{ad}}}$.
More explicitly, using the description of ${\mathrm{B}G_\mathrm{con}}_{~}^{\widecheck{M}}(U)$
given in Lemma \ref{lem:BGconcheckM} and the one of ${\mathrm{B}G_{\Omega^2_{\mathrm{ad}}}}^{\widecheck{M}}$ provided above,
we find that $F^{\widecheck{M}}:{\mathrm{B}G_\mathrm{con}}^{\widecheck{M}}(U) \to
{\mathrm{B}G_{\Omega^2_{\mathrm{ad}}}}^{\widecheck{M}}(U)$ is the groupoid morphism
\begin{flalign}
\nonumber F^{\widecheck{M}} ~:~ \big(\{A_V\},\{g_{VV^\prime}\}\big) ~&\longmapsto~ \big(\{F(A_V)\} , \{g_{VV^\prime}\}\big)~,\\
\{h_{V} \} ~&\longmapsto ~ \{h_{V}\}~,
\end{flalign}
for all objects $U$ in $\mathsf{C}$.
It is easy to confirm directly  that
$F^{\widecheck{M}}: {\mathrm{B}G_\mathrm{con}}^{\widecheck{M}} \to {\mathrm{B}G_{\Omega^2_{\mathrm{ad}}}}^{\widecheck{M}}$
is a natural transformation between functors $\mathsf{C}^\mathrm{op} \to \mathsf{Grpd}$.
\vspace{2mm}

Our concretification prescription for ${\mathrm{B}G_\mathrm{con}}_{~}^{\widecheck{M}}$ (cf.\ Definition \ref{defi:diffconcret})
can be also applied to the mapping stacks
${\mathrm{B}G_{\Omega^p_{\mathrm{ad}}}}^{\widecheck{M}}$, $p\in\mathbb{Z}_{\geq 0}$. The relevant pullback diagram (replacing
\eqref{eqn:pullbackconcret}) is
\begin{flalign}
\xymatrix{
\sharp\big({\mathrm{B}G_{\Omega^p_{\mathrm{ad}}}}_{~}^{\widecheck{M}}\big) \ar[rr]^-{\sharp (\mathrm{forget}^{\widecheck{M}})} ~&&~ \sharp\big({\mathrm{B}G}_{~}^{\widecheck{M}}\big) ~&&~\ar[ll]_-{\zeta} {\mathrm{B}G}_{~}^{\widecheck{M}}
}~,
\end{flalign}
where now the $\mathsf{H}$-morphism $\mathrm{forget} : {\mathrm{B}G_{\Omega^p_{\mathrm{ad}}}} \to \mathrm{B}G$ is the
one which forgets the adjoint bundle valued $p$-forms.
We define in analogy to Definition \ref{defi:diffconcret} the concretification of ${\mathrm{B}G_{\Omega^p_{\mathrm{ad}}}}^{\widecheck{M}}$
abstractly by
\begin{flalign}
\mathbf{\Omega}^p(M,\mathrm{ad}(G)) ~:=~\mathrm{Im}_1\Big(\xymatrix{
 {\mathrm{B}G_{\Omega^p_{\mathrm{ad}}}}_{~}^{\widecheck{M}}\ar[r]~&~ \sharp\big({\mathrm{B}G_{\Omega^p_{\mathrm{ad}}}}_{~}^{\widecheck{M}}\big)\times^h_{ \sharp({\mathrm{B}G}_{~}^{\widecheck{M}})} {\mathrm{B}G}_{~}^{\widecheck{M}}
 }\Big) ~.
\end{flalign}
Similarly to Proposition \ref{propo:GCon},
the concretified mapping stack $\mathbf{\Omega}^p(M,\mathrm{ad}(G))$ has the following
explicit description, up to weak equivalence in $\mathsf{H}$.  For any object $U$ in $\mathsf{C}$,
the objects of the groupoid $\mathbf{\Omega}^p(M,\mathrm{ad}(G))(U)$ are pairs of families
\begin{flalign}\label{eqn:bfOmegaobj}
\big(\boldsymbol{\omega},\mathbf{P}\big) := \Big(\big\{\omega_{V} \in \Omega^{p,0}(V\times U,\mathfrak{g})\big\},\big\{ g_{VV^\prime}\in C^\infty((V\cap V^\prime)\times U,G) \big\}\Big)~,
\end{flalign}
where $V\subseteq M$ and $V^\prime \subseteq M$ run over all open subsets
diffeomorphic to $\mathbb{R}^{\mathrm{dim}(M)}$ and $\Omega^{p,0}$ denotes the vertical $p$-forms on $V\times U\to U$,
which satisfy the conditions in \eqref{eqn:formcomp}. The morphisms of the groupoid
$\mathbf{\Omega}^p(M,\mathrm{ad}(G))(U)$ from $(\boldsymbol{\omega},\mathbf{P})= (\{\omega_V\},\{g_{VV^\prime}\})$ to
$(\boldsymbol{\omega}^\prime,\mathbf{P}^\prime) = (\{\omega_{V}^\prime\}, \{g^\prime_{VV^\prime}\})$ are families
\begin{flalign}\label{eqn:bfOmegamor}
\mathbf{h}:= \big\{ h_{V} \in C^\infty(V\times U,G)  \big\}~:~\big(\boldsymbol{\omega},\mathbf{P}\big)~\longrightarrow~\big(\boldsymbol{\omega}^\prime,\mathbf{P}^\prime\big)~,
\end{flalign}
where $V\subseteq M$ runs over all open subsets  diffeomorphic to $\mathbb{R}^{\mathrm{dim}(M)}$,
which satisfy the conditions in \eqref{eqn:formcomp2}. The groupoid morphisms
$\mathbf{\Omega}^p(M,\mathrm{ad}(G))(\ell) $  associated to $\mathsf{C}$-morphisms $\ell :U\to U^\prime$
are analogous to the ones in Proposition \ref{propo:GCon}. Similarly to Remark \ref{rem:GConisstack},
one can verify that this simplified, weakly equivalent description
of $\mathbf{\Omega}^p(M,\mathrm{ad}(G))$  is a stack too, for all $p\in\mathbb{Z}_{\geq 0}$.
\vspace{2mm}

From our abstract concretification prescription and the $\mathsf{H}$-morphism
$F^{\widecheck{M}} :{\mathrm{B}G_\mathrm{con}}^{\widecheck{M}}
\to {\mathrm{B}G_{\Omega^2_{\mathrm{ad}}}}^{\widecheck{M}}$ we obtain an $\mathsf{H}$-morphism
\begin{flalign}
\mathbf{F}_M\,:\, G\mathbf{Con}(M)~ \longrightarrow~ \mathbf{\Omega}^2(M,\mathrm{ad}(G))~
\end{flalign}
between the concretified mapping stacks.
Explicitly, using our simplified, but weakly equivalent, models for both concretified mapping stacks,
the stages  $\mathbf{F}_M: G\mathbf{Con}(M)(U) \to \mathbf{\Omega}^2(M,\mathrm{ad}(G))(U)$
of this $\mathsf{H}$-morphism read as
\begin{flalign}\label{eqn:curvaturemorph}
\nonumber \mathbf{F}_M ~: ~~\big(\mathbf{A},\mathbf{P}\big) = \big(\{A_V\} , \{g_{VV^\prime}\}\big) ~&\longmapsto~ \big(\{F^{\mathrm{vert}}(A_V)\} , \{g_{VV^\prime}\}\big)~,\\
\big(\mathbf{h} : (\mathbf{A},\mathbf{P})\to(\mathbf{A}^\prime,\mathbf{P}^\prime)\big) ~&\longmapsto ~ \big(\mathbf{h}:  \mathbf{F}_M(\mathbf{A},\mathbf{P})\to  \mathbf{F}_M(\mathbf{A}^\prime,\mathbf{P}^\prime)\big)~,
\end{flalign}
where $F^{\mathrm{vert}}(A_V) := \mathrm{d}^{\mathrm{vert}} A_V + A_V \wedge A_V$ is the vertical curvature
defined by the vertical de Rham differential $\mathrm{d}^{\mathrm{vert}}$ on $V\times U\to U$.
\begin{rem}\label{rem:conccurvaturenat}
Similar to Remark \ref{rem:concmappinstackfunctor} it is easy to see that
$\mathbf{\Omega}^p(-,\mathrm{ad}(G)) : \mathsf{Man}_{\hookrightarrow}^{\mathrm{op}}\to \mathsf{H}$ is a functor, for all $p\in\mathbb{Z}_{\geq0}$.
It is also easy to check that the $\mathsf{H}$-morphisms $\mathbf{F}_M: G\mathbf{Con}(M) \to \mathbf{\Omega}^2(M,\mathrm{ad}(G))$ constructed
above are the components of a natural transformation
\begin{flalign}
\mathbf{F} \,:\, G\mathbf{Con} ~\longrightarrow~ \mathbf{\Omega}^2(-,\mathrm{ad}(G))
\end{flalign}
between functors from $\mathsf{Man}_{\hookrightarrow}^{\mathrm{op}}$ to $\mathsf{H}$.
\end{rem}

\section{\label{sec:YM}Yang-Mills equation}
We formalize the Yang-Mills equation on
globally hyperbolic Lorentzian manifolds in terms of a morphism between
concretified mapping stacks. The corresponding stack of Yang-Mills solutions
is defined by an appropriate homotopy fiber product and it will be worked out explicitly,
up to weak equivalence in $\mathsf{H}$.
Our constructions are functorial on the usual category $\mathsf{Loc}_m$
of oriented and time-oriented globally hyperbolic Lorentzian manifolds
(of a fixed but arbitrary dimension $m\geq 2$), which we shall review below.

\subsection{\label{subsec:spacetimes}Globally hyperbolic Lorentzian manifolds}
Spacetimes in physics are described by globally hyperbolic Lorentzian manifolds,
see \cite[Chapter 3]{BEE}, \cite[Chapter 14]{ONeill}
and also \cite[Section 1.3]{Baer} for a more concise introduction.
Recall that a Lorentzian manifold is a manifold $M$ that is equipped with a metric
of Lorentzian signature $(-++\cdots +)$.
We further assume our Lorentzian manifolds to be equipped with an orientation
and a time-orientation, and that they are
of a fixed but arbitrary dimension $m\geq 2$.
For notational simplicity, we denote oriented and time-oriented
Lorentzian manifolds by symbols like $M$, i.e.\ we
suppress the orientation, time-orientation and metric from our notation.
\vspace{2mm}

A Cauchy surface in a Lorentzian manifold $M$
is a subset $\Sigma\subseteq M$ such that
every inextensible timelike curve in $M$ meets $\Sigma$ exactly once.
A Lorentzian manifold that admits a Cauchy surface
is called globally hyperbolic.
Globally hyperbolic Lorentzian manifolds $M$ provide us with a suitable
geometric framework to study hyperbolic partial differential equations,
whose initial data are assigned on a spacelike Cauchy surface $\Sigma\subseteq M$.
Later we will also need an equivalent characterization
of global hyperbolicity given in terms of strong causality
and compactness of double-cones. Concretely, this means that
every point admits a basis of causally convex open neighborhoods and
that $J^+_M(p) \cap J^-_M(p^\prime)$ is compact, for all $p,p^\prime \in M$.
Recall that a subset $S \subseteq M$ is called causally convex
if $J^+_M(S) \cap J^-_M(S) \subseteq S$
(in other words, causal curves with endpoints in $S$ lie entirely in it),
where $J^\pm_M(S)\subseteq M$ denotes the causal future/past of $S\subseteq M$.
(This is the subset consisting of all points of $M$ that can be reached by a future/past-directed
piecewise smooth causal curve emanating from $S$.)
\vspace{2mm}

Let us denote by $\mathsf{Loc}_m$ the category of all
$m$-dimensional oriented and time-oriented globally hyperbolic Lorentzian manifolds $M$
with morphisms given by all causal embeddings $f : M\to M^\prime$ (see \cite[Section 2.2]{SPAS}).
Explicitly, the latter are orientation and time-orientation preserving isometric embeddings,
whose image is a causally convex open subset of $M^\prime$.
\vspace{2mm}

Let $\mathcal{V} = \{V_\alpha\subseteq M\}$ be an open cover of (the manifold underlying) an object
$M$ in $\mathsf{Loc}_m$. Then each $V_\alpha$ may be equipped with
the induced Lorentzian metric, orientation and time-orientation,
however it is not necessarily globally hyperbolic and hence not necessarily an object in $\mathsf{Loc}_m$.
This motivates us to introduce the notion of {\em causally convex open covers}
of objects $M$ in $\mathsf{Loc}_m$, which are open covers $\mathcal{V} = \{V_\alpha\subseteq M\}$
such that each $V_\alpha$ is causally convex.
By the characterization of global hyperbolicity in terms
of strong causality and compactness of double-cones, it follows
that each $V_\alpha$ is an object of $\mathsf{Loc}_m$ when equipped
with the induced Lorentzian metric, orientation and time-orientation,
and that the canonical inclusion $\rho_\alpha : V_\alpha\to M$ is a $\mathsf{Loc}_m$-morphism.
Moreover, if non-empty, $V_\alpha\cap V_\beta$ is a causally convex open subset
of $M$ (as well as of $V_\alpha$ and of $V_\beta$) and thus may be regarded as an object in $\mathsf{Loc}_m$.
The canonical inclusion of $V_\alpha\cap V_\beta\neq \emptyset$ into
$M$ (as well as the ones into $V_\alpha$ and $V_\beta$) is a $\mathsf{Loc}_m$-morphism.
A similar statement holds true for all higher intersections $V_{\alpha_1}\cap \cdots\cap V_{\alpha_n}\neq \emptyset$.
\vspace{2mm}

Similarly to Corollary \ref{cor:functorialcofibrepMan},
there exists a canonical cofibrant replacement in $\mathsf{H}$
for objects in $\mathsf{Loc}_m$ which makes use of causally convex open covers.
For $M$ an object in $\mathsf{Loc}_m$, we define
\begin{flalign}\label{eqn:VMcc}
\mathcal{V}_M^{\mathrm{cc}}:= \Big\{V\subseteq M\,:\, V\text{ open, causally convex and diffeomorphic to }\mathbb{R}^m\Big\}
\end{flalign}
to be the set of {\em all} causally convex open subsets of $M$ that are diffeomorphic
to $\mathbb{R}^m$.\footnote{It is easy to see that \eqref{eqn:VMcc} indeed defines a cover of $M$:
Given any point $p\in M$, choose a Cauchy surface $\Sigma \subseteq M$ such that
$p\in \Sigma$. Taking any open neighborhood $W\subseteq \Sigma$ of $p$
that is diffeomorphic to $\mathbb{R}^{m-1}$, the Cauchy development $D(W)\subseteq M$
contains $p$ and belongs to $\mathcal{V}_M^{\mathrm{cc}}$
(in particular, $D(W)$ is diffeomorphic to $\mathbb{R} \times W$ because $W$ is one of its Cauchy surfaces).
See \cite[Definition 14.35 and Lemma 14.43]{ONeill} for the relevant
statements from Lorentzian geometry that we used in this argument.}
We denote the corresponding presheaf of \v{C}ech groupoids by
$\widecheck{M}{}^{\mathrm{cc}}:= \widecheck{\mathcal{V}_M^{\mathrm{cc}}}$
and note that by the same arguments as in Appendix \ref{app:cofibrep} (see in particular
Proposition \ref{propo:cofibcover} and Corollary \ref{cor:functorialcofibrepMan})
this defines a functorial cofibrant replacement in $\mathsf{H}$
of objects in $\mathsf{Loc}_m$. The corresponding functor and
natural transformation will be denoted by
\begin{flalign}
\widecheck{(-)}{}^{\mathrm{cc}} \,:\, \mathsf{Loc}_m\longrightarrow \mathsf{H}\quad,\qquad q^{\mathrm{cc}} \,:\,\widecheck{(-)}{}^{\mathrm{cc}} \longrightarrow \underline{(-)}~.
\end{flalign}
When working with objects $M$ in $\mathsf{Loc}_m$,
we may use these causally convex cofibrant replacements to
compute the mapping stacks and their concretifications
presented in Section \ref{sec:gaugefields} up to a weak equivalence in $\mathsf{H}$.
This is a consequence of
\begin{propo}\label{propo:cccovervscover}
For all objects $M$ in $\mathsf{Loc}_m$,
there exists a natural weak equivalence
$\widecheck{M}{}^{\mathrm{cc}} \to \widecheck{M}$ in $\mathsf{H}$
from the causally convex cofibrant replacement to the one of
Corollary \ref{cor:functorialcofibrepMan}.
\end{propo}
\begin{proof}
Notice that $\mathcal{V}_M^{\mathrm{cc}}$ given in \eqref{eqn:VMcc}
is a sub-cover of the cover
\begin{flalign}
\mathcal{V}_M= \big\{V\subseteq M \,:\, V\text{ open and diffeomorphic to }\mathbb{R}^m  \big\}
\end{flalign}
used in Appendix \ref{app:cofibrep}. Hence, there exists a natural
$\mathsf{H}$-morphism $\widecheck{M}{}^{\mathrm{cc}} = \widecheck{\mathcal{V}_M^{\mathrm{cc}}} \to
\widecheck{\mathcal{V}_M} = \widecheck{M}$ between the associated presheaves
of \v{C}ech groupoids. Explicitly, the stage at $U$ in $\mathsf{C}$ is specified by
\begin{flalign}
 \Big(\xymatrix{
M & \ar[l]_-{\rho_V}V & \ar[l]_-{\nu}U
}\Big) ~~\longmapsto~~\Big(\xymatrix{
M & \ar[l]_-{\rho_V}V & \ar[l]_-{\nu}U
}\Big)~,
\end{flalign}
where $V\subseteq M$ runs over all causally convex open subsets
diffeomorphic to $\mathbb{R}^m$.
The commutative diagram
\begin{flalign}
\xymatrix{
\ar[rd]_-{q_M^{\mathrm{cc}}}\widecheck{M}{}^{\mathrm{cc}} \ar[rr]^-{}&& \widecheck{M}\ar[dl]^-{q_M}\\
&\underline{M}&
}
\end{flalign}
in $\mathsf{H}$ and the fact that both $q_M$ and $q_M^\mathrm{cc}$ are weak equivalences
implies via the 2-out-of-3 property of weak equivalences
that $\widecheck{M}{}^{\mathrm{cc}} \to \widecheck{M}$ is a weak equivalence too.
\end{proof}
\begin{cor}\label{cor:cccofibrep}
Let $Y$ be a stack in $\mathsf{H}$ and $M$ an object in $\mathsf{Loc}_m$.
Then the natural weak equivalence
$\widecheck{M}{}^{\mathrm{cc}} \to \widecheck{M}$
of Proposition \ref{propo:cccovervscover} induces a
natural weak equivalence $Y^{\widecheck{M}} \to Y^{\widecheck{M}{}^{\mathrm{cc}}}$
of mapping stacks. Hence, up to natural
weak equivalence, all mapping stacks and their concretifications in Section \ref{sec:gaugefields}
can be computed using the cofibrant replacement $\widecheck{M}{}^{\mathrm{cc}}$ instead of $\widecheck{M}$.
\end{cor}
\begin{rem}\label{rem:cccofibrep}
In practice, the statement of Corollary \ref{cor:cccofibrep} means that
when working on an object $M$ in $\mathsf{Loc}_m$, all open subsets
$V,V^\prime,V^{\prime\prime}\subseteq M$ diffeomorphic to $\mathbb{R}^m$
entering our explicit models for mapping stacks and their concretifications
(see e.g.\ Proposition \ref{propo:GCon}) may be assumed to be also causally convex.
We shall use this weakly equivalent description from now on.
\end{rem}

\subsection{\label{subsec:YMmap}Yang-Mills morphism}
Let us first fix some notations.
Let $V$ be an object in $\mathsf{Loc}_m$ that is diffeomorphic (as a manifold) to $\mathbb{R}^m$.
Consider the vector space $\Omega^p(V)$
of $p$-forms on $V$. Because $V$ is in particular an oriented Lorentzian manifold,
we may introduce the Hodge operator $\ast : \Omega^p(V) \to \Omega^{m-p}(V)$.
Using also the de Rham differential $\mathrm{d} : \Omega^p(V)\to \Omega^{p+1}(V)$,
we may define the codifferential $\delta := (-1)^{m\,(p+1)} \, \ast\mathrm{d}\ast : \Omega^p(V) \to \Omega^{p-1}(V)$.
These operations extend to the vector space $\Omega^p(V,\mathfrak{g})$ of $\mathfrak{g}$-valued $p$-forms.
Given $A\in \Omega^1(V,\mathfrak{g})$, we also define
\begin{flalign}
\mathrm{d}_A^{} \,:\, \Omega^p(V,\mathfrak{g})\longrightarrow \Omega^{p+1}(V,\mathfrak{g})~,~~
\omega \longmapsto \mathrm{d}_A^{}\omega := \mathrm{d} \omega + A\wedge\omega - (-1)^p\,\omega\wedge A~,
\end{flalign}
and
\begin{flalign}
\delta_{A}^{} :=  (-1)^{m\,(p+1)} \, \ast\mathrm{d}_A^{} \ast  \,:\, \Omega^p(V,\mathfrak{g})\longrightarrow \Omega^{p-1}(V,\mathfrak{g})~.
\end{flalign}
Interpreting $A$ as a gauge field, the Yang-Mills equation on $V$ reads as $\delta_A^{} F(A) =0$, where
$F(A) = \mathrm{d} A + A\wedge A$ is the curvature of $A$.
\vspace{2mm}

Given also an object $U$ in $\mathsf{C}$, the Hodge operator, the de Rham differential and the codifferential on $V$
may be extended vertically along $V\times U\to U$ to the vector space $\Omega^{p,0}(V\times U)$ of vertical
$p$-forms on $V\times U\to U$.
We denote the vertical Hodge operator by $\ast^\mathrm{vert} : \Omega^{p,0}(V\times U) \to \Omega^{m-p,0}(V\times U)$,
the vertical de Rham differential by $\mathrm{d}^\mathrm{vert} : \Omega^{p,0}(V\times U) \to \Omega^{p+1,0}(V\times U)$
and the vertical codifferential by $\delta^\mathrm{vert} : \Omega^{p,0}(V\times U) \to \Omega^{p-1,0}(V\times U)$.
Of course, these operations extend to the vector space $\Omega^{p,0}(V\times U,\mathfrak{g})$ of vertical
$\mathfrak{g}$-valued $p$-forms on $V\times U\to U$.
Given $A\in \Omega^{1,0}(V\times U,\mathfrak{g})$, we also define
\begin{flalign}
\nonumber \mathrm{d}_A^{\mathrm{vert}} \,:\, \Omega^{p,0}(V\times U,\mathfrak{g}) &\longrightarrow \Omega^{p+1,0}(V\times U,\mathfrak{g})~,~\\
\omega & \longmapsto \mathrm{d}_A^{\mathrm{vert}}\omega := \mathrm{d}^\mathrm{vert} \omega + A\wedge\omega - (-1)^p\,\omega\wedge A~,
\end{flalign}
and
\begin{flalign}
\delta_{A}^{\mathrm{vert}} :=  (-1)^{m\,(p+1)} \, \ast^\mathrm{vert} \mathrm{d}_A^{\mathrm{vert}} \ast^\mathrm{vert}  \,:\, \Omega^{p,0}(V\times U,\mathfrak{g})
\longrightarrow \Omega^{p-1,0}(V\times U,\mathfrak{g})~.
\end{flalign}
Interpreting $A$ as a smoothly $U$-parametrized
gauge field, the vertical
Yang-Mills equation on $V\times U\to U$ reads as $\delta_A^{\mathrm{vert}} F^\mathrm{vert}(A) =0$,
where $F^\mathrm{vert}(A) = \mathrm{d}^\mathrm{vert} A + A\wedge A$ is the vertical curvature of $A$, see also Section \ref{subsec:curvature}.
\vspace{2mm}

Let now $M$ be any object in $\mathsf{Loc}_m$. The gauge fields on $M$ are described by
the stack $G\mathbf{Con}(M)$. In the following we shall always use
the weakly equivalent explicit description given by
Proposition \ref{propo:GCon} and Corollary \ref{cor:cccofibrep}. (Recall also Remark \ref{rem:cccofibrep}
for what this means in practice.)
We define the Yang-Mills $\mathsf{H}$-morphism
\begin{flalign}
\mathbf{YM}_M \, :\,  G\mathbf{Con}(M) ~  \longrightarrow~\mathbf{\Omega}^1(M,\mathrm{ad}(G))
\end{flalign}
in terms of the vertical Yang-Mills operators $\delta_A^{\mathrm{vert}} F^\mathrm{vert}(A)$
mimicking the definition of the curvature $\mathsf{H}$-morphism $\mathbf{F}_M:
G\mathbf{Con}(M) \to \mathbf{\Omega}^2(M,\mathrm{ad}(G))$ in terms of the vertical curvatures $F^\mathrm{vert}(A)$,
cf.\ \eqref{eqn:curvaturemorph}.
Explicitly, at stage $U$ in $\mathsf{C}$, the associated
groupoid morphism $\mathbf{YM}_M :  G\mathbf{Con}(M)(U) \to \mathbf{\Omega}^1(M,\mathrm{ad}(G))(U)$ is defined as
\begin{flalign}
\nonumber \mathbf{YM}_M ~:~~\big(\mathbf{A},\mathbf{P}\big) = \big(\{A_V\} , \{g_{VV^\prime}\}\big)~&\longmapsto~ \big(\{\delta_{A_V}^\mathrm{vert} F^{\mathrm{vert}}(A_V)\} , \{g_{VV^\prime}\}\big)~,\\
\big(\mathbf{h} : (\mathbf{A},\mathbf{P})\to(\mathbf{A}^\prime,\mathbf{P}^\prime)\big) ~&\longmapsto ~\big( \mathbf{h} : \mathbf{YM}_M(\mathbf{A},\mathbf{P})\to \mathbf{YM}_M(\mathbf{A}^\prime,\mathbf{P}^\prime)\big)~.\label{eqn:YMeqnM}
\end{flalign}
To confirm that this indeed defines a groupoid morphism observe that
$\delta_{A\triangleleft^\mathrm{vert} g}^\mathrm{vert} F^{\mathrm{vert}}(A\triangleleft^\mathrm{vert} g) = \mathrm{ad}_g(\delta^\mathrm{vert}_A F^\mathrm{vert} (A))$
under gauge transformations. Naturality with respect to a change of stage
under any $\mathsf{C}$-morphism $\ell : U\to U^\prime$ is clear because, loosely speaking,
all vertical operations do not involve the objects $U$ in $\mathsf{C}$ by definition.
Finally, it is easy to confirm that the Yang-Mills $\mathsf{H}$-morphisms $\mathbf{YM}_M$ are the components
of a natural transformation
\begin{flalign}
\mathbf{YM} \,:\, G\mathbf{Con} ~\longrightarrow~ \mathbf{\Omega}^1(-,\mathrm{ad}(G))
\end{flalign}
between the functors $G\mathbf{Con} : \mathsf{Loc}_m^{\mathrm{op}} \to \mathsf{H}$
and $\mathbf{\Omega}^1(-,\mathrm{ad}(G)) : \mathsf{Loc}_m^\mathrm{op} \to \mathsf{H}$.
(This uses the fact that morphisms $f: M\to M^\prime$
in $\mathsf{Loc}_m$ preserve causally convex open subsets
and intertwine the Hodge operators. The same holds true for
their restrictions $f_V : V\to f(V)$ to all causally convex open subsets $V\subseteq M$.)

\subsection{\label{subsec:YMsol}Yang-Mills stack}
A naive way to define the stack of solutions $G\mathbf{Sol}(M)$ to the Yang-Mills
equation on $M$ is as follows: For any object $U$ in $\mathsf{C}$,
define $G\mathbf{Sol}(M)(U)$ to be the full sub-groupoid
of $G\mathbf{Con}(M)(U)$ consisting of all objects
$(\mathbf{A},\mathbf{P}) = (\{A_V\},\{g_{VV^\prime}\})$ satisfying
\begin{flalign}\label{eqn:naiveYM}
\mathbf{YM}_M\big(\mathbf{A},\mathbf{P}\big) = \big(\{\delta_{A_V}^\mathrm{vert} F^{\mathrm{vert}}(A_V)\} , \{g_{VV^\prime}\}\big)=\big(\{0 \}, \{g_{VV^\prime}\}\big) ~,
\end{flalign}
where $\mathbf{YM}_M$ is the Yang-Mills morphism  \eqref{eqn:YMeqnM} and $0\in \Omega^{1,0}(V\times U,\mathfrak{g})$
are the vanishing vertical $1$-forms on $V\times U\to U$. The groupoid morphism
$G\mathbf{Con}(M)(\ell) : G\mathbf{Con}(M)(U^\prime)\to G\mathbf{Con}(M)(U) $
associated to a $\mathsf{C}$-morphism $\ell : U \to U^\prime$
clearly induces a groupoid morphism $G\mathbf{Sol}(M)(\ell) : G\mathbf{Sol}(M)(U^\prime)\to G\mathbf{Sol}(M)(U)$,
hence $G\mathbf{Sol}(M) : \mathsf{C}^\mathrm{op}\to \mathsf{Grpd}$ is a functor, i.e.\ an object in $\mathsf{H}$.
The problem with this naive construction is that it is not clear whether it is homotopically meaningful,
i.e.\ whether it  preserves weak equivalences in $\mathsf{H}$.
\vspace{2mm}

To ensure that the stack of solutions to the Yang-Mills equation
is a homotopically meaningful concept,
we will propose an abstract definition.
Recall the stack $G\mathbf{Bun}(M)$ of principal $G$-bundles on $M$ from Definition \ref{defi:GBun}.
For any $p\in\mathbb{Z}_{\geq0}$, we introduce the $\mathsf{H}$-morphism
\begin{flalign}
\mathbf{0}_M \,:\, G\mathbf{Bun}(M) ~\longrightarrow~ \mathbf{\Omega}^p(M,\mathrm{ad}(G))~
\end{flalign}
whose stages $\mathbf{0}_M: G\mathbf{Bun}(M)(U) \to \mathbf{\Omega}^p(M,\mathrm{ad}(G))(U)$
are the groupoid morphisms
\begin{flalign}
\nonumber \mathbf{0}_M ~:~~ \mathbf{P}=\{g_{VV^\prime}\} ~&\longmapsto~\big(\{0\}, \{g_{VV^\prime}\}\big)~,\\
\big(\mathbf{h} : \mathbf{P}\to \mathbf{P}^\prime\big) ~&\longmapsto~ \big(\mathbf{h} : \mathbf{0}_M(\mathbf{P})\to \mathbf{0}_M(\mathbf{P}^\prime)\big)~.\label{eqn:0mstagewise}
\end{flalign}
(Similarly to the curvature $\mathsf{H}$-morphism $\mathbf{F}_M : G\mathbf{Con}(M) \to \mathbf{\Omega}^2(M,\mathrm{ad}(G))$
in Section \ref{subsec:curvature}, the $\mathsf{H}$-morphism $\mathbf{0}_M$
may be obtained more abstractly by inducing the canonical $\mathsf{H}$-morphism
$0 : \mathrm{B}G\to \mathrm{B}G_{\Omega^p_{\mathrm{ad}}}$ between the classifying stacks
to their corresponding mapping stacks and concretifications.)
In words, the $\mathsf{H}$-morphism $\mathbf{0}_M$
assigns to a smoothly $U$-parametrized principal $G$-bundle $\mathbf{P}$
the vanishing smoothly $U$-parametrized $p$-form $\mathbf{0}_M(\mathbf{P})$ with values in the associated adjoint bundle.
It is clear that $\mathbf{0}_M$ are the components of a natural transformation
$\mathbf{0} : G\mathbf{Bun} \to \mathbf{\Omega}^p(-,\mathrm{ad}(G))$
between functors from $\mathsf{Loc}_m^\mathrm{op}$ to $\mathsf{H}$.
\begin{defi}\label{defi:solstack}
Let $M$ be an object in $\mathsf{Loc}_m$.  We define the
{\em Yang-Mills stack} on $M$ as
the homotopy fiber product
\begin{flalign}
G\mathbf{Sol}(M) ~:= ~G\mathbf{Con}(M) ~\times^h_{\mathbf{\Omega}^1(M,\mathrm{ad}(G))} ~ G\mathbf{Bun}(M)
\end{flalign}
of the pullback diagram
\begin{flalign}\label{eqn:solutionpullback}
\xymatrix{
G\mathbf{Con}(M) \ar[rr]^-{\mathbf{YM}_M}~~&&~~\mathbf{\Omega}^1(M,\mathrm{ad}(G))~~&&~~\ar[ll]_-{\mathbf{0}_M}G\mathbf{Bun}(M)
}
\end{flalign}
in $\mathsf{H}$. Notice that the pullback diagram is natural in $M$,
hence this construction defines a functor $G\mathbf{Sol} : \mathsf{Loc}_m^\mathrm{op} \to H$.
Furthermore, on account of Proposition \ref{propo:homfibprod}
and recalling that $G\mathbf{Con}(M)$, $\mathbf{\Omega}^1(M,\mathrm{ad}(G))$ and $G\mathbf{Bun}(M)$ are stacks,
$G\mathbf{Sol}(M)$ is a stack too.
\end{defi}
\begin{rem}
Using Proposition \ref{propo:homfibprod}, we may explicitly compute $G\mathbf{Sol}(M)$.
Due to reasons explained below, this computation can be simplified considerably.
Nonetheless, we find it instructive to see explicitly how the homotopy fiber product enforces the
Yang-Mills equation, hence we briefly sketch the interesting part of the computation of the objects in
$G\mathbf{Sol}(M)$. Let $U$ be any object in $\mathsf{C}$. By Proposition \ref{propo:homfibprod},
the objects of $G\mathbf{Sol}(M)(U)$ are given by triples
\begin{flalign}
\big((\mathbf{A},\mathbf{P}), \widetilde{\mathbf{P}}, \mathbf{k}\big)~,
\end{flalign}
where $(\mathbf{A},\mathbf{P})$ is an object in $G\mathbf{Con}(M)(U)$,
$\widetilde{\mathbf{P}}$ is an object in $G\mathbf{Bun}(M)(U)$
and
\begin{flalign}\label{eqn:tmpYMhom0}
\mathbf{k} \,: \, \mathbf{YM}_M\big(\mathbf{A},\mathbf{P}\big)~ \longrightarrow~ \mathbf{0}_M\big(\widetilde{\mathbf{P}}\big)
\end{flalign}
is a morphism in $\mathbf{\Omega}^1(M,\mathrm{ad}(G))(U)$. Observe that this does {\em not} enforce the
Yang-Mills equation in the strict sense as above in our naive construction (cf.\ \eqref{eqn:naiveYM}),
but it demands that $\mathbf{YM}_M(\mathbf{A},\mathbf{P})$ is isomorphic to one of the zeros $\mathbf{0}_M(\widetilde{\mathbf{P}})$
in $\mathbf{\Omega}^1(M,\mathrm{ad}(G))(U)$. It is important to notice that every morphism in
$\mathbf{\Omega}^1(M,\mathrm{ad}(G))(U)$ with target given by $\mathbf{0}_M(\widetilde{\mathbf{P}})$
necessarily has to originate from an object of the form $\mathbf{0}_M(\mathbf{P}^\prime)$,
because the vanishing vertical $1$-forms $0\in\Omega^{1,0}(V\times U,\mathfrak{g})$
are invariant under the adjoint action $\mathrm{ad}$ of gauge transformations.
As a consequence, the fact that the morphism \eqref{eqn:tmpYMhom0} exists implies already the strict condition
that $\delta^\mathrm{vert}_{A_V} F^\mathrm{vert}(A_V)=0$ for all $V$. Summing up, we observe that
even though a priori the homotopy fiber product enforces a weaker version of the Yang-Mills equation
(i.e.\ up to isomorphism), a specific feature of the $\mathsf{H}$-morphism $\mathbf{0}_M$
turns this weaker version into a strict equality similar to \eqref{eqn:naiveYM}.
Below we shall make this statement precise by proving that $\mathbf{0}_M$ is a fibration
in $\mathsf{H}$, hence the homotopy fiber product may be computed (up to weak equivalence)
by the ordinary fiber product. This will eventually show that  $G\mathbf{Sol}(M)$
is  weakly equivalent to our naive solution stack discussed at
the beginning of this subsection.
\end{rem}

As already mentioned in the remark above, there exists a weakly equivalent simplified description
of the Yang-Mills stack $G\mathbf{Sol}(M)$ given in Definition \ref{defi:solstack}. It relies on the following
observation.
\begin{lem}
For every $p\in\mathbb{Z}_{\geq0}$, the $\mathsf{H}$-morphism
$\mathbf{0}_M: G\mathbf{Bun}(M) \to \mathbf{\Omega}^p(M,\mathrm{ad}(G))$ is a fibration
in the local model structure on $\mathsf{H}$.
\end{lem}
\begin{proof}
Because $G\mathbf{Bun}(M)$ and (the simplified description of)
$\mathbf{\Omega}^p(M,\mathrm{ad}(G))$ are stacks, by Lemma \ref{lem:fibrationlocfibrant}
the thesis follows if we show that $\mathbf{0}_M: G\mathbf{Bun}(M) \to \mathbf{\Omega}^p(M,\mathrm{ad}(G))$
is a stage-wise fibration in $\mathsf{Grpd}$ (recall Theorem \ref{theo:groupoids}).
Using the explicit expressions for the stages \eqref{eqn:0mstagewise},
one immediately realizes that this is indeed the case
because the functor $\mathbf{0}_M: G\mathbf{Bun}(M)(U) \to \mathbf{\Omega}^p(M,\mathrm{ad}(G))(U)$ is fully faithful
and any object of the groupoid $\mathbf{\Omega}^p(M,\mathrm{ad}(G))(U)$ isomorphic
to one in the image of $\mathbf{0}_M: G\mathbf{Bun}(M)(U) \to \mathbf{\Omega}^p(M,\mathrm{ad}(G))(U)$
has to lie in the image too.
\end{proof}

As a consequence of this lemma,
the homotopy fiber product in Definition \ref{defi:solstack}
is weakly equivalent to the ordinary fiber product.
Therefore, similarly to Proposition \ref{propo:GCon}, we obtain
a weakly equivalent simplified description of $G\mathbf{Sol}(M)$,
which agrees with our naive solution stack from the beginning of this subsection.
Summing up, we obtained
\begin{propo}\label{propo:GSol}
Up to weak equivalence in $\mathsf{H}$, the Yang-Mills stack $G\mathbf{Sol}(M)$
defined in Definition \ref{defi:solstack} has the following explicit description:
For all objects $U$ in $\mathsf{C}$, the groupoid $G\mathbf{Sol}(M)(U)$ is the full sub-groupoid
of $G\mathbf{Con}(M)(U)$  (cf.\ Proposition \ref{propo:GCon}) consisting of all objects $(\mathbf{A},\mathbf{P})=(\{A_V\},\{g_{VV^\prime}\})$
satisfying the vertical Yang-Mills equation
\begin{flalign}
\mathbf{YM}_M \big(\mathbf{A},\mathbf{P}\big) = \mathbf{0}_M(\mathbf{P}) \qquad \Longleftrightarrow\qquad \delta_{A_V}^\mathrm{vert} F^{\mathrm{vert}}(A_V)=0~,
\end{flalign}
for all causally convex open subsets $V\subseteq M$ diffeomorphic to $\mathbb{R}^m$.
For all morphisms $\ell : U\to U^\prime$ in $\mathsf{C}$,  the groupoid morphism
$G\mathbf{Sol}(M)(\ell) : G\mathbf{Sol}(M)(U^\prime) \to G\mathbf{Sol}(M)(U)$ is
the one induced by $G\mathbf{Con}(M)(\ell) : G\mathbf{Con}(M)(U^\prime) \to G\mathbf{Con}(M)(U)$ (cf.\ Proposition \ref{propo:GCon}).
\end{propo}
\begin{rem}
Similarly to Remark \ref{rem:concmappinstackfunctor},
it is easy to see that our weakly equivalent simplified
model for the Yang-Mills stack given in Proposition \ref{propo:GSol}
is functorial, i.e.\ we have a functor $G\mathbf{Sol} : \mathsf{Loc}_m^\mathrm{op} \to \mathsf{H}$.
Moreover, by an explicit computation similar to the one in Remark \ref{rem:GConisstack},
one can show that the above mentioned model for $G\mathbf{Sol}(M)$ is a stack too.
\end{rem}

\section{\label{sec:Cauchy}Stacky Cauchy problem}
In this section we introduce and discuss a  {\em stacky} version of the Yang-Mills Cauchy problem.
It turns out that well-posedness of the stacky Cauchy problem is a
stronger statement than well-posedness of the ordinary Cauchy problem for
gauge equivalence classes of Yang-Mills fields. In particular,
the solution for each given initial datum in the stacky Cauchy problem must be unique
up to a {\em unique} isomorphism, which is stronger than uniqueness
of their associated gauge equivalence classes.
To set up the stacky Cauchy problem, we first introduce
a stack $G\mathbf{Data}(\Sigma)$ that describes initial data on a Cauchy surface $\Sigma$
for the Yang-Mills equation and an $\mathsf{H}$-morphism $\mathrm{data}_{\Sigma} : G\mathbf{Sol}(M)\to G\mathbf{Data}(\Sigma)$
that assigns to Yang-Mills fields their initial data on $\Sigma$.
This will allow us to define well-posedness of the stacky Yang-Mills Cauchy problem
using the language of model categories.
We conclude explaining that this condition is equivalent to a family of parametrized PDE problems,
which may be addressed by ordinary PDE-theoretical techniques.

\subsection{\label{subsec:data}Initial data stack}
Let $M$ be any object in $\mathsf{Loc}_m$ and $\Sigma\subseteq M$ any spacelike Cauchy surface.
Recall  that $\mathrm{dim}(\Sigma) = \mathrm{dim}(M)-1 = m-1$.
In the usual approach, see e.g.\ \cite{CSYM,CBYM}, an initial datum on $\Sigma$
for the Yang-Mills equation on $M$ is a triple $(A^\Sigma, E,P^\Sigma)$ consisting of a
principal $G$-bundle $P^\Sigma$ on $\Sigma$ with connection
$A^\Sigma$ and a $1$-form $E$ on $\Sigma$  with values
in the corresponding adjoint bundle,
which satisfies the Yang-Mills constraint $\delta_{A^\Sigma}^{} E=0$.
Here $\delta_{A^\Sigma}^{}$ is the covariant
codifferential on $\Sigma$ that is obtained from the induced Hodge operator on $\Sigma$.
As a refinement of the set of initial data used in \cite{CSYM,CBYM},
our approach allows us to introduce a stack $G\mathbf{Data}(\Sigma)$ of initial data on $\Sigma$.
Abstractly, this stack may be obtained by the following construction:
Consider the stack of gauge fields $G\mathbf{Con}(\Sigma)$ on $\Sigma$
and form its tangent stack $T^{\mathrm{st}}G\mathbf{Con}(\Sigma)$ using similar techniques as in \cite{Hepworth}.
Then implement the Yang-Mills constraint by a homotopy fiber product similarly to Section \ref{subsec:YMsol}.
Since for our practical purposes the construction of tangent stacks in \cite{Hepworth} is too involved,
we shall not employ this abstract perspective and instead define directly the stack of initial data
(up to weak equivalence) in an explicit form.
\begin{defi}\label{defi:GData}
Let $M$ be any object in $\mathsf{Loc}_m$ and $\Sigma\subseteq M$ any spacelike Cauchy surface.
The {\em stack of initial data} on $\Sigma$ is the following presheaf of groupoids
$G\mathbf{Data}(\Sigma) : \mathsf{C}^\mathrm{op} \to \mathsf{Grpd}$:
\begin{itemize}
\item For all objects $U$ in $\mathsf{C}$,
the objects of the groupoid $G\mathbf{Data}(\Sigma)(U)$ are triples
\begin{flalign}
\big(\mathbf{A}^\Sigma , \mathbf{E},\mathbf{P}^\Sigma\big)~,
\end{flalign}
such that $(\mathbf{A}^\Sigma,\mathbf{P}^\Sigma)$ is an object in $G\mathbf{Con}(\Sigma)(U)$ and
$(\mathbf{E},\mathbf{P}^\Sigma)$ an object in $\mathbf{\Omega}^1(\Sigma,\mathrm{ad}(G))(U)$,
satisfying the vertical Yang-Mills constraint
\begin{flalign}
 \delta^{\mathrm{vert}}_{A_W^\Sigma} E_W =0~,
\end{flalign}
for all open subsets $W\subseteq \Sigma$ diffeomorphic to $\mathbb{R}^{m-1}$.
The morphisms of the groupoid  $G\mathbf{Data}(\Sigma)(U)$ are
\begin{flalign}
\mathbf{h}^\Sigma  ~:~(\mathbf{A}^\Sigma,\mathbf{E},\mathbf{P}^\Sigma)~\longrightarrow~(\mathbf{A}^{\prime\Sigma},\mathbf{E}^\prime,\mathbf{P}^{\prime\Sigma})~,
\end{flalign}
such that $\mathbf{h}^\Sigma : (\mathbf{A}^\Sigma,\mathbf{P}^\Sigma) \to (\mathbf{A}^{\prime\Sigma},\mathbf{P}^{\prime\Sigma})$
is a morphism in $G\mathbf{Con}(\Sigma)(U)$ and
$\mathbf{h}^\Sigma : (\mathbf{E},\mathbf{P}^\Sigma)\to(\mathbf{E}^\prime,\mathbf{P}^{\prime\Sigma})$
a morphism in $\mathbf{\Omega}^1(\Sigma,\mathrm{ad}(G))(U)$.

\item For all $\mathsf{C}$-morphisms $\ell : U\to U^\prime$, the groupoid morphism
$G\mathbf{Data}(\Sigma)(\ell) : G\mathbf{Data}(\Sigma)(U^\prime) \to G\mathbf{Data}(\Sigma)(U)$
is given by
\begin{flalign}
\nonumberG\mathbf{Data}(\Sigma)(\ell) ~: ~ (\mathbf{A}^\Sigma,\mathbf{E},\mathbf{P}^\Sigma) ~&\longmapsto~ (\ell^\ast\mathbf{A}^\Sigma,\ell^\ast\mathbf{E},\ell^\ast\mathbf{P}^\Sigma) ~,\\
\mathbf{h}^\Sigma ~&\longmapsto ~ \ell^\ast\mathbf{h}^\Sigma~,
\end{flalign}
where our pullback notation $\ell^\ast$ is analogous to the one introduced in Proposition \ref{propo:GCon}.
\end{itemize}
\end{defi}

\subsection{\label{subsec:datamap}Initial data morphism}
Let $M$ be any object in $\mathsf{Loc}_m$ and $\Sigma\subseteq M$ any spacelike Cauchy surface.
We denote by $\iota_\Sigma : \Sigma\to M$ the embedding of the Cauchy surface
$\Sigma$ into $M$.  We further choose and fix any normalized future-directed timelike
vector field $n$ on $M$ whose restriction to $\Sigma\subseteq M$ is
normal to the Cauchy surface. Given any object $U$ in $\mathsf{C}$,
we denote by the same symbol $n$ also the vector field on $M\times U$
that is obtained by extending $n$ constantly along $U$.
The restrictions of $n$ to open subsets $V\times U$ of $M\times U$  are also denoted by
$n$ in order to simplify our notations.
\vspace{2mm}

The aim of this subsection is to define the {\em initial data} $\mathsf{H}$-morphism
\begin{flalign}\label{eqn:datamorphism}
\mathrm{data}_{\Sigma}^{} \,:\, G\mathbf{Sol}(M) ~\longrightarrow~G\mathbf{Data}(\Sigma)
\end{flalign}
from the Yang-Mills stack (cf.\ Proposition \ref{propo:GSol}) to
the initial data stack (cf.\ Definition \ref{defi:GData}) whose role is
to assign to solutions of the Yang-Mills equation their initial data.
\vspace{2mm}

This requires some preparations. Let $W\subseteq \Sigma$ be any open subset of the Cauchy
surface that is diffeomorphic to $\mathbb{R}^{m-1}$. We denote by
$D(W)\subseteq M$ the {\em Cauchy development} of $W$ in $M$.
By definition, see e.g.\ \cite[Definition 14.35]{ONeill},
$D(W)\subseteq M$ is the subset of points $p \in M$ such that every inextensible
causal curve in $M$ emanating from $p$ meets $W$. By \cite[Lemma 14.43]{ONeill},
we may regard the Cauchy development $D(W)$ equipped with the induced metric,
orientation and time-orientation as an object in $\mathsf{Loc}_m$.
It is diffeomorphic (as a manifold) to $\mathbb{R}^m$ because $W$ defines a Cauchy surface for $D(W)$
and $W$ is by hypothesis diffeomorphic to $\mathbb{R}^{m-1}$.
We denote by $\iota_W : W \to D(W)$ the restriction of the embedding
$\iota_\Sigma : \Sigma\to M$ to the domain $W$ and the codomain $D(W)$.
Let us now consider two open subsets $W\subseteq \Sigma$ and $W^\prime\subseteq \Sigma$
of the Cauchy surface that are both diffeomorphic to $\mathbb{R}^{m-1}$. Because $W$ and $W^\prime$
are both subsets of the same Cauchy surface, it is easy to show that $D(W\cap W^\prime) = D(W)\cap D(W^\prime)$.
The latter is again a causally convex open subset of $M$ (not necessarily diffeomorphic to $\mathbb{R}^m$).
We denote by $\iota_{W\cap W^\prime} : W\cap W^\prime  \to D(W)\cap D(W^\prime)$
the restriction of the embedding  $\iota_\Sigma : \Sigma\to M$ to the domain $W\cap W^\prime$
and the codomain $D(W)\cap D(W^\prime)$. Similar statements hold for higher intersections.
\vspace{2mm}

For any object $U$ in $\mathsf{C}$, we define the stage $\mathrm{data}_{\Sigma}^{} : G\mathbf{Sol}(M)(U) \to G\mathbf{Data}(\Sigma)(U)$
of the $\mathsf{H}$-morphism \eqref{eqn:datamorphism} as the groupoid morphism specified by the assignment
\begin{flalign}
\nonumber \mathrm{data}_{\Sigma}^{} ~:~\quad\qquad\qquad\qquad (\mathbf{A},\mathbf{P}) ~&\longmapsto~\Big(\iota_\Sigma^\ast\mathbf{A} , \iota_\Sigma^\ast\big( n\,\lrcorner\,\mathbf{F}_M(\mathbf{A})\big),\iota_{\Sigma}^\ast\mathbf{P}\Big)~,\\
\big(\mathbf{h}: (\mathbf{A},\mathbf{P}) \to (\mathbf{A}^\prime,\mathbf{P}^\prime)\big) ~&\longmapsto~ \big(\iota_\Sigma^\ast\mathbf{h}: \mathrm{data}_{\Sigma}^{}(\mathbf{A},\mathbf{P}) \to \mathrm{data}_{\Sigma}^{}(\mathbf{A}^\prime,\mathbf{P}^\prime)\big)~,\label{eqn:datamorphismstage}
\end{flalign}
where we used an intuitive compact notation.
Explicitly, for $(\mathbf{A},\mathbf{P}) = ( \{A_V\},\{g_{VV^\prime}\})$ and $\mathbf{h} = \{h_V\}$,
we set
\begin{subequations}
\begin{flalign}
\iota_\Sigma^\ast\mathbf{A} &:=  \big\{(\iota_W\times \mathrm{id}_U)^\ast \, A_{D(W)}\big\}~,\\
 \iota_\Sigma^\ast\big( n\,\lrcorner\,\mathbf{F}_M(\mathbf{A})\big) &:=  \big\{(\iota_W\times \mathrm{id}_U)^\ast \, \big(n \,\lrcorner\, F^\mathrm{vert}(A_{D(W)})\big)\big\}~,\\
\iota_\Sigma^\ast\mathbf{P} &:= \big\{(\iota_{W\cap W^\prime}\times\mathrm{id}_U)^\ast\,g_{D(W) D(W^\prime)} \big\}~,\\
\iota_\Sigma^\ast\mathbf{h} &:= \big\{(\iota_W \times\mathrm{id}_U)^\ast\, h_{D(W)}\big\}~,
\end{flalign}
\end{subequations}
where $n \,\lrcorner\, F^\mathrm{vert}(A_{D(W)}) \in \Omega^{1,0}(D(W)\times U,\mathfrak{g})$ denotes
the contraction of the vertical curvature $F^\mathrm{vert}(A_{D(W)}) \in \Omega^{2,0}(D(W)\times U,\mathfrak{g})$
with our fixed normalized timelike vector field $n$. (As explained above, the vector field $n$
on $M$ is extended constantly to $M\times U$ and then restricted to $D(W)\times U$.)
Using the vertical Yang-Mills equations $\delta_{A_V}^\mathrm{vert} F^{\mathrm{vert}}(A_V)=0$,
it is an elementary check that $ \mathrm{data}_\Sigma (\mathbf{A},\mathbf{P})$
satisfies the vertical Yang-Mills constraint of Definition \ref{defi:GData}. Verifying that \eqref{eqn:datamorphismstage}
indeed defines a groupoid morphism and confirming naturality in $U$ are also elementary checks.
Hence, we defined the initial data $\mathsf{H}$-morphism in \eqref{eqn:datamorphism}.

\subsection{\label{subsec:cauchyexplicit}Cauchy problem}
Using the language of model categories, we can now define the concept of a
well-posed stacky Cauchy problem associated to the Yang-Mills equation.
We will then show that our definition is equivalent to a family of parametrized PDE problems,
which generalize the ordinary Yang-Mills Cauchy problem, cf.\  \cite{CSYM, CBYM}.
The purpose of this section is thus to establish a bridge between our model categorical perspective
on Yang-Mills theory and the language more familiar to PDE theorists.
\begin{defi}\label{def:stackycauchypbl}
Let $M$ be an object in $\mathsf{Loc}_m$ and $\Sigma\subseteq M$ a spacelike Cauchy surface.
We say that the {\em stacky Cauchy problem for the Yang-Mills equation is well-posed} if
the initial data $\mathsf{H}$-morphism $\mathrm{data}_{\Sigma}^{}: G\mathbf{Sol}(M) \to G\mathbf{Data}(\Sigma)$, cf.\ \eqref{eqn:datamorphism},
is a weak equivalence.
\end{defi}

Our goal is to rephrase this abstract definition in terms of more explicit conditions.
To begin with, observe that both $G\mathbf{Sol}(M)$ and $G\mathbf{Data}(\Sigma)$ are stacks, i.e.\ fibrant objects in $\mathsf{H}$.
Hence, by Theorem \ref{theo:localH},
the $\mathsf{H}$-morphism $\mathrm{data}_{\Sigma}^{}: G\mathbf{Sol}(M) \to G\mathbf{Data}(\Sigma)$
is a weak equivalence if and only if for each object $U$ in $\mathsf{C}$
the groupoid morphism $\mathrm{data}_{\Sigma}^{}: G\mathbf{Sol}(M)(U) \to G\mathbf{Data}(\Sigma)(U)$
is a weak equivalence, i.e.\ a fully faithful and essentially surjective functor.
\vspace{2mm}

Recalling the explicit description in Section \ref{subsec:datamap}, we observe that
 $\mathrm{data}_{\Sigma}^{}: G\mathbf{Sol}(M)(U) \to G\mathbf{Data}(\Sigma)(U)$ is
essentially surjective if and only if the following holds true:
For every object $(\mathbf{A}^\Sigma,\mathbf{E},\mathbf{P}^\Sigma)$ in $G\mathbf{Data}(\Sigma)(U)$,
there exists an object $(\mathbf{A},\mathbf{P})$ in $G\mathbf{Sol}(M)(U)$ and a morphism
$\mathbf{h}^\Sigma: \mathrm{data}_{\Sigma}^{}(\mathbf{A},\mathbf{P}) \to (\mathbf{A}^\Sigma,\mathbf{E},\mathbf{P}^\Sigma)$
in $G\mathbf{Data}(\Sigma)(U)$. Note that $(\mathbf{A},\mathbf{P})$ may be interpreted as a solution for
the initial datum $(\mathbf{A}^\Sigma,\mathbf{E},\mathbf{P}^\Sigma)$ up to the isomorphism
$\mathbf{h}^\Sigma: \mathrm{data}_{\Sigma}^{}(\mathbf{A},\mathbf{P}) \to (\mathbf{A}^\Sigma,\mathbf{E},\mathbf{P}^\Sigma)$ of initial data.
In other words, given any smoothly $U$-parametrized initial datum
$(\mathbf{A}^\Sigma,\mathbf{E},\mathbf{P}^\Sigma)$ on $\Sigma$,
essential surjectivity of $\mathrm{data}_{\Sigma}^{}$ is equivalent to the statement
that we can find a smoothly $U$-parametrized Yang-Mills field $(\mathbf{A},\mathbf{P})$ on $M$,
whose initial datum is isomorphic to $(\mathbf{A}^\Sigma,\mathbf{E},\mathbf{P}^\Sigma)$
by a smoothly $U$-parametrized gauge transformation
$\mathbf{h}^\Sigma: \mathrm{data}_{\Sigma}^{}(\mathbf{A},\mathbf{P}) \to (\mathbf{A}^\Sigma,\mathbf{E},\mathbf{P}^\Sigma)$
of initial data.
\vspace{2mm}

We now analyze what full faithfulness of $\mathrm{data}_{\Sigma}^{}: G\mathbf{Sol}(M)(U) \to G\mathbf{Data}(\Sigma)(U)$ implies.
Explicitly, this property means that, given any two objects
$(\mathbf{A},\mathbf{P})$ and $(\mathbf{A}^\prime,\mathbf{P}^\prime)$ in $G\mathbf{Sol}(M)(U)$
and any morphism
$\mathbf{h}^\Sigma: \mathrm{data}_{\Sigma}^{}(\mathbf{A},\mathbf{P}) \to \mathrm{data}_{\Sigma}^{}(\mathbf{A}^\prime,\mathbf{P}^\prime)$
in $G\mathbf{Data}(\Sigma)(U)$, there exists a unique morphism $\mathbf{h}: (\mathbf{A},\mathbf{P}) \to (\mathbf{A}^\prime,\mathbf{P}^\prime)$
in $G\mathbf{Sol}(M)$ such that $\mathrm{data}_\Sigma(\mathbf{h}) = \mathbf{h}^\Sigma$.
In other words, this means that every
smoothly $U$-parametrized gauge transformation  between the initial data
of two smoothly $U$-parametrized Yang-Mills fields
admits a unique extension from the Cauchy surface $\Sigma$
to the whole spacetime $M$.
\vspace{2mm}

Full faithfulness of $\mathrm{data}_{\Sigma}^{}: G\mathbf{Sol}(M)(U) \to G\mathbf{Data}(\Sigma)(U)$ is equivalent
to the following more practical condition: Given any object
$(\mathbf{A}^\Sigma,\mathbf{E},\mathbf{P}^\Sigma)$ in $G\mathbf{Data}(\Sigma)(U)$
and any two morphisms $\mathbf{h}^\Sigma : \mathrm{data}_{\Sigma}^{}(\mathbf{A},\mathbf{P})\to (\mathbf{A}^\Sigma,\mathbf{E},\mathbf{P}^\Sigma)$
and $\mathbf{h}^{\prime\Sigma} : \mathrm{data}_{\Sigma}^{}(\mathbf{A}^\prime,\mathbf{P}^\prime)\to (\mathbf{A}^\Sigma,\mathbf{E},\mathbf{P}^\Sigma)$
in $G\mathbf{Data}(\Sigma)(U)$,
there exists  a unique morphism $\mathbf{h}: (\mathbf{A},\mathbf{P})\to(\mathbf{A}^\prime,\mathbf{P}^\prime)$ in $G\mathbf{Sol}(M)(U)$
such that $\mathbf{h}^{\prime\Sigma} \circ \mathrm{data}_{\Sigma}^{}(\mathbf{h}) = \mathbf{h}^{\Sigma} $.
In fact, assuming full faithfulness, the desired  morphism
$\mathbf{h}: (\mathbf{A},\mathbf{P})\to(\mathbf{A}^\prime,\mathbf{P}^\prime)$ in $G\mathbf{Sol}(M)(U)$
is the one uniquely obtained from the morphism
${\mathbf{h}^{\prime\Sigma}}^{-1} \circ \mathbf{h}^\Sigma: \mathrm{data}_\Sigma(\mathbf{A},\mathbf{P})
\to \mathrm{data}_\Sigma(\mathbf{A}^\prime,\mathbf{P}^\prime)$ in $G\mathbf{Data}(\Sigma)(U)$.
Conversely, given any morphism $\mathbf{h}^\Sigma: \mathrm{data}_{\Sigma}^{}(\mathbf{A},\mathbf{P})
\to \mathrm{data}_{\Sigma}^{}(\mathbf{A}^\prime,\mathbf{P}^\prime)$ in $G\mathbf{Data}(\Sigma)(U)$,
take $\mathbf{h}^{\prime\Sigma} : \mathrm{data}_{\Sigma}^{}(\mathbf{A}^\prime,\mathbf{P}^\prime)\to
\mathrm{data}_{\Sigma}^{}(\mathbf{A}^\prime,\mathbf{P}^\prime)$ to be the identity.
It follows from the condition stated above that
there exists a unique morphism $\mathbf{h}: (\mathbf{A},\mathbf{P}) \to (\mathbf{A}^\prime,\mathbf{P}^\prime)$
in $G\mathbf{Sol}(M)(U)$ such that $\mathrm{data}_\Sigma(\mathbf{h}) = \mathbf{h}^\Sigma$.
\vspace{2mm}

We summarize the results obtained above in the following
\begin{propo}\label{propo:cauchy}
Let $M$ be an object in $\mathsf{Loc}_m$ and $\Sigma\subseteq M$ a spacelike Cauchy surface.
Then the stacky Cauchy problem for the Yang-Mills equation is well-posed, cf.\ Definition \ref{def:stackycauchypbl},
if and only if the following conditions hold true, for all objects $U$ in $\mathsf{C}$:
\begin{enumerate}
\item Given any object $(\mathbf{A}^\Sigma,\mathbf{E},\mathbf{P}^\Sigma)$ in $G\mathbf{Data}(\Sigma)(U)$, there exists
an object $(\mathbf{A},\mathbf{P})$ in $G\mathbf{Sol}(M)(U)$ together with a morphism
$\mathbf{h}^\Sigma: \mathrm{data}_{\Sigma}^{}(\mathbf{A},\mathbf{P}) \to (\mathbf{A}^\Sigma,\mathbf{E},\mathbf{P}^\Sigma)$ in $G\mathbf{Data}(\Sigma)(U)$.

\item Given any other object $(\mathbf{A}^\prime,\mathbf{P}^\prime)$ in $G\mathbf{Sol}(M)(U)$
and morphism $\mathbf{h}^{\prime\Sigma}: \mathrm{data}_{\Sigma}^{}(\mathbf{A}^\prime,\mathbf{P}^\prime)
\to (\mathbf{A}^\Sigma,\mathbf{E},\mathbf{P}^\Sigma)$ in $G\mathbf{Data}(\Sigma)(U)$,
there exists a unique morphism $\mathbf{h}: (\mathbf{A},\mathbf{P}) \to (\mathbf{A}^\prime,\mathbf{P}^\prime)$
in $G\mathbf{Sol}(M)(U)$ such that diagram
\begin{flalign}\label{eqn:cauchydiagram}
\xymatrix{
\mathrm{data}_\Sigma(\mathbf{A},\mathbf{P}) \ar[rr]^-{\mathrm{data}_\Sigma(\mathbf{h})} \ar[rd]_-{\mathbf{h}^\Sigma~~} &&
\mathrm{data}_\Sigma(\mathbf{A}^\prime,\mathbf{P}^\prime) \ar[ld]^-{~~\mathbf{h}^{\prime\Sigma}} \\
& (\mathbf{A}^\Sigma,\mathbf{E},\mathbf{P}^\Sigma)
}
\end{flalign}
in $G\mathbf{Data}(\Sigma)(U)$ commutes.
\end{enumerate}
\end{propo}
\begin{rem}
In more explicit words, item 1.\ of this proposition demands
that there exists for every smoothly $U$-parametrized
initial datum $(\mathbf{A}^\Sigma,\mathbf{E},\mathbf{P}^\Sigma)$
a smoothly $U$-parametrized solution $(\mathbf{A},\mathbf{P})$ of the Yang-Mills equation
whose initial datum is isomorphic to the given one
by a smoothly $U$-parametrized gauge transformation
$\mathbf{h}^\Sigma: \mathrm{data}_{\Sigma}^{}(\mathbf{A},\mathbf{P}) \to (\mathbf{A}^\Sigma,\mathbf{E},\mathbf{P}^\Sigma)$.
Item 2.\ demands that any two such solutions are isomorphic
by a {\em unique} smoothly $U$-parametrized gauge transformation $\mathbf{h}: (\mathbf{A},\mathbf{P}) \to (\mathbf{A}^\prime,\mathbf{P}^\prime)$.
This is clearly a stronger condition than existence and uniqueness of
solutions to the Cauchy problem for gauge equivalence classes, where the uniqueness
aspect in item 2.\ does not play a role.
\end{rem}
\begin{rem}
The fact that the conditions in Proposition \ref{propo:cauchy} have to hold true
for all objects $U$ in $\mathsf{C}$ is very important from our stacky perspective.
This is because the groupoids $G\mathbf{Sol}(M)(U)$ and $G\mathbf{Data}(\Sigma)(U)$
encode the smooth structure of the Yang-Mills stack and initial data stack.
Thus, well-posedness of the stacky Cauchy problem does not only formalize
the usual notion of well-posedness (i.e.\ existence and uniqueness of solutions for given initial data),
but it also demands smooth dependence (in the sense of stacks) of solutions on their initial data.
The latter may be interpreted as a smooth analogue of the
condition of continuous dependence of solutions on their initial data,
which is more familiar in PDE theory.
\end{rem}
\begin{rem}\label{rem:solvabilityPDE}
As a final remark, we note that the conditions in Proposition \ref{propo:cauchy}
are known to hold for $U = \mathbb{R}^0$ and spacetime dimension $m=2,3,4$ \cite{CSYM, CBYM}.
However, we are not aware of any results for other objects $U$ in $\mathsf{C}$,
which leads to the more complicated realm of smoothly $U$-parametrized PDE problems.
Being crucial for a better understanding of the geometry of the stack $G\mathbf{Sol}(M)$ of Yang-Mills fields,
we believe that a detailed study of the explicit conditions of Proposition \ref{propo:cauchy}
is a very interesting and compelling PDE problem.
This problem is clearly beyond the scope of the present work.
However, we would like to mention that analogous results
for the  simpler case of smoothly $U$-parametrized normally hyperbolic {\em linear} PDEs
can be established via the theory of symmetric hyperbolic systems \cite{Florian}.
We expect such techniques to be sufficient for proving that the stacky Cauchy problem
is well-posed for Abelian Yang-Mills theory with structure group $G=U(1)$.
\end{rem}

\section{\label{sec:Lorenz}Yang-Mills stack in Lorenz gauge}
We briefly discuss how gauge fixings may be interpreted
in our framework as weak equivalences of stacks. For simplicity, we
shall focus on the particular example given by Lorenz gauge fixing, even
though our ideas apply to other gauge fixings as well.
Recall from Proposition \ref{propo:GSol} the stack $G\mathbf{Sol}(M)$ of Yang-Mills fields
on a globally hyperbolic Lorentzian manifold $M$.
For $U$ an object in $\mathsf{C}$, the objects of the groupoid
$G\mathbf{Sol}(M)(U)$ are smoothly $U$-parametrized gauge fields
$(\mathbf{A},\mathbf{P}) = (\{A_V\},\{g_{VV^\prime}\})$
that solve the vertical Yang-Mills equation $\delta_{A_V}^\mathrm{vert} F^\mathrm{vert}(A_V)=0$,
for all causally convex open subsets $V\subseteq M$ diffeomorphic to $\mathbb{R}^m$.
We say that $(\mathbf{A},\mathbf{P})$ satisfies the {\em Lorenz gauge condition} if
\begin{flalign}\label{eqn:LorcondA}
\delta^\mathrm{vert}_{A_V} A_V =0~,
\end{flalign}
for all causally convex open subsets $V\subseteq M$ diffeomorphic to $\mathbb{R}^m$.
As a consequence of \eqref{eqn:LorcondA} and the conditions $A_{V^\prime}\vert_{(V\cap V^\prime)\times U}
= A_{V}\vert_{(V\cap V^\prime)\times U}\triangleleft^\mathrm{vert} g_{VV^\prime}$,
it follow that the $g_{VV^\prime}$ have to satisfy the conditions
\begin{flalign}\label{eqn:Lorcondg}
\delta^\mathrm{vert}_{A_{V}\vert_{(V\cap V^\prime)\times U}} \Big(\big(\mathrm{d}^\mathrm{vert} g_{VV^\prime}\big)~ g^{-1}_{VV^\prime} \Big) =0~,
\end{flalign}
for all causally convex open subsets $V\subseteq M$ and $V^\prime\subseteq M$
diffeomorphic to $\mathbb{R}^m$. Notice that these are smoothly $U$-parametrized hyperbolic
PDEs which are similar to the wave map equation, see e.g.\ \cite{CBsigma}.
Given any morphism $\mathbf{h} = \{h_V\} : (\mathbf{A},\mathbf{P})\to (\mathbf{A}^\prime,\mathbf{P}^\prime)$
in $G\mathbf{Sol}(M)(U)$ between two objects that satisfy the Lorenz gauge condition,
it follows from \eqref{eqn:LorcondA} and the conditions $A_{V}^\prime
= A_{V}\triangleleft^\mathrm{vert} h_V$ that the $h_V$ have to satisfy the smoothly $U$-parametrized PDEs
\begin{flalign}\label{eqn:Lorcondh}
\delta^\mathrm{vert}_{A_V} \Big( \big(\mathrm{d}^\mathrm{vert} h_V\big)~h_V^{-1} \Big) =0~,
\end{flalign}
for all causally convex open subsets $V\subseteq M$ diffeomorphic to $\mathbb{R}^m$.
\begin{defi}
Let $M$ be an object in $\mathsf{Loc}_m$.
The stack $G\mathbf{Sol}_{\mathrm{g.f.}}(M)$
of {\em Lorenz gauge-fixed Yang-Mills fields} on $M$
is defined as the presheaf of groupoids whose stage at $U$ in $\mathsf{C}$ is the full sub-groupoid of $G\mathbf{Sol}(M)(U)$
specified by the Lorenz gauge condition \eqref{eqn:LorcondA}.
Because Lorenz gauge is natural in $M$, this construction defines
a functor $G\mathbf{Sol}_{\mathrm{g.f.}} : \mathsf{Loc}_m^\mathrm{op} \to \mathsf{H}$.
\end{defi}

By construction, there exists a natural transformation $j : G\mathbf{Sol}_{\mathrm{g.f.}}\to G\mathbf{Sol}$
of functors $\mathsf{Loc}_m^\mathrm{op}\to \mathsf{H}$, whose components $j_M : G\mathbf{Sol}_{\mathrm{g.f.}}(M) \to G\mathbf{Sol}(M)$
are just the sub-presheaf embeddings.
It is an interesting question to ask whether the morphisms
$j_M :  G\mathbf{Sol}_{\mathrm{g.f.}}(M) \to G\mathbf{Sol}(M)$ are weak equivalences in $\mathsf{H}$.
This would allow us to describe the Yang-Mills stack $G\mathbf{Sol}(M)$ in terms
of the weakly equivalent stack $G\mathbf{Sol}_{\mathrm{g.f.}}(M)$, which has the practical
advantage that all of its gauge fields $(\mathbf{A},\mathbf{P})$ and gauge transformations $\mathbf{h}$
satisfy a smoothly parametrized hyperbolic PDE. (Recall \eqref{eqn:Lorcondg} and \eqref{eqn:Lorcondh},
as well as the fact that the Yang-Mills equation in Lorenz gauge is hyperbolic.)
Proving that $j_M$ is a weak equivalence in $\mathsf{H}$ requires
assumptions on solvability of smoothly parametrized PDEs similar to those in Proposition \ref{propo:cauchy}.
We summarize the relevant statement in the following
\begin{propo}\label{propo:fixing}
Let $M$ be an object in $\mathsf{Loc}_m$. Then the $\mathsf{H}$-morphism
$j_M :  G\mathbf{Sol}_{\mathrm{g.f.}}(M) \to G\mathbf{Sol}(M)$ is a weak equivalence
if and only if the following holds true: For all objects $U$ in $\mathsf{C}$
and all objects $(\mathbf{A},\mathbf{P}) = (\{A_V\},\{g_{VV^\prime}\})$
in $G\mathbf{Sol}(M)(U)$ there exists a solution $h_V \in C^\infty(V\times U,G)$
of the smoothly $U$-parametrized PDE
\begin{flalign}\label{eqn:gaugefix}
\delta^\mathrm{vert}_{A_V} \Big(h_V^{-1}\,\mathrm{d}^\mathrm{vert} h_V\Big) = \delta_{A_V}^{\mathrm{vert}} A_V~,
\end{flalign}
for all causally convex open subsets $V\subseteq M$ diffeomorphic to $\mathbb{R}^m$.
\end{propo}
\begin{proof}
Using Theorem \ref{theo:localH} and that both
$G\mathbf{Sol}_{\mathrm{g.f.}}(M)$ and $G\mathbf{Sol}(M)$ are stacks,
$j_M$ is a weak equivalence in $\mathsf{H}$ if and only
if $j_M : G\mathbf{Sol}_{\mathrm{g.f.}}(M)(U) \to G\mathbf{Sol}(M)(U)$ is a weak equivalence
of groupoids, for all objects $U$ in $\mathsf{C}$. By construction of $ G\mathbf{Sol}_{\mathrm{g.f.}}(M)$,
all these stages are fully faithful, hence $j_M$ is a weak equivalence if and only if all stages are essentially
surjective. The latter means that for all objects $U$ in $\mathsf{C}$ and all objects $(\mathbf{A},\mathbf{P})$ in
$G\mathbf{Sol}(M)(U)$, there exists a morphism $\mathbf{h} = \{h_V\} : (\widetilde{\mathbf{A}},\widetilde{\mathbf{P}}) \to (\mathbf{A},\mathbf{P})$
in $G\mathbf{Sol}(M)(U)$, such that $(\widetilde{\mathbf{A}},\widetilde{\mathbf{P}}) $
satisfies the Lorenz gauge condition \eqref{eqn:LorcondA}. Applying $\delta_{A_V}^{\mathrm{vert}}$
on the conditions $A_{V} = \widetilde{A}_V\triangleleft^\mathrm{vert} h_V$ that every morphism $\mathbf{h}$ has to satisfy,
one realizes that the Lorenz gauge condition for $\widetilde{A}_V$ coincides with
the smoothly parametrized PDEs \eqref{eqn:gaugefix}. Hence, essential surjectivity of
$j_M : G\mathbf{Sol}_{\mathrm{g.f.}}(M)(U) \to G\mathbf{Sol}(M)(U)$ is equivalent to solvability of the smoothly $U$-parametrized
PDEs \eqref{eqn:gaugefix} for all causally convex open subsets $V\subseteq M$ diffeomorphic to $\mathbb{R}^m$.
\end{proof}
\begin{rem}
For the unparametrized case $U=\mathbb{R}^0$, solvability of PDEs of the form \eqref{eqn:gaugefix}
has been studied in \cite{CBsigma} for spacetime dimension  $m=2$.
However, we are not aware of any results for other objects
$U$ in $\mathsf{C}$. We believe that, together with the smoothly parametrized PDEs explained
in Remark \ref{rem:solvabilityPDE}, these are very interesting problems for PDE theorists
as they are crucial for understanding the geometry of the Yang-Mills stack.
For the case of Abelian Yang-Mills theory with structure group $G=U(1)$,
we expect that similar techniques as in \cite{Florian}, which are based on the theory of
symmetric hyperbolic systems, can be used to prove that the conditions in Proposition \ref{propo:fixing}
hold true and hence that $j_M$ is a weak equivalence in $\mathsf{H}$. We hope to come back to this issue in future work.
\end{rem}

\section*{Acknowledgments}
The work of M.B.\ is supported by a Postdoctoral Fellowship
of the Alexander von Humboldt Foundation (Germany).
A.S.\ gratefully acknowledges the financial support of
the Royal Society (UK) through a Royal Society University
Research Fellowship, a Research Grant and an Enhancement Award.
U.S.\ was supported by RVO:67985840.

redpajama_set_name: RedPajamaArXiv