\section{Introduction}

Moduli spaces of vector bundles on a smooth and projective curve $C$ have been a central object in algebraic geometry, with tight relations to representation theory and also class field theory. A natural generalization of these objects, which encompass parabolic bundles or prym varieties, is to instead consider principal $\mathcal{G}$-bundles over $C$, where $\mathcal{G}$ is a \textit{parahoric Bruhat--Tits group}. The definition of this type of group can be roughly described by saying that the generic fiber of $\mathcal{G}$ is reductive, it has connected geometric fibers, and for every point $x \in C$ such that $\mathcal{G}|_x$ is not reductive, the sections of $\mathcal{G}$ over a formal disk about $x$ defines a parahoric group in the sense of \cite{bruhat.tits:1984:II}.  The points $x$ with non reductive fiber $\mathcal{G}|_x$ are called branching points of $\mathcal{G}$. In what follows we will assume further that the generic fiber of $\mathcal{G}$ is actually simple and not merely reductive. One of the aims of this paper, developed in \cref{sec:BTfromcoverings}, is to provide a direct description of these groups through ramified Galois coverings and the concept of $(\Gamma,G)$-bundles.

We recall here the notion of $(\Gamma,G)$-bundles, which have been introduced by \cite{balaji.seshadri:2015:moduli} and then extended by the first author in \cite{damiolini:2021:equivariant}. Let $\Gamma$ be a finite group and assume that it acts on a smooth and projective curve $\widetilde{C}$ so that $\pi \colon \widetilde{C} \to \widetilde{C}/\Gamma =: C$ is a possibly ramified covering of the curve $C$. Let $G$ be a simple algebraic group over $k$ and assume that the action of $\Gamma$ on $\widetilde{C}$ lifts to an action of $G \times \widetilde{C}$. Under these assumptions, the group $\mathcal{G}:= \pi_*(G \times \widetilde{C})^\Gamma$ is a parahoric Bruhat--Tits group over $C$. We can generalize this construction, by considering $(\Gamma,G_\mathrm{ad})$-bundles  that is principal $G_\mathrm{ad}$-bundles over $\widetilde{C}$ which are further equipped with a compatible action of $\Gamma$. If $\mathcal{E}$ is a $(\Gamma,G_\mathrm{ad})$-bundle, then the group $G_\mathcal{E}:= \mathcal{E} \times^{G_\mathrm{ad}} G$ is still equipped with an action of $\Gamma$, so that  $\mathcal{G}_\mathcal{E}:= \pi_*(G_\mathcal{E})^\Gamma$ defines a smooth group scheme over $C$. This is actually a parahoric Bruhat--Tits group over $C$ and, according to the following theorem, this construction essentially recovers all parahoric Bruhat--Tits groups.

\begin{thmx} [\cref{thm:parahoricfromcoverings}] Let $\mathcal{G}$ be a parahoric Bruhat--Tits group over $C$, a smooth and projective curve of genus $g \geq 1$ over an algebraically closed field $k$ of characteristic zero. Assume that $\mathcal{G}$ is generically simple and simply connected, and let $G$ be the group over $k$ with the same root datum as $\mathcal{G}_{k(C)}$. Then there exists a finite group $\Gamma$, a $\Gamma$-covering $\pi \colon \widetilde{C} \to C$, and a $(\Gamma,G_{\mathrm{ad}})$-bundle $\mathcal{E}$ on $\widetilde{C}$ such that $\mathcal{G} \cong \pi_*(G_\mathcal{E})^\Gamma$.
\end{thmx}

This result is stated in slightly more generality in \cref{thm:parahoricfromcoverings}, where curves of genus zero are allowed, provided that $\mathcal{G}$ is not ramified at only one point. This result can be seen as a generalization of \cite[Theorem 5.2.7]{balaji.seshadri:2015:moduli}: in fact, Balaji and Seshadri assume that the parahoric Bruhat--Tits group $\mathcal{G}$ is generically split, while we do not restrict to this case.

The proof of  \cref{thm:parahoricfromcoverings} relies on its local counterpart, developed in \cref{secct:local} and which we summarize here. For every integer $N$ will use the notation $\mathcal{K}_N$ (resp. $\mathcal{O}_N$) to denote $k(\!(z^{1/N})\!)$ (resp. $k[\![z^{1/N}]\!]$).

\begin{thmx}[\cref{thm_local}, \cref{cor:BT}]
Let $\tau$ be a diagram automorphism of the simple group $G$ of order $r$. Let $\mathcal{G}_\theta$ be a parahoric group scheme of the twisted loop group $\mathrm{Res}_{\mathcal{K}_r/\mathcal{K}}(G_{\mathcal{K}_r})^\tau$ corresponding to a rational point $\theta$ in the fundamental alcove. Let $m$ be the minimal positive integer such that $m\theta$ is in the lattice $X_*(T)^\tau$. Assume that $\mathrm{char}(k)$ does not divide $m$. Then $\mathcal{G}_\theta$ is isomorphic to ${\mathrm{Res}}_{\mathcal{O}_m/\mathcal{O}}\left(G_{\mathcal{O}_m}\right)^\sigma$, for some automorphism $\sigma$ on $G$ such that $\sigma^m=1$, and $\bar{\sigma}=\bar{\tau} \in {\rm Out}(G)$.
\end{thmx}

This can be viewed as an extension of \cite[Theorem 2.3.1]{balaji.seshadri:2015:moduli}, where the authors assumed $\sigma$ to act by conjugation only. Here instead, $\sigma$ will be of the form $\mathrm{Ad}_t\circ \tau$, so that a wider class of automorphisms is considered. In fact, by \cref{cor:parahoric}, we can take almost all finite order automorphisms. Moreover, we work over more general fields $k$, while \cite{balaji.seshadri:2015:moduli} considers only the case $k=\mathbb{C}$. In \cref{rmk:adjoint} we note that the above result remains true if $r=2$ (resp. $r=3$) and $G$ is adjoint of type $A_{2\ell}$, $E_6$ (resp. $D_4$).

Another motivation for this result, is the analogous isomorphism that holds at the level of Lie algebras \cite[Chapter 8]{kac:1990:infinite}.

\medskip

The principal consequence of \cref{thm:parahoricfromcoverings} is that the study of parahoric Bruhat--Tits group can be translated into the analysis of $(\Gamma,G)$-bundles.
We first of all show that every $(\Gamma,G)$-bundle on $\widetilde{C}$, is uniquely determined by its isomorphism class at the ramification points of the covering $\widetilde{C} \to C$, which we call here its \textit{local type} (as in \cite{balaji.seshadri:2015:moduli} and \cite{damiolini:2021:equivariant}). This is similarly done in \cite{hong.kumar:2022}, and it relies on the fact that the restriction of every $(\Gamma,G)$-bundle to the complement of the ramification locus is trivial by combining results of \cite{damiolini:2021:equivariant} and \cite{heinloth:2010:uniformization}.

We can further give a combinatorial description of the local types using the \textit{non-abelian cohomology spaces} $\mathrm{H}^1(\Gamma_x,G)$ for the cyclic group $\Gamma_x \subset \Gamma$ fixing the ramified point $x$. Intuitively, if we see the $(\Gamma,G)$-bundle $\mathcal{E}$ only as a $G$-bundle, this is trivial on the formal neighborhood $\mathbb{D}_x$ of $x$. It is the action of $\Gamma$ on this trivial $G$-bundle that can be explicitly determined by an element $G(\mathbb{D}_x)$ satisfying appropriate cocycle conditions.
By changing the trivialization, this gives rise to an element of $\mathrm{H}^1(\Gamma_x,G(\mathbb{D}_x))$, which in turns coincides with $\mathrm{H}^1(\Gamma_x,G)$ (see  \cref{prop:twgen} and also \cite[Lemma 2.5]{teleman.woodward:2003:parabolic}). In \cref{thm_comp} we further show that, when $G$ is simply-connected, the components of the moduli stack $\mathrm{Bun}_{\Gamma,G}$ parametrizing $(\Gamma,G)$-bundles on a curve are exactly classified by the local types at ramified points.

\medskip

We are then left to give an explicit description of $\mathrm{H}^1(\Gamma,G)$ for a cyclic group $\Gamma$, whose generator $\gamma$ acts on the simple group $G$ via an automorphism of $G$. Resorting to previous works on \textit{twisted conjugacy classes} for simple algebraic groups and related invariant theory \cite{mohrdieck:2003:conjugacy, springer:2006:twisted}, we can explicitly describe $\mathrm{H}^1(\Gamma,G)$ when $\gamma$ acts as a diagram automorphism $\tau$ of $G$ as follows.

\begin{thmx}[\cref{thm:H1tauG}] Let $m$ be the order of $\Gamma$ let its generator $\gamma$ act on $G$ by the diagram automorphism $\tau$ of order $r$. Assume that  $\mathrm{char}(k)$ does not divide $m$. Then if either $k = \mathbb{C}$, or $G$ is simply connected or adjoint, then
\[ \mathrm{H}^1(\Gamma,G) \cong \dfrac{\frac{1}{m}X_*(T)^\tau}{\mathsf{Av}_\tau(X_*(T)) \rtimes W^\tau},
\] where $X_*(T)$ denotes the set of cocharacters of $G$, by $\mathsf{Av}_\tau$ we denote the map averaging the action of $\tau$ (i.e. $\mathsf{Av}_\tau=\frac{(1+ \tau + \dots + \tau^{r-1})}{r} \colon X_*(T) \to \frac{1}{r}X_*(T)$), and $W$ is the Weyl group of $G$.
\end{thmx}

When $G$ is simply connected, then this can be identified with certain rational points in the fundamental alcove of the affine Weyl group $\mathsf{Av}_\tau(X_*(T)) \rtimes W^\tau$ \cref{lemma:alcove}. When $G$ is adjoint $\mathrm{H}^1(\Gamma,G)$ has an even more concrete realization, as described in \cref{prop:alcove}. This has as a consequence the fact that we can extend Kac's classification of automorphisms of $G$ to fields of positive characteristic not dividing the order of $\Gamma$ (\cref{thm_clas}).

Finally, using this explicit description, we can compare the chamber of Bruhat--Tits buildings for $G(\mathcal{K}_r)^\tau$  with the possible local types of $(G,\Gamma)$ bundles. This agrees with the results of \cref{thm_local} and \cref{cor:parahoric}.

\medskip Some of the results obtained in this paper have been independently obtained by Pappas and Rapoport in the recent preprint \cite{Pappas-Rapoport:2022}. Their work is more arithmetic oriented than the one presented here. For instance, their description of local types are Bruhat--Tits theoretic, while our description is more group-theoretical and combinatorial in nature. One can also compare  \cite[Theorem 1.1]{Pappas-Rapoport:2022} and \cref{thm:parahoricfromcoverings}: under different assumptions---we restrict to characteristic zero---both statements assert that parahoric Bruhat--Tits group schemes arise from coverings, but the methods used to reach this result are different.  Our result is based on its local counterpart (\cref{thm_local}), which we prove in a group-theoretically way and where we do not require characteristic zero.

\subsection*{Structure of the paper} In \cref{sec:parahoric} we recall the definition of parahoric groups and of parahoric Bruhat--Tits group schemes. In \cref{sect:non-abelian} we introduce the concept of non-abelian group cohomology. We give an explicit description of $\mathrm{H}^1(\Gamma,G)$ when the cyclic group $\Gamma$ acts by diagram autmorphism \cref{sec:cohomology_diagram}. In \cref{sec:cohomology_general} we consider the general case. In \cref{secct:local} we give an explicit description of the local structure of parahoric group scheme (see \cref{thm_local}). In order to extend this description to a global one, we introduce in \cref{sec:localtypes} the concept of $(\Gamma,G)$-bundle, show that local types uniquely identify them (\cref{prop:nonempty}) and we further identify the connected components of the stack parametrizing $(\Gamma,G)$-bundles. Finally, in \cref{sec:BTfromcoverings}, we show that all parahoric Bruhat--Tits groups over a projective curve can be realized from $(\Gamma,G_\mathrm{ad})$-bundles (\cref{thm:parahoricfromcoverings}).

\medskip

\subsection*{Acknowledgements} The authors wish to thank J. Heinloth for conversations had during the conference ``Bundles and Conformal Blocks with a Twist'' held at ICMS, Edinburgh. Many thanks also to G. Pappas and M. Rapoport for their interest in this work. We also thank Cheng Su for communicating to us some similar ideas on local types that are presented in this work. J. Hong is grateful to R. Travkin for many stimulating discussions on the global aspects of parahoric Bruhat--Tits group schemes in 2021. He was partially supported by the NSF grant DMS-2001365.

\subsection*{Notation}

Throughout we work over an algebraically closed field $k$. Assumptions on the characteristic will vary throughout the paper, and will always be allowed to have characteristic zero.

We denote the valued field $k(\!(z)\!)$ by $\mathcal{K}$ and its ring of integers $k[\![z]\!]$ by $\mathcal{O}$.  For every $r \in \mathbb{N}$, we set $\mathcal{K}_r:=  k(\!(z^{\frac{1}{r}})\!)$ and similarly $\mathcal{O}_r:=k[\![z^{\frac{1}{r}}]\!]$. The discrete valuation $\mathfrak{v}$ of $\mathcal{K}$ extends to a unique valuation $\mathfrak{v}_r$ of $\mathcal{K}_r$ with values in $\frac{1}{r}\mathbb{Z}$ such that $\mathfrak{v}_rz^{\frac{1}{r}} = \frac{1}{r}$.

We fix a generator $\gamma$ of $\text{Gal}(\mathcal{K}_r/\mathcal{K})$ and assume that a primitive $r$-th root of unity $\zeta_r \in k$ is fixed so that $\gamma(z^{\frac{1}{r}}) := \zeta_r^{-1}z^{\frac{1}{r}}$.

Geometrically, this situation corresponds to the totally ramified Galois covering between formal disks
\[ \pi \colon  \mathbb{D}_r:=\mathrm{Spec}(\mathcal{O}_r) \longrightarrow \mathbb{D}:=\mathrm{Spec}(\mathcal{O}),
\]which restricts to an étale covering $\mathbb{D}_r^\times :=\mathrm{Spec}(\mathcal{K}_r) \to \mathbb{D}^\times:=\mathrm{Spec}(\mathcal{K})$ between punctured disks. Similarly, when $x \in C$ is a smooth point of a reduced curve, we will denote by $\mathcal{O}_x$ the complete local ring at $x$, in formulas $\mathcal{O}_x= \varprojlim \mathscr{O}_{C,p}/\mathfrak{m}_x^n$, and $\mathbb{D}_x:=\mathrm{Spec}(\mathcal{O}_x)$. By choosing a local coordinate $z$ at $x$, these are isomorphic to $\mathcal{O}$ and $\mathbb{D}$. One analogously defines the field $\mathcal{K}_x$ and  the scheme $\mathbb{D}_x^\times=\mathrm{Spec}(\mathcal{K}_x)$.

For every scheme $X$ over $\mathbb{D}^\times$ (or $\mathbb{D}$), we will denote by $X_{\mathcal{K}_r}$ (resp $X_{\mathcal{O}_r}$) the fiber product $X \times_{\mathbb{D}^\times} \mathbb{D}_r$ (resp. $X \times_\mathbb{D} \mathbb{D}_r$).

\section{Parahoric Bruhat--Tits group schemes} \label{sec:parahoric}
In this introductory section, we recall the notions of parahoric groups and the associated group schemes over local fields. Following \cite{heinloth:2010:uniformization}, in the second half of this section we introduce a \textit{global} version of these groups, that is parahoric Bruhat--Tits group schemes over curves.

\subsection{Parahoric group schemes} We briefly present here the notion of parahoric group schemes, introduced in \cite{bruhat.tits:1984:II} and to which we refer for more details. These are connected group schemes $\mathcal{G}$ over $\mathcal{O}$ such that $\mathcal{G}|_{\mathcal{K}}$ are reductive and the sections $\mathcal{G}(\mathcal{O})$ define a \textit{parahoric subgroup} $\mathcal{P}$ of $\mathcal{G}(\mathcal{K})$. They are a generalization of \textit{constant} group schemes $G_{\mathcal{O}}$ for a reductive group scheme $G$ over $k$. In this paper we only consider the case in which $\mathcal{G}|_{\mathcal{K}}$ is required to be simple, and we begin describing such groups.

In this section we denote by $\mathcal{G}$ a quasi-split simple group scheme over $\mathcal{K}$ which splits over a tamely ramified extension. This implies that we can write \[\mathcal{G} \cong \mathrm{Res}_{\mathcal{K}_r/\mathcal{K}}(G_{\mathcal{K}_r})^\tau,\]
where $G$ is a simple algebraic group over $k$, $\tau$ is a diagram automorphism of order $r$, and $\mathrm{char}(k)$ does not divide $r$. The action of $\tau$ on $\mathcal{K}_r$ is $k$-linear and determined by $\tau(z^{\frac{1}{r}}) = \zeta_r^{-1} z^{\frac{1}{r}}$ for $\zeta_r$ a primitive $r$-th root of unity.

The maximal torus $\mathcal{T}$ of $\mathcal{G}$ can be analogously described as $\mathrm{Res}_{\mathcal{K}_r/\mathcal{K}}(T_{\mathcal{K}_r})^\tau$ and contains the maximal split torus $\mathcal{S}$ of $\mathcal{G}$ which is isomorphic to the connected component of $(T_{\mathcal{K}})^\tau$, which we denote $T_\mathcal{K}^{\tau,\circ}$. The relative root system $\mathcal{R}$ for $(\mathcal{G}, \mathcal{S})$ (which is not necessarily reduced) can be seen as a quotient of the root system $R$ of $(G,T)$. We call an element $a$ of $\mathcal{R}$ a \textit{multiple or divisible} root if $2a$ or $\frac{1}{2}a$ is also an element of $\mathcal{R}$. This case can only happen when $\tau$ has order two and switches adjacent roots in the Dynkin diagram of $G$. In order to describe parahoric subgroups of $\mathcal{G}(\mathcal{K})$, we briefly introduce the roots subgroups $\mathcal{U}_{a}$ of $\mathcal{G}$ for every $a\in \mathcal{R}$. In what follows, we denote by $\Delta_a \subset R$ the set of preimages of $a \in \mathcal{R}$.

When $a$ is not multiple or divisible, then the group $\mathcal{U}_a$ is given by
\[\left(\prod_{\alpha \in \Delta_a} U_\alpha(\mathcal{K}_\alpha)\right)^{\tau},\]
where $\mathcal{K}_\alpha$ is the subfield of $\mathcal{K}_r$ which is fixed by the stabilizer of any $\alpha \in \Delta_a$, in formulas $\mathcal{K}_\alpha= \mathcal{K}_r^{\text{Stab}_{\alpha}}$. Since the action of $\tau$ on $\prod_{\alpha \in \Delta_a} U_\alpha(\mathcal{K}_\alpha)$ is transitive, one can identify $\mathcal{U}_a$ with $U_\alpha(\mathcal{K}_\alpha)$. In this way, the map $x_\alpha \colon \mathbb{G}_{\mathrm{a}}(\mathcal{K}_\alpha) \to U_\alpha(\mathcal{K}_\alpha)$ induces the Chevalley-Steinberg pinning $x_a \colon \mathbb{G}_{\mathrm{a}}(\mathcal{K}_\alpha) \to \mathcal{U}_a$.

\begin{eg} In the case of $\Delta_a=\{\alpha, \tau(\alpha)\}$, then
\[\mathcal{U}_a=\{ A \tau(A) \quad \text{with} \quad A \in U_\alpha(\mathcal{K}_2)\}.
\] Note that $\tau(A) \in U_{\tau(\alpha)}(\mathcal{K}_2)$. The identification of $U_\alpha(\mathcal{K}_2)$ with $\mathcal{U}_a$ is given by $A \mapsto A \tau(A)$. \end{eg}

The discrete valuation $\mathfrak{v}$ of $\mathcal{K}$ induces a unique valuation $\mathfrak{v} \colon \mathcal{K}_\alpha \to \frac{1}{r}\mathbb{Z}$ and, through the pinning $x_\alpha$, this induces a valuation $\mathfrak{v}_a$ on non zero elements of $\mathcal{U}_a$. Namely, for every $A \in \mathcal{U}_a \setminus \{0\}$ we set $\mathfrak{v}_a(A) := \mathfrak{v}(x_a^{-1}(A))$. This allows us to define, for every $\ell \in \mathbb{R}$, the group $\mathcal{U}_{a,\ell} := \mathfrak{v}_a^{-1}[\ell, \infty) \subseteq \mathcal{U}_a$.

One similarly defines $\mathcal{U}_a$ and $\mathcal{U}_{a,\ell}$ for multiple and divisible roots, and we refer the reader to \cite[4.1.9]{bruhat.tits:1984:II} and \cite[Appendix]{heinloth:2017:stability}.

Consider the affine space generated by the cocharacters of $\mathcal{S}$, i.e. $E=X_*(\mathcal{S}) \otimes_\mathbb{Z} \mathbb{R}$. which we can identify with $X_*(T^\tau) \otimes_\mathbb{Z} \mathbb{R}$. The bilinear map $X_*(\mathcal{S}) \times X^*(\mathcal{S}) \to \mathbb{Z}$  induces the map \[E \times \mathcal{R} \to \mathbb{R},  \qquad (\theta, a) \mapsto \theta(a).\]

\begin{defi} \label{def:parahoric} We define the parahoric group associated with $\theta \in E$ to be the subgroup $\mathcal{P}_\theta$ of $\mathcal{G}(\mathcal{K})$ which is generated by $T(\mathcal{O}_r)^{\tau,0}$  and $\lbrace \mathcal{U}_{a,-\theta(a)}  \rbrace_{a \in \mathcal{R}}$.  By \cite[3.8.1, 3.8.3, 4.6.2, 4.6.26, 5.2.6]{bruhat.tits:1972:I,bruhat.tits:1984:II} there exists an affine smooth group scheme $\mathcal{G}_{\theta}$ over $\mathcal{O}$ which extends $\mathcal{G}$ and such that $\mathcal{G}_\theta(\mathcal{O}) = \mathcal{P}_{\theta}$. The group $\mathcal{G}_{\theta}$ is called the \textit{parahoric group scheme} associated with $\theta$. \end{defi}

\subsection{Parahoric Bruhat--Tits group schemes} In the same spirit in which $\mathbb{D}^\times=\mathrm{Spec}(\mathcal{K})$ and $\mathbb{D}=\mathrm{Spec}(\mathcal{O})$ detect the local behavior of a smooth curve at a point, the group schemes that we have described in the previous section provide the local description of parahoric Bruhat--Tits group schemes. More precisely, we have the following definition:

\begin{defi} \label{def:BT} Let $C$ be a smooth projective curve over $k$. We say that a smooth affine group scheme $\mathcal{G}$ over $C$ is a \textit{parahoric Bruhat--Tits group scheme} over $C$ if it satisfies the following conditions:
\begin{enumerate}
\item All geometric fibers of $\mathcal{G}$ are connected.
\item \label{item:defBT2} The generic fiber of $\mathcal{G}$ is simple.
\item For all $x \in C$ such that the fiber $\mathcal{G}|_x$ is not simple, the group scheme $\mathcal{G}|_{\mathbb{D}_x}$ is a parahoric group scheme extending $\mathcal{G}|_{\mathbb{D}_x^\times}$, that is $\mathcal{G}(\mathbb{D}_x)$ is a parahoric subgroup of $\mathcal{G}(\mathbb{D}_x^\times)$.\end{enumerate}\end{defi}

In \cref{sec:BTfromcoverings} we will see how, under appropriate conditions, parahoric Bruhat--Tits groups can be recovered from coverings of curves through the concept of $(\Gamma,G)$-bundles.

\begin{rmk} The definitions of parahoric Bruhat--Tits groups given in \cite{heinloth:2010:uniformization,balaji.seshadri:2015:moduli}, allows the generic fiber to be semisimple, rather than simple as in our definition. This simplifies our arguments, but it is not a very restrictive conditions.
However, we note that in \cite[Definition 5.2.1]{balaji.seshadri:2015:moduli} condition \ref{item:defBT2} is replaced by the assumption that there exists a Zariski open subset $U \subset C$ such that $\mathcal{G}|_U \cong G \times U$, for $G$ a simple group scheme over $k$. From our \cref{prop:genericallyreductive}, in fact this is equivalent to require the parahoric Bruhat--Tits group scheme defined in \cref{def:BT} to be generically split.
\end{rmk}

\section{Non-abelian group cohomology}
\label{sect:non-abelian}
In this section we explore various methods to explicitly compute the (non-abelian) group cohomology $\mathrm{H}^1(\Gamma,G):=\mathrm{H}^1(\Gamma,G(k))$ of a cyclic group $\Gamma$ acting on a simple group $G$ over $\mathrm{Spec}(k)$. Throughout we will assume that $\mathrm{char}(k)$ does not divide the order of $\Gamma$.

The motivation to give a precise description of these spaces arise from a geometric question: How to effectively describe $(\Gamma,G)$-bundles on a curve? More specifically, in \cref{sec:localtypes}, we will show that the local description of a $(\Gamma,G)$-bundle is determined by its local type which in turn is an element of $\mathrm{H}^1(\Gamma,G)$ (see \cref{def:localtype}).

We begin by recalling the definition of $\mathrm{H}^1(\Gamma,A)$ for a group $A$, not necessarily abelian. Fix a generator $\gamma$ of $\Gamma$ and let $m$ be the cardinality of $\Gamma$. By abuse of notation, we will still denote by $\gamma$ the automorphism of $G$ induced by $\gamma$.

\begin{defi} We say that an element $g \in A$ is a \textit{cocycle} if  \[ g \cdot \gamma(g) \cdots  \gamma^{m-1}(g)=1\] holds. The set of cocycles is denoted by $Z^1(\Gamma,A)$. The \textit{non-abelian cohomology of $\Gamma$ with values in $A$}, denoted by $\mathrm{H}^1(\Gamma,A)$, is the quotient of $Z^1(\Gamma,A)$  by the equivalence relation $\sim_\gamma$, which identifies two cocycles $a$ and $b$ if and only if there exists an element $g \in A$ such that $a = g b \gamma(b)^{-1}$.\end{defi}

One can see that $\mathrm{H}^1(\Gamma,A)$ is a pointed space, with the class of $1 \in A$ being a preferred point, but it is not a group if $A$ is not abelian. Furthermore, given an exact sequence of groups
\[ \xymatrix{ 0 \ar[r] & A \ar[r] & B \ar[r] & C \ar[r] & 0 }\] which are equipped with compatible actions of $\Gamma$, one obtains an exact sequence
\[\xymatrix{ 0 \ar[r] & A^\Gamma \ar[r] & B^\Gamma \ar[r] & C^\Gamma \ar[r] & \mathrm{H}^1(\Gamma,A) \ar[r] & \mathrm{H}^1(\Gamma,B) \ar[r] & \mathrm{H}^1(\Gamma,C) }.
\] In this way $\mathrm{H}^1(\Gamma,A)$ can be interpreted as a space which measures the failure of right-exactness for the functor that takes a group with a $\Gamma$ action to its subgroup of $\Gamma$-invarians.

\subsection{Computation of non-abelian cohomology for diagram automorphisms} \label{sec:cohomology_diagram}

Let $G$ be a simple algebraic group over $k$ and assume that the cyclic group $\Gamma$ acts on $G$, hence on $G(k)$. Throughout this section, we will further assume that the generator $\gamma$ of $\Gamma$ acts on $G$ via a diagram automorphism $\tau$ of order $r$ preserving a maximal torus $T$ and a Borel subgroup $B$ containing $T$. We will denote  $\mathrm{H}^1(\Gamma,G(k))$ by $\mathrm{H}^1_\tau(\Gamma,G)$.

\begin{eg} \label{eg:tabledynkin} In the table below we describe pictorially the non trivial diagram automorphisms of simply laced groups.

\begin{center}\begin{longtable}{c|c}
     Type & Diagram automorphisms  \\ \hline
     $A_{2\ell -1}$&
     \dynkin[%
edge length=.75cm,
labels*={\alpha_1,\alpha_2, \alpha_{\ell}, \alpha_{2\ell-2},\alpha_{2\ell -1}},
involution/.style={blue!50,<->},
involutions={15;24}]A{**.*.**} \\
$A_{2\ell}$& \dynkin[%
edge length=.75cm,
labels*={\alpha_1,\alpha_2, \alpha_{\ell}, \alpha_{\ell+1},\alpha_{2\ell-1}, \alpha_{2\ell}},
involution/.style={blue!50,<->},
involutions={16;25;34}]A{**.**.**} \\
     $D_{\ell +1 }$& \dynkin[%
edge length=.75cm,
labels*={\alpha_1,\alpha_2, ,\qquad \alpha_{\ell -1},\alpha_{\ell}, \alpha_{\ell+1}},
involution/.style={blue!50,<->},
involutions={65}]D{}  \\
$D_{4}$& {\begin{tikzpicture}[baseline]
     \dynkin[edge length=0.75cm]{D}{4}
 \draw [blue!50,->](root 4) edge[bend right=-80]  (root 1);
 \draw [blue!50,->](root 1) edge[bend right=-80]  (root 3);
 \draw [blue!50,->](root 3) edge[bend right=-80]  (root 4);
  \node [below right] at (root 4) {{\tiny $\alpha_4$}};
    \node [left] at (root 1) {{\tiny $\alpha_1$}};
      \node [right] at (root 2) {{\tiny $\alpha_2$}};
        \node [above right] at (root 3) {{\tiny $\alpha_3$}};
      \end{tikzpicture}} \\
     $E_6$ & \dynkin[%
edge length=.75cm,
labels*={\alpha_1,\alpha_6, \alpha_2, \alpha_3,\alpha_4, \alpha_5},
involution/.style={blue!50,<->},
involutions={16;35}]E6
\end{longtable}\end{center}
In particular we can see that only $D_4$ admits an automorphism of order $3$ and that none of the roots of $A_{2\ell}$ are $\Gamma$-invariant.
\end{eg}

Since $\tau$ is a diagram automorphism, the Weyl group $W$ of $(G,T)$ is acted on by $\Gamma$ and we denote by $W^\tau=W^\Gamma$ the invariant elements. Note that if $R=R(G,T)$ is the root system of $G$ relative to $T$, then $W^\tau$ is the Weyl group for the \textit{folded root system} $\overline{R}$ consisting of $\mathsf{Av}_\tau(\alpha):= \frac{1}{r} \sum_{i=0}^{r-1}\tau(\alpha)$ for every $\alpha \in R$.

\begin{prop} \label{prop:H1GTW} Using the above notation, there is a bijection
\[\mathrm{H}^1_\tau(\Gamma,G) \cong \mathrm{H}^1_\tau(\Gamma,T) / W^\tau.
\]
\end{prop}

We learned from \cite{Pappas-Rapoport:2022}, that one could also deduce this result from the proof of  \cite[Proposition 2.4]{pappas.zhu:2013}. We give here a different proof, relying on \cite{mohrdieck:2003:conjugacy}.

\begin{lemma}\label{lem:TsurgG} The natural inclusion $B \subseteq G$ and projection $B \to T$ induce a surjection $\mathrm{H}^1_\tau(\Gamma,T) \to  \mathrm{H}^1_\tau(\Gamma,G)$. \end{lemma}

\begin{proof} Using \cite[Lemma 7.3]{steinberg:1968:endomorphisms} we first of all deduce that  the inclusion of $B$ in $G$ induces a surjection  $\mathrm{H}^1_\tau(\Gamma,B) \to  \mathrm{H}^1_\tau(\Gamma,G)$.

We now claim that $\mathrm{H}^1_\tau(\Gamma,B) \cong \mathrm{H}^1_\tau(\Gamma,T)$. To show this consider the exact sequence of algebraic groups
\begin{equation} \label{eq:UBT}\xymatrix{ 0 \ar[r] & U \ar[r] & B \ar[r] & T \ar[r] & 0}
\end{equation}
on which $\Gamma$ acts.

Denote by $U^{(\ell)}=[U^{(\ell-1)},U^{(\ell-1)}]$ the derived series of $U$ and consider the vector space $U_\ell:=U^{(\ell)}/U^{(\ell+1)}$, so that one has the exact sequence
\[ \xymatrix{ 0 \ar[r]& U^{(\ell-1)} \ar[r] & U^{(\ell)} \ar[r] &U_\ell \ar[r] &0
}\] on which $\Gamma$ acts. Let $N$ be such that $U^{(N)} \neq 0$ and $U^{(N+1)} =0$. Since $\mathrm{H}^1_\tau(\Gamma,V)=0$ for every vector space $V$, we deduce by induction that $\mathrm{H}^1_\tau(\Gamma,U:{(\ell)})=0=\mathrm{H}^2_\tau(\Gamma,U:{(\ell)})$ for every $\ell$.

After quotienting the exact sequence \eqref{eq:UBT} by $U^{(N)}$, the action of $\Gamma$ induces the exact sequence
\[ \xymatrix{ 0=\mathrm{H}^1_\tau(\Gamma,U_N) \ar[r] & \mathrm{H}^1_\tau(\Gamma,B_N) \ar[r] & \mathrm{H}^1_\tau(\Gamma,T) \ar[r] & \mathrm{H}^2_\tau(\Gamma,U_N)=0,}
\]so that we are left to show that $\mathrm{H}^1_\tau(\Gamma,B_N) \cong \mathrm{H}^1_\tau(\Gamma,B)$.

Note that the group $U^{(\ell)}$ is a normal subgroup of $B$, and setting $B_\ell:=B/U^{(\ell)}$ we obtain that $U_\ell$ is normal in $B_{\ell +1}$ and that $B_\ell = B_{\ell+1}/U_\ell$. Since $U_\ell$ is a vector space over a field whose characteristic does not divide $|\Gamma|$, we have that $\mathrm{H}^2_\tau(\Gamma,U_\ell)=0$ for every $\ell$, and so that $\mathrm{H}^1_\tau(\Gamma,B_\ell)\cong \mathrm{H}^1_\tau(\Gamma,B_{\ell+1})$. It follows that $\mathrm{H}^1_\tau(\Gamma,B) \cong \mathrm{H}^1_\tau(\Gamma,B_{N})$.\end{proof}

\begin{rmk} \label{rmk:TsurgGal-forgeneralsigma} We observe that in the proof of \cref{lem:TsurgG} we do not need to assume that $\gamma$ acts on $G$ via a diagram automorphism $\tau$, but could have acted by any type of automorphism of $G$.
\end{rmk}

In order to show that \cref{prop:H1GTW} holds, we will use \cite[Theorem 1.1]{mohrdieck:2003:conjugacy}. This result states that the inclusion map $T_0^\tau \subset G$ induces an isomorphism of schemes
\[\xymatrix{ T_\tau/ W^\tau \ar[r]^\cong & G/\!/_\tau G,}
\] where $T_\tau$ consists of the coinvariant $T/(1-\tau)T$ and $G/\!/_\tau G$ is the categorical quotient of $G$ by the action of $G$ on itself defined as $g*h := g h \tau(g)^{-1}$.

Combining this statement with lemma \cref{def:parahoric}, we obtain the commutative diagram
\[\xymatrix{\mathrm{H}^1_\tau(\Gamma,T) \ar@{->>}[r]\ar[d] & \mathrm{H}^1_\tau(\Gamma,G) \ar[d] \ar@{^(->}[r] & G(k)/\sim_\tau \ar[dl] \\
T_\tau / W^\tau \ar[r]^\cong & (G/\!/_\tau G)(k)
}\]
where $\sim_\tau$ identifies two elements $g$ and $g'$ of $G(k)$ if and only if $g = h g' \tau(h)^{-1}$ for some $h \in G(k)$. To conclude the proof of \cref{prop:H1GTW}, we are then left to show that the map $\mathrm{H}^1_\tau(\Gamma,G) \to (G/\!/_\tau G)(k)$ is injective.

We first of all recall that since $\Gamma$ acts on $G$, we can build the disconnected group scheme $\widetilde{G}=G \rtimes \Gamma$, whose elements will be denoted $g.\gamma$ for $g \in G$ and $\gamma_i \in \Gamma$. Using this language $G/\!/_\tau G$ is the categorical quotient of the component $G.\gamma$ by conjugation and $G(k)/\sim_\tau=G(k).\gamma/\sim$ consists of conjugacy classes of elements in the component $G.\gamma$. In \cite[Proposition 3.18]{mohrdieck:2003:conjugacy}, it is shown that every fiber of the map $G.\gamma \to G/\!/_\tau G$ contains exactly one orbit consisting of semisimple elements. In particular the restriction of $G(k).\gamma/\sim \to (G/\!/_\tau G)(k)$ to semisimple elements in $G.\gamma$ is injective. We then focus our attention on semisimple elements of $\widetilde{G}$.

As for connected groups, an element $g.\gamma$ of $\widetilde{G}$ is semisimple if there exists a linear representations $\rho \colon \widetilde{G} \to \text{GL}_n$, such that $\rho(g.\gamma)$ is diagonalizable. For a connected group $G$, an element is semisimple if and only if it is conjugated to an element of the torus $T$. In the following lemma, we will see that an analogous statement holds in this situation. Using the terminology introduced in \cite{springer:2006:twisted}, we say that an element $g \in G$ is \textit{$\tau$-semisimple} if and only if $g$ is $\tau$-conjugated to an element of $T$, i.e. there exists $h \in G$ such that $h g \tau(h)^{-1} \in T$.

\begin{lemma} An element $g \in G$ is $\tau$-semisimple if and only if $g.\gamma$ is semisimple in $\widetilde{G}$.
\end{lemma}

\begin{proof} We first of all prove that if $g.\gamma$ is semisimple, then $g$ is $\tau$-semisimple by applying \cite[Proposition 3.4]{mohrdieck:2003:conjugacy}. Applying that result to the element $z=1.\gamma \in \widetilde{G}$ we indeed obtain that $g.\gamma$ is conjugate, via an element $h.1 \in \widetilde{G}$ to an element of $T^{\tau,0}.\gamma$. Since $\gamma$ acts on $G$ by $\tau$, this is equivalnet to $g$ being $\tau$-conjugate to an element of $T^{\tau,0}$, hence being $\tau$-semisimple.

Conversely, assume that $g=ht\tau(h)^{-1}$ for some $h \in G$ and $t \in T$. This is equivalent to the element $g.\gamma \in \widetilde{G}$ being  conjugated to $t.\gamma$ via the element $h.1$. Since semisimplicity of an element in invariant under conjugation, it is then enough to show that $t.\gamma$ is a semisimple element in $\widetilde{G}$. This is a direct consequence of the last part of \cite[Lemma 3.5]{mohrdieck:2003:conjugacy} using $z=1.\gamma$.
\end{proof}

\begin{proof}[Proof of \cref{prop:H1GTW}] By the above arguments, it is enough to show that every element if $\mathrm{H}^1_\tau(\Gamma,G)$ can be represented by a $\tau$-semisimple element of $G$. This is equivalent to showing that $\mathrm{H}^1_\tau(\Gamma,T)$ surjects onto $ \mathrm{H}^1_\tau(\Gamma,G)$, and this is guaranteed by \cref{lem:TsurgG}.
\end{proof}

\subsubsection{Cohomology of tori} Given the results of \cref{prop:H1GTW}, in order to give an explicit description of the local types of $(\Gamma, G)$-bundles through non abelian cohomology, we focus our attention on the computation of $\mathrm{H}^1(\Gamma,T)$.

\begin{prop} \label{prop:H1Tcomb} Let $\Gamma$ be a cyclic group of order $m$ acting on the simple algebraic group $G$ over $k$ by the (diagram) automorphism $\tau$ of order $r$. If  $\mathrm{char}(k)$ does not divide $m$ and $G$ is either simply connected or adjoint, then we have a natural identification
\[ \mathrm{H}^1_\tau(\Gamma,T) \cong \frac{X_*(T)^\tau}{\mathsf{N}_{\tau,m}(X_*(T))}=\frac{\tfrac{r}{m}X_*(T)^\tau}{\mathsf{N}_\tau(X_*(T))}=\frac{\tfrac{1}{m}X_*(T)^\tau}{\mathsf{Av}_\tau(X_*(T))},\]
where $\mathsf{N}_{\tau,m}$ (resp $\mathsf{N}_\tau$) is the norm operator $1+\tau + \dots + \tau^{m-1}$ (resp. $1+ \tau + \dots + \tau^{r-1}$) and $\mathsf{Av}_\tau=\frac{1}{m}\mathsf{N}_{\tau,m}=\frac{1}{r}\mathsf{N}_\tau$.
\end{prop}

\begin{proof} We first of all observe that since the group $\Gamma$ is cyclic, one recovers that $\mathrm{H}^2_\tau(\Gamma,X_*(T))$ is isomorphic to $X_*(T)^\tau/\mathsf{N}_{\tau,m}X_*(T)$ (see, e.g. \cite[Example 2, page 58-59]{brown:1982:cohomology}). It remains to prove that $\mathrm{H}^1_\tau(\Gamma,T) \cong \mathrm{H}^2 (\Gamma,X_*(T))$.

We first identify $\mathrm{H}^1_\tau(\Gamma,T)$ with $\mathrm{H}^1_\tau(\Gamma,T_m)$, where $T_m$ denotes the $m$-th torsion elements of $T$.  Indeed, let $(-)^m$ denote the map $T \to T$ given by $t \mapsto t^m$. From the exact sequence
\[ \xymatrix{ 0 \ar[r]& T_m \ar[r] & T \ar[r]^{(-)^m} & T \ar[r] & 0
}\] we obtain the long exact sequence
\[\xymatrix{ T^\tau \ar[r]^-{{(-)^m}} & T^\tau \ar[r] & \mathrm{H}^1_\tau(\Gamma,T_m)\ar[r] &\mathrm{H}^1_\tau(\Gamma,T)\ar[r]^-{{(-)^m}} &\mathrm{H}^1_\tau(\Gamma,T).
}\] Observe that if $t$ is a cocycle, i.e. belongs to $\text{Z}^1(\Gamma,T)$, then $t^m$ is zero in $\mathrm{H}^1_\tau(\Gamma,T)$ since it can be written as $s\tau(s)^{-1}$ for $s=\prod_{i=0}^{m-2}\tau^i(t)^{m-1-i}$. It follows that $\mathrm{H}^1_\tau(\Gamma,T_m)$ surjects onto $\mathrm{H}^1_\tau(\Gamma,T)$. Moreover, since $G$ is simply connected (or adjoint) the group $T^\tau$ is connected, so that the induced map $(-)^m$ between invariants is necessarily surjective, hence $\mathrm{H}^1_\tau(\Gamma,T_m)$ injects into $\mathrm{H}^1_\tau(\Gamma,T)$. Thus we obtain \begin{equation}\label{eq:*}\mathrm{H}^1_\tau(\Gamma,T_m)\cong \mathrm{H}^1_\tau(\Gamma,T).
\end{equation}

We next have the exact sequence of abelian groups
\begin{equation}\label{eq:XmXT} \xymatrix{0 \ar[r] &X_*(T) \ar[r]^{m\cdot} & X_*(T)\ar[r] & T_m \ar[r] &0,
}
\end{equation} where we have identify $T_m$ with the quotient $X_*(T)/mX_*(T)$ as follows. Choose a basis $\lambda_1,\dots, \lambda_\ell$ of $X_*(T)$, so that $X_*(T) \cong \mathbb{Z}^\ell$. Similarly, we fix an isomorphism $T \cong (k^\times)^\ell$, which identifies $T_m$ with $\mu_m^\ell$. The map $\mathbb{Z}^\ell \to (k^\times)^\ell$ given by $(a_1,\dots,a_\ell) \mapsto (\zeta^{a_1},\dots, \zeta^{a_\ell})$, induces the wanted isomorphism. We can then take $\tau$-invariants of \eqref{eq:XmXT}, obtaining the short exact sequence
\[\xymatrix{0 \ar[r] &\mathrm{H}^1_\tau(\Gamma,X_*(T)) \ar[r] & \mathrm{H}^1_\tau(\Gamma,T_m) \ar[r] & \mathrm{H}^2_\tau(\Gamma,X_*(T))\ar[r] &0,
}
\] where we have used the fact that the multiplication map $m\, \cdot \; \colon X_*(T) \to X_*(T)$ induces the zero maps $\mathrm{H}^1_\tau(\Gamma,X_*(T)) \to \mathrm{H}^1_\tau(\Gamma,X_*(T))$ and $\mathrm{H}^2_\tau(\Gamma,X_*(T)) \to \mathrm{H}^2_\tau(\Gamma,X_*(T))$ (see e.g., \cite[\S 7.7]{sharifi:notes}).

In order to conclude, it suffices to show that $\mathrm{H}^1_\tau(\Gamma,X_*(T))=0$. When $G$ is simply connected (or adjoint), we can identify $X_*(T)$ with $\mathbb{Z}^\ell$, with the action of $\tau$ given  by either
\[\tau(a_1, \dots, a_\ell) = (a_\ell, \dots, a_1) \qquad \text{if $\tau$ has order $2$}\]
or
\[
\tau(a_1, a_2, a_3)= (a_2,a_3,a_1) \qquad \text{if $\tau$ has order $3$ (and so necessarily $G$ of type $D_4$)}.
\] In both cases, a direct computation shows that $\mathrm{H}^1_\tau(\Gamma,\mathbb{Z}^\ell)=0$, implying the isomorphism $\mathrm{H}^1_\tau(\Gamma,T_m) \cong \mathrm{H}^2_\tau(\Gamma, X_*(T))$ which, combined with \eqref{eq:*}, allows us to conclude.\end{proof}

\begin{rmk} \label{pp:H1H2} When $k=\mathbb{C}$, one does not need to assume that $G$ is adjoint or simply connected to obtain the isomorphism of \cref{prop:H1Tcomb}. In fact we have the exact sequence
\begin{equation}  \label{eq:XhT} \xymatrix{ 0 \ar[r] & X_*(T) \ar[r] &  \mathfrak{h} \ar[r]^{e} & T \ar[r] & 0, }
\end{equation} where $e(h):=\exp(2\pi i h)$ and we can identify $\mathfrak{h}$ with $X_*(T) \otimes_\mathbb{Z} \mathbb{C}$.

The action of $\Gamma$ on $T$ induces an action on $\mathfrak{h}$ and on $X_*(T)$, which we still denote $\tau$. Taking $\tau$-invariants of \eqref{eq:XhT} (seen as an exact sequence of abelian groups) we obtain the following long exact sequence of abelian groups
\begin{equation*}  \label{eq:XhTlong} \xymatrix@C=1.5em{ 0 \ar[r] & X_*(T)^\tau \ar[r] &  \mathfrak{h}^\tau \ar[r]^{e} & T^\tau \ar[r] & \mathrm{H}^1_\tau(\Gamma, X_*(T))  \ar[r]& 0 \ar[r] & \mathrm{H}^1_\tau(\Gamma,T) \ar[r] & \mathrm{H}^2(\Gamma, X_*(T)) \ar[r] & 0,  }
\end{equation*}  hence the desired isomorphism claimed in \cref{prop:H1Tcomb}.

Moreover, given an element $[t] \in \mathrm{H}^1_\tau(\Gamma,T)$, we explicitly describe the associated equivalence class in $X_*(T)^\tau/\mathsf{N}_{\tau,m}X_*(T)$. Choose $h \in \mathfrak{h}$ such that $t=e(h)$, then the natural map $\mathrm{H}^1_\tau(\Gamma,T) \cong X_*(T)^\tau/\mathsf{N}_{\tau,m}X_*(T)$ identifies $[t]$  to the element $[h+\tau(h)+ \dots + \tau^{m-1}(h)]$ of $X_*(T)^\tau/\mathsf{N}_{\tau,m}X_*(T)$. This can be seen from the explicit computation of the cohomology of cyclic groups as in \cite[Example 2, page 58-59]{brown:1982:cohomology}. Conversely the class of an element $\alpha \in X_*(T)^\tau$, corresponds to the class of $e(\alpha/m)$ in $\mathrm{H}^1_\tau(\Gamma,T)$. These two maps are one inverse of the other since $[e(h)]=[e(h + \dots+\tau^{m-1}h)/m)]$. We can further note that every equivalence class in $\mathrm{H}^1_\tau(\Gamma,T)$ can be represented by an element of $T^\tau$. Rescaling $X_*(T)^\tau/\mathsf{N}_{\tau,m}X_*(T)$ by a factor of $m$, we obtain $\frac{1}{m}X_*(T)^\tau/\mathsf{Av}_\tau(X_*(T))$. Combining this with the above discussion, it follows that the map $e(h) \mapsto \mathsf{Av}_\tau(h)$ realizes the isomorphism
\begin{equation*}
\mathrm{H}^1_\tau(\Gamma,T) \cong \frac{\tfrac{1}{m}X_*(T)^\tau }{\mathsf{Av}_\tau(X_*(T))}.
\end{equation*} \end{rmk}

\begin{eg} \label{eg:H1Tsc} Let $G$ be a simply connected group, so that $X_*(T)$ has a basis of coroots, and let $T$ be a $\tau$-invariant torus, so that we can apply \cref{prop:H1Tcomb}. When $\tau$ is the trivial diagram automorphism, then it follows that $X_*(T)^\tau =X_*(T) = \mathsf{N}_\tau(X_*(T))$, so that $\mathrm{H}^1_\tau(\Gamma,T)$ is isomorphic to $(\mathbb{Z}/m\mathbb{Z})^{\oplus \ell}$, where $\ell$ is the rank of $G$ and $m = |\Gamma|$. One could obtain this result directly from the definition of $\mathrm{H}^1_\tau(\Gamma,T)$, which is in bijection with $T_m$, the $m$-torsion of the torus $T$.

We now assume that $\tau$ is not trivial. In view of \cref{eg:tabledynkin}, we can explicitly spell out the generators of $X_*(T)^\tau$ and $\mathsf{N}_\tau X_*(T)$.

\begin{center}
\begin{tabular}{|c|c|l|l| }
     \hline Order of $\tau$ & Type & $\mathbb{Z}$-generators of $X_*(T)^\tau$ & $\mathbb{Z}$-generators of $\mathsf{N}_\tau X_*(T)$\\ \hline

      \multirow{7}{*}{Order 2} & \multirow{2}{*}{$A_{2\ell-1}$} &  $\check{\alpha}_\ell$ & $2 \check{\alpha}_\ell$ \\
      && $\check{\alpha}_i + \check{\alpha}_{2\ell -i}$  for $i \in \{1, \dots, \ell-1\}$
     & $ ( \check{\alpha}_i + \check{\alpha}_{2\ell -i})$  for $i \in \{1, \dots, \ell-1\}$\\ \cline{2-4}

     & $A_{2\ell}$ &  $ \check{\alpha}_i + \check{\alpha}_{2\ell +1 -i}$  for $i \in \{1, \dots, \ell-1\}$ & $(\check{\alpha}_i + \check{\alpha}_{2\ell +1-i})$  for $i \in \{1, \dots, \ell\}$\\  \cline{2-4}

     &\multirow{2}{*}{$D_{\ell +1 }$} &  $\check{\alpha}_i$ for $i \in \{1,\dots, \ell-1\}$ & $2 \check{\alpha}_i$ for $i \in \{1,\dots, \ell-1\}$\\
     && $\check{\alpha}_{\ell}+\check{\alpha}_{\ell+1}$ & $(\check{\alpha}_{\ell}+\check{\alpha}_{\ell+1})$ \\  \cline{2-4}

     & \multirow{2}{*}{$E_{6}$} &  $\check{\alpha}_3$, $\check{\alpha}_6$ & $2 \check{\alpha}_3$, $2 \check{\alpha}_6$,\\
     & & $\check{\alpha}_1+\check{\alpha}_5$, $\check{\alpha}_2+\check{\alpha}_4$
     & $(\check{\alpha}_1+\check{\alpha}_5)$,  $(\check{\alpha}_2+\check{\alpha}_4)$\\  \hline

     \multirow{2}{*}{Order $3$} & \multirow{2}{*}{$D_4$} & $\check{\alpha}_2$ & $3 \check{\alpha}_2$ \\
     && $(\check{\alpha}_1+ \check{\alpha}_3+ \check{\alpha}_4)$ & $(\check{\alpha}_1+ \check{\alpha}_3+ \check{\alpha}_4)$\\ \hline
\end{tabular}\end{center}
Hence we can explicitly compute $\mathrm{H}^1_\tau(\Gamma,T)$ in this situation.
\begin{center}\renewcommand{\arraystretch}{1.6}
\begin{tabular}{|c|c|c|}
     \hline Order of $\tau$ & Type & $\mathrm{H}^1_\tau(\Gamma,T)$ \\ \hline
    \multirow{4}{*}{Order 2} & $A_{2\ell -1}$  & $\frac{\mathbb{Z}}{m\mathbb{Z}} \times \left(\frac{\mathbb{Z}}{(m/2)\mathbb{Z}}\right)^{\ell -1}$\\ \cline{2-3}
    &$A_{2\ell}$ & $\left( \frac{\mathbb{Z}}{(m/2)\mathbb{Z}}\right)^{\ell}$\\ \cline{2-3}
    &$D_{\ell +1}$ & $\left( \frac{\mathbb{Z}}{m \mathbb{Z}}\right)^{\ell-1} \times \frac{\mathbb{Z}}{(m/2)\mathbb{Z}}$\\\cline{2-3}
    &$E_6$ & $\left(\frac{\mathbb{Z}}{m\mathbb{Z}}\right)^{2} \times \left(\frac{\mathbb{Z}}{(m/2)\mathbb{Z}}\right)^{2}$\\  \hline
    Order 3 &$D_4$ & $\frac{\mathbb{Z}}{m \mathbb{Z}} \times \frac{\mathbb{Z}}{(m/3)\mathbb{Z}}$\\ \hline
\end{tabular}\end{center}
In particular, if we assume that $\tau$ has order $2$ and $m=2$, then we can see that $\mathrm{H}^1_\tau(\Gamma,T)$ is trivial in type $A_{2\ell}$ for $\ell \geq 1$, while it consists of two elements for type $A_{2\ell-1}$ with $\ell \geq 2$. From this, and \cref{lem:TsurgG}, we can immediately deduce that $\mathrm{H}^1_\tau(\Gamma,\textrm{SL}_{2\ell+1})$ is trivial for $\ell \geq 1$. We can actually show that $\mathrm{H}^1_\tau(\Gamma,\textrm{SL}_{2\ell})$ has indeed two elements for $\ell \geq 2$.
Let $B$ denote a Borel of $G = \textrm{SL}_{2\ell}$ containing $T$ on which $\tau$ acts. One obtains that the map $\phi$
\[ \xymatrix{ (G/B)^\Gamma \ar[r]^-\phi &  \mathrm{H}^1_\tau(\Gamma, B) \ar[r]^-\psi & \mathrm{H}^1_\tau(\Gamma, G) \ar[r] &0,}
\] is zero.
Since the map $\psi$ is surjective and  $|\mathrm{H}^1_\tau(\Gamma, B)|=|\mathrm{H}^1_\tau(\Gamma, T)|=2$, then also $|\mathrm{H}^1_\tau(\Gamma, G)|= 2$, concluding the example.
\end{eg}

\subsubsection{Conclusion}

We can combine \cref{prop:H1GTW} and \cref{prop:H1Tcomb} to deduce the following result.

\begin{theorem} \label{thm:H1tauG} Let $\Gamma =\langle \gamma \rangle$ be the cyclic group of order $m$ such that $\gamma$ acts on $G$ via a diagram automorphism $\tau$ of order $r$. Then if either $k = \mathbb{C}$ or $G$ is simply connected or adjoint (and $\mathrm{char}(k)$ does not divide $m$), then
\[ \mathrm{H}^1_\tau(\Gamma,G) \cong \dfrac{\frac{1}{m}X_*(T)^\tau}{\mathsf{Av}_\tau(X_*(T)) \rtimes W^\tau} = \dfrac{\frac{r}{m}X_*(T)^\tau}{\mathsf{N}_\tau(X_*(T)) \rtimes W^\tau},
\] where $\mathsf{N}_\tau := r \mathsf{Av}_\tau$.
\end{theorem}

\begin{eg}
\label{eg_diagram}
We can use \cref{thm:H1tauG} and \cref{eg:H1Tsc} to compute $\mathrm{H}^1_\tau(\Gamma,G)$ for simply connected groups $G$ in which the order of $\Gamma$ equals the order of $\tau$. We summarize the result in the table below.

\begin{center}\renewcommand{\arraystretch}{1.6}
\begin{tabular}{|c|c|c|}
     \hline Order of $\tau$ & Type & $\mathrm{H}^1_\tau(\Gamma,G)$ \\ \hline
     Order 1 & Any & $\{[0]\}$ \\ \hline
    \multirow{4}{*}{Order 2} & $A_{2\ell -1}$  & $\{[0], [\check{\alpha}_\ell]\}$ \\ \cline{2-3}
    &$A_{2\ell}$ & $\{[0]\}$\\ \cline{2-3}
    &$D_{\ell +1}$ & $\{[0], [\check{\alpha}_\ell]\}$\\\cline{2-3}
    &$E_6$ & $\{[0], [\check{\alpha}_2]\}$ \\  \hline
    Order 3 &$D_4$ & $\{ [0], [\check{\alpha}_2]\}$\\ \hline
\end{tabular}\end{center}

When $\tau$ is trivial and for type $A_{2\ell}$ there is nothing to show since $\mathrm{H}^1_\tau(\Gamma,T)$ is already trivial. In type $A_{2\ell-1}$ the Weyl group $W^\tau$ acts trivially on the invariant coroots, so $\mathrm{H}^1_\tau(\Gamma,G)=\mathrm{H}^1_\tau(\Gamma,T)$. In the other cases with $\tau$ of order $2$, the Weyl group $W^\tau$ permutes the non zero invariant coroots and so we always have two elements in $\mathrm{H}^1_\tau(\Gamma,G)$, one represented by $0$ and the other one by the class of any of the invariant simple coroots. Finally, for $D_4$ and $\tau$ of order $3$, we have that $\sigma_2(\check{\alpha}_2)=-\check{\alpha}_2$ and so the two non trivial elements of $\mathrm{H}^1_\tau(\Gamma,T)$ are identified in $\mathrm{H}^1_\tau(\Gamma,G)$, which then has $2$ elements.
\end{eg}

\begin{eg} \label{eg:tautrivial} Let $m$ be the cardinality of $\Gamma$ and assume that $\tau$ is the trivial diagram automorphism. Then $\mathrm{H}^1_\tau(\Gamma,G)$ is identified with the quotient of $T_m$ (the $m$-th torsion of the torus $T$) by the Weyl group $W$ of $G$.
For instance, when $G=\textrm{SL}_n$ and $m=2$, then \[\mathrm{H}^1_\tau(\Gamma,\textrm{SL}_n) = \left\lceil \frac{n+1}{2}\right\rceil .
\] Similarly, for general $m$ and for $G=\textrm{SL}_2$ we have
\[\mathrm{H}^1_\tau(\Gamma,\textrm{SL}_2)= \left\lceil \frac{m+1}{2}\right\rceil.\]
\end{eg}

\begin{rmk}
It was proved by Adams--Ta\"{\i}bi \cite{Adams-Taibi:2018} that Galois group of real groups is isomorphic to $\mathrm{H}^1_\theta(\Gamma, G_{\mathbb{C}})$ for the holomorphic involutions arising from Cartan involutions, and they determined the cardinality of those $\mathrm{H}^1_\theta(\Gamma, G_{\mathbb{C}})$. In \cite{Borovoi-Timashev:2021}, Borovoi--Timashev computed the Galois group of real groups in terms of Kac labellings when $m=2$, which is similar to what we will do in the next subsection for general $m$.
\end{rmk}

\subsubsection{Description through alcove} In this section we further describe $\mathrm{H}^1_\tau(\Gamma,G)$ as representing equivalence classes of rational points in the fundamental alcove for $X_*(T)^\tau$. We first begin with some notation that we are using throughout.

Let $\tau$ be a diagram automorphism on $G$ of order $r$ (possibly trivial). Let $G^\tau$ be the fixed subgroup of $\tau$ in $G$. Then, $G^\tau$ is connected and simple.
Following \cite[p.8]{Hong-Kumar:2019}, set
\begin{equation*}
  \theta_0=\begin{cases}
  \text{highest root of } G &\text{ if } r=1;\\
  \text{highest short root of }G^\tau   &\text{ if $r>1$ and } G\not= A_{2\ell}  ;\\
  \text{2 $\cdot$ highest short root of } G^\tau    &\text{ if $r=2$ and $G=A_{2\ell}$ }.  \end{cases}
\end{equation*}
Let $\check{\theta}_0$ be the dual of $\theta_0$, in other words:
\begin{equation*}
  \check{\theta}_0=\begin{cases}
  \text{highest short  coroot of } G &\text{ if } r=1;\\
  \text{highest  coroot of }G^\tau   & \text{ if $r>1$ and } G\not= A_{2\ell}  ;\\
  \frac{1}{2} \cdot \text{ highest coroot of } G^\tau    & \text{ if $r=2$ and $G=A_{2\ell}$ }.
  \end{cases}
\end{equation*}
Let $\check{M}$ be the lattice spanned by $W^\tau\cdot \check{\theta}_0$. Then
\begin{equation*}
 \check{M}=\begin{cases}
 \text{coroot lattice of $G$} &\text{ if } r=1;\\
  \text{lattice of long coroots of $G^\tau$}   &\text{ if $r>1$ and } G\not= A_{2\ell}  ;\\
  2\cdot \text{lattice of long coroots of $G^\tau$ }     & \text{ if $r=2$ and $G=A_{2\ell}$ }.
  \end{cases}
\end{equation*}

We consider the affine Weyl group $W^\tau_{a}:= \check{M} \rtimes W^\tau$, which naturally acts on $X_*(T)^\tau_{\mathbb{R}}$. Then the quotient $X_*(T)^\tau_{\mathbb{R}}/W^\tau_{a}$ is in bijection with the fundamental alcove
\[ \mathcal{A}(G^\tau)=\left\lbrace \lambda \in X_*(T)^\tau_\mathbb{R} \text{ such that } ( \lambda, \beta_i ) \geq 0 \text{ for } 1 \leq i \leq \ell \text{ and } ( \lambda, \theta_0 ) \leq 1 \right\rbrace,
\]
where $\beta_1, \dots, \beta_\ell$ are the simple roots of $G^\tau$.
In what follows we will use the notation $\mathcal{A}_{r/m}(G^\tau)$, or simply $\mathcal{A}_{r/m}$, to denote the finite set $\mathcal{A}(G^\tau) \cap   \frac{r}{m} X_*(T)^\tau$, for non zero integers $r$ and $m$.

\begin{lemma}\label{lemma:alcove} Let $\Gamma =\langle \gamma \rangle$ be the cyclic group of order $m$ and assume that $\gamma$ acts on the simple algebraic group $G$ via a diagram automorphism $\tau$ of order $r$. Assume that $\mathrm{char}(k)$ does not divide $m$. Then there is a surjective map
\[ \phi \colon \mathcal{A}_{r/m} \to \mathrm{H}^1_\tau(\Gamma, G)\] which is an isomorphism when $G$ is simply connected.
\end{lemma}

\begin{proof} We first of all note that
\[\mathcal{A}_{r/m} \cong  \dfrac{\frac{r}{m}X_*(T)^\tau}{\check{M}\rtimes W^\tau} ,\] so that, in view of \cref{thm:H1tauG}, it will be enough to show that lattice $\mathsf{N}_\tau(X_*(T))$ contains $\check{M}$. Let $T_{sc}$ denote the torus of the simply connected cover $G_{sc}$ of $G$. Since $X_*(T_{sc})$ equals the coroot lattice and $X_*(T_{sc}^\tau)=X_*(T_{sc})^\tau$, one can directly show that $\mathsf{N}_\tau(X_*(T_{sc}))$ is naturally identified with $\check{M}$ (e.g. using the computations of \cref{eg:H1Tsc}).
Since $\mathsf{N}_\tau(X_*(T_{sc})) \subset \mathsf{N}_\tau(X_*(T))$, the above argument shows that $\check{M}$ is contained in $\mathsf{N}_\tau(X_*(T))$.
\end{proof}

\begin{eg} Let $G$ be a group of type $A_3$ and $\tau$ be its non trivial diagram automorphism of order $2$. Let $m=2k$ be the cardinality of the cyclic group $\Gamma$. From the lemma above it follows that $\mathrm{H}^1_\tau(\Gamma,G)$ is in bijection with $\mathcal{A}_{2/2k}$ when $G$ is simply connected, i.e. for $G=\textrm{SL}_4$.
The group $G^\tau$ is of type $C_2$, with simple roots $\{ \alpha, \beta\}$ and with highest shortest root $\theta_0=\alpha + \beta$.
If the group is simply connected, then $X_*(T^\tau)$ is spanned by the coroots $\check{\alpha}=\frac{\alpha}{2}$ and $\check{\beta}=\beta$. Then, an element $\frac{A}{k} \check{\alpha} + \frac{B}{k} \beta  \in \frac{1}{k} X_*(T^\tau)$ belongs to $\mathcal{A}_{2/2k}$ if and only if
\[ 2A -B \geq 0 \qquad -2A+2B \geq 0 \qquad  B \leq k.\]
This implies that $A$ and $B$ are necessarily integers between $0$ and $k$. We can therefore compute that
\[|\mathrm{H}^1_\tau(\Gamma,\textrm{SL}_4)| = | \mathcal{A}_{2/2k}| = \begin{cases}
(\ell + 1)^2 & k = 2 \ell \\
(\ell +1)(\ell +2) & k = 2 \ell +1.
\end{cases}
\]
One can similarly compute the cardinality of $\mathrm{H}^1_\tau(\Gamma,\textrm{SL}_6)$, where $\Gamma$ is the cyclic group of order $2k$ and $\tau$ acts on $\textrm{SL}_6$ via the non trivial diagram automorphism. One obtains
\[|\mathrm{H}^1_\tau(\Gamma,\textrm{SL}_6)| = \begin{cases}
\dfrac{\ell(\ell + 1)(\ell +2)}{3} & k = 2 \ell \\
\dfrac{(\ell +1)(\ell +2)(\ell+3)}{3} & k = 2 \ell +1
\end{cases}.
\]
\end{eg}

\medskip We have seen in the example above how  \cref{lemma:alcove} allows us to translate the problem of computing $\mathrm{H}^1_\tau(\Gamma,G)$ into counting the number of integer solutions of a system of inequalities. These inequalities are explicitly found using the Cartan matrix of the group $G^\tau$.

\smallskip  We use this point of view to describe $\mathrm{H}^1_\tau(\Gamma, G)$ for $G$ of adjoint type. We first set up some notation. If the group $G$ is of type $X_n$ and $\tau$ has order $r$, then the coefficients $a_i$ of $\theta_0=\sum_{i=1}^\ell a_i \beta_i$ for the group $G^\tau$ are the Kac's labels at the $i$-th vertex of the (twisted) affine Dynkin diagram of type $X_n^{(r)}$ (see \cite[Tables Aff 1, Aff 2 and Aff 3,  at pages 54 and 55]{kac:1990:infinite}), except when $G$ is of type $A_{2\ell}$ and $\tau$ has order $2$. In this latter case, $\theta_0= \sum_{i=1}^\ell 2 \beta_i$, or equivalently $a_i$ corresponds to Kac's label of $A_{2\ell}^{(2)}$ at the $(i-1)$-st vertex.

Using this notation, we define $\mathcal{S}_{r/m}(G^\tau)$, or simply denoted $\mathcal{S}_{r/m}$, to be the set whose elements are an $(\ell+1)$-tuple $(s_i)_{i=0,1,\cdots, \ell}$ of integers, satisfying
\[ s_i\geq 0 \quad \text{for all $i\in\{0,\dots, \ell\}$,} \quad \text{ and } \quad    \sum_{i=0}^\ell a_i s_i= \frac{m}{r},\]
where $a_0=1$ (this is again Kac's label at the $0$-th vertex of the (twisted) affine Dynkin diagram, except in case $A_{2\ell}^{(2)}$, where it is Kac's label at the $\ell$-th vertex).

\begin{lemma} \label{lemma:ArmSrm} Let $\Gamma =\langle \gamma \rangle$ be the cyclic group of order $m$ and assume that $\gamma$ acts on the simple algebraic group $G$ via a diagram automorphism $\tau$ of order $r$. Assume that $\mathrm{char}(k)$ does not divide $m$.
If $G$ is of adjoint type, then $\mathcal{A}_{r/m} \cong \mathcal{S}_{r/m}$.
\end{lemma}
\begin{proof} Since $G$ is of adjoint type, then $X_*(T^\tau)$ is spanned by the coweights $\check{\varpi}_1,\dots, \check{\varpi}_\ell$, so every element $\lambda \in \mathcal{A}_{r/m}$ can be written as $\frac{r}{m}\sum_{i=1}^\ell s_i\check{\varpi}_i$ for some integers $s_i$. From $( \lambda, \beta_i ) \geq 0$ we deduce that $s_i \geq 0$ for all $i \in \{1,\dots, \ell\}$. Moreover, $( \lambda, \theta ) \leq 1$ is equivalent to $\sum_{i=1}^\ell s_ia_i \leq \frac{m}{r}$, that is $s_0:=\frac{m}{r}-\sum_{i=1}^\ell s_i a_i \geq 0$.
\end{proof}

We introduce the equivalence relation $\sim$ on $\mathcal{S}_{r/m}$ which is induced by the outer automorphisms  of the affine Dynkin diagrams (possibly twisted). For example, if the affine Dynkin digram has no outer symmetry, then the equivalence relation is trivial. If, for instance,  $G$ is of type $A_{2\ell-1}$ and the order $r$ of $\sigma$ is $2$, the equivalence relation $\sim$ is given by
\[ (s_i) \sim (s_i') \qquad \text{ if and only if } \qquad  s_0=s'_1, \quad s_1=s_0', \text{ and }s_i=s_i' \text{ for }i \geq 2.\]
Let $\mathcal{S}_{r/m}/\!\sim$ be the set of the equivalence classes of $\sim$.

\begin{prop}\label{prop:alcove}
Under the assumptions of \cref{lemma:ArmSrm}, there is a natural bijection \[\mathrm{H}_\tau^1(\Gamma, G)\cong \mathcal{S}_{r/m}/\!\sim.\]
\end{prop}
\begin{proof}
By \cref{lemma:ArmSrm}, there is a natural bijection
\begin{equation}\label{eq_pre_bij}
\dfrac{\frac{r}{m}X_*(T)^\tau}{\check{M}\rtimes W^\tau} \cong \mathcal{S}_{r/m}.     \end{equation}
We will split the proof in three cases.

\textit{Case I.} When $\tau$ is trivial, equivalently $r=1$, we have that $\check{M}$ is the coroot lattice $\check{Q}$ of $G$, so that the left hand side of \eqref{eq_pre_bij} is $\frac{1}{m}X_*(T) / W_{\rm aff} $, where $W_{\rm aff}$ is the affine Weyl group $\check{Q}\rtimes W$. Moreover, since $G$ is adjoint, $X_*(T)$ equals to the coweight lattice $\check{P}$ of $G$.
Let $\Omega_a$ be the normalizer of the set of all affine simple reflections of $W_{\rm aff}$. It is known that the extended affine Weyl group $\check{P}\rtimes W$ is isomorphic to the semidirect product $ W_{\rm aff}\rtimes \Omega_a$ \cite[\S 2.3]{Bourbaki:1968}. In particular, $\Omega_a$ is the group of all outer automorphisms of $W_{\rm aff}$, and the map \eqref{eq_pre_bij} is $\Omega_a$-equivariant.

Observe that we have the following bijections:
\[ \mathrm{H}_\tau^1(\Gamma,G)\cong  \dfrac{ \frac{r}{m}X_*(T)}{(\check{P}\rtimes W )} \cong  \left( \dfrac{\frac{r}{m}X_*(T)}{ W_{\rm aff}} \right) / (\check{P}/\check{Q}).   \]
The action of $\check{P}/\check{Q}$ on $\frac{r}{m}X_*(T)  /W_{\rm aff} $ is equivalent to the action of $\Omega_a$, via the natural isomorphism $\Omega_a \cong \check{P}/\check{Q}$ \cite[\S 2.3]{Bourbaki:1968}. It follows that, there is a natural bijection $ \mathrm{H}_\tau^1(\Gamma,G)\cong \mathcal{S}_{r/m}/\!\sim $.

\smallskip

\textit{Case II.} When $(G,r)=(A_{2\ell}, 2 ), (E_6, 2), (D_4,3)$, there are no outer symmetry in the associated affine Dynkin diagram $A_{2\ell}^{(2)}, E_6^{(2)}, D_4^{(3)}$. Moreover, a direct computation allows us to compare $\check{M}$ with $\mathsf{N}_\tau(X_*(T))$:
\begin{center}\renewcommand{\arraystretch}{1.6}
\begin{tabular}{|c|c|c|}
     \hline $(G,r)$ & $\check{M}$ & $\mathsf{N}_\tau(X_*(T))$ \\ \hline
    $(A_{2\ell},2)$  & $\left\langle \begin{array}{c} 2\varpi_1-\varpi_2, (-\check{\varpi}_{i-1} +2 \check{\varpi}_{i} - \check{\varpi}_{i+1})_{i=2,\dots, \ell-2},\\ -\check{\varpi}_{\ell-2}+2\check{\varpi}_{\ell-1}-2\check{\varpi}_{\ell}, -\check{\varpi}_{\ell-1}+2\check{\varpi}_\ell \end{array} \right\rangle$ & $\langle (\check{\varpi}_i)_{i=1, \dots, \ell-1}, 2 \check{\varpi}_\ell \rangle$ \\ \cline{2-3}
     $(E_{6},2)$ & $\left\langle \begin{array}{c} 4 \check{\varpi}_1 - 2 \check{\varpi}_2, 2\check{\varpi}_1-4\check{\varpi}_2+4\check{\varpi}_3\\
     2\check{\varpi}_2-2\check{\varpi}_3+\check{\varpi}_4, \check{\varpi}_3-2\check{\varpi}_4 \end{array} \right\rangle $ & $\langle 2\check{\varpi}_1, 2\check{\varpi}_2, \check{\varpi}_3, \check{\varpi}_4 \rangle$ \\ \cline{2-3}
 \hline
   $(D_4,3)$ & $\langle 2\check{\varpi}_1-3\check{\varpi}_2, 3\check{\varpi}_1-6\check{\varpi}_2\rangle$ & $\langle \check{\varpi}_1, 3\check{\varpi}_3\rangle$\\ \hline
\end{tabular}\end{center}
This shows that $\mathsf{N}_\tau(X_*(T)) =\check{M}$. This also completes the proof the theorem in these cases.

\smallskip

\textit{Case III.} We are left to consider other two cases, i.e. when $(G, r)$ is $(A_{2\ell-1}, 2)$, or $(D_{\ell+1}, 2)$. Denote by  $X_*(T)_\tau$ the quotient of $X_*(T)$ by the operator $1-\tau$. Note that there is a natural map $X_*(T)_\tau\to X_*(T)^\tau$ given by $\bar{\lambda}\mapsto \sum_{i=0}^{r-1}\tau^i(\lambda)$, where $\lambda$ is any lift $\bar{\lambda}$ in $X_*(T)$. This gives rise to the following bijections (in these two cases):
\[ X_*(T)_\tau\cong  \mathsf{N}_r(X_*(T)), \quad \check{Q}_\tau\cong \mathsf{N}_r(\check{Q})=\check{M} .   \]
It induces the following isomorphisms:
\[ \mathsf{N}_r(X_*(T))/ \check{M} \cong X_*(T)_\tau/  \check{Q}_\tau  \cong  (X_*(T)/ \check{Q})_\tau  \]
of abelian groups. By the calculation in \cite[Table 2.11]{Besson-Hong:2020}, $(X_*(T)/ \check{Q})_\tau \cong \mathbb{Z}/2\mathbb{Z}$. Thus, $\mathsf{N}_r(X_*(T))/ \check{M}\cong \mathbb{Z}/2\mathbb{Z}$. By the argument similar to the case when $r=1$, the action of $\mathsf{N}_r(X_*(T))/ \check{M}$ on $\frac{r}{m}X_*(T)^\tau  / \check{M}$ exactly corresponds to the only nontrivial outer automorphisms on the twisted affine Dynkin diagrams of types $A_{2\ell-1}^{(2)}$ and $ D_{\ell+1}^{(2)}$. This concludes the proof.
\end{proof}

\subsubsection{Revisit Kac's classification of finite order automorphisms}
Let $G$ be a simple algebraic group over $k$ of characteristic $p$ and let $\sigma$ be an automrphism on $G$ such that $\sigma^m=0$ for some positive integer $m$.
When $p=0$, it is a classical result of Kac \cite[Theorem 8.6]{kac:1990:infinite} that $\sigma$ up to conjugation is classified by elements in $\mathcal{S}_{r/m}/\sim$. In fact, from our computation of $\mathrm{H}_\tau^1(\Gamma,G)$, the same classification holds for general characteristic $p$ such that $p$ does not divide $m$.

Given a diagram automorphism $\tau$ on $G$, we consider the set
\[ \mathrm{Aut}(G)_{\tau,m}:=\{ \sigma\in \mathrm{Aut}(G)  \,|\,  \sigma^m=1,   \bar{\sigma}=\bar{\tau} \text{ in } \mathrm{Out}(G)      \} ,       \]
where $\mathrm{Out}(G):=\mathrm{Aut}(G)/G_{\mathrm{ad}}$ is the group of outer automorphisms, and $\bar{\sigma}$ and $\bar{\tau}$ are the images of $\sigma$ and $\tau$ in $\mathrm{Out}(G)$. Let $\mathrm{Aut}(G)_{\tau,m}/\!\sim$ be the conjugation classes of $\mathrm{Aut}(G)_{\tau,m}$ by $G_{\mathrm{ad}}$. Then,
there is a natural bijection
\begin{equation} \label{eq:kac}  \mathrm{H}_\tau^1(\Gamma, G_{\mathrm{ad}})\cong   \mathrm{Aut}(G)_{\tau,m}/\sim   \end{equation}
given by $[g]\mapsto \mathrm{Ad}_{{g}}\circ \tau$. Having described the left hand side of \eqref{eq:kac} in \cref{prop:alcove} in terms of $\mathcal{S}_{r/m}/\!\sim$, we obtain Kac's classification over a field of possibly positive characteristic.

\begin{theorem}\label{thm_clas} Let $G$ be a simple group over an algebraically closed field of characteristic $p \geq 0$. Let $\tau$ be a diagram automorphism of $G$ whose order divides $m$. If $p$ does not divide $m$, then there is a natural bijection $\mathrm{Aut}(G)_{\tau,m}/\! \sim \;  \cong \,  \mathcal{S}_{r/m}/\!\sim $.
\end{theorem}

\subsection{From diagram automorphisms to general automorphisms} \label{sec:cohomology_general} In the previous sections, we have seen how to compute $\mathrm{H}^1(\Gamma,G)$ under the assumption that the $\Gamma$ acts via diagram automorphisms only. We explore here what happens when we drop this assumption.

We first of all note that, from the very definition of non-abelian group cohomology, we obtain the following result.

\begin{lemma}
Let $\Gamma$ act on $G$ given by two finite order automorphisms
$\sigma, \sigma'$. Suppose further that $\sigma'=\mathrm{Ad}_h\circ \sigma \circ \mathrm{Ad}_{h^{-1}}$ for some $h\in G$.  Then, the map $\mathrm{Ad}_h \colon \mathrm{H}^1_{\sigma}(\Gamma, G)\to \mathrm{H}^1_{\sigma'}(\Gamma, G)$ is a bijection.
\end{lemma}

In the following proposition, we obtain a decomposition of every finite order automorphism of $G$.

\begin{prop}\label{prop_decom}
Let $G$ be a simple algebraic group over $k$. Let $\sigma$ be an automorphism on $G$ of finite order. Assume that $\mathrm{char}(k)$ does not divide the order of $\sigma$ and the order of the center of $G^{\eta,0}$, where $\eta$ is a diagram automorphism such that $\bar{\sigma}=\bar{\eta} \in \mathrm{Out}(G)$. Then, we have a decomposition
\[\sigma=\tau\circ \mathrm{Ad}_{t},\]
where $\tau$ is a diagram automorphism preserving a Borel subgroup $B$ and a maximal torus $T$ contained in $B$, and $t=\zeta_{M}^{\lambda}$ for some positive integer $M$ and $\lambda\in X_*(T)^\tau$. In fact, one can take $M=|\sigma|\cdot |Z(G^{\tau,0})|$, where $Z(G^{\tau,0})$ is the center of $G^{\tau,0}$.
\end{prop}

\begin{proof} Suppose that $\sigma^m=1$. We first assume $G$ is adjoint and show that we can choose $M=m$. Then, we write $\sigma=\mathrm{Ad}_g\circ \tau'$, for some diagram automorphism $\tau'$ preserving a Borel subgroup $B'$ and a maximal torus $T'$ contained in $B'$.  By the condition $\sigma^m=1$ and the fact that $G$ is adjoint, we deduce that $g$ satisfies the condition $g\tau'(g)\cdots (\tau')^{m-1}(g)=1$.
Thus, $[g]\in \mathrm{H}^1_{\tau'}(\Gamma, G)$ where $\Gamma$ is the cyclic group of order $m$. By \cref{prop:H1GTW}, there exists $t'\in T'$ such that $[g]=[t']$, with $t'=(\zeta_m)^\lambda$ for some $\lambda\in X_*(T)^{\tau'}$. One may observe that $[g]=[t']$ is equivalent to that, there exists an element $k\in G$, such that $\sigma=\mathrm{Ad}_k \circ \mathrm{Ad}_{t'}\circ \tau'\circ  \mathrm{Ad}_{k^{-1}}$. Thus, $\sigma=\mathrm{Ad}_t\circ \tau $, where $\tau=\mathrm{Ad}_k\circ \tau'\circ \mathrm{Ad}_{k^{-1}}$ is a diagram automrophism preserving $B=\mathrm{Ad}_{k}(B')$ and $T=\mathrm{Ad}_t(T')$, and $t=\mathrm{Ad}_k(t')=\zeta_m^{\lambda}\in T$ with $\lambda$ regarded as an element in $X_*(T)^\tau$.

Now, let $G$ be a simple algebraic group which is not adjoint. Passing to $\bar{G}=G_{\mathrm{ad}}=G/Z(G)$, we can write $\sigma=\mathrm{Ad}_{\bar{t}}\circ \tau $ where $\tau$ preserves a Borel subgroup $\bar{B}$ of $G_{\mathrm{ad}}$ and a maximal torus $\bar{T}$ contained in $\bar{B}$, and $\bar{t}\in \bar{T}^\tau$. Denote by $T$ and $B$ the preimages of $\bar{T}$ and $\bar{B}$ in $G$. Let $\bar{T}_m$ be the subgroup of $\bar{T}$ consisting of those elements $\bar{t}$ such that $\bar{t}^m=1$.
The surjective map $T \mapsto \bar{T}$ induces the surjective morphism $\pi:T^{\tau,0} \to \bar{T}^\tau$,
which restricts to the surjection $T^{\tau,0}_{M} \to \bar{T}^\tau_m$ where $M= m\cdot |Z(G^{\tau,0 })|$, as $\ker(\pi)=Z(G^{\tau,0})$ (see, e.g.,\cite[Corollary 7.6.4 (iii)]{Springer:2009}).  In particular this means that for such an $M$, there exists $t\in T_{M}^{\tau,0}$ such that $\bar{t}$ is the image of $t$ in $\bar{T}$. Moreover, by assumption $\mathrm{char}(k)$ does not divide $M$, hence there exists an $M$-th primitive root of unity $\zeta_{M}$. Observe that the assignment  $\mu \mapsto \zeta_{M}^\mu$ induces a surjective map $X_*(T)^\tau = X_*(T^{\tau,0}) \to T^{\tau,0}_{M}$.  It follows that we can write $t=\zeta_{M}^\lambda$ for some $\lambda\in X_*(T)^\tau$.
Thus, $\sigma=\mathrm{Ad}_t\circ \tau$ on $G$ with $t=\zeta_{M}^\lambda$ for some $\lambda\in X_*(T)^\tau$.
\end{proof}

We then obtain two consequences.

\begin{cor} Let $G$, $k$ and $\sigma$ be as in the assumptions of \cref{prop_decom}. Let $\Gamma$ be a cyclic group whose order $m$ is a multiple of the order of $\sigma$. Decompose $\sigma = \tau \circ \mathrm{Ad}_t$ as in \cref{prop_decom}. The multiplication map $- \cdot t \colon G \to G$ induces a bijection $\xymatrix{G/\!\sim_\sigma \ar[r]^-{\cong} & G/\!\sim_\tau}$. This induces an isomorphism $\xymatrix{\mathrm{H}^1_\sigma(\Gamma,G)  \ar[r]^-{\cong} & \mathrm{H}^1_\tau(\Gamma,G)}$ if and only if $t^{m}=1$.
\end{cor}

\begin{proof} We are only left to show the last assertion. By definition, we have that $a \in \text{Z}^1_\sigma(\Gamma,G)$ is equivalent to $a \sigma(a) \dots \sigma^{m-1}(a)=1$. This amounts to
\begin{align*}1 = a \, t \tau(a) t^{-1} \,  t^2 \tau^2(a) t^{-2} \,  \dots \, t^{m-1}\tau^{m-1}(a) t^{m-1}= (a t) \, \tau(at)\,  \tau^2(at)\, \dots \, \tau^{m-1}(at) t^{m},\end{align*}
so that $at\in \text{Z}^1_\tau(\Gamma,G)$ if and only if $t^m=1$, as claimed.
\end{proof}

\begin{cor}\label{cor_H1}
Let $G$ be an adjoint group, and let the cyclic group $\Gamma$ act on $G$ via the automorphisms $\sigma_1$ and $\sigma_2$. Assume that $\mathrm{char}(k)$ does not divide the order of $\Gamma$. If $\bar{\sigma}_1=\bar{\sigma}_2 \in \text{Out}(G)$, then $\mathrm{H}^1_{\sigma_1}(\Gamma,G)=\mathrm{H}^1_{\sigma_2}(\Gamma,G)$.
\end{cor}

\begin{eg}
Let $\sigma$ be involution on $\textrm{SL}_n$ given by $\sigma(g)=(g^{t})^{-1}$, i.e. the one sending a matrix to the inverse of its transpose. Take $\Gamma=\mathbb{Z}/2\mathbb{Z}$. By linear algebra, $\mathrm{H}^1_\sigma(\Gamma, \textrm{SL}_n)$ consists of one element. It is well-known that when $n=2i+1 $ with $i\geq 1$, then $\sigma$ is a diagram automorphism preserving a Borel subgroup (different from the group of upper-triangular matrices).  We can see that this calculation agrees with the calculation in \cref{eg_diagram}.  When $n=2i$ with $i\geq 1$, the automorphism $\sigma$ is not a diagram automorphism and in this case, we get different cardinalities for $\mathrm{H}_\sigma^1(\Gamma, \textrm{SL}_n)$.

Let $G$ be the group $\textrm{PGL}_n$ and let $\sigma$ be the involution as above. Let $g$ be an invertible matrix in $\textrm{GL}_n$ and denote by $\bar{g}$ is equivalence class in $\textrm{PGL}_n$. The condition $\bar{g}\sigma(\bar{g})=1$ holds if and only if  there exists a non zero scalar $\lambda \in k$ such that $g^t=\lambda g$. This implies that $\lambda^2=1$, thus $\lambda=\pm 1$. If $n=2i+1$, $\lambda=1$, as there is no invertible anti-symmetric matrix. It follows that when $n=2i+1$, $\mathrm{H}_\sigma^1(\Gamma, \textrm{PGL}_n)$ has one element. When $n=2i$, instead, $g$ can be either symmetric or anti-symmetric matrices and this determines two distinct elements of $\mathrm{H}^1_\sigma(\Gamma, \textrm{PGL}_n)$.  Note that the cardinalities of $\mathrm{H}^1$ agree with the calculation in \cref{eg_diagram} and with  \cref{cor_H1}.
\end{eg}

\section{Parahoric group schemes}\label{secct:local}

The main result of this section is to realize every parahoric group scheme through invariant sections of restriction of scalars.

\subsection{Parahoric group schemes from invariants} Throughout this section  $G$ is a simple group over $k$  which is simply connected. Let $\tau$ be a diagram automorphism on $G$ preserving a maximal torus $T$. In view of
\cref{prop:H1GTW} and \eqref{eq:*}, for any $\kappa\in \mathrm{H}^1_\tau(\Gamma, G)$ where $|\Gamma|=m$, we can choose $\kappa=[t]$ for some $t\in T^{\tau}$. We then let $\sigma$ be the automorphism $\tau\circ \mathrm{Ad}_t$. Then $\sigma^m=1$.
 Moreover, $t$ can be written as $\zeta_m^{\lambda}$, for $\lambda \in X_*(T)$.
The group $\Gamma$ acts also on $\mathcal{K}_m$ by $\gamma(z^{\frac{1}{m}})=\zeta_m^{-1}z^{\frac{1}{m}}$. It follows that we can define two actions of $\Gamma$ on the group scheme $G_{\mathcal{K}_m}$, one induced by $\sigma$ and another one by $\tau$. We can then define two group schemes over $\mathcal{K}$, namely \[ G_{\sigma,\mathcal{K}}:=\mathrm{Res}_{\mathcal{K}_m/\mathcal{K}}(G_{\mathcal{K}_m})^\sigma\qquad \text{ and }\qquad G_{\tau,\mathcal{K}}:=\mathrm{Res}_{\mathcal{K}_r/\mathcal{K}}(G_{\mathcal{K}_r})^\tau,\]
whose global sections are contained in $G(\mathcal{K}_m)$.

We now show that these group schemes are naturally isomorphic. This can be interpreted as a group version of the Lie algebra isomorphism between $\mathfrak{g}(\mathcal{K}_r)^\tau$ and $\mathfrak{g}(\mathcal{K}_m)^\sigma$ (see e.g. \cite[Chapter 8]{kac:1990:infinite}). The key ingredient is to explicitly relate the two actions $\sigma$ and $\tau$ on $G_{\mathcal{K}_m}$. Choose an isomorphism between $X_*(T)$ and $\mathbb{Z}^\ell$ so that the element $\lambda$ corresponds to $(\lambda_1, \dots, \lambda_\ell)$. Similarly, we identify the torus $T$ with $\mathbb{G}_{\mathrm{m}}^\ell$ and let $z^\theta$ denote the element of $T(\mathcal{K}_m)$ given by $(z^{\frac{\lambda_1}{m}}, \dots, z^{\frac{\lambda_\ell }{m}})$. In fact, $\theta=\frac{\lambda}{m}\in \frac{1}{m}X_*(T)$.

\begin{prop} \label{prop:kacgroup} The map $\mathrm{Ad}_{z^\theta}$ induces an isomorphism of group schemes
\[ \xymatrix{\mathrm{Res}_{\mathcal{K}_r/\mathcal{K}}(G_{\mathcal{K}_r})^\tau \, \ar[r]^-{\cong} & \mathrm{Res}_{\mathcal{K}_m/\mathcal{K}}(G_{\mathcal{K}_m})^\sigma}.\]
\end{prop}

\begin{proof}
Let $\Gamma$ be the Galois group ${\rm Gal}(\mathcal{K}_m/\mathcal{K})$ with a generator $\gamma$.  After the base change, we have the following isomorphism
\[ \mathrm{Res}_{\mathcal{K}_r/\mathcal{K}}(G_{\mathcal{K}_r})\times_{\mathcal{K}} \mathcal{K}_m\cong G_{\mathcal{K}_m}, \]
where the Galois group $ \Gamma$ acting on $\mathrm{Res}_{\mathcal{K}_r/\mathcal{K}}(G_{\mathcal{K}_r})\times_{\mathcal{K}} \mathcal{K}_m$ corresponds to the action of $\gamma$ on $G_{\mathcal{K}_m}$ given by combining $\tau$ on $G$ and the field automorphism $t\mapsto \zeta_m^{-1}t$.
Similarly, we have
\[ \mathrm{Res}_{\mathcal{K}_m/\mathcal{K}}(G_{\mathcal{K}_m})\times_{\mathcal{K}} \mathcal{K}_m\cong G_{\mathcal{K}_m}, \]
where the Galois group action corresponds to $\gamma$ acts on $ G_{\mathcal{K}_m}$ given by combining $\sigma$ on $G$, and the field automorphism as above.
One may check easily that the automorphism $\mathrm{Ad}_{z^\theta}: G_{\mathcal{K}_m}\cong G_{\mathcal{K}_m}$ intertwines with the two actions given above. By Galois descent, we obtain the isomorphism
$ \xymatrix{\mathrm{Res}_{\mathcal{K}_r/\mathcal{K}}(G_{\mathcal{K}_r})^\tau \, \ar[r]^-{\cong} & \mathrm{Res}_{\mathcal{K}_m/\mathcal{K}}(G_{\mathcal{K}_m})^\sigma}$.
\end{proof}

\begin{theorem}
\label{thm_local}
Let $\sigma$ be an automorphism on $G$ arising from a class $\kappa\in \mathrm{H}^1_\tau(\Gamma, G)$ as above.
Under the isomorphism of  \cref{prop:kacgroup}, the group scheme $\mathrm{Res}_{\mathcal{O}_m/\mathcal{O}}(G_{\mathcal{O}_m})^\sigma$ is isomorphic to the parahoric group scheme $\mathcal{G}_{\theta}$, where $\theta=\frac{\lambda}{m}$.
\end{theorem}

\begin{proof}
Let $B$ be the Borel subgroup preserved by $\tau$ which contains $T$. Let $B^-$ be the opposite Borel subgroup of $B$. Let $U^\pm$ be the unipotent radical of $B^\pm$. It is well-known that the multiplication $U^-\times U\times T\to G $ is an open embedding of varieties over $k$. It induces an open embedding of their jet schemes as pro-varieties over $k$:
\[ U^-(\mathcal{O}_m)\times U(\mathcal{O}_m)\times T(\mathcal{O}_m) \to G(\mathcal{O}_m).    \]
By taking $\sigma$-invariants, we get an open embedding:
\[    U^-(\mathcal{O}_m)^\sigma \times U(\mathcal{O}_m)^\sigma\times T(\mathcal{O}_m)^\sigma \to G(\mathcal{O}_m)^\sigma. \]
Since $G$ is simply-connected, $G^\sigma$ is a connected simple algebraic group, cf. \cite{steinberg:1968:endomorphisms}. Thus, $G(\mathcal{O})^\sigma$ is also a connected pro-algebraic group over $k$. As a consequence, $U^-(\mathcal{O}_m)^\sigma, U(\mathcal{O}_m)^\sigma$ and $T(\mathcal{O}_m)^\sigma  $ generate $G(\mathcal{O})^\sigma $.

Via the isomorphism $\mathrm{Ad}_{z^\theta}: G_{\tau,\mathcal{K}} \cong  G_{\sigma,\mathcal{K} }$ given in \cref{prop:kacgroup}, we can identify the relative root systems for $G_{\tau, \mathcal{K}}$ and $G_{\sigma, \mathcal{K}}$. For any relative root $a\in \mathcal{R}$, $\mathcal{U}_a$ denotes the root subgroup in $G_{\tau, \mathcal{K}}$ and we denote $\mathcal{U}'_a$ the associated root subgroup in $G_{\sigma, \mathcal{K}}$. Moreover, there is a natural valuation structure on $\mathcal{U}'_a$. Using the description of the root subgroups given in \cref{sec:parahoric} and the analogue for $\mathcal{U}_{a}'$, by direct calculation we have for any $a\in \mathcal{R}$ the identification
\[ \mathrm{Ad}_{z^\theta} ( \mathcal{U}_{a, -\theta(a)} )= \mathcal{U}'_{a, 0}.    \]
Moreover,  $\mathrm{Ad}_{z^\theta}(T(\mathcal{O}_r)^\tau )= T(\mathcal{O}_m)^\sigma$. Let $\mathcal{P}^\pm_\theta$ be the subgroup of $\mathcal{P}$ generated by $\{\mathcal{U}_{a, -\theta(a)}  \,: \,  a\in \mathcal{R}^\pm \}$. Then, $\mathrm{Ad}_{z^\theta}( \mathcal{P}^\pm_\theta)=U^\pm(\mathcal{O}_m)^\sigma$.

It follows that $\mathrm{Ad}_{z^\theta}(  \mathcal{P}_\theta)= G(\mathcal{O}_m)^\sigma$. In view of \cite[I.7.6]{bruhat.tits:1984:II}, the isomorphism $\mathrm{Ad}_{z^\theta} \colon G_{\tau,\mathcal{K}}\cong G_{\sigma, \mathcal{K}}$ uniquely extends to an isomorphism $\mathcal{G}_\theta\cong {\rm Res}_{\mathcal{O}_m/\mathcal{O} }(G_{\mathcal{O}_m })^\sigma$.
\end{proof}

\begin{rmk} \label{rmk:adjoint}In the assumptions above, We have assumed that $G$ is simply connected, so that we can ensure that $G^\sigma$ and $G(\mathcal{O})^\sigma$ are connected. When $G$ is not simply connected, this property doesn't automatically hold, but it will depend on the type of the group $G$. When $G$ is adjoint and $\tau$ has order $2$ (resp. $3$), this will be the case when $G$ is of type $A_{2\ell}$ or $E_6$ (resp. $D_4$), cf.\,\cite[9.8]{steinberg:1968:endomorphisms}. So in these cases, \cref{thm_local} also holds when $G$ is of adjoint type.  \end{rmk}

In the above, we consider the automorphism $\sigma$ arising from a class $\kappa\in \mathrm{H}^1_\tau(\Gamma, G)$. In fact, more generally we have the following consequence.

\begin{cor}\label{cor:parahoric}
Let $G$ be a simply-connected simple algebraic group with a finite order automorphism $\sigma$ such that $\sigma^m=1$. Let $\eta$ be a diagram automorphism such that $\bar{\sigma}=\bar{\eta} \in \mathrm{Out}(G)$ and assume that $\mathrm{char}(k)$ does not divide $m\cdot |Z(G^{\eta})|$. Then ${\rm Res}_{\mathcal{O}_m/\mathcal{O}}(G_{\mathcal{O}_m})^\sigma$ is a parahoric group scheme.
\end{cor}
\begin{proof}
By  \cref{prop_decom} and its proof, we are able to write $\sigma=\tau\circ \mathrm{Ad}_t$ for some diagram automorphism $\tau$ preserving a maximal torus $T$, $t\in T$ and $t^{M}=1$ for a multiple $M$ of $m$. In view of  \cref{thm_local}, ${\rm Res}_{\mathcal{O}_{M}/\mathcal{O}}( G_{\mathcal{O}_{M} }  )^{\tilde{\Gamma}}$ is a parahoric group scheme over $\mathcal{O}$, where $\tilde{\Gamma}$ is a cyclic group of order $M$ with the generator $\tilde{\gamma}$ acts on $G$ by $\sigma$ and on $\mathcal{M}$ by $\tilde{\gamma}(t^{\frac{1}{M}})= \zeta_M^{-1}t^{\frac{1}{M}}$. We denote the cyclic group $\Gamma$ with generator $\gamma$ acts on $G$ by $\sigma$ and on $\mathcal{O}_m$ similarly.
We claim that there is an isomorphism of group schemes over $\mathcal{O}$
\[ {\rm Res}_{\mathcal{O}_{M}/\mathcal{O}}( G_{\mathcal{O}_{M} }  )^{\tilde{\Gamma}} \cong  {\rm Res}_{\mathcal{O}_{m}/\mathcal{O}}( G_{\mathcal{O}_{m} }  )^{\Gamma} . \]
For convenience, we only show their $\mathcal{O}$-points agree, the argument for general algebra $A$ over $\mathcal{O}$ will be similar.
For $\mathcal{O}$-points, it suffices to check there is a bijection $G(\mathcal{O}_M)^{\tilde{\Gamma}}\cong G(\mathcal{O}_M)^{\Gamma}$. Let $k[G]$ be the coordinate ring of $G$. It suffices to show that for any $\tilde{\Gamma}$-equivariant ring homomorphism $\phi:k[G]\to \mathcal{O}_M$, the image lands in $\mathcal{O}_m$. Note that the action of $\tilde{\gamma}$ on $k[G]$ coincides with the action of $\gamma$ on $k[G]$. Then, for any $f\in k[G]$, $\phi(f)= \phi(\tilde{\gamma}^{m}\cdot f)=\tilde{\gamma}^m \phi(f)$, i.e. $\phi(f)$ is $\tilde{\gamma}^m$-invariant. It forces $\phi(f)\in \mathcal{O}_m$.
This completes the proof of our corollary.
\end{proof}

\subsection{Matching with Bruhat--Tits building of $G(\mathcal{K}_r)^\tau$}
We assume $G$ is simply-connected. Following \cite{Tits:1979}, we describe the chamber of Bruhat--Tits of the twisted loop group $G(\mathcal{K}_r)^\tau$ for the maximal split $\mathcal{K}$-torus $T^\tau\times_k \mathcal{K}$, and the corresponding affine Weyl group action. The chamber corresponding to $T^\tau\times_k \mathcal{K}$ is  given by $X_*(T)^\tau_{\mathbb{R}}$. The group $W^\tau$ can be regarded as the Weyl group of the relative root systems corresponding to $T^\tau\times_k \mathcal{K}$. The translation part comes from $T(\mathcal{K}_r)^\tau/ T(\mathcal{O}_r)^\tau$. Note that there is a natural identification  $X_*(T)_\tau\cong T(\mathcal{K}_r)^\tau/ T(\mathcal{O}_r)^\tau$ given by $\bar{\lambda}\mapsto \prod_{i=0}^{r-1} \tau^i(t^{\frac{\lambda}{r} })$ for any $\bar{\lambda}\in X_*(T)_\tau$,  where $\lambda$ is a representative of $\bar{\lambda}$ in $X_*(T)$ \cite[Section 2.3]{Besson-Hong:2020}.  Then the translation lattice on the chamber $X_*(T)^\tau_\mathbb{R}$ is exactly given by $\mathsf{Av}_r(X_*(T))$.

Given an element $\theta\in X_*(T)^\tau_\mathbb{Q}$, let $m$ be the minimal positive integer such that $\theta\in \frac{1}{m} X_*(T)^\tau$. We write $\theta=\frac{\lambda}{m}$ for some $\lambda\in X_*(T)^\tau$ and set $\sigma= \tau\circ \mathrm{Ad}_{\zeta_m^\lambda}$ for some $m$-th primitive root $\zeta_m$ of unity. The following corollary  follows from \cref{thm_local}.
\begin{cor}\label{cor:BT}
If $\mathrm{char}(k)$ does not divide $m$, then there exists an isomorphism of group schemes
\[ \mathrm{Res}_{\mathcal{O}_r/\mathcal{O} }( G_{\mathcal{O}_r } )^\sigma \cong \mathcal{G}_\theta,  \]
where $\mathcal{G}_\theta$ is the parahoric group scheme corresponding to $\theta$.
\end{cor}

From the Bruhat--Tits theory, parahoric group schemes are determined by facets, i.e. any interior points of a given facet give rise to the same parahoric group scheme. From this corollary, we can try to find an interior point in a given facet such that $m$ is minimal. Thus, the restriction of the characteristic $p$ can be very small.

\begin{rmk}
Let $\mathcal{G}$ be a special parahoric group scheme over $\mathcal{O}$ of type $X_N^{(r)}$ with $r>1$. Here, ``special'' refers to that the parahoric group schemes correspond to special vertices of Bruhat--Tits building of $G(\mathcal{K}_r)^\tau$. When $X_N^{(r)}\not= A_{2\ell}^{(2)}$, the parahoric group scheme $\mathcal{G}$ is isomorphic to $ {\rm Res}_{\mathcal{O}_{r}/\mathcal{O}}( G_{\mathcal{O}_{r} }  )^\sigma $ where $\sigma$ is a diagram automorphism of order $r$. When $X_N^{(r)}=A_{2\ell}^{(2)}$, there are two special parahoric group schemes which are not isomorphic. One of them can be realized using a diagram automorphism of order $2$,  while another one can be realized by a standard automorphism of order $4$, see \cite{Besson-Hong:2020,Hong-Yu:2022}.
\end{rmk}

\section{$(\Gamma,G)$-bundles} \label{sec:localtypes}

\subsection{\texorpdfstring{$(\Gamma,G)$}{(Gamma-G)}-bundles and their local types} We recall in this section the notion of $(\Gamma,G)$-bundles, following \cite{balaji.seshadri:2015:moduli, damiolini:2021:equivariant}. Let $\Gamma$ be a finite group acting on a smooth and projective curve $C$. Assume further that $G$ is an affine group scheme over $k$ and fix an action of $\Gamma$ on $G$ via $\rho \colon \Gamma \to \text{Aut}(G)$. Throughout we will assume that $G$ is smooth and that the characteristic of $k$ does not divide $|\Gamma|$.

\begin{defi} A $(\Gamma,G)$-bundle is the data of a right $G$-bundle $\mathcal{E}$ over $C$ together with a left action of $\Gamma$ on its total space, lifting the action of $\Gamma$ on $C$, and compatible with the action of $\Gamma$ on $G$.\end{defi}

\begin{rmk} One can similarly define a $(\Gamma,G)$-bundle as being a left $G$-bundle with a right action of $\Gamma$ on its total space. It will be clear from the context which version we are going to use.
\end{rmk}

More explicitly, on every $\Gamma$-equivariant open set $U \subseteq C$ on which $\mathcal{E}$ is trivial as a $G$-bundle, we can express the compatibility condition as follows. Let $1 \in \mathcal{E}(U)$ define a trivialization of $\mathcal{E}$, then for all $\gamma \in \Gamma$ and $g \in G(U)$ we require that
\begin{equation}\label{eq:compatibility} \gamma(1 \cdot g) = \gamma(1) \cdot \rho_\gamma(g).
\end{equation} This in particular tells us that the action of $\Gamma$ on $\mathcal{E}$ is uniquely determined by the action of $\Gamma$ on the preferred section $1$ and the fixed action of $\Gamma$ on $G$ by $\rho$.

We now consider the case in which $U$ is replaced by the disk $\mathbb{D}_x=\mathrm{Spec}(k[\![z_x]\!])$ around a point $x \in C$. The stabilizer $\Gamma_x$ of $x \in C$ is a cyclic group, denote its generator by $\gamma_x$, and denote by $m_x$ its order. Then, on the formal disk $\mathbb{D}_x$ about $x$ the element $\gamma_x$ acts multiplying the local coordinate $z_x$ by a primitive $m_x$-th root of unity. Any $(\Gamma,G)$-bundle $\mathcal{E}$ on $C$ trivializes, as a $G$-bundle, over $\mathbb{D}_x$. Fixing a trivialization induced by the element $1 \in \mathcal{E}(\mathbb{D}_x)$, we deduce from \eqref{eq:compatibility} and from $\gamma_x^{m_x}=e$, that $\gamma_x(1)$ needs to satisfy the cocycle condition
\[\gamma_x(1) \rho_\gamma(\gamma_x(1)) \cdots \rho_\gamma^{m_x-1}(\gamma_x(1)) =1.
\] Changing the trivialization to $1' \in \mathcal{E}(\mathbb{D}_x)$, we obtain that
\[\gamma_x(1') = a \cdot  \gamma_x(1) \cdot \rho_\gamma^{-1}(a).
\] for $a \in G(\mathbb{D}_x)$ such that $1=1'\cdot a$.  It follows that isomorphism classes of $(\Gamma_x,G)$-bundles on $\mathbb{D}_x$ are described by the non abelian cohomology $\mathrm{H}^1(\Gamma_x,G(\mathbb{D}_x))$, where we view $G(\mathbb{D}_x)$ as a $\Gamma_x$-module through the combined actions of $\Gamma_x$ on $\mathbb{D}_x$ and on $G$ (via $\rho$).

Similarly to \cite[Lemma 2.5]{teleman.woodward:2003:parabolic}, we have the following statement.

\begin{prop} \label{prop:twgen} The closed embedding $x \to \mathbb{D}_x$ (or equivalently the evaluation map $k[\![z_x]\!] \to k$ given by $z_x \mapsto 0$), induces an isomorphism $\mathrm{H}^1(\Gamma_z,G(\mathbb{D}_x)) \cong \mathrm{H}^1(\Gamma_x,G(k))$. In particular, isomorphism classes of $(\Gamma_x,G)$-bundles on $\mathbb{D}_x$ are in bijection with $\mathrm{H}^1(\Gamma_x,G(k))$.
\end{prop}

\begin{proof} It is enough to show that the evaluation map induces an injection of $\mathrm{H}^1(\Gamma_z,G(\mathbb{D}_x))$ into $\mathrm{H}^1(\Gamma_x,G(k))$ since this map is already surjective. This is a consequence of \cite[Proposition 2.9]{damiolini:2021:equivariant}. \end{proof}

Using the same terminology introduced by \cite{balaji.seshadri:2015:moduli} and used also in \cite{damiolini:2021:equivariant}, we define the concept of local type in cohomological terms.

\begin{defi}\label{def:localtype} For every $(\Gamma,G)$-bundle $\mathcal{E}$ on $C$ and $x \in C$ with stabilizer $\Gamma_x$, we call \textit{local type} of $\mathcal{E}$ at $x$ the element $\kappa \in \mathrm{H}^1(\Gamma_x,G):=\mathrm{H}^1(\Gamma_x,G(k))$ which corresponds to the isomorphism class of $\mathcal{E}$ on $\mathbb{D}_x$ via \cref{prop:twgen}.\end{defi}

\begin{rmk} \label{rmk:localtypesgamma} Observe that for all $\gamma \in \Gamma$ and $x \in C$ one has that $\Gamma_{\gamma(x)} = \gamma \Gamma_x \gamma^{-1}$. Moreover, if an element $\kappa \in\mathrm{H}^1(\Gamma_x,G)$ describes the local type of the $(\Gamma,G)$-bundle $\mathcal{E}$ around $x$, this uniquely determines the element $\gamma(\kappa) \in\mathrm{H}^1(\Gamma_{\gamma(x)},G)$ corresponding to the local type of $\mathcal{E}$ around $\gamma(x)$. Thus, specifying the local type of $\mathcal{E}$ at $x$ automotically specifies the local type of $\mathcal{E}$ at all the points in the same orbit of $x$. \end{rmk}

\subsubsection{Patching} We can use the main theorem of  \cite{beauville.laszlo:descent}, to show that $(\Gamma,G)$-bundles on $C$ can be obtained by patching together local $(\Gamma,G)$-bundles. The covering that we will use consists of the complement of the ramification locus $R$ of the action of $\Gamma$ on $C$, and of formal neighborhoods $\mathbb{D}_x$ about every point $x \in R$. We begin with the following result:

\begin{lemma} \label{lem:trivialGGamma} Let $\mathcal{E}$ be a $(\Gamma,G)$-bundle on $C$. Let $U = C \setminus R$ be the complement of the ramification locus of the action of $\Gamma$ on $C$. Then the restriction of $\mathcal{E}$ to $U$ is isomorphic to the trivial $(\Gamma,G)$-bundle over $U$. \end{lemma}

\begin{proof} In view of \cite[Theorem 3.1]{damiolini:2021:equivariant} it is enough to show that $\pi_*(\mathcal{E})^\Gamma$ is the trivial $\pi_*(G\times U)^\Gamma$-bundle on the quotient curve $U/\Gamma$. Since U does not contain any ramification point, we deduce from \cite[Proposition 2.9]{damiolini:2021:equivariant} that $\pi_*(\mathcal{E})^\Gamma$ is a $\pi_*(G\times U)^\Gamma$-bundle. Moreover, the group $\pi_*(G\times U)^\Gamma$ is a parahoric Bruhat--Tits group over the affine curve $U/\Gamma$, hence \cite[Theorem 1]{heinloth:2010:uniformization} guarantees that $\pi_*(\mathcal{E})^\Gamma \cong \pi_*(G\times U)^\Gamma$, concluding the argument.
\end{proof}

\begin{rmk} The idea underlying the proof of the above result can be found also in the proof of  \cite[Lemma 3.1]{hong.kumar:2022}. \end{rmk}

The following result tells us that we can reconstruct $(\Gamma,G)$-bundles from local types at the ramification points.

\begin{prop} \label{prop:nonempty}
Let $C$ be a smooth and projective curve with a $\Gamma$ action and $\rho \colon \Gamma \to \text{\rm Aut}(G)$ be a group homomorphism. Let $R \subset C$ be the ramification locus for the action of $\Gamma$. Choose $S=\{x_1, \dots, x_s\} \subseteq R$ such that $R = \sqcup_{x_i \in S} \Gamma x_i$ and, for every $x \in S$ choose an element $\kappa_{x} \in \mathrm{H}^1(\Gamma_{x}, G)$. Then there exists a unique $(\Gamma,G)$-bundle over $C$ with local types $\gamma(\kappa_{x})$ at every point $\gamma(x) \in R$ with $x \in S$ and $\gamma \in \Gamma$.
\end{prop}

\begin{proof} In view of \cref{rmk:localtypesgamma} it is enough to show that there exists a unique $(\Gamma,G)$-bundle over $C$ with local types $\kappa_{x}$ at every point $x \in S$. From Proposition \cref{prop:twgen} we know that $\kappa_{x}$ extends uniquely to an element of $\mathrm{H}^1(\Gamma_{x}, G(\mathbb{D}_x))$, and this defines an isomorphism class of $(\Gamma,G)$-bundles on the disjoint union $\sqcup_{\gamma \in \Gamma/\Gamma_x} D_{\gamma(x)}$ of the prescribed local type. On the open curve $U=C \setminus R$, we take the trivial $(\Gamma,G)$-bundle $U \times G$. For these data to give rise to a $(\Gamma,G)$-bundle on the whole curve $C$, it is enough to show that $\mathrm{H}^1(\Gamma_x,G(\mathbb{D}_x^\times))$ is trivial. Rewriting this in terms of Galois cohomology, this equals $\mathrm{H}^1(\mathcal{K}_{m_x}/\mathcal{K}, \mathcal{G}(\mathcal{K}_{m_x}))$, where $\mathcal{G}:=(\mathrm{Res}_{\mathcal{K}_{m_x} / \mathcal{K}}(G))^{\Gamma_x}$ is a smooth and connected group over $\mathrm{Spec}(\mathcal{K})$. Here we have used the notation $\mathbb{D}_x^\times = \mathrm{Spec}(\mathcal{K}_{m_x}) = \mathrm{Spec}(k(\!( z^{{1}/{m_x}})\!))$ and $\mathrm{Spec}(\mathcal{K}) = \mathrm{Spec}(k(\!(z)\!))$. Note that, for every extension $L$ of $\mathcal{K}_{m_x}$ we have $\mathcal{G}(\mathcal{K}_{m_x})=\mathcal{G}(L)$ because the action of $\text{Gal}(L/K)$ on $G$ factors through the action of $\Gamma_x$. It is then enough to show that the absolute Galois cohomology $\mathrm{H}^1(\mathcal{K}, \mathcal{G})=0$, and this follows from \cite[page 484]{borel.springer:1968:rationalityII}.
\end{proof}

\subsection{Components of $\mathrm{Bun}_{\Gamma,G}$}
Let $C$ be a smooth and projective curve on which the finite group $\Gamma$ acts and assume that $\Gamma$ acts on the group $G$. We focus here on the moduli stack $\mathrm{Bun}_{\Gamma, G}$ of $(\Gamma, G)$-bundles on $C$.

As in the statement of \cref{prop:nonempty}, let $S=\{x_1,\cdots, x_s\}$ be a subset of the ramification locus $R$ such that $R=\sqcup_{i=1}^s \Gamma x_i$. Further denote by $\Gamma_i$ the stabilizer groups at $x_i$.  For every $x_i \in S$, choose an element $\kappa_i\in \mathrm{H}^1(\Gamma_i, G)$ and denote by $\vec{\kappa}$ the $s$-tuple $(\kappa_1, \dots, \kappa_s)$. Denote by $\mathrm{Bun}_{\Gamma, G, \vec{\kappa}}$ the moduli stack of $(\Gamma, G)$-bundles on $C$ with local types $\vec{\kappa}$ at $\vec{x}$.  It follows from  \cref{prop:nonempty} that $\mathrm{Bun}_{\Gamma, G, \vec{\kappa}}$ is always non-empty.  Moreover, by \cite{damiolini:2021:equivariant},     $\mathrm{Bun}_{\Gamma, G, \vec{\kappa}}$ is isomorphic to $\mathrm{Bun}_{\mathcal{G}_{\vec{\kappa}} }$,  where
\[\mathcal{G}_{\vec{\kappa}}={\rm Aut}_{\Gamma,G}(\mathcal{E}),\]
for a $(\Gamma, G)$-bundle $\mathcal{E}$ in $\mathrm{Bun}_{\Gamma, G, \vec{\kappa}}$.

 \begin{theorem}\label{thm_comp}
 If $G$ is simply-connected, then
 the group scheme $\mathcal{G}_{\vec{\kappa}}$ is a parahoric Bruhat--Tits group scheme over $\bar{C}=C/\Gamma$. In particular, $\mathrm{Bun}_{\Gamma, G, \vec{\kappa}}$ is connected, hence \begin{equation*}  \mathrm{Bun}_{\Gamma,G} = \sqcup_{\vec{\kappa}} \mathrm{Bun}_{\Gamma,G,\vec{\kappa}}.
\end{equation*}
 \end{theorem}

 \begin{proof}
Let $\gamma_i$ be a generator of $\Gamma_i$. Then the local type $\kappa_i=[t_i]\in \mathrm{H}^1(\Gamma_i,G)$ gives rise to a finite order automorphism $\sigma_i:=\mathrm{Ad}_{t_i}\circ \gamma_i$ on $G$. By
\cref{prop:twgen}, $\mathrm{H}^1(\Gamma_i, G)\cong \mathrm{H}^1(\Gamma_i, G(\mathbb{D}_{x_i}))$.
Fix any $\mathcal{E}\in \mathrm{Bun}_{\Gamma,G, \vec{\kappa}}$. Then, $[\mathcal{E}|_{\mathbb{D}_{x_i}}]\in H^1(\Gamma_x, G(\mathbb{D}_x ))\cong H^1(\Gamma_x, G)$ (by \cref{prop:twgen}). It actually means that $\mathcal{E}|_{\mathbb{D}_{x_i}}$ is isomorphic to the $(\Gamma_x, G)$-bundle $\mathcal{E}^\circ_i:=\mathbb{D}_{x_i}\times G$, which is a trivial $G$-bundle and the action of  $\gamma_i$ is given by $(z, g)\mapsto (\gamma_x(z), t_i\gamma_i(g))$. This implies that
\[ {\rm Aut }_{\Gamma_i,G}(\mathcal{E}|_{\mathbb{D}_{x_i} })\cong {\rm Aut}_{\Gamma_i,G}(\mathcal{E}^\circ_i)\cong {\rm Res}_{\mathbb{D}_{x_i}/\mathbb{D}_{\bar{x}_i} }( G_{\mathbb{D}_{x_i}} )^{\sigma_i},  \]
where $\bar{x}_i$ is the image of $x_i$ under the projection map $C \to C/\Gamma$.
By
\cref{cor:parahoric}, ${\rm Aut }_{\Gamma_i,G}(\mathcal{E}|_{\mathbb{D}_{x_i} })$ is a parahoric group scheme. Thus, $\mathcal{G}_{\vec{\kappa}}={\rm Aut}_{\Gamma,G}(\mathcal{E})$ is a parahoric Bruhat--Tits group scheme over $\bar{C}$.

The second statement follows from  \cite[Theorem 2]{heinloth:2010:uniformization}.
 \end{proof}

\begin{eg}
We now assume that $\Gamma=\langle \gamma \rangle$ is a cyclic group of order $r$ and its generator acts on $G$ by a diagram automorphism of order $r$ as well. Let $s$ be the number of ramified points for the action of $\Gamma$ on $C$. We combine  \cref{thm_comp} and \cref{eg_diagram} to show that
\begin{itemize}
    \item if $(G,r)  \in \{(A_{2\ell-1},2), (D_{\ell+1},2), (E_6,2), (D_4,3) \}$ then $\mathrm{Bun}_{\Gamma,G}$ has $2^s$ connected components;
    \item if $(G,r) = (A_{2\ell},2)$, then $\mathrm{Bun}_{\Gamma,G}$ has only one component.
\end{itemize}
Finally, when $\Gamma$ is trivial, then $\mathrm{Bun}_{\Gamma,G}=\mathrm{Bun}_{G}$, which is connected. This can also be seen directly from \cref{thm_comp} and \cref{lemma:alcove}.\end{eg}

\begin{eg} Assume that the group $\Gamma\cong \mathbb{Z}/2\mathbb{Z}$ acts trivially on $G=\textrm{SL}_{n}$. Let $s$ be the number of ramified points for the action of $\Gamma$ on $C$. Then we deduce from \cref{thm_comp} and \cref{eg:tautrivial} that the stack $\mathrm{Bun}_{\mathbb{Z}/2\mathbb{Z},\textrm{SL}_{n}}$ has $\left\lceil \frac{n+1}{2}\right\rceil^s$ connected components.
\end{eg}

\begin{eg} We can construct explicitly a $(\Gamma, G)$-bundle which has different local types than the trivial $(\Gamma, G)$-bundle.  Let $\mathcal{E}$ be the following $(\Gamma, G)$-bundle:  $\mathcal{E}=C\times G$. Fix a $\gamma$-invariant element $t \neq 1$ in $G$ such that $t^2=1$.  $G$ acts on $\mathcal{E}$ on the right, and $\gamma(p, x)= (\gamma(p), t\gamma(x))$.  Then, the local type of $\mathcal{E}$ at a ramified point is given by $[t]\in \mathrm{H}^1(\Gamma, G)$. When $G$ is of type $A_{2\ell-1}$, we can find an element $t$ such that $[t]$ is not trivial. For example,  we can take $t=\alpha^\vee_\ell(-1)$, where $\alpha^\vee_\ell$ is the $\ell$-th simple coroot, regarded as a cocharacter of the maximal torus $T$.
 \end{eg}

\section{Parahoric Bruhat--Tits group schemes arising from coverings} \label{sec:BTfromcoverings}

\subsection{Reductive group schemes over curves}

In this section we denote by $\mathcal{G}$ a smooth and simple group scheme over an algebraic curve $C$. i.e. the group $\mathcal{G}$ is smooth over $C$ and every geometric fiber is a simple group. Let $G$ be the simple group over $k$ with the same root datum as one geometric fiber of $\mathcal{G}$ and let $G_{C}$ denote its pullback to $C$.  Let $\mathcal{E}:=\mathcal{I}\textit{so}(G_{C}, \mathcal{G})$ denote the scheme over $C$ classifying the group scheme isomorphisms from $G_{C}$ to $\mathcal{G}$ over $C$. In view of the following result, $\mathcal{E}$ is a right ${\rm Aut}(G)$-bundle.

\begin{lemma}
\label{equiv_lem_1}\cite[Corollaire 1.17, Exposé XXIV]{SGA3:volIII}
There exists an equivalence between the category $\mathrm{Form}(G)_C$ of forms of $G$ over $C$, and the category   ${\mathrm{Bun}}_{{\mathrm{Aut}}(G), C} $ of ${\rm Aut}(G)$-bundles over $C$, given by $G' \mapsto {\mathcal{I}\textit{so}}(G_C, G')$.  The inverse is given by $\mathcal{F} \mapsto G_\mathcal{F}:= \mathcal{F} \times^{\mathrm{Aut}(G)}G$.
\end{lemma}

Let $\mathcal{E}^\circ$ denote a connected component of $\mathcal{E}$ and denote by $\widetilde{C}$ the quotient  $\mathcal{E}^\circ/G_{\mathrm{ad}}$. Then, $\widetilde{C}$ is a connected \'etale covering over $C$, and $\widetilde{C}$ is a component of the quotient $\mathcal{E} / G_{\mathrm{ad}} $. The finite group ${\rm Out}(G)$ acts on $\mathcal{E}/ G_{\mathrm{ad}}$ naturally on the right and we define $\Gamma$ to be the subgroup of ${\rm Out}(G)$ which stabilizes the component $\widetilde{C}$.  Then,  $\pi \colon  \widetilde{C} \to C$ is a $\Gamma$-covering. We summarize the above notation in the diagram below.

\[
  \begin{tikzcd}
  \mathcal{G} \arrow[d] & \mathcal{E} \arrow{dl}[near start]{{\small \mathrm{Aut}_G\text{-bundle}}} \arrow[r, hookleftarrow]& \mathcal{E}^\circ \arrow{d}{\small G_{\mathrm{ad}}\text{-bundle}} \\
  C \arrow[leftarrow]{rr}{\pi} &&\widetilde{C}=\mathcal{E}^\circ/G_\mathrm{ad}
\end{tikzcd}
\]

We recall the following fact from étale descent along torsors.
\begin{lemma} \cite{vistoli:descent}
\label{lem:descentG}
Let $\pi\colon \widetilde{C} \to C$ be an \'etale $\Gamma$-covering of algebraic curves for some finite group $\Gamma$.
There is an equivalence between the category of smooth group schemes over $C$ and smooth $\Gamma$-group schemes over the $\Gamma$-curve $\widetilde{C}$, where the pullback functor $\pi^*$ and the $\Gamma$-invariant direct image $\pi_*^\Gamma$ are inverse to each other.
\end{lemma}

 We now fix a splitting
  \begin{equation}
  \label{eq:splitting}
   \iota: {\rm Out}(G)\to  {\rm Aut}(G)\end{equation}
   preserving a Borel subgroup $B$ and a maximal torus $T$ contained in $B$.  This gives rise to a group homomorphism $\phi_\iota \colon \Gamma \to {\rm Aut}(G)$.  It then follows that $\mathcal{E}^\circ$ is a $(\Gamma,G_{\mathrm{ad}})$-bundle over $\widetilde{C}$, where the action of $\Gamma$ is on the right and the action of $G_\mathrm{ad}$ is on the left.

   We now denote by $G_{\mathcal{E}^\circ}$ the group scheme over $\widetilde{C}$ associated to the $G_\mathrm{ad}$-bundle $\mathcal{E}^\circ$, namely $G_{\mathcal{E}^\circ}:= \mathcal{E}^\circ\times^{G_{\mathrm{ad}}} G $, where $G_{\mathrm{ad}}$ acts on $G$ by conjugation. The group scheme $G_{\mathcal{E}^\circ}$, together with the induced $\Gamma$-action, is a group scheme over $\widetilde{C}$ which is equipped with an action of $\Gamma$ compatible with that on $\widetilde{C}$.

\begin{lemma}
\label{lem:reductive} Under the above assumptions, there exists a natural isomorphism of group schemes over $C$
\[   \mathcal{G} \cong \pi_*( G_{\mathcal{E}^\circ} )^\Gamma. \]
\end{lemma}

\begin{proof} The map $\widetilde{C} \to C$ is a torsor for the group $\Gamma$, hence by \cref{lem:descentG} it is enough to check that $\pi^*\mathcal{G} \cong G_{\mathcal{E}^\circ}$.

Since $\widetilde{C}=\mathcal{E}^\circ/G_{\mathrm{ad}}$, this can be further reduced to show that there exists an $G_{\mathrm{ad}}\rtimes \Gamma$-equivariant isomorphism between  $\mathcal{E}^\circ \times_k G$ and $\mathcal{E}^\circ \times_{C} \mathcal{G}$.  To establish such an isomorphism, we first construct a ${\rm Aut}(G)$-equivariant isomorphism between $\mathcal{E} \times_{C} G_{C}$  and $\mathcal{E} \times_{C} \mathcal{G}$, where the action of ${\rm Aut}(G)$  is given by
\[ \mathcal{E} \times_{C} G_{C} \times  {\rm Aut}(G)  \to \mathcal{E} \times_{C} G_{C}, \qquad ((\phi, g) , \psi) \mapsto (\phi \circ \psi, \psi^{-1}(g))
\]
\[\mathcal{E} \times_{C} \mathcal{G}  \times {\rm Aut}(G)  \to \mathcal{E} \times_{C} \mathcal{G} , \qquad ((\phi, \alpha) , \psi) \mapsto (\phi \circ \psi, \alpha).
\]
It follows that the map
\[ f \colon  \mathcal{E} \times_{C} G_{C}  \to  \mathcal{E} \times_{C} \mathcal{G} , \qquad (\phi,g) \mapsto (\phi, \phi(g)) \] is ${\rm Aut}(G)$-equivariant and it is also an isomorphism which further restricts to an isomorphism
 \[ \mathcal{E}^\circ \times_C G_C  \cong  \mathcal{E}^\circ \times_{C} \mathcal{G} ,\]
which is $G_{\mathrm{ad}}\rtimes \Gamma$-equivariant.  This concludes the lemma.  \end{proof}

\begin{prop} \label{prop:CaffineGtrivial}
If the smooth algebraic curve $C$ is affine, then $ \mathcal{G} \cong \pi_*( G \times \widetilde{C}  )^\Gamma $, where the action of $\Gamma$ on $G_C$ is induced from the splitting \eqref{eq:splitting} and $\Gamma$ acts on $\widetilde{C}$ described above.
\end{prop}

\begin{proof}
\Cref{lem:trivialGGamma} shows that the $(G_\mathrm{ad},\Gamma)$ bundle ${\mathcal{E}^\circ}$ is isomorphic to the trivial $(G_\mathrm{ad}, \Gamma)$-bundle $\widetilde{C} \times G_\mathrm{ad}$. Then, the proposition follows from \cref{lem:reductive}.
\end{proof}

We conclude this section with a description of generically split groups over $C$. For this purpose, we recall that a reductive group scheme $\mathcal{G}$ over $C$ is called generically split if $\mathcal{G}_{k(C)}$ is a split reductive group scheme over the function field $k(C)$ of $C$.

\begin{prop}
\label{prop:genericallyreductive}
The reductive group scheme $\mathcal{G}$ is generically split if and only if $\mathcal{G}\cong G_{\mathcal{F}}:=\mathcal{F} \times^{G_{\mathrm{ad}}} G$ for some $G_{\mathrm{ad}}$-bundle $\mathcal{F}$ on $C$.  In particular, if $C$ is affine, then $\mathcal{G}$ is split generically if and only if $\mathcal{G}\cong G \times C$.
\end{prop}
\begin{proof}
Suppose that $\mathcal{G}\cong G_{\mathcal{F}}$ for some $G_{\mathrm{ad}}$-bundle $\mathcal{F}$ over $C$. Since generically $\mathcal{F}$ is trivializable, $\mathcal{G}$ is generically split.

Conversely, by \cref{lem:reductive}  we know that  $\mathcal{G}\cong \pi_*( G_{\mathcal{E}^\circ}  )^\Gamma$. It is enough to show that if $\mathcal{G}$ is generically split, then necessarily $\Gamma$ must be trivial. Let $K$ (resp. $L$) be the function field of $C$ (resp. $\widetilde{C}$), so that ${\rm Gal}(L/K)=\Gamma$. It suffices to show that when $\Gamma$ is nontrivial,  $\mathcal{G}_K={\mathrm{Res}}_{L/K}(G_L)^\Gamma$ is not split.  The $K$-form $\mathcal{G}_K$ of $G_L$ gives a class $\kappa$ in $\mathrm{H}^1(\Gamma, {\rm Aut}(G)(L) )$. The pointed set  $\mathrm{H}^1(\Gamma, {\rm Aut}(G)(L) )$  classifies the isomorphism classes of all $K$-forms of $G_L$. Recall that $\mathrm{H}^1(\Gamma, {\rm Out}(G) )$ can be identified with the isomorphisms classes of all group homomorphisms from $\Gamma$ to ${\rm Out}(G)$.  With respect to the splitting $\iota: {\rm Out}(G) \to {\rm Aut}(G)$,  it induces a map $\mathrm{H}^1(\Gamma, {\rm Out}(G) )\to \mathrm{H}^1(\Gamma, {\rm Aut}(G)(L))$.  This map is injective, since the composition of ${\rm Out}(G)\to {\rm Aut}(G)(L)\to{\rm Out}(G) $ is the identity map.  We also observe that, the group homomorphism $u: \Gamma\to {\rm Out}(G)$ induced from the action of $\Gamma$ on $G$, corresponds to $\kappa$. Since $u$ is nontrivial, it follows that $\kappa$ is also nontrivial. Thus, $\mathcal{G}_K$ is not split.

When $C$ is affine, $\mathcal{E}$ is trivializable.  Thus, the second statement also follows.
\end{proof}

\subsection{Parahoric Bruhat--Tits group schemes over curves}
Suppose that $C$ is a connected projective smooth curve over $k$. In this section we will further assume that $\mathrm{char}(k)=0$, assumption needed for \cref{thm_cover}.  Let $\pi\colon \widetilde{C}\to C$ be a $\Gamma$-covering of $C$. For any $x\in C$,  let $m_x$ denotes the \textit{ramification index} at $x$; equivalently for any $\tilde{x}\in \widetilde{C}$ such that $\pi(\tilde{x})=x$, we have $m_x=|\Gamma_{\tilde{x}}|$.

\begin{lemma}
\label{thm_cover}
Let $C$ be any connected projective smooth curve $C$ over $k$. Let $g$ be the genus of $C$. There exists a connected $\Gamma$-covering $\pi\colon \hat{C}\to C$ of $C$  for some finite group $\Gamma$, with prescribed branched points $x_1,\cdots, x_s\in C$ and prescribed ramification indices $m_1,\cdots, m_s$ at $x_1,\cdots, x_s$, except the following cases:
\begin{enumerate}
\item $g=0$, $s=1$;
\item $g=0$, $s=2$ and $m_1\not=m_2$.
\end{enumerate}
\end{lemma}
\begin{proof}
Using \cite[Theorem 6.4.2]{serre:1992}, the proof proceeds as in the proof of \cite[Lemma 2.5]{poonen:2005}.
\end{proof}

Given a parahoric Bruhat--Tits group scheme $\mathcal{G}$ over $C$, we say that $\mathcal{G}$ is ramified at $x\in C$ if the fiber $\mathcal{G}_x$ at $x$ is not reductive.  If $x\in C$ is a ramified point of $\mathcal{G}$, then $\mathcal{G}|_{ \mathbb{D}_x }$ is a parahoric group scheme over $ \mathbb{D}_x$.

\begin{theorem}\label{thm:parahoricfromcoverings}
Let $\mathcal{G}$ be any parahoric Bruhat--Tits group scheme over an irreducible smooth projective curve $C$ of genus $g$ with $s$---possibly zero---ramified points in $C$. Assume that $\mathcal{G}|_{k(C)}$ is simply connected and let $G$ be the group defined over $k$ with the same root datum as $\mathcal{G}|_{k(C)}$. Suppose further that $(g, s) \neq (0, 1)$. Then, there exists a $\Gamma$-covering $\pi \colon \widetilde{C}\to C$ of $C$ for some finite group $\Gamma$ and a $(\Gamma, G_{\mathrm{ad}})$-bundle $\mathcal{E}$ where $\Gamma$ acts on $G_{\mathrm{ad}}$ by diagram automorphisms, such that $\mathcal{G}\cong  \pi_*(G_{\mathcal{E}})^\Gamma$.
\end{theorem}

We begin by proving a statement that we will use to deduce the above result.

\begin{lemma}\label{lem:transitiveaction}
Let $\Gamma$ be a finite group acting on a variety $X$ over $k$. Suppose that $\Gamma$ permutes the set of connected components of $X$ transitively. Let $X^\circ$ be a component of $X$ and $\Gamma^\circ$ be the stabilizer of $X^\circ$ in $\Gamma$. Then, the morphism $\phi: \Gamma\times^{\Gamma^\circ}  X^\circ\to X$ given by $(\gamma, x)\mapsto \gamma\cdot x$, is a $\Gamma$-equivariant isomorphism.
\end{lemma}

\begin{proof}
Since $\Gamma$ permutes the component set of $X$ transitively,  the morphism $\phi$ must be surjective. Since for any $\gamma\in \Gamma$, the map $\gamma \colon X^\circ\to \gamma X^\circ$ is an isomorphism, then $\phi$ is also a closed immersion.  Thus, $\phi$ is an isomorphism of varieties.
\end{proof}

\begin{proof}[Proof of \cref{thm:parahoricfromcoverings}]

    Since the case $s=0$ is covered by
    \cref{lem:reductive}, we can assume that $s\geq 1$.

    We will begin with some notation. We first of all denote by $R=\{x_1,x_2,\cdots, x_s\}$ the set of all ramified points of $\mathcal{G}$ and by $S$ the set $\{1, \dots, s\}$. The affine curve $C\setminus R$ is denoted by $C^\circ$. For every $i \in S$, let $z_i$ be a formal parameter around $x_i$, and let $u_i \colon \mathbb{D} \to \mathbb{D}_{x_i} \subset C$ be the isomorphism identifying $z$ with $z_i$.

    By \cref{prop:CaffineGtrivial},   there exists an isomorphism $\mathcal{G}|_{C^\circ}\cong {\mathrm{Res}}_{\hat{C}^\circ / C^\circ }(G_{\hat{C}^\circ})^D$, for some \'etale $D$-covering $\hat{C}^\circ$ of $C^\circ$, and a faithful action of $D$ on $G$ preserving a triple $(B,T, e)$, where $T\subset B$ and $e$ is a pinning of the pair $(B,T)$.  Then, there exists an isomorphism $ u_i^*(\mathcal{G})|_{\mathbb{D}^\times}\cong {\mathrm{Res}}_{\mathbb{D}^\times_{r_i}/ \mathbb{D}^\times  } ( G_{ \mathbb{D}^\times}  ) ^{\tau_i}$,  with $\tau_i\in D$.

    Since by definition $u_i^*\mathcal{G}$ is a parahoric group scheme, \cref{thm_local} tells us that there exists an isomorphism
    \begin{equation}\label{local_isom_1}
    \phi_i\colon  u_i^*\mathcal{G}\cong  {\mathrm{Res}}_{\mathbb{D}_{m_i}/\mathbb{D}} (G_{\mathbb{D}_{m_i}  })^{\sigma_i}, \end{equation}
    where $\sigma_i$ acts on $G$ by $\tau_i\circ {\rm Ad}_{t_i}$ for some $t_i\in T^{\tau_i}$, and $\sigma_i$ acts on $\mathbb{D}_{m_i}$ as usual.  Note that, by  \cref{thm_local},  the isomorphism $\phi_i$ always exists if we replace $m_i$ by any of its multiples and  take the same action of $\sigma_i$ on $G$. In particular, when $g=0$ and $s=2$, we can assume that $m_1=m_2$, hence we can assume to be in the hypothesis of \cref{thm_cover}.

    By \cref{thm_cover}, there exists a  $\Gamma'$-covering $f \colon  X\to C$ of $C$ for some finite group $\Gamma'$, such that the ramification indices at each $x_i$ is $m_i$.    Then $f^*\mathcal{G}$ is a smooth group scheme over $X$. For each $x_i$,  choose a point $x'_i$ above $x_i$ and let $\Gamma'_i$ be the stabilizer of $x'_i$ in $\Gamma'$. Let $\mathbb{D}_{x_i}$ (resp. $\mathbb{D}_{x'_i}$) be the formal neighborhood of $x_i$ (resp. $x'_i$) in $C$ (resp. $X$).    Then the isomorphism \eqref{local_isom_1} can be reinterpreted as the following isomorphism
  \[ \phi_i\colon   \mathcal{G}|_{\mathbb{D}_{x_i} }\cong   f_*(G_{\mathbb{D}_{x'_i} }  )^{\Gamma'_i} ,\]
  where $\Gamma'_i=\langle \gamma_i \rangle  $ with $\gamma_i$ being of order $m_i$ and   acting on $G$ by $\sigma_i$.

    Note that,  there  is a natural morphism of group schemes
    \[  \iota_i\colon G_{\mathbb{D}_{x_i'} } \to  f^* ( f_* (G_{\mathbb{D}_{x'_i} })^{\Gamma'_i  }     )  , \]
     which is $\Gamma'_i $-equivariant and is an isomorphism over $\mathbb{D}^\times_{x'_i}$. There exists a unique smooth $\Gamma'$-group scheme  $\mathcal{G}'$ over $X$ such that $\mathcal{G}'=f^*(\mathcal{G}|_{C^\circ})$, and for each $i$ an isomorphism $\phi'_i\colon \mathcal{G'}|_{\mathbb{D}_{x'_i} }\cong G_{\mathbb{D}_{x'_i} }$ of $\Gamma'_i$-group schemes such that $\phi_i'|_{\mathbb{D}^\times_{x'_i} }=(\iota|_{\mathbb{D}^\times_{x'_i} })^{-1} \circ  f^*(\phi_i)|_{\mathbb{D}^\times_{x'_i} }$. Moreover, there is an isomorphism
     \begin{equation}\label{eq:des1}
       \mathcal{G} \cong f_*(\mathcal{G}' )^{\Gamma'}. \end{equation}

 We will proceed with a construction similar to that of \cref{lem:reductive}.  The scheme $\mathcal{E}= {\rm Iso}(G_{X}, \mathcal{G}' )$ is an ${\rm Aut}(G) $-bundle over $X$, with a commuting action of $\Gamma'$. Let $\mathcal{E}^\circ$ be a component of  $\mathcal{E}$.   The finite group ${\rm Out}(G)\times \Gamma'$ acts on $\mathcal{E}$.  Let $\Gamma$ be the subgroup of ${\rm Out}(G)\times \Gamma'$ which stabilizes the component $\mathcal{E}^\circ$ of $\mathcal{E}$.  Set $\widetilde{C}= \mathcal{E}^\circ/{G_{\mathrm{ad}}}$.  Then, $\pi \colon \widetilde{C}\to C$ is a $\Gamma$-covering of $C$, and $\mathcal{E}^\circ$ is a $(\Gamma, G_{\mathrm{ad}} )$-bundle over $\widetilde{C}$.

 Let $X^\circ$ (resp. $\widetilde{C}^\circ$) be the open unramified part of $X$ (resp. $\widetilde{C}$) with respect to the $\Gamma'$ (resp. $\Gamma$)-action.  Recall that $X= \mathcal{E}/ { {\rm Aut}(G)   }$ and ${\rm Aut}(G) =G_{\mathrm{ad}}\rtimes {\rm Out}(G)$. Let $D'$ be the stabilizer of the component $\mathcal{E}^\circ$ in ${\rm Out}(G)$ via the splitting \eqref{eq:splitting}. By \cref{lem:transitiveaction}, $X= \mathcal{E}^\circ/{(G_{\mathrm{ad}}\rtimes D' )}$.  Thus, the natural morphism $q\colon \widetilde{C}\to X$ is an \'etale $D'$-covering of $X$. Moreover, the projection map $\Gamma\to \Gamma'$ descends to an isomorphism of groups  $\Gamma/D'\cong \Gamma'$.

Finally, we are ready to verify that $\mathcal{G}\cong  \pi^\Gamma_*(G_{ \mathcal{E}^\circ })$.  Note that $f_* ^{{\Gamma'}} \circ  q_*^{ D'} \cong \pi_*^\Gamma$. By \eqref{eq:des1},  it suffices to check that $q_*(G_{\mathcal{E}^\circ})^{D'} \cong \mathcal{G}'$.   Since $q$ is \'etale, by \cref{lem:descentG},  it is enough to show that $G_{\mathcal{E}^\circ}\cong  \pi^*\mathcal{G}'$ as $\Gamma$-group schemes.
 In other words, it suffices to show that
\[ G_{\mathcal{E}^\circ}\cong \widetilde{C}\times_{X} (\mathcal{E}\times ^{{\rm Aut}(G) } G)   . \]
By \cref{lem:transitiveaction},  $ \mathcal{E}\times ^{{\rm Aut}(G) } G\cong \mathcal{E}^\circ\times ^{G_{\mathrm{ad}}\rtimes D'} G$.
Thus, we are left to show that
\[ G_{\mathcal{E}^\circ}\cong    \widetilde{C}\times_{X} ( G_{\mathcal{E}^\circ} / D'),\]
which holds true, since  $q\colon \widetilde{C}\to X$ is \'etale. This concludes the proof of our theorem.  \end{proof}

\bibliographystyle{alphamod}