We construct a local deformation problem for residual Galois representations $\bar{\rho}$ valued in an arbitrary reductive group $\hat{G}$ which we use to develop a variant of the Taylor–Wiles method.
Our generalization allows Taylor–Wiles places for which the image of Frobenius is semisimple, a weakening of the regular semisimple constraint imposed previously in the literature.
We introduce the notion of $\hat{G}$-adequate subgroup, our corresponding `big image' condition.
When $\hat{G}$ is symplectic, special orthogonal, or simply connected and of exceptional type, and $\hat{G} \to \GL_n$ is a faithful irreducible representation of minimal dimension, we show that a subgroup is $\hat{G}$-adequate if it is $\GL_n$-irreducible and the residue characteristic is sufficiently large.

We apply our ideas to the case $\hat{G} = \GSp_4$ and prove a modularity lifting theorem for abelian surfaces over a totally real field $F$ which holds under weaker hypotheses than in the work of Boxer–Calegari–Gee–Pilloni.
We deduce some modularity results for elliptic curves over quadratic extensions of $F$.

§ INTRODUCTION

We introduce a new setup which provides a generalization of the Taylor–Wiles method for an arbitrary reductive group.
We apply our constructions to the context of proving modularity results for abelian surfaces over totally real fields, extending [5].

§.§ Main ideas and theorems

Let $\hat{G}$ be a reductive group over $\mathbb{Z}$ and let $p$ a prime number not dividing the order of the Weyl group of $\hat{G}$.
Let $F$ be a number field with absolute Galois group $G_{F}$ and fix a continuous representation $\bar{\rho}: G_{F} \to \hat{G}(\mathbb{F}_p)$ which is absolutely $\hat{G}$-irreducible (see Definition <ref>).
The Taylor–Wiles method is used to establish automorphy lifting theorems, providing instances of the global Langlands correspondence.
The goal of automorphy lifting is to take lifts $\rho_1,\rho_2: G_F \to~\hat{G}(\mathbb{Z}_p)$ of $\bar{\rho}$ for which $\rho_1$ is the Galois representation attached to an automorphic representation and show that the same is true of $\rho_2$.

In the Taylor–Wiles method one considers lifts of $\bar{\rho}$ for which ramification is allowed at certain auxiliary sets of places.
In this paper we consider finite places $v$ of $F$ for which

* $\bar{\rho}$ is unramified at $v$

* the residue field $k(v)$ satisfies $\# k(v) \equiv 1 \mod p$

* the image of the Frobenius element $\bar{g} = \bar{\rho}(\Frob_v)$ is semisimple.

We call such a place $v$ a Taylor–Wiles place.
This is a generalization of previous notions for which $\bar{g}$ was always taken to be regular semisimple, such as in [6].

The main difficulty arising from our above notion is that the Taylor–Wiles method requires us to consider deformations of $\bar{\rho}$ for which the inertia subgroup $I_v$ has image in a torus.
While this is automatic in the regular semisimple case, we prove the following theorem to provide us with a `canonical' torus.

Let $A$ be a complete Noetherian local $\mathbb{Z}_p$-algebra of residue field $\mathbb{F}_p$ and let $g \in \hat{G}(A)$ be a lift of $\bar{g}$.
Then there is a canonical lift of the centralizer $M_{\bar{g}} = Z_{\hat{G}_{\mathbb{F}_p}}(\bar{g})$ to a closed reductive subgroup scheme $M_g$ of $\hat{G}_A$.

A more precise statement is given in Theorem <ref>.
Let $g$ be the image of a Frobenius lift at $v$ under a lift
$\rho: G_F \to \hat{G}(A)$
of $\bar{\rho}$.
We then define a local deformation problem by admitting all lifts $\rho$ for which $I_v$ is valued in the torus given by the connected center of $M_g$.
Since our deformation problem is in general not equal to the unrestricted deformation problem, some kind of local-global compatibility would be required to show that Galois representations (attached to those automorphic representations arising in the Taylor–Wiles method) satisfy our local deformation condition upon restriction to the decomposition group at a Taylor–Wiles prime.

In order to control the arising universal deformation rings, one requires the existence sets of Taylor–Wiles places for which a certain Galois cohomology group (the dual Selmer group) is forced to vanish.
Consequently, one typically imposes `big image' hypotheses on the representation $\bar{\rho}$ (e.g. the $\hat{G}$-abundant image condition of [6] or vast representations of [5]) to guarantee the existence of such sets of Taylor–Wiles places.
In Proposition <ref> we show that the dual Selmer group can be killed off under much weaker assumptions on $\bar{\rho}$ if one allows our notion of Taylor–Wiles prime.
This motivates the following definition, which is our milder `big image' condition.

We say $H \leq \hat{G}(\mathbb{F}_p)$ is $\hat{G}$-adequate if the following conditions hold:

* The following groups vanish

* $H^0(H,\hat{\mathfrak{g}}^{0,\vee})$

* $H^1(H,\mathbb{F}_p)$

* $H^1(H,\hat{\mathfrak{g}}^{0,\vee})$

* For every non-zero simple $\mathbb{F}_p[H]$-submodule $W \leq \hat{\mathfrak{g}}^{0,\vee}$ there exists a semisimple element $h \in H$ such that for some $w \in W$ and $z \in \Lie Z(Z_{\hat{G}}(h)) \cap \g^0$ we have $w(z) \neq 0$.

Here $\hat{\mathfrak{g}}^0$ denotes the Lie algebra of the derived group of $\hat{G}$ (over $\mathbb{F}_p$) equipped with the adjoint action of $\hat{G}(\mathbb{F}_p)$, $\hat{\mathfrak{g}}^{0,\vee}$ denotes the dual module and $\mathfrak{z}$ denotes the center of a Lie algebra.

Our notion of Taylor–Wiles place and $\hat{G}$-adequate subgroup are by analogy with [49].
There unramified places $v$ are considered for which the $\bar{\rho}(\Frob_v)$ acts as $\bar{\psi} \oplus \bar{s}$, where $\bar{\psi}$ is an eigenspace which is acted on semisimply.
A local deformation problem is then defined by taking lifts of the form $\psi \oplus s$, where the action on $\psi$ is through a scalar.
This itself was a generalization of [16], where $\bar{\psi}$ was required to be $1$-dimensional.
Thus our generalization of allowing $\bar{\rho}(\Frob_v)$ to be any semisimple element, rather than regular semisimple, is analogous to allowing repeated eigenvalues in the case of $\GL_n$.

`Irreducibility implies adequacy' results have already been established in the case of $\hat{G} = \GL_n$ in [24, 23] outside of a set of primes depending on $n$.
We use this to deduce an analogous theorem for absolutely irreducible subgroups of some simple linear algebraic groups.

Let $\hat{G}$ be one of the following simple linear algebraic groups over $\Fpbar$:

* the special orthogonal group $\SO_{n}$ for $n \geq 3$

* the symplectic group $\Sp_{n}$ for $n \geq 2$ even

* the simply connected exceptional groups $G_2,F_4,E_6,E_7,E_8$.

Let $\hat{G} \hookrightarrow \GL_n$ be a faithful irreducible representation of minimal dimension.
If $p \geq n+4$, $p \neq 2n \pm 1$ and $\Gamma \subset \hat{G}(\Fpbar)$ is a finite, $\GL_n$-irreducible subgroup, then $\Gamma$ is $\hat{G}$-adequate.

* $H^0(\Gamma, \g^\vee) = 0$

* $H^1(\Gamma, \g^\vee) = 0$

* $H^1(\Gamma, \Fpbar) = 0$

* $\sum_{\gamma \in \Gss} \Lie Z(Z_{\hat{G}}(\gamma)) = \g$.

Here $\Gss$ denotes the set of semisimple elements of $\Gamma$.
In particular, if $\hat{G}$ is not special orthogonal then $\Gamma$ is $\hat{G}$-adequate.

We show in Corollary <ref> that the converse to Theorem <ref> holds when $\hat{G}$ is either $\Sp_{2n}$ or $\SO_{2n+1}$.
We also give examples of $\hat{G}$-adequate subgroups which are not $\GL_n$-irreducible when $\hat{G}$ is either $\SO_{n}$ for $n$ even or when $\hat{G}$ is a simply connected exceptional group.

One complication of our general setup in proving an `$R= \mathbb{T}$' type theorem is that the existence of a map $R \to \mathbb{T}$ from the universal deformation ring to a localized ring of Hecke operators requires that the Galois representations, attached to automorphic representations for which certain spaces of localized invariants are non-zero, satisfy our local deformation condition at the Taylor–Wiles primes.
Together with an analysis of the local representation theory at a Taylor–Wiles prime, this would follow from a form of local-global compatibility up to Frobenius semisimplification.

Our methods are then applied with the goal of proving modularity results in the case of $\hat{G} = \GSp_4$ and $F$ totally real.
We are able to prove modularity theorems in which the assumption of [5] that $\bar{\rho}$ is `vast' is replaced by the assumption that $\bar{\rho}$ is $\GSp_4$-reasonable (see Definition <ref>); this holds when $\bar{\rho}(G_{F(\zeta_p)})$ is $\GSp_4$-adequate.
This offers a significant upgrade, since condition <ref> in Definition <ref> always holds for irreducible subgroups of $\Sp_4(\mathbb{F}_p)$.
In contrast, the corresponding condition with `semisimple' replaced by `regular simple' fails for approximately half of the conjugacy classes of irreducible subgroups of $\Sp_4(\mathbb{F}_p)$ (for some small choices of $p$).
Many of our preparatory lemmas (such as the study of various Hecke algebras) are proven for an arbitrary reductive group and are therefore applicable in other settings.
Here are the modularity lifting theorems we prove.

Let $F$ be a totally real field in which $p \geq 3$ splits completely.
Suppose that $\rho:G_F \to \GSp_4(\Qpbar)$ is a continuous representation satisfying:

* $\nu \circ \rho = \varepsilon^{-1}$

* $\bar{\rho}$ is $\hat{G}$-reasonable and tidy in the senses of Definition <ref> and Definition <ref>

* For every $v | p$, $\restr{\rho}{G_{F_v}}$ is $p$-distinguished weight $2$ ordinary in the sense of Definition <ref>

* There exists an automorphic representation $\pi$ of $\GSp_4(\mathbb{A}_F)$ of parallel weight 2 and central character $|\cdot|^2$, ordinary in the sense of <cit.>, such that $\overline{\rho_{\pi,p}} \cong \bar{\rho}$, where $\rho_{\pi,p}$ is as in Corollary <ref>.

* For every finite place $v$ of $F$, the representations $\restr{\rho}{G_{F_v}}$ and $\restr{\rho_{\pi,p}}{G_{F_v}}$ are pure.

Then $\rho$ is modular and for every finite place $v$ of $F$ we have full local-global compatibility.

Here $\nu: \GSp_4 \to \mathbb{G}_m$ is the similitude character and $\varepsilon$ is the $p$-adic cyclotomic character.
A more precise statement of Theorem <ref> is given in Theorem <ref>

Let $F$ be a totally real field in which $p \geq 3$ splits completely.
Let $A/F$ be an abelian surface such that

* $A$ has good ordinary reduction at every $v | p$

* for each $v|p$, the unit root crystalline eigenvalues are distinct modulo $p$

* $A$ admits a polarization of degree prime to $p$.

Suppose that the residual Galois representation $\overline{\rho_{A,p}}$ is such that

* $\overline{\rho_{A,p}}$ is $\hat{G}$-reasonable and tidy

* $\overline{\rho_{A,p}}$ is ordinarily modular: there exists $\pi$ an automorphic representation of $\GSp_4(\mathbb{A}_F)$ for which

* $\pi$ has parallel weight $2$ and central character $|\cdot|^2$

* for every $v|p$, $\pi_v$ is unramified and ordinary

* $\overline{\rho_{A,p}} \cong \overline{\rho_{\pi,p}}$

* for every finite place $v$ of $F$, $\rho_{\pi,p}$ is pure.

Then $A$ is modular.

Here the Galois representation $\rho_{A,p}$ is given by the $p$-adic cohomology group $H^1(A_{\bar{F}},\Qpbar)$.
Now let $K/F$ be an arbitrary quadratic extension.
We apply Theorem <ref> to $p$-adic Galois representations of abelian surfaces arising as the restriction of scalars of an elliptic curve over $K$ and deduce a modularity for lifting theorem for elliptic curves $E/K$.

Let $F$ be a totally real field in which $p \geq 3$ splits completely and let $K/F$ be a quadratic extension in which $p$ is unramified with Galois group $\{1,\sigma\}$.
Let $E/K$ be an elliptic curve and let $\bar{\varrho} = \overline{\varrho_{E,p}}$ be the attached mod $p$ Galois representation of determinant $\varepsilon^{-1}$.
Suppose that the following conditions hold:

* $E$ has ordinary good reduction or multiplicative reduction at every place $w | p$

* $\bar{\varrho}(G_{K(\zeta_p)})$ is absolutely irreducible

* $\bar{\varrho}$ is ordinarily modular

* if $p = 3$ or $p=5$ then order of the subgroup of $\GL_2(\mathbb{F}_p) \times \GL_2(\mathbb{F}_p)$ generated by the image of $\bar{\varrho} \oplus \bar{\varrho}^\sigma$ together with the matrices $\diag(I,-I), \diag(-I,I)$ is not equal to $64$.

Then $E$ is modular.

Theorem <ref> often applies even when the image $\overline{\varrho_{E,p}}(G_{K(\zeta_p)})$ is small, such as when it is projectively dihedral.
In some such cases we are able to establish ordinary modularity of $\overline{\varrho_{E,p}}$ via automorphic induction of a character and hence deduce modularity of $E$ (see, for example, Corollary <ref> when $p \geq 7$).
Here is a precise statement we prove when $p=5$ which provides infinitely many modular elliptic curves over $K$ without complex multiplication nor arising from base-change from a proper subfield.

Let $F$ be a totally real field in which $5$ splits completely and let $K/F$ be a quadratic extension in which $5$ is unramified.
There exists representations $\bar{\varrho}:~G_K \to \GL_2(\mathbb{F}_5)$ which are CM-compositum induced from a character $\bar{\psi}: G_L \to \mathbb{F}_5^\times$ (see Definition <ref>), where $L/K$ is a quadratic extension, and $\bar{\psi}$ satisfies $\restr{(\bar{\psi}^2)^\tau}{G_{L(\zeta_p)}} \neq \restr{\bar{\psi}^2}{G_{L(\zeta_p)}}$ for $\tau \in G_F \setminus G_K$.
Fix such a representation $\bar{\varrho}$ and suppose that $E/K$ is an elliptic curve for which $\overline{\varrho_{E,5}} \cong \bar{\varrho}$ and that $E$ has ordinary good reduction or multiplicative reduction at every $w|5$.
Then $E$ is modular.
Moreover, the subset of $X_{\bar{\varrho}}(K)$ given by such elliptic curves which in addition do not have complex multiplication nor have $j$-invariant contained in a proper subfield of $K$ is of positive density (in the sense of Definition <ref>).

§.§ Structure of the paper

In Section <ref>, we prove in Theorem <ref> a precise version of Theorem <ref> and show that our `canonical' torus lift given by the connected center of $M_g$ satisfies many of the desired functoriality properties.
We also give an alternate construction in the case of lifting to the ring of integers of a finite extension of $\mathbb{Q}_p$, which is used in Section <ref>.

Then in Section <ref> we define our Taylor-Wiles local deformation problem by requiring that the inertia subgroup $I_v$ has image in the torus constructed in Section <ref>.
We then study the Galois cohomological interpretation of our local deformation problem and give a definition of $\hat{G}$-adequate subgroups, which is our weakened `big image' condition.

In Section <ref> we compare our notion of $\hat{G}$-adequate subgroups to absolute irreducibility.
From the corresponding result for $\GL_n$, we show an `irreducibility implies adequacy' type result for some simple groups.
We use computer algebra software  to study the case of $\Sp_4$ in small characteristic for our applications in Sections <ref> and <ref>, and give a comparison between $\Sp_4$-adequacy and a `big image' condition seen previously in the literature using the tables given in Appendix <ref>.

Let $G$ be the reductive group dual to $\hat{G}$ and let $v$ be a Taylor–Wiles place.
In Section <ref>, we explore the  representation theory of $G(F_v)$ in relation to our constructions of Section <ref>.
We explain how our semisimple image of Frobenius gives rise to certain compact open groups $\mathfrak{p}_1$ and $\mathfrak{p}$ of $G(F_v)$, summarized by Construction <ref>.
We prove Theorem <ref>, a generalization of the Satake isomorphism, which we use to define certain abelian subalgebras of the Hecke algebras arising from our compact open subgroups.
These abelian subalgebras have maximal ideals corresponding to $\bar{g}$, and we study the localizations of modules of our Hecke algebras at these maximal ideals.
The results obtained are in full generality, but with the precise statements suited for our applications in the $\hat{G} = \GSp_4$ case.
To conclude the section, we restrict to the $\GSp_4$ case, where there is the local Langlands correspondence of [27] available.
We show in Proposition <ref> and Proposition <ref> that if our localized spaces of invariants of irreducible admissible representations of $\GSp_4(F_v)$ are non-zero, then their image under the local Langlands map is a semisimple Weil–Deligne representation.

The main goal of Section <ref> is to prove Proposition <ref>.
In rough terms, this states that if we have a sufficiently strong local-global compatibility assumption between an automorphic representation $\pi$ and an associated Galois representation at the Taylor–Wiles places then the Galois representation will satisfy our deformation condition.
Moreover, we show the necessary compatibility between the action of inertia and the action of certain Hecke operators holds.
Our proof uses the alternate construction of $M_g$ of Section <ref> to understand the passage to Frobenius-semisimplification of Weil–Deligne representations in the context of our deformation problem.

In Section <ref>, we apply the theory developed in the earlier sections to the case of $\hat{G} = \GSp_4$ in order to extend the partial results on modularity of abelian surfaces over a totally real field $F$ given in [5].
Using the methods of [5] as a framework, we explain a setup compatible with our generalized notion of Taylor–Wiles primes.
The majority of the work is done in Section <ref>.
Here we prove analogues of many of the results of <cit.> necessary for the Taylor–Wiles patching argument.
In particular, we explain the moduli interpretation of working with level structures given by the compact open subgroups of Section <ref> at Taylor–Wiles primes.
We use the main result of Section <ref> to prove the existence of a Galois representation valued in a certain Hecke algebra satisfying our deformation condition.
The patching construction then goes through from our work in Sections <ref> and <ref>.
In Section <ref> we deduce our modularity lifting theorems which are analogous to those of [5] but hold under our weaker hypotheses on the images of the residual Galois representations.

Finally, in Section <ref> we study representations of $G_F$ induced from $\GL_2$-valued representations of the absolute Galois group of quadratic extensions $K/F$.
From the main modularity lifting theorem of Section <ref> we deduce modularity lifting theorems for elliptic curves over $K$.
We define the notion of CM-compositum induced representations (Definition <ref>), which are certain projectively dihedral residual Galois representations.
We give a construction of these representations for every $p \geq 5$ and prove modularity theorems for some elliptic curves with CM-compositum induced mod $p$ Galois representation.

§.§ Acknowledgements

The author is exceptionally grateful to Jack Thorne for inspiration of the topic of this paper, numerous insightful conversations and for helpful comments on earlier drafts.

§ SETUP FOR A LOCAL DEFORMATION PROBLEM

Let $\hat{G}$ be a reductive group defined over $\mathbb{Z}$ (that is, a smooth affine group scheme $\hat{G} \to \Spec \mathbb{Z}$ such that every geometric fibre $\hat{G}_{\Bar{s}}$ is a connected reductive group).
Let $p$ be a prime number, which we will later assume is pretty good for $\hat{G}$ (see Definition <ref>).
Let $\mathcal{O}$ be the ring of integers of a finite extension of $E/\mathbb{Q}_p$ with uniformizer $\lambda$ and residue field $k = \mathcal{O}/\lambda \mathcal{O}$, a finite field of characteristic $p$.
Denote by $\CNL_\CalO$ the category whose objects are complete Noetherian local $\mathcal{O}$-algebras together with a fixed isomorphism from the residue field to $k$, so that we may freely identify them without confusion.

Motivated by wanting to impose constraints on representations valued in $\hat{G}(A)$ for $A \in \CNL_\CalO$, we will consider the following setup. Fix $A \in \CNL_\CalO$ with maximal ideal $m_A$ and let $\bar{g} \in \hat{G}(k)$ be a semisimple element with centralizer $M_{\bar{g}} = Z_{\hat{G}_k}(\bar{g})$, a possibly disconnected smooth closed $k$-subgroup with reductive identity component (<cit.>).
Denote by $\hat{\mathfrak{g}}_k$ the Lie algebra of $\hat{G}_k$, and consider the adjoint action of $\Bar{g}$, a Lie algebra automorphism $\Ad(\Bar{g}): \hat{\mathfrak{g}}_k \to \hat{\mathfrak{g}}_k$.
Let $\overline{L_0} = \{v \in \gk: \Ad(\Bar{g})(v) = v\}$ denote the eigenvalue-1 subspace.
Let $\overline{L_1}$ denote the $\Ad(\Bar{g})$-invariant complement in $\gk$, which will be the direct sum of all other eigenspaces over an algebraic closure.
Thus we have an $\Ad(\Bar{g})$-invariant decomposition $\gk = \overline{L_0} \oplus \overline{L_1}$.
We have the equality of Lie algebras $\Lie M_{\bar{g}} = \Lzerobar$ by <cit.>.

Now let $g \in \hat{G}(A)$ be a fixed choice of lift of $\bar{g}$ under the natural map $\hat{G}(A) \to \hat{G}(k)$.
Our main goal of this section is to show Theorem <ref>, which states that the Lie algebra $\gA$ admits a unique $\Ad(g)$-invariant lift $\gA = L_0 \oplus L_1$ of the decomposition $\gk = \overline{L_0} \oplus \overline{L_1}$ and that there exists a unique closed subgroup $M_g \subset \hat{G}_A$ defined over $A$ with reductive identity component and with the properties that the base change $(M_g)_k$ is naturally identified with $M_{\bar{g}}$, $\Lie M_g = L_0$ and that $g \in M_g(A)$.

Throughout this section we will allow ourselves to replace $k$ (and $\mathcal{O}$) by some finite extension, so long as the choice of extension depends only on $\bar{g}$.

§.§ Lifting the Lie algebra

Let $f: A^n \to A^n$ be an $A$-linear map inducing $\bar{f}: k^n \to k^n$. Suppose we have a factorisation of the characteristic polynomial of $\bar{f}$ as $\det(X-\bar{f}) = \bar{p}(X)\bar{q}(X)$ with $\bar{p}(X)$ coprime to $\bar{q}(X)$. Then letting $\bar{N} = \ker(\bar{p}(\bar{f}))$, there exists a unique $f$-invariant direct summand lift $N$ of $\bar{N}$ to $A^n$. Moreover if $M$ is an $f$-invariant direct summand of $A^n$ with $\bar{M} \subset \bar{N}$ then $M \subset N$.

Since $\det(X-\bar{f})$ is monic and $A$ is a Henselian local ring (as $A$ is a complete Noetherian local ring) it follows by Hensel's lemma that there exists a factorisation

$$\det(X-f) =p(X)q(X)$$
with $p(X) \mod m_A = \bar{p}(X)$ and $q(X) \mod m_A = \bar{q}(X)$.
Moreover, since $\bar{p}(X)$ and $\bar{q}(X)$ are coprime, we claim we can find power series $r[X],s[X] \in A[[X]]$ with $p(X)r(X) + q(X)s(X) = 1$.
Indeed, by coprimality of $\bar{p}(X)$ and $\bar{q}(X)$ we can find $\bar{r}[X],\bar{s}[X] \in k[X]$ such that $\bar{p}(X) \bar{r}(X) + \bar{q}(X) \bar{s}(X) = 1$.
Then taking arbitrary lifts $\Tilde{r}[X],\Tilde{s}[X] \in A[X]$ of $\bar{r}(X),\bar{s}(X)$ respectively, we have that $p(X)\Tilde{r}(X) + q(X)\Tilde{s}(X) = 1 + h(X)$ for some polynomial $h(X)$ whose coefficients all lie in $m_A$.
Multiplying both $\Tilde{r}(X)$ and $\Tilde{s}(X)$ by $\sum_{i=0}^\infty (-1)^i h(X)^i$ yields the desired $r(X)$ and $s(X)$.

Now we have $p(f) r(f) + q(f) s(f) = \id_{A^n}$ so letting $e_1 = p(f) r(f)$ and $e_2 = q(f)s(f)$ we have $e_1 e_2 = e_2 e_1 = r(f)s(f) p(f)q(f) = 0$ by Cayley-Hamilton.
Since $e_1 + e_2 = \id_{A^n}$ we have $e_1^2 = e_1^2 + e_1 e_2 = e_1$ and $e_2^2 = e_2$.
Setting $N = e_2(A^n)$, we see that $N$ is an $f$-invariant direct summand, since $f$ commutes with $e_2$ and $A^n = N \oplus e_1(A^n)$. Note $\overline{e_2}(A^n) = \overline{e_2}(k^n) = \bar{N}$, so we have constructed a lift.

For uniqueness we show that if $N'$ is any $f$-invariant direct summand lift with $\overline{N'} \subset \overline{N}$ then $N' \subset N$ with equality if and only if $\overline{N'} = \overline{N}$.
We have that $N'$ is a free submodule (since projective modules over a local ring are free).
Since $N'$ is $f$-invariant, we can consider the decomposition $N' = e_1(N') \oplus e_2(N')$.
Then $\overline{N'} = \overline{e_1}(\overline{N'}) \oplus \overline{e_2}(\overline{N'})$. We supposed that $\overline{N'} \subset \overline{N}$, and we know $\overline{e_1}(\overline{N}) = 0$ and $\overline{e_2}(\overline{N}) = \overline{N}$.
Thus $e_1(N')$ is a finite free $A$-module which is zero on reduction modulo $m_A$, so it is equal to $0$.
Hence $N' = e_2(N') \subset e_2(A^n) = N$.
Finally, if $\overline{N'} = \overline{N}$ then we have that $N'$ is a free $A$-submodule direct summand of $N$ of equal rank (as their reductions modulo $m_A$ have equal dimension), and we therefore have equality.

Applying Lemma <ref> to the adjoint action of $g$ on $A^n$, we see that $\Lzerobar$ admits a unique $\Ad(g)$-invariant direct summand lift to $\gA$, and we write this decomposition as $\gA = L_0 \oplus L_1$. We can also use Lemma <ref> to prove a generalisation which will be of use later.

Let $f_1,\ldots,f_m: A^n \to A^n$ be a commuting family of $A$-linear maps such that each $\bar{f_i}$ has all of its eigenvalues lying in $k$. For each vector $\lambda \in k^m$ let
$$\overline{V_\lambda} = \{v \in k^n: (\bar{f_i}-\lambda_i)^n(v) = 0 \text{ for } i=1,\ldots,m\}.$$

Then reduction modulo $m_A$ puts the following sets in bijection:

*  The set of $k$-subspaces of $k^n$ of the form $\oplus_{\lambda \in S} \overline{V_\lambda}$ for some $S \subset k^m$

*  The set of $A$-submodule direct summands of $A^n$ invariant under each $f_i$ whose reduction modulo $m_A$ is of the type defined in <ref>.

Let $e_{i,\lambda_i}$ denote the $f_i$-invariant projection from $A^n$ onto the unique $f_i$-invariant lift of the generalised $\lambda_i$-eigenspace for the action of $f_i$ on $k^n$, as in Lemma <ref>. Then $e_{i,\lambda_i}$ is a polynomial in $f_i$, and hence commutes with any other such $e_{j,\lambda_j}$. We show firstly that $\overline{V_{\lambda}}$ admits a lift to a direct summand of $A^n$ which is invariant under every $f_i$, and that this lift is unique.

We have that $\overline{V_\lambda} = \cap_{i=1}^m \overline{e_{i,\lambda_i}}(k^n)$. We claim that $V_\lambda = \cap_{i=1}^m e_{i,\lambda_i}(A^n)$ is such a lift. To see this, let $e = \prod_{i=1}^m e_{i,\lambda_i}$ and observe that $V_\lambda' = e(A^n)$ is equal to $V_{\lambda}$. Clearly we have $V_\lambda' \subset V_\lambda$, as the projection operators all commute.
Now let $v \in V_{\lambda}$.
Note that since each $e_{i,\lambda_i}$ is a projection operator, we have $v = e_{1,\lambda_1}(v)$, $v = e_{2,\lambda_2}(v) = e_{2,\lambda_2}(e_{1,\lambda_1}(v))$, and so on.
Thus we have $v = \prod_{i=1}^m e_{i,\lambda_i}(v) \in V_\lambda'$, establishing the claim.
We deduce that $e(A^n)$ is a lift of $\overline{V_\lambda} = \bar{e}(k^n)$.
Moreover, this lift is a direct summand of $A^n$.
Indeed, the operator $\Tilde{e} = \sum_{\mu \in k^n\setminus \{\lambda\}} \prod_{i=1}^m e_{i,\mu_i}$ satisfies $\Tilde{e} e = 0$, $\Tilde{e}^2 = \Tilde{e}$ and $\Tilde{e} + e = \id_{A^n}$.
Thus $\Tilde{e}(A^n)$ provides a direct sum complement to $e(A^n)$.
This lift is invariant under each $f_i$, as each $f_i$ commutes with $e$ and so $f_i(e(A^n)) = e(f_i(A^n)) \subset e(A^n)$.

To see uniqueness, observe that if $N$ is a direct summand lift of $\overline{V_\lambda}$ that is invariant under each $f_i$ then $N \subset e_{i,\lambda_i}(A^n)$ for every $i$ by Lemma <ref>.
It follows that $N \subset V_\lambda$ is a direct summand free $A$-submodule of the same rank (as their reductions modulo $m_A$ are equal), and hence are equal.

By taking direct sums of such $V_\lambda$ we have established the existence of $f_i$-invariant direct summand lifts.
To show uniqueness, suppose that $N \subset A^n$ is a direct summand $f_i$-invariant lift of $\oplus_{\lambda \in S} \overline{V_\lambda}$.
Then $N$ is free over $A$ and we can therefore write $N = \oplus_{\lambda \in S} V_\lambda'$, with each $V_\lambda'$ a direct summand $f_i$-invariant lift of $\overline{V_\lambda}$.
Since $N$ itself is a direct summand of $A^n$, it follows by the uniqueness of $V_\lambda$ shown already that $V_\lambda' = V_\lambda$ and we are done.

The following lemma provides another perspective on the lifts of Lemma <ref> in terms of topological nilpotents.

Let $f: A^n \to A^n$ be an $A$-linear map inducing $\bar{f}: k^n \to k^n$. The $\bar{f}$-invariant decomposition $k^n = \overline{V_0} \oplus \overline{V_1}$, where $\overline{V_0} = \ker \bar{f}^n$ admits a unique $f$-invariant lift $A^n = V_0 \oplus V_1$. Then
$$V_0 = \{v \in A^n| f^m(v) \to 0 \text{ as } m \to \infty\},$$
where convergence is with respect to the $m_A$-adic topology.

The existence and uniqueness of the decomposition follows from Lemma <ref>.
$$V_0' = \{v \in A^n| f^m(v) \to 0 \text{ as } m \to \infty\}.$$

If $v \in V_0$ then $\bar{f}^n(v \mod m_A) = 0$, so $f^n(v) \in m_A A^n \cap V_0 = m_A V_0$, since $V_0$ is a direct summand of $A^n$. Thus $f^n(V_0) \subset m_A V_0$ and so $f^{nu}(V_0) \subset (m_A)^u V_0$ for every $u \geq 1$.
It follows that $V_0 \subset V_0'$.

Now suppose $v \in V_0'$, and write $v = x+y$ with $x \in V_0$ and $y \in V_1$.
Then $y \in V_1 \cap V_0'$.
On the one hand, $f$ acts invertibly on $y$, since $\bar{f}$ has trivial kernel on $\overline{V_1}$.
On the other hand, $f^m(y) \to 0$ as $m \to \infty$, so $y \in (m_A)^m \cdot A^n$ for every $m$.
We conclude that $y = 0$ and $V_0 = V_0'$.

The $A$-submodule $L_0$ is a Lie subalgebra of $\gA$.

We need only check that $L_0$ is closed under the Lie bracket of $\gA$.
We will firstly consider the case that $A$ is Artinian, so $(m_A)^u = 0$ for some $u \geq 1$.
Let $f: \gA \to \gA$ denote the endomorphism $\Ad(g) - \id$ and define the increasing sequence of $A$-submodules $L_0^{(m)} = \{v \in L_0| f^m(v) = 0\}$.
Since $L_0$ is the $f$-invariant lift of $\ker \bar{f}$, we have by Lemma <ref> that $L_0 = \{v \in \gA| f^m(v) = 0 \text{ for some } m \geq 0\} = \bigcup_{m \geq 0} L_0^{(m)}$.
Let $x \in L_0^{(n)}$ and $x' \in L_0^{(m)}$.
We show that $[x,x'] \in L_0^{(n+m)}$ by induction on $n+m$. Notice that in the case $n=0$ we have $x = 0$ and so the result is clear. We need only show the inductive step then, where we may take both $n,m \neq 0$. Then write

\begin{align*}
\Ad(g)(x) &= x + y \\
\Ad(g)(x') &= x'+ y'
\end{align*}

where $f^{n-1}(y) = f^{n-1}(f(x)) = 0$ and similarly $f^{m-1}(y') = 0$. Thus $y \in L_0^{(n-1)}$ and $y' \in L_0^{(m-1)}$. We show $f([x,x']) \in L_0^{(n+m-1)}$ to deduce then that $[x,x'] \in L_0^{(n+m)}$, completing the argument. We have

\begin{align*}
f([x,x']) &= \Ad(g)([x,x']) - [x,x'] \\
&= [\Ad(g)(x),\Ad(g)(x')] - [x,x'] \\
&= [x+y,x'+y'] - [x,x'] \\
&= [y,x'] + [x,y'] + [y,y']
\end{align*}

where we have used that $\Ad(g)$ is a Lie algebra homomorphism on $\gA$. By induction hypothesis, the three terms all lie in $L_0^{(n+m-1)}$ and we are done in the Artinian case.

Suppose now that $A$ is not necessarily Artinian.
Let $x,x' \in L_0$ and let $u \geq 1$.
We wish to show that $f^m([x,x']) \in (m_A)^u \gA$ for all $m$ sufficiently large.
We know that there exists $M \geq 1$ such that for all $m \geq M$ we have $f^m(x),f^m(x') \in (m_A)^u \gA$.
From the argument above applied to $A/(m_A)^u$, we see that $f^{2m}([x,x']) \in (m_A)^u \gA$.
So indeed we have for every $m \geq 2M$ that $f^m([x,x']) \in (m_A)^u \gA$ and we are done.

§.§ Lifting $M_{\bar{g}}$

We will frequently wish to take the Lie algebra of a base-changed group scheme, and so we record the following lemma which will be of repeated use.

Let $G \to S$ be a smooth group scheme over a base scheme $S$ with identity section $e: S \to G$. Let $f: S' \to S$ be a morphism of schemes and let $G' = G \times_S S'$ be the base change.
Let $e': S' \to G'$ be the base-change of $e$.
Then we have an isomorphism

\begin{align*}
f^* e^* \Omega^1_{G/S} \cong (e')^* \Omega^1_{G'/S'}
\end{align*}

and, in particular, an isomorphism of Lie algebras

\begin{align*}
(\Lie G)_{S'} \cong \Lie G'.
\end{align*}

Letting $g: G' \to G$ be the natural map, there is an isomorphism $g^* \Omega^1_{G/S} \cong \Omega^1_{G'/S'}$ (<cit.>).
Pulling back by $e'$ we have

\begin{align*}
(e')^* \Omega^1_{G'/S'}  \cong (e')^* g^* \Omega^1_{G/S} \cong f^* e^* \Omega^1_{G/S}
\end{align*}

by functoriality of pullback.
Since pullback of locally free sheaves commutes with taking duals, we deduce the stated isomorphism of Lie algebras.

We will require later that taking centers of certain reductive groups will commute with formation of the Lie algebras.
For such statements to hold we need to make assumptions on the characteristic of $k$.
An example where such an equality does not hold is for $\SL_2$ in characteristic 2: the Lie algebra has 1-dimensional center spanned by the identity while $\SL_2$ has 0-dimensional center.
We recall the notion of pretty good characteristic, as in <cit.>.

Let $l$ be a prime number and $G$ a reductive group over a field $F$.
Denote the root datum of $G$ (with respect to some maximal torus over an algebraic closure of $F$) by $(X^*,\Phi,X_*,\Phi^\vee)$.
We say $l$ is a prime of pretty good characteristic for $G$ if for any subset $\Phi' \subset \Phi$ the abelian groups $X^*/\mathbb{Z}\Phi'$ and $X_*/\mathbb{Z}(\Phi')^\vee$ are $l$-torsion free.

For a given group $G$, we are only considering the $l$-torsion of finitely many finitely generated abelian groups and hence only finitely many primes $l$ are not of pretty good characteristic for $G$.
In our setting we have that if $l$ is a prime of pretty good characteristic for $\hat{G}$ then it is also of pretty good characteristic for $M_{\bar{g}}^\circ$, since the roots of $M_{\bar{g}}^\circ$ are a subset of the roots of $\hat{G}$ (and the character and cocharacter groups are equal).
From now on then we assume that $p = \ch k$ is a pretty good prime for $\hat{G}_k$.

One use of Definition <ref> to us comes from <cit.> and <cit.>.
Together these imply that if $\ch F = l$ is a prime of pretty good characteristic for $G$, then $Z_G(G)$ is smooth and in particular the Lie algebra $\mathfrak{g} = \Lie G$ is separable inside itself, in the sense that

\begin{equation} \label{lie algebra commute center}
\dim Z_{G}(\mathfrak{g}) = \dim \mathfrak{z}(\mathfrak{g}).
\end{equation}

From this discussion we deduce the following lemma, which is use for computations in later sections.

Let $\bar{H} = Z(M_{\bar{g}}^\circ)$.
Then there is an equality of Lie algebras $\Lie \bar{H} = \mathfrak{z}(\Lzerobar)$.

By <cit.> we always have $\bar{H} = Z_{M_{\bar{g}}^\circ}(\Lzerobar)$, the kernel of the adjoint representation, and hence equality of their Lie algebras.
The containment $\Lie \bar{H} \subset \mathfrak{z}(\Lzerobar)$ is clear from differentiating the adjoint action of $\bar{H}$ on $\Lzerobar$.
Thus they are equal, as by equality <ref> they are $k$-vector spaces of the same dimension.

In our applications in later sections, we will take $p$ to be a prime of order coprime to the Weyl group of $\hat{G}$.
This will, in particular, imply that $p$ is a prime of pretty good characteristic for $\hat{G}$ since $p$ will be a very good prime for $\hat{G}$ by <cit.> and hence a pretty good prime by <cit.>.

The next step in the construction of $M_g$ is to find an appropriate multiplicative type subgroup, which will be the center of $M_g$.
The key will be to find a suitable lift of a maximal torus of $\hat{G}_k$.
We recall some definitions and results from [21] which will aid us in this goal.

Let $\mathfrak{g}$ be a Lie algebra of dimension $n$ over a field $F$. For any $F$-algebra $R$ and for any $a \in \mathfrak{g}_R = \mathfrak{g} \otimes_F R$ we can consider the endomorphism of $\mathfrak{g}_R$ given by $\ad(a)$. We may write its characteristic polynomial as $P_\mathfrak{g}(a,t) = t^n + c_{n-1}(a) t^{n-1} + \cdots + c_0(a)$.
The nilpotent rank is the minimal $r \geq 0$ such that $c_r(a) \neq 0$ for some $a$.
Let $r$ denote the nilpotent rank of $\mathfrak{g}$.

With notation as above, we say that $a \in \mathfrak{g}$ is ad-regular if $c_r(a) \neq 0$.

The terminology `ad-regular' is not standard, but we use it to avoid conflict with the other notion of regular (which is that the centralizer has dimension as small as possible).

If $a \in \mathfrak{g}$ is any element we let $\Nil(a,\mathfrak{g}) = \bigcup_{u \geq 0} \ker(\ad(a)^u: \mathfrak{g} \to \mathfrak{g})$, a Lie subalgebra of $\mathfrak{g}$. If $a \in \mathfrak{g}$ is ad-regular then $\rank_k(\Nil(a,\mathfrak{g})) = r$ and we call $\Nil(a,\mathfrak{g})$ a Cartan subalgebra of $\mathfrak{g}$.
More generally <cit.>, if $S = \Spec R$ is any affine scheme and $\mathfrak{g}$ is a Lie algebra over $S$ we say a Lie subalgebra $\mathfrak{d} \subset \mathfrak{g}$ is a Cartan subalgebra if $\mathfrak{d}$ is locally a direct summand of $\mathfrak{g}$ and for every $s \in S$ we have that $\mathfrak{d}(s) \subset \mathfrak{g}(s)$ is a Cartan subalgebra in the sense described above. Here $\mathfrak{g}(s) = \mathfrak{g} \otimes_R k(s)$ is the fibre over $k(s)$.

Suppose that $a \in \gA$ is such that $\bar{a}$ is ad-regular in $\gk$.
Let $\mathfrak{d}$ denote the direct summand $\ad(a)$-invariant lift of $\Nil(\bar{a},\gk)$ to $\gA$.
Then $\mathfrak{d}$ is a Cartan subalgebra of $\gA$.

Let $S = \Spec A$.
Since $\hat{G}$ admits a maximal torus of rank $r \geq 0$, $\gA$ satisfies condition $(\text{C}_0)$ of <cit.> stating that the nilpotent rank of $\mathfrak{\hat{g}}(s)$ is a locally constant function of $s$ on $S$.
Then by <cit.>, the set $U$ of $s \in S$ for which $a(s)$ is ad-regular in $\mathfrak{\hat{g}}(s)$ is an open subset of $S$.
Thus since $U$ contains the closed point of $S$ corresponding to $m_A$, we have that $U = S$.

Let $f = \ad(a): \gA \to \gA$, and recall that the unique $f$-invariant lift of $\ker(\bar{f}^{\dim(\gk)}) = \Nil(\bar{a},\gk)$ is given by

\begin{equation}
\mathfrak{d} = \{a \in \gA : \ad(a)^m (x) \to 0 \text{ as } m \to \infty\}
\end{equation}

by Lemma <ref>.
We claim that $\mathfrak{d}$ is a Lie subalgebra.
Note that $f$ is an $A$-linear derivation, in the sense that $f([y,z]) = [f(y),z] + [y,f(z)]$ for every $y,z \in L_0$.
So suppose $y,z \in \mathfrak{d}$, and let $u \geq 1$.
There exists $M \geq 1$ such that $f^m(y),f^m(z) \in (m_A)^u \gA$ for every $m \geq M$.
Now suppose $m \geq 2M$.
Then since $f$ is a derivation,

f^m([y,z]) = \sum_{i=0}^m \binom{m}{i} [f^i(y), f^{m-i}(z)]

and each term in the sum lies in $(m_A)^u \gA$.
Hence $[y,z] \in \mathfrak{d}$.

Observe that there are inclusions $\mathfrak{d}(s) \supset \Nil(a(s),\mathfrak{\hat{g}}(s))$ for every $s \in S$.
Indeed, let $\eta$ denote the $f$-invariant direct sum complement to $\mathfrak{d}$ in $\gA$.
Then $f$ acts invertibly on $\eta$.
Hence writing $\mathfrak{\hat{g}}(s) = \mathfrak{d}(s) \oplus \eta(s)$, we see that $\ad(a(s))$ acts invertibly on $\eta(s)$, which shows the containment.
This inclusion is an equality, since both are $k(s)$-vector spaces of dimension $r$, as $a(s)$ is ad-regular and $r$ is the nilpotent rank of $\mathfrak{\hat{g}}(s)$.
We have therefore shown that $\mathfrak{d}$ is a Cartan subalgebra of $\gA$.

Let $S$ be a scheme and $G$ a group-scheme over $S$.
We say <cit.> $G$ is a torus if $G$ is locally isomorphic in the fpqc topology to a group of the form $\mathbb{G}_m^r$ for some $r \geq 0$.
We say <cit.> a subgroup-scheme $T$ of $G$ is a maximal torus if $T$ is a torus whose geometric fibres are maximal tori in the geometric fibres of $G$, in the classical sense.
By <cit.>, reduction modulo $m_A$ induces an equivalence of categories between the categories of finite type and multiplicative type group schemes over $A$ and those over $k$. Thus if we have a torus over $A$ such that its reduction modulo $m_A$ is split, then our torus over $A$ must also be split.

Now suppose that is $G$ is a smooth group scheme over $S$.
We say (<cit.>) that $G$ is root-smooth if for every geometric point $\bar{s}$ of $S$ and maximal torus $T$ of $G_{\bar{s}}$, every root $T \to \mathbb{G}_{m,\bar{s}}$ is a smooth morphism.
Equivalently, a root $\alpha$ is smooth if $X^*(T)/\mathbb{Z} \alpha$ is $\ch k(\bar{s})$-torsion free.
It therefore follows from Definition <ref> that $\hat{G}$ is root-smooth over $A$.
The following proposition is contained in <cit.> and allows us to pass between Cartan subalgebras and maximal tori in our setting.

Let $G$ be a root-smooth reductive group over a scheme $S$.
The Cartan subalgebras of $\mathfrak{g}$ are precisely the Lie algebras of the maximal $S$-tori of $G$.

Suppose $x \in L_0$ is any choice of lift of an ad-regular element of $\Lzerobar$.
Then there exists a Lie subalgebra $\mathfrak{t}$ of $L_0$ containing $x$ and a maximal torus $T$ of $\hat{G}_A$ with Lie algebra $\mathfrak{t}$.

Let $\mathfrak{t}$ denote the unique $\ad(x)$-invariant lift of $\Nil(\bar{x},\gk)$ to $\gA$.
Then $\mathfrak{t}$ is a Cartan subalgebra of $\gA$ by Proposition <ref> and we can find a maximal torus $T$ with $\Lie T = \mathfrak{t}$ by Proposition <ref>.
Hence we just need to show that $\mathfrak{t} \subset L_0$.
Since $L_0$ is a Lie algebra, the adjoint action of $x$ on $\gA$ restricts to an $A$-linear endomorphism of $L_0$.
We can therefore lift $\mathfrak{\bar{t}}$ to an $\ad(x)$-invariant direct summand of $L_0$.
Since $L_0$ is itself a direct summand of $\gA$, by uniqueness in Lemma <ref> this lift must equal $\mathfrak{t}$ and we are done.

By extending $k$ if necessary, we will assume from now on that $M_{\bar{g}}$ contains a split maximal torus $\bar{T}$ whose Lie algebra $\mathfrak{\bar{t}}$ contains an ad-regular element $\bar{x}$ of $\gk$.
Let $x$ be an arbitrary lift of $\bar{x}$ to $L_0$ and let $T$ be the maximal torus arising from Corollary <ref>.
Necessarily $T$ is split, since we assumed $\bar{T}$ is split.
Now recall that $\bar{H} = Z(M_{\bar{g}}^\circ)$ is the scheme-theoretic centre of $M_{\bar{g}}^\circ$, a subgroup of $\bar{T}$ of multiplicative type.
We claim that there exists a unique subgroup $H \subset T$ lifting $\bar{H}$.
Indeed, by <cit.> we deduce an antiequivalence of categories between finite $\mathbb{Z}$-modules and split multiplicative groups of finite type on any connected scheme, and that this is compatible with base change to a connected scheme.
So $\bar{H}$ corresponds to a quotient of the finite free module defining $\bar{T}$, and thus under the antiequivalence correspond to subgroup of $T$ lifting $H$.

We are now ready to define $M_g$ and show the desired properties.

Let $\bar{g} \in \hat{G}(k)$ be semisimple with centralizer $M_{\bar{g}}$, whose Lie algebra is denoted by $\Lzerobar$.
Let $A \in \CNL_{\CalO}$ and let $g \in \hat{G}(A)$ be a lift of $\bar{g}$.

* There exists a unique connected reductive closed subgroup-scheme $M_g^\circ$ of $\hat{G}_A$ with the following properties:

*  $(M_g^\circ)_k = M_{\bar{g}}^\circ$ as subgroups of $\hat{G}_k$

*  $\Lie M_g^\circ = L_0$

*  $g \in M_g^\circ(A)$.

Here we recall that $\gA = L_0 \oplus L_1$ is the unique $\Ad(g)$-invariant lift of the $\Ad(\bar{g})$-invariant decomposition $\gk = \Lzerobar \oplus \overline{L_1}$.

* There exists a unique multiplicative type subgroup scheme $S$ of $Z(M_g^\circ)$ such that $S_k = Z(M_{\bar{g}})$.
Let $M_g = Z_{\hat{G}_A}(S)$.
Then $M_g$ has identity component $M_g^\circ$ and $(M_g)_k = M_{\bar{g}}$ as subgroups of $\hat{G}_k$.

Set $M_g^\circ = Z_{\hat{G}_A}(H)^\circ$ to be the identity component of the scheme-theoretic centralizer of $H$.
The group scheme $M_g^\circ$ is reductive and smooth over $A$ by the discussion preceding <cit.>.
We show <ref> firstly.
By definition of scheme-theoretic centralizer, we have that $Z_{\hat{G}_A}(H)_k = Z_{\hat{G}_k}(H_k)$.
We have an inclusion $M_{\bar{g}}^\circ \subset Z_{\hat{G}_k}(H_k)$ which is immediate from the definitions.
We also have an inclusion $Z_{\hat{G}_k}(H_k) \subset M_{\bar{g}}$ which follows because $\bar{g} \in H_k(k)$.
From the discussion in <cit.> we see that $(M_g^\circ)_k = (Z_{\hat{G}_A}(H)_k)^\circ$ and we deduce that <ref> holds from the above inclusions.

Recalling that $\bar{H} = H_k$ is the centre of $M_{\bar{g}}$, <ref> would follow if we have $Z_{\hat{G}_k}(Z(M_{\bar{g}})) = M_{\bar{g}}$.
Certainly we have $M_{\bar{g}} \subset Z_{\hat{G}_k}(\bar{H})$. For the other containment we note that $\bar{g} \in Z(M_{\bar{g}})(R)$ for every $k$-algebra $R$, and hence if $h \in Z_{\hat{G}_k}(Z(M_{\bar{g}}))(R)$ then $h \bar{g} h^{-1} = \bar{g}$ (so $h$ is in the centralizer of $\bar{g}$ giving the other containment).

Next we note that $\Lie M_g^\circ$ is a lift of $\Lzerobar$. Indeed, we have that taking Lie algebras is compatible with base-change, so $(\Lie M_g^\circ)_k = \Lie (M_g^\circ)_k = \Lie M_{\bar{g}}^\circ = \Lzerobar$ by <ref>.
We have that $\Lie M_g^\circ = \Lie Z_{\hat{G}_A}(H) = (\gA)^H$ by <cit.> and that $\Lie M_g$ is a direct summand of $\gA$.
Indeed, the action of the split multiplicative group $H$ on the finite free $A$-module $\gA$ induces a grading indexed by the character group of $H$ (see <cit.>).
Then $(\gA)^H$ is the graded piece corresponding to the trivial character, hence is a direct summand.

We have direct summand submodules $L_0$ and $\Lie M_g$ of $\gA$, both containing $\mathfrak{t}$, with reductions modulo $m_A$ both equal to $\Lzerobar$. Since $\bar{T}$ is a split maximal torus in $\hat{G}_k$, $\gk$ admits a root space decomposition $\gk = \mathfrak{\bar{t}} \oplus \bigoplus_{\alpha} \hat{\mathfrak{g}}_{\alpha}$.
These $\hat{\mathfrak{g}}_{\alpha}$ come in pairs, and are distinct subspaces for different pairs (even when $\ch k = 2$).
We also have that $\Lzerobar = \Lie M_{\bar{g}}$ admits such a decomposition, hence necessarily corresponding to a subset of pairs of roots.
Applying Lemma <ref> to the adjoint action of a basis of $\mathfrak{t}$ on $\gA$, we see that $L_0$ must equal $\Lie M_g$.

We now show $\ref{g_in_Mg}$.
Since $Z(M_g^\circ) = \ker(\Ad: M_g^\circ \to \GL(L_0))$ by <cit.> and $\Ad(g): L_0 \to L_0$ we see that $g$ normalizes $Z(M_g^\circ)$.
Note that $Z(M_g^\circ)$ lifts $Z(M_{\bar{g}}^\circ) = \bar{H}$ by definition of scheme theoretic centralizer.
Thus since $H \subset Z(M_g^\circ)$ are both multiplicative type subgroup schemes of a torus lifting $\bar{H}$ they must be equal.
Since $\bar{g} \in \bar{H}(k)$, the morphism of split multiplicative type groups $\Ad(\bar{g}): \bar{H} \to \bar{H}$ is trivial.
Thus $\restr{\Ad(g)}{H}$ is an automorphism which is trivial $\mod m_A$.
By <cit.>, this implies that the conjugation action of $g$ on $H$ is trivial.
By definition, we have $Z_{\hat{G}_A}(H)(A) = \{z \in \hat{G}_A(A): \restr{\Ad(z)}{H} = \id_H\}$, so we have shown $g \in Z_{\hat{G}_A}(H)(A)$.
We deduce that $g \in M_g^\circ(A)$ since $\bar{g} \in M_g^\circ(k)$ and $\Spec A$ is connected.

Uniqueness of such a subgroup $M_g^\circ$ satisfying <ref> follows from <cit.> since $\mathfrak{t} \subset L_0$ is Cartan subalgebra of $\mathfrak{g}_A$.

Finally, we show the second part of the theorem.
We observe that $Z_{\hat{G}_k}(S_k) = M_{\bar{g}}$ since $\bar{g} \in S_k(k)$.
We therefore have $Z_{\hat{G}_k}(S_k)^\circ = M_{\bar{g}}^\circ$.
The properties of $M_g$ are now clear by definition of scheme theoretic centralizer and because taking identity components commutes with base change in this setting.

§.§ Functoriality properties of $M_{g}$

Having constructed $M_g$, we now show some properties which will be useful in defining our deformation condition.

The center of $M_g$, $Z(M_g)$, lifts $Z(M_{\bar{g}})$.

This is immediate by functoriality of scheme-theoretic center.

We now show that the construction of $M_g$ is compatible with changing $g$ by an element $h \in \ker(\hat{G}(A) \to ~\hat{G}(k))$, in the following senses.

Let $h \in \ker(\hat{G}(A) \to \hat{G}(k))$. Then

* $M_{h g h^{-1}} = \Ad(h)(M_g)$;

* if additionally $h \in M_g(A)$ then $M_{gh} = M_g$.

We prove <ref> firstly.
We show that the Lie algebras of $M_{h g h^{-1}}$ and $\Ad(h)(M_g)$ coincide:

\begin{align*}
\Lie M_{h g h^{-1}} &= \{v \in \gA: (\Ad(hgh^{-1}) - 1)^u v  \to 0 \text{ as } m \to \infty\} \\
&= \{v \in \gA: (\Ad(h) \Ad(g) \Ad(h)^{-1} - 1)^u v  \to 0 \text{ as } m \to \infty\} \\
&= \{v \in \gA: \Ad(h)( \Ad(g)  - 1)^u \Ad(h)^{-1} v  \to 0 \text{ as } m \to \infty\} \\
&= \Ad(h) \{v \in \gA: ( \Ad(g)  - 1)^u v  \to 0 \text{ as } m \to \infty\} \\
&= \Ad(h) (\Lie M_g) \\
&= \Lie \Ad(h)(M_g).
\end{align*}

Equality of $M^\circ_{h g h^{-1}}$ and $\Ad(h)(M_g^\circ)$ then follows, just as in the proof of uniqueness in Theorem <ref>.
If $S$ is the unique subgroup scheme of $Z(M_g^\circ)$ lifting $Z(M_{\bar{g}})$ then $\Ad(h)(S)$ is the unique subgroup scheme of $Z(M_{h g h^{-1}}^\circ)$ lifting $Z(M_{\bar{g}})$ and the equality $M_{h g h^{-1}} = \Ad(h)(M_g)$ is then clear.

Now suppose in addition that $h \in M_g(A)$.
We have a semisimple element $\bar{g} \in M_g^\circ(k)$ and a lift $gh \in M_g^\circ(A)$.
Thus we can apply Theorem <ref> to the reductive group $M_g^\circ$ to define a connected, reductive, closed subgroup-scheme $N$ of $M_g^\circ$ with the properties

* $N$ lifts $Z_{M_{\bar{g}}^\circ}(\bar{g}) = M_{\bar{g}}^\circ$

* $\Lie N  = \{v \in \Lie M_g^\circ : (\Ad(gh)-1)^u v \to 0 \text{ as } u \to \infty\}$.

It follows that $N = M_g^\circ$, and therefore $\Lie M_g^\circ = \Lie N \subset \Lie M_{gh}^\circ$.
By symmetry we have equality of Lie algebras and hence equality of $M_g^\circ$ and $M_{gh}^\circ$ just as above.
The constructions of $M_g$ and $M_{gh}$ are given by taking the centralizer of the same multiplicative type group scheme inside $\hat{G}_A$ and therefore also coincide.

As an application, we obtain the following corollary which will be of use in identifying Selmer groups corresponding to our deformation condition in Section <ref>.

Suppose $A = k[\epsilon]$ and identify $\gk = \ker(\hat{G}(k[\epsilon]) \to \hat{G}(k)) \subset \hat{G}(k[\epsilon])$.
Then $\gk \cap M_{\bar{g}}(k[\epsilon]) = \gk \cap M_{g}(k[\epsilon])$ and $\gk \cap Z(M_{\bar{g}})(k[\epsilon]) = \gk \cap Z(M_{g})(k[\epsilon])$.

Observe firstly that for $h \in \gk$ we have $\gk \cap M_{g}(k[\epsilon]) = \gk \cap M_{h g h^{-1}}(k[\epsilon])$, since conjugation by $h$ acts trivially on $\gk$.
Since conjugation will also send centers to centers, we may freely replace $g$ by its conjugate under an element of $\gk$.
Now suppose we are in the situation that $g = \bar{g} \delta$ where $\delta \in M_{\bar{g}}(k[\epsilon])$.
Then since $g$ is a lift of $\bar{g}$, we have $\delta \in \gk$ and so by Lemma [multiply g]<ref>change_of_g <ref>multiply g we have $M_{\bar{g} \delta} = M_{\bar{g}}$.
Thus equality of their centers also holds.

Thus we just need to find some $h \in \gk$ such that $\bar{g}^{-1} h g h^{-1} \in M_{\bar{g}}(k[\epsilon])$. Writing $g = \bar{g} \gamma$ for $\gamma \in \gk$ we require, switching now to additive notation, that

$$\Ad({\bar{g}}^{-1})(h) + \gamma - h \in  \Lzerobar.$$

Letting $\overline{L_1}$ be the $\Ad(\bar{g})$-invariant complement to $\Lzerobar$, we know that $\Ad(\bar{g})-\id$ restricts to a vector space automorphism of this subspace.
Thus we may write
$$\Ad(\bar{g})(\gamma) \equiv (\Ad(\bar{g}) - \id)(h) \mod \Lzerobar$$
for some $h \in \gk$. Taking $\Ad(\bar{g})^{-1}$ of this equality, we are done.

We now show compatibility under changing the coefficient ring $A$.

Let $\varphi: A \to B$ be a morphism in $\CNL_\mathcal{O}$.
Let $g' \in \hat{G}(B)$ denote the image of $g$ under the map $\hat{G}(\varphi): \hat{G}(A) \to \hat{G}(B)$.
Then under the natural identification of $(\hat{G}_A)_B$ with $\hat{G}_B$, we have $(M_g)_B = M_{g'}$ and $Z(M_g)^\circ_B = Z(M_{g'})^\circ$. In particular, we have the equality $Z(M_g)^\circ(B) = Z(M_{g'})^\circ(B)$.

We may identify $\Lie (M_g)_B$ with $\Lie M_g \otimes_A B$ by compatibility of Lie algebras under base-change. This isomorphism is also compatible with the action of $\Ad(g)$ in the sense that $\Ad(g')(v \otimes b) = \Ad(g)(v) \otimes b$ for any $v \in \gA$ and $b \in B$.
Hence we have a containment of Lie algebras $\Lie (M_g)_B \subset \Lie M_{g'}$.
Indeed, if $v \in \Lie M_g$ and $b \in B$ then $(\Ad(g')-1)^u(v \otimes b) = (\Ad(g)-1)^u(v) \otimes b \to 0$ as $u \to \infty$.
The Lie algebras are both free and direct summand $B$-submodules of equal ranks (as their reductions $\mod m_B$ coincide) and hence are equal.
We deduce that $(M_g^\circ)_B = M_{g'}^\circ$.
Letting $S$ be the unique subgroup of $Z(M_g^\circ)$ lifting $Z(M_{\bar{g}})$ we see that $S_B$ is a subgroup of $Z(M_{g'}^\circ)$ lifting $Z(M_{\bar{g}})$.
Thus $Z(M_g)_B = Z(M_{g'})$ and $(M_g)_B = M_{g'}$ from which the lemma follows.

We have by functoriality of base-change that $(M_g)_B$ reduces to $M_{\bar{g}}$ modulo $m_B$ and that $g' \in M_g(B) = (M_g)_B(B)$, as $g \in M_g(A)$.
So by uniqueness in Theorem <ref>, they are equal.
By definition of scheme-theoretic centre, we have that $Z((M_g)_B) = Z(M_g)_B$, and hence the lemma follows.

§.§ A construction of $M_g^\circ$ over $\Qpbar$

For the remainder of this section suppose that $A =~\mathcal{O}$.
We give a description of $(M_g^\circ)_{\Qpbar}$ and its center which depend only on the knowledge of the semisimple part of $g$ in its Jordan decomposition.

Let $g = g_{ss} g_u$ be the multiplicative Jordan decomposition of $g$ in $\hat{G}(\Qpbar)$.
Let $T$ be any maximal torus of $Z_{\hat{G}_{\Qpbar}}(g_{ss})$ and let
$$N_{g_{ss}} = \langle T, U_\alpha | \alpha \in \Phi(\hat{G},T), \alpha(g_{ss}) \equiv 1 \mod m_{\Zpbar} \rangle^\circ,$$

where $U_\alpha$ denotes the root group for $\alpha$.
Then $N_{g_{ss}} = (M_g^\circ)_{\Qpbar}$.

Let $L \leq \hat{\mathfrak{g}}_{\Qpbar}$ be given by the sum of generalized eigenspaces for the action of $\Ad(g_{ss})$ on $\hat{\mathfrak{g}}_{\Qpbar}$ with eigenvalues congruent to $1 \mod m_{\Zpbar}$.
We firstly show that $L$ coincides with $(\Lie M_g^\circ)_{\Qpbar}$.
The generalized eigenspaces for the actions of $\Ad(g)$ and $\Ad(g_{ss})$ on $\g_{\Qpbar}$ coincide.
It then follows because $\Lie M_g^\circ = L_0$ is given by the sum of topological nilpotents for the action of $\Ad(g) - 1$, while its $\Ad(g)$-invariant complement is given by the sum of topological nilpotents for the action of $\Ad(g) - \lambda$ for all eigenvalues $\lambda \in \Zpbar^\times$ with $\lambda \not\equiv 1 \mod m_{\Zpbar}$.

We next claim that

$$\Lie N_{g_{ss}} = \langle \Lie T \oplus \bigoplus_{\alpha \in \Phi(\hat{G},T), \alpha(g_{ss}) \equiv 1 \mod m_{\Zpbar} } \hat{\mathfrak{g}}_\alpha \rangle$$

coincides with $L$.
Since the action of $\Ad(g_{ss})$ on $\Lie \hat{G}$ is the identity on $\Lie T$ and given by $\alpha(g_{ss})$ on a root space $\hat{\mathfrak{g}}_\alpha$, they must coincide as $L$ is a Lie algebra.
Thus $N_g = (M_g^\circ)_{\Qpbar}$, as their Lie algebras coincide (and contain a Cartan subalgebra of $\mathfrak{g}_{\Qpbar}$).

We deduce the following corollary, which we use in Section <ref>.

If $g_1,g_2 \in \hat{G}(\CalO)$ are lifts of $\bar{g}$ and there exists $h \in \hat{G}(\Qpbar)$ for which $\Ad(h)(g_{1,ss}) = g_{2,ss}$ then $\Ad(h)((M_{g_1}^\circ)_{\Qpbar}) = (M_{g_2}^\circ)_{\Qpbar}$ and $\Ad(h)(Z(M_{g_1}^\circ)_{\Qpbar}) = Z(M_{g_2}^\circ)_{\Qpbar}$.

§ DEFORMATION THEORY

Continue with notation as in the start of Section <ref>.
We make a further assumption on $p = \ch k$ by taking $p$ to be a very good prime for $\hat{G}$.
Let $F$ be a global field, so that $F$ is either a number field or the function field of a smooth, projective, geometrically connected curve $X$ over a finite field $\mathbb{F}_q$ (whose characteristic we suppose is prime to $p$).
Fix a separable closure $\overline{F}$ of $F$ and denote the absolute Galois group by $G_F$.
If $S$ is a finite set of finite places of $F$, let $F_S$ denote the maximal extension of $F$ unramified outside of $S$ with Galois group $G_{F,S} = \Gal(F_S/F)$.
We let $S_p$ denote the (possibly empty) set of places of $F$ dividing $p$.

Let $\bar{\rho}: G_{F} \to \hat{G}(k)$ be an absolutely $\hat{G}$-irreducible representation, continuous with respect to the usual profinite topology on $G_{F}$ and discrete topology on $\hat{G}(k)$, and unramified outside of fixed finite set $S$ of finite places of $F$ (so that we can, and will, view $\bar{\rho}$ as a representation of $G_{F,S}$).
Recall that absolutely $\hat{G}$-irreduciblity means that the image of $G_F$ is not contained inside (the $\Fpbar$-points of) any proper parabolic subgroup of $\hat{G}_{\Fpbar}$.
By <cit.>, this implies that $Z_{\hat{G}}(\bar{\rho}(G_F))$ is finite modulo $Z(\hat{G})$, and hence that the invariants of $\gk$ under the adjoint action of $G_F$ via $\bar{\rho}$ are exactly $\mathfrak{z}(\gk)$.
We let $\gk^0$ denote the Lie algebra of $\hat{G}_k^{\der}$, viewed as a $G_{F}$-module via the adjoint action under $\bar{\rho}$.
Since we are in very good characteristic for $\hat{G}$, we in fact have a decomposition $\gk = \gk^0 \oplus \mathfrak{z}(\gk)$ as $G_{F}$-modules.
By extending $k$ if necessary, we assume throughout this section that for every semisimple element $\bar{g}$ in the image of $\bar{\rho}$ there exists a split maximal torus $T$ defined over $k$ such that $\bar{g} \in T(k)$ and that $\Lie T$ contains an ad-regular element, in the sense of Definition <ref>.

If $v$ is a place of $F$, let $F_v$ denote the completion of $F$ with residue field $k(v)$ of finite cardinality $q_v$ and fix an embedding of $\overline{F}$ into a separable closure $\overline{F_v}$ of $F_v$, defining inertia and decomposition subgroups $I_v \subset G_{F_v} \subset G_F$.
We will let $\bar{\rho}_v = \restr{\bar{\rho}}{G_{F_v}}$.
If, for each $v \in S$, we are given $\Lambda_v \in \CNL_{\CalO}$ then we will let $\Lambda = \hat{\otimes}_{v \in S, \mathcal{O}} \Lambda_v$ be the completed tensor product and let $\CNL_{\Lambda}$ be the category of complete Noetherian local $\Lambda$-algebras with residue field $k$.
Let $\CGhat$ denote the cocenter of $\hat{G}$, the quotient of $\hat{G}$ by its derived group, and let $\nu: \hat{G} \to \CGhat$ be this quotient map.
Fix a continuous character $\psi: G_{F,S} \to \CGhat(\CalO)$ such that $\nu \circ \bar{\rho} = (\psi \mod \lambda)$, which may be thought of by analogy with fixing the determinant when $\hat{G} = \GL_n$.

§.§ Deformation theory of representations

Firstly, let us recall some of the theory of deformation problems, as in [18].

Let $\Gamma$ be a profinite group, $\bar{\rho}: \Gamma \to \hat{G}(k)$ be a continuous representation and $\Lambda \in \CNL_{\CalO}$.

* Let $(\theta: \Lambda \to A)  \in \CNL_{\Lambda}$.
A lift $\rho: \Gamma \to \hat{G}(A)$ is a continuous homomorphism satisfying $\rho \mod m_A = \bar{\rho}$.
Such a lift $\rho$ is said to have similitude character $\psi$ if $\nu \circ \rho = \theta \circ \psi$.
This defines the functor of lifts (also called framed deformations)
$$D_{\bar{\rho}}^{\square}: \CNL_{\Lambda} \to \catname{Set}$$
sending $A \in \CNL_{\Lambda}$ to the set of lifts of similitude character $\psi$.

* If $A \in \CNL_{\Lambda}$, a deformation is a strict equivalence class of lifts of similitude character $\psi$, where two lifts in $D_{\bar{\rho}}^{\square}(A)$ are said to be strictly equivalent if they are conjugate by an element of $\ker(\hat{G}(A) \to \hat{G}(k))$.
This defines a functor
$$D_{\bar{\rho}}: \CNL_{\Lambda} \to \catname{Set}$$
assigning $A \in \CNL_{\Lambda}$ to the set of deformations valued in $A$.
Note that if any representative of a strict equivalence class has similitude character $\psi$, then all of representatives do.

We say a functor $D: \CNL_{\Lambda} \to \catname{Set}$ is representable if there exists $R \in \CNL_{\Lambda}$ and a natural equivalence between $D$ and the functor $h_R = \Hom_{\CNL_{\Lambda}}(R,-)$.
If $\mathcal{D},D: \CNL_{\Lambda} \to \catname{Set}$ are two functors with $\mathcal{D} \subset D$ a subfunctor, we say $\mathcal{D}$ is relatively representable to $D$ if the following condition holds: for every pair of morphisms $A \to C \xleftarrow{} B$ in $\CNL_{\Lambda}$ the diagram

𝒟(A ×_C B) [r] [d]     𝒟(A) ×_𝒟(C) 𝒟(B) [d]

D(A ×_C B) [r]                         D(A) ×_D(C) D(B)

is cartesian.
By Grothendieck's theorem on representability <cit.>, we see that if $D$ itself is representable, then $\mathcal{D}$ is representable if and only if $\mathcal{D}$ is relatively representable to $D$.
If $D$ is represented by $R$ and $\mathcal{D}$ is relatively representable then $\mathcal{D}$ will be represented by a quotient of $R$.

We will use notation similar to <cit.> in defining local and global deformation problems.

Let $v \in S$.
Let $D_v^\square: \CNL_{\Lambda_v} \to \catname{Set}$ denote the functor of liftings for $\restr{\bar{\rho}}{G_{F_v}}: G_{F_v} \to \hat{G}(k)$.
A local deformation problem for $\restr{\bar{\rho}}{G_{F_v}}$ is a subfunctor $\mathcal{D}_v^\square$ of $D_v^\square$ which is relatively representable and is closed under strict equivalence.

Since $G_{F_v}$ satisfies Mazur's $\Phi_p$-condition (see <cit.>), the functor of lifts $D_v^\square$ is representable (see <cit.>) by some $R_v^{\square} \in \CNL_{\Lambda_v}$.
Hence any local deformation problem will be representable by a quotient of $R_v^{\square}$.
If $\mathcal{D}_v^\square$ is any local deformation problem, we will let $\mathcal{D}_v$ denote the functor of strict equivalence classes of $\mathcal{D}_v^\square$.
In particular, $D_v$ will denote the functor of all deformations of $\bar{\rho}_v$.

A global deformation problem is a tuple

where for $v \in S$, $\mathcal{D}_v^\square$ is a local deformation problem.
For $A \in \CNL_{\Lambda}$, a lift $\rho: G_{F,S} \to \hat{G}(A)$ is of type $\mathcal{S}$ if $\nu \circ \rho$ equals the image of $\psi$ and $\restr{\rho}{G_{F_v}} \in \mathcal{D}_v^\square(A)$ (where we view $A \in \CNL_{\Lambda_v}$ via the natural map $\Lambda_v \to \Lambda$).
We let $\mathcal{D}_{\mathcal{S}}$ denote the functor sending $A \in \CNL_{\Lambda_v}$ to the set of strict equivalence classes of $A$-valued lifts of type $\mathcal{S}$.

Let $\mathcal{S} = (\bar{\rho},S,\{\Lambda_v\}_{v \in S}, \psi, \{\mathcal{D}_v\}_{v \in S})$ be a global deformation problem and let $T \subset S$.
If $T \subset S$ and $A \in \CNL_{\Lambda}$, a $T$-framed lift of type $\mathcal{S}$ is a tuple $(\rho,\{\gamma_v\}_{v \in T})$ where $\rho: G_{F,S} \to \hat{G}(A)$ is a lift of type $\mathcal{S}$ and $\gamma_v \in \ker(\hat{G}(A) \to \hat{G}(k))$ for every $v \in T$.
Two $T$-framed lifts $(\rho,\{\gamma_v\}_{v \in T})$ and $(\rho',\{\gamma'_v\}_{v \in T})$ are said to be strictly equivalent if there exists $\alpha \in \ker(\hat{G}(A) \to \hat{G}(k))$ such that $\rho' = \alpha \rho \alpha^{-1}$ and $\gamma'_v = \alpha\gamma_v$ for every $v \in T$.
A strict equivalence class of $T$-framed lifts is called a $T$-framed deformation and the functor sending $A$ to the set of $T$-framed deformations is denoted $\mathcal{D}_\mathcal{S}^T$.

Let $\Sglobdp$ be a global deformation problem.
The functor $\mathcal{D}_\mathcal{S}$ is representable by an object $R_{\mathcal{S}}$ of $\CNL_{\Lambda}$.
If $T \subset S$ then the functor $\mathcal{D}_\mathcal{S}^T$ is representable by an object $R^T_{\mathcal{S}}$ of $\CNL_{\Lambda}$.

This can be proved in the same way as the proof of <cit.>, since $\gk^{\bar{\rho}(G_{F,S})} = \mathfrak{z}(\gk)$.

Now suppose $v \in S \setminus S_p$ is a place and $\mathcal{D}_v^\square: \CNL_{\Lambda_v} \to \catname{Set}$ is a local deformation problem.
As explained in <cit.>, local Tate duality gives a perfect pairing

\begin{align*}
H^1(G_{F_v},\gk^0) \times H^1(G_{F_v},\gkv) \to H^2(G_{F_v}, \mu),
\end{align*}

where $\mu = \bigcup_{n \in \mathbb{N}} \mu_n(\overline{F_v})$ and

* if $F$ is a number field then $H^2(G_{F_v}, \mu) \cong \mathbb{Q}/\mathbb{Z}$,

* if $F$ has positive characteristic $l$, then $H^2(G_{F_v}, \mu) \cong \bigcup_{l \nmid n} \frac{1}{n}\mathbb{Z}/\mathbb{Z}$.

We will define the Selmer conditions for $\mathcal{D}_v$, which will be subspaces $\mathcal{L}_v \subset H^1(G_{F_v},\gk^0)$ and $\mathcal{L}_v^\perp \subset H^1(G_{F_v},\gkv)$ dual to each other under the local Tate pairing.

Take $v$ and $\mathcal{D}_v^\square$ as above and let $\mathcal{D}_v$ be the arising functor of deformations.
Let $\mathcal{D}_v(k[\epsilon])$ be the tangent space of the functor $\mathcal{D}_v$.
The Selmer condition, $\mathcal{L}_v$, is the subspace given by the image of $\mathcal{D}_v(k[\epsilon])$ in $H^1(G_{F_v}, \gk^0)$ under the isomorphism $D_v(k[\epsilon]) \cong H^1(G_{F_v}, \gk^0)$.
The dual Selmer condition, $\mathcal{L}_v^\perp \subset H^1(G_{F_v}, \gkv)$, is the annihilator of $\mathcal{L}_v$ under the Tate pairing.

Note that any local deformation problem defines a subspace of $H^1(G_{F_v}, \gk^0)$ rather than just $H^1(G_{F_v}, \gk)$, since we have fixed the similitude character $\psi$ (and hence the arising cocyles will have trivial image under projection to $\Lie Z(\hat{G})$).
We can now define the Selmer groups arising from a global deformation problem.

Let $\Sglobdp$ be a global deformation problem and let $T \subset S$ with $S_p \subset T$.
For $v \in S \setminus T$ let $\mathcal{L}_v$ and $\mathcal{L}_v^\perp$ be the subspaces arising from Definition <ref> applied to $\mathcal{D}_v^\square$.
The Selmer groups for $\mathcal{S}$ and $T$ are given by

\begin{align*}
H^1_{\mathcal{S},T}(\gk^0) &= \ker\left(H^1(G_{F,S},\gk^0) \to \prod_{v \in S \setminus T}\frac{H^1(G_{F_v},\gk^0)}{\mathcal{L}_v} \times \prod_{v \in T} H^1(G_{F_v},\gk^0)\right) \\
H^1_{\mathcal{S}^\perp,T}(\gkv) &= \ker\left(H^1(G_{F,S},\gkv) \to \prod_{v \in S \setminus T}\frac{H^1(G_{F_v},\gkv)}{\mathcal{L}_v^\perp}\right).
\end{align*}

§.§ Taylor–Wiles places

We begin this section by giving a modified definition of what it means to be a Taylor–Wiles place.

We say a finite place $v \not\in S$ of $F$ is a Taylor–Wiles place if $q_v \equiv 1 \mod p$ and $\bar{g}_v := \bar{\rho}(\phi_v) \in \hat{G}(k)$ is semisimple where $\phi_v \in G_{F_v}$ is any choice of lift of (geometric) Frobenius element.
Such a place is said to be of level $n \geq 1$ if $q_v \equiv 1 \mod p^n$.

In <cit.>, there is no insistence of Taylor–Wiles places having image of Frobenius with a multiplicity one eigenvalue, as was the case for previous work in the $\hat{G} = \GL_n$ case.
As explained in the introduction, Definition <ref> is an attempt to make an analogous generalization for a general reductive group $\hat{G}$, by allowing $v$ for which $\bar{g}_v$ is only semisimple rather than regular-semisimple.
It is therefore necessary for us impose a deformation condition at such Taylor–Wiles places $v$ to ensure that the image of inertia subgroup at $v$ is still valued in a torus, as is automatic in the regular-semisimple case.

If $v$ is a Taylor–Wiles place, let $\phi_v \in G_{F_v}$ be a fixed choice of lift of the Frobenius element at $v$.
Let $\bar{g}_v$ be as in Definition <ref> and let $M_{\bar{g}_v} := Z_{\hat{G}_k}(\bar{g}_v)$ denote the centralizer of $\bar{g}_v$ in $\hat{G}_k$.
These are independent of the choice of $\phi_v$ since $\bar{\rho}$ is unramified at $v$.

A Taylor–Wiles datum is a pair

(Q,\{(\hat{T}_v,\hat{B}_v)\}_{v \in Q})

where $Q$ is a set of Taylor–Wiles places and, for each $v \in Q$, $\hat{T}_v \subset \hat{G}_k$ is a split maximal torus defined over $k$ containing $Z(M_{\bar{g}_v})^\circ$ and $\hat{B}_v$ is a Borel subgroup of $\hat{G}_k$ containing $\hat{T}_v$.

Fixing a maximal torus and Borel subgroup can be seen as analogous to fixing an ordering on the eigenvalues of $g_v$.
Now let $(Q,\{(\hat{T}_v,\hat{B}_v)\}_{v \in Q})$ be a Taylor–Wiles datum.
We will set $\Lambda_v = \CalO$ for $v \in Q$ and define a local deformation problem $\DvTW$ for $v \in Q$.

Let $v \in Q$ be a Taylor–Wiles place.
Define a subfunctor $\DvTW \subset D_v^\square$ whose image for $A \in \CNL_\CalO$ is given by those lifts $\rho_v: G_{F_v} \to \hat{G}(A)$ for which $\rho_v(I_v) \subset Z(M_{g_v})^\circ(A)$.
Here $g_v = \rho_v(\phi_v)$ and $M_{g_v}$ is the subgroup constructed in Theorem <ref>.

We make the following two remarks on Definition <ref>.

* Definition <ref> is independent of the choice of lift of Frobenius, $\phi_v$, by Lemma <ref>.

* For $\rho_v \in \DvTW(A)$ the representation has image in $M_{g_v}(A)$ since $G_{F_v}$ is topologically generated by $\phi_v$ and inertia.

We need to show that $\DvTW$ is actually a functor and is relatively representable to the functor of all lifts.

Let $v$ be a Taylor–Wiles place and $\rho: G_{F_v} \to \hat{G}(A)$ be a lift of $\bar{\rho}_v$ in $\DvTW(A)$. Then

*  if $A \to C$ and $B \to C$ are two morphisms in $\CNL_{\CalO}$ and $\rho_B \in \DvTW(B)$ with $\rho$ and $\rho_B$ inducing the same lift to $C$, then the arising representation to $\hat{G}(A \times_C B) \cong \hat{G}(A) \times_{\hat{G}(C)} \hat{G}(B)$ lies in $\DvTW(A \times_C B)$.

For <ref>, Lemma <ref> immediately shows that $\rho'(I_v) \subset Z(M_{\rho'(\phi_v)})^\circ(B)$ and hence $\rho'$ lies in $\DvTW(B)$.
Let $D$ denote the fibre product $A \times_C B$.
For <ref> it will suffice to show that under the isomorphism $\hat{G}(D) \cong \hat{G}(A) \times_{\hat{G}(C)} \hat{G}(B)$ we have $Z(M_{g_{D}})^\circ(D)$ is mapped to $Z(M_{g_A})^\circ(A) \times_{Z(M_{g_C})^\circ(C)} Z(M_{g_B})^\circ(B)$, where $g_R$ denotes the image of $\phi_v$ for the aforementioned representations with values in $\hat{G}(R)$.
By Lemma <ref> again we have $Z(M_{g_{D}})^\circ(A) = Z(M_{g_A})^\circ(A)$, and similarly for $B,C$. So denoting $Y = Z(M_{g_{D}})^\circ$ we need $Y(D) = Y(A) \times_{Y(C)} Y(B)$, which indeed holds.

From this we deduce $\DvTW$ is relatively representable to $D_v$ and hence the following corollary.

The functor $\DvTW$ defines a local deformation problem, represented by an algebra $R_{v}^{\textup{TW}} \in \CNL_{\CalO}$.

Now let $\mathcal{S} = (\bar{\rho},S,\{\Lambda_v\}_{v \in S}, \psi, \{\mathcal{D}_v\}_{v \in S})$ be a global deformation problem.
We can form the augmented global deformation problem

$$\mathcal{S}_Q = (\bar{\rho},S \cup Q,\{\Lambda_v\}_{v \in S \cup Q}, \psi, \{\mathcal{D}_v\}_{v \in S \cup Q}),$$
where for every $v \in Q$ we take $\mathcal{D}_v = \DvTW$ (and $\Lambda_v = \CalO$, as before).
Hence for any $T \subset S$, the functors $\mathcal{D}_{\mathcal{S}_Q}$ and $\mathcal{D}_{\mathcal{S}_Q}^T$ are representable by respective objects $R_{\mathcal{S}_Q}, R_{\mathcal{S}_Q}^T \in \CNL_{\Lambda}$ by Proposition <ref>.

Having now shown our deformation problem is representable, we can explore the Selmer conditions $\mathcal{L}_v$ and $\mathcal{L}_v^\perp$ arising from our local deformation problem $\DvTW$ at $v \in Q$.
From this we can find conditions for existence of sets of Taylor–Wiles places with generating sets for the universal deformation rings of our augmented deformation problems as small as possible, by controlling the arising dual Selmer groups.

For $v \in Q$, $\mathcal{L}_v$ is given by those classes in $H^1(G_{F_v},\gk^0)$ whose restriction to inertia lies in $\Lie Z(M_{\bar{g}_v})$.
Indeed, we have by Corollary <ref> that the condition of a deformation to $k[\epsilon]$ defining a cocycle whose restriction to inertia lies in $\Lie Z(M_{\bar{g}_v})$ is equivalent to a representative lift $\rho$ having image of inertia in $Z(M_{\rho(\phi_v)})(k[\epsilon])$.

If $M$ is any $G_{F_v}$-module write $H^1_{\text{ur}}(G_{F_v},M) = \ker(\res: H^1(G_{F_v},M) \to H^1(I_v,M))$.
Let $N_v$ denote the $G_{F_v}$-submodule $\Lie Z(M_{\bar{g}_v}) \cap \gk^0$.
Then we may write

\begin{equation}
\mathcal{L}_v = H^1_{\text{ur}}(G_{F_v},\gk^0) + H^1(G_{F_v},N_v).
\end{equation}

Indeed, if $\xi \in \mathcal{L}_v$ then we can choose $\gamma \in H^1(G_{F_v},N_v)$ with $\res(\gamma) = \res(\xi)$ (as $N_v$ is a trivial $G_{F_v}$-module and so any homomorphism $I_v \to N_v$ can be extended to $G_{F_v}$ by local class field theory).
Then $\xi = (\xi - \gamma) +\gamma$ shows $\xi \in H^1_{\text{ur}}(G_{F_v},\gk^0) + H^1(G_{F_v},N_v)$.

We will further simplify this to a direct sum of terms whose dimensions can be computed.
Consider the following decomposition of $\gk$ into $G_{F_v}$-submodules:

\begin{equation} \label{gk decomposition}
\gk^0 = N_v \oplus M_v \oplus L_{1,v}
\end{equation}

where $\gk = L_{0,v} \oplus L_{1,v}$ is the $\Ad(\bar{g}_v)$-invariant decomposition of $\gk^0$ into its eigenvalue $1$ subspace and complement, and $M_v$ is any choice of vector space complement to $N_v \subset L_{0,v}$ (necessarily a $G_{F_v}$-module, since $L_{0,v}$ is a trivial $G_{F_v}$-module).
Note then that since $Z(\hat{G}_k) \subset M_{\bar{g}_v}$ we have $\Lie M_{\bar{g}_v} / \Lie Z(\hat{G}_k) \cong L_{0,v}$.
We now claim that $H^1(G_{F_v},L_{1,v}) = 0$.
Indeed, by the Euler characteristic formula <cit.> we have $h^1(G_{F_v},L_{1,v}) = h^0(G_{F_v},L_{1,v}) + h^2(G_{F_v},L_{1,v})$. We have in turn by Tate duality that $h^2(G_{F_v},L_{1,v}) = h^0(G_{F_v},L_{1,v}^\vee(1))$.
Both $L_{1,v}$ and its Tate dual have trivial $\phi_v$-invariants (as the residual $p$-adic cyclotomic character is trivial on $G_{F_v}$, since $q_v \equiv 1 \mod p$) and so indeed $h^1(G_{F_v},L_{1,v}) = 0$.
So we can rewrite

\begin{equation} \label{Lv decomposition}
\mathcal{L}_v = H^1(G_{F_v},N_v) \oplus H^1_{\text{ur}}(G_{F_v},M_v).
\end{equation}

Now let $z = \dim Z(\hat{G}_k)$, $l_v = \dim_k(L_{0,v}) = \dim M_{\bar{g}_v} - z$ and $n_v = \dim_k(N_v) = \dim Z(M_{\bar{g}_v}) - z$.
We will compute $\dim_k(\mathcal{L}_v)$.
We will firstly show that $h^1(G_{F_v},k) = 2$ and $h^1_{\text{ur}}(G_{F_v},k) = 1$. The former follows by the local Euler characteristic formula and Tate duality:

\begin{align*}
h^1(G_{F_v},k) &= h^0(G_{F_v},k) +h^2(G_{F_v},k) \\
&= 1 +h^0(G_{F_v},k^\vee(1)) = 2
\end{align*}

since the residual $p$-adic cyclotomic character is trivial.
The latter is exactly $\dim_k(\Hom(G_{F_v}/I_v,k))$, which equals 1 since any such homomorphism is determined by the image of Frobenius, of which all may occur.
Since $\mathcal{L}_v = H^1(G_{F_v},N_v) \oplus H^1_{\text{ur}}(G_{F_v},M_v)$ for trivial $G_{F_v}$-modules $N_v$ and $M_v$ of respective dimensions $n_v$ and $l_v-n_v$, it follows that

\begin{equation} \label{dimension of Lv}
\dim_k \mathcal{L}_v = l_v + n_v.
\end{equation}

We will now consider the dual Selmer conditions $\mathcal{L}_v^\perp$, given by annihilators of $\mathcal{L}_v$ under the Tate pairing.
If $M$ is any $G_{F_v}$-module then the annihilator of $H^1_{\text{ur}}(G_{F_v},M)$ in $H^1(G_{F_v},M^\vee(1))$ under this pairing is given by the subspace $H^1_{\text{ur}}(G_{F_v},M^\vee(1))$.
We therefore see from equations <ref> and <ref> that

$$\mathcal{L}_v^\perp =
H^1\left(G_{F_v},M_v^\vee(1) \oplus L_{1,v}^\vee(1)\right) \cap \left(H^1_{\text{ur}}(G_{F_v}, M_v^\vee(1)) \oplus
H^1(G_{F_v}, N_v^\vee(1) \oplus L_{1,v}^\vee(1)\right).$$

Since we already saw that $H^1(G_{F_v},L_{1,v}^\vee(1)) = 0$, we conclude that

\begin{equation} \label{dual selmer condition}
\mathcal{L}_v^\perp = H^1_{\text{ur}}(G_{F_v},M_v^\vee(1)).
\end{equation}

Having explicitly computed the dual Selmer condition for a Taylor–Wiles deformation, we obtain a better understanding of the arising dual Selmer groups.

Let $\mathcal{S} = (\bar{\rho},S,\{\Lambda_v\}_{v \in S}, \psi, \{\mathcal{D}_v\}_{v \in S})$ a global deformation problem and $T \subset S$ with $S_p \subset T$.
Let $Q$ be any set of Taylor–Wiles places and let $\mathcal{S}_Q$ denote the augmented global deformation problem.

H^1_{\mathcal{S}_Q^\perp,T}(\gkv) \cong \ker\left(H^1(G_{F,S},\gkv) \to \prod_{v \in Q} H^1_{\text{ur}}(G_{F_v},N_v^\vee(1)) \times \prod_{v \in S\setminus T} \frac{H^1(G_{F_v},\gkv)}{\mathcal{L}_v^\perp}\right).

Recall by Definition <ref> that

$$H^1_{\mathcal{S}_Q^\perp,T}(\gkv) = \ker\left(H^1(G_{F,S \cup Q}, \gkv) \to \prod_{v \in Q \cup S \setminus T} \frac{H^1(G_{F_v},\gkv)}{\mathcal{L}_v^\perp}\right),$$

where for $v \in Q$ we saw that $\mathcal{L}_v^\perp = H^1_{\text{ur}}(G_{F_v},M_v^\vee(1)) \leq H^1_{\text{ur}}(G_{F_v},\gkv)$.
We therefore see that any class $[\psi] \in H^1_{\mathcal{S}_Q^\perp,T}(\gkv)$ has $\res_{G_{F_v}} [\psi] \in H^1_{\text{ur}}(G_{F_v},\gkv)$.

We will firstly show that any class $[\psi] \in H^1_{\mathcal{S}_Q^\perp,T}(\gkv)$ lies in the subgroup $H^1(G_{F,S},\gkv) \leq H^1(G_{F,S \cup Q},\gkv)$.
Let $Q = \{v_1,\ldots,v_r\}$ and for $0 \leq t \leq r$ let $Q_t = \{v_1,\ldots,v_t\}$
We show that if $[\psi] \in H^1(G_{F,S \cup Q_t},\gkv)$ for some $t \geq 1$ then in fact $[\psi] \in H^1(G_{F,S \cup Q_{t-1}},\gkv)$. To simplify notation, let $v$ denote $v_t$.
Inflation-restriction gives an exact sequence

\begin{align*}
0 \to H^1(G_{F,S \cup Q_{t-1}},\gkv) \to H^1(G_{F,S \cup Q_t},\gkv) \to H^1(I_{v,t},\gkv),
\end{align*}

where $I_{v,t}$ is an inertia subgroup at a place of $F_{S \cup Q_{t-1}}$ above $v$ in $F_{S \cup Q_t}$.
Since $I_{v,t}$ may be identified as a quotient of $I_v$ (noting that, as $F_{S \cup Q_{t-1}}/F$ is unramified at $v$, we see that $I_{v,t}$ is equal to the inertia subgroup at $v$ in $F_{S \cup Q_t}$), we have an inclusion $H^1(I_{v,t},\gkv) \hookrightarrow H^1(I_v,\gkv)$.
Under this inclusion, $\res_{I_{v,t}} [\psi]$ has image $0$, since this coincides with $\res_{I_v} [\psi] = 0$ and we saw that $[\psi]$ defines an unramified class at $v$.
Thus $[\psi]$ naturally lies in $H^1(G_{F,S \cup Q_{t-1}},\gkv)$ completing the induction.

We next claim that if $v \in Q$, then
$$\frac{H^1_{\text{ur}}(G_{F_v},\gkv)}{H^1_{\text{ur}}(G_{F_v},\gkv) \cap \mathcal{L}_v^\perp} \cong H^1_{\text{ur}}(G_{F_v},N_v^\vee(1)).$$

The result would then follow, since we already saw that any class in $H^1_{\mathcal{S}_Q^\perp,T}(\gkv)$ is unramified at $v$.
The claim follows immediately on writing $H^1(G_{F_v},\gkv) = H^1(G_{F_v},N_v^\vee(1)) \oplus H^1(G_{F_v},M_v^\vee(1))$, where we have recalled that $H^1(G_{F_v}, L_v^\vee(1)) = 0$.

We now consider conditions under which we can show existence of sets of Taylor–Wiles places of level $N$ with vanishing dual Selmer group.
Our first notion is a modification of the definition of an abundant subgroup <cit.> to allow for our images of Frobenius elements to be only semisimple elements of $\hat{G}(k)$.

We say $H \leq \hat{G}(k)$ is $\hat{G}$-adequate if the following conditions hold:

* The following groups vanish

* $H^0(H,\gk^{0,\vee})$

* $H^1(H,k)$

* $H^1(H,\gk^{0,\vee})$

* For every non-zero simple $k[H]$-submodule $W \leq \gk^{0,\vee}$ there exists a semisimple element $h \in H$ such that for some $w \in W$ and $z \in \Lie Z(M_{h}) \cap \gk^0$ we have $w(z) \neq 0$.

When $M_{h}$ is connected we may write $\Lie Z(M_{h}) \cap \gk^0 = \mathfrak{z}((\gk^0)^h)$ by Lemma <ref>.
If moreover $h \in H$ is regular semisimple we recover the contribution of $h$ in the original definition of $\hat{G}$-abundant (when $\hat{G}$ is semisimple and simply connected):
the centralizer of $h$ is a maximal torus and $\mathfrak{z}((\gk^0)^h) = (\gk^0)^h$, so taking $z \in (\gk^0)^h$ and $w \in W$ with $w(z) \neq 0$ shows the restriction of $w$ to $W^h$ is non-zero.

The following lemma has an identical proof to that of <cit.>.

Let $n \geq 1$.
Suppose that $H^0(\bar{\rho}(G_{F(\zeta_{p^n})}), \gk^{0,\vee}) = 0$.
Let $L$ be the fixed field of the module $\gk^{0,\vee}$.
Suppose that one of the following conditions holds

* $\zeta_p \not\in L$

* $H^1(\bar{\rho}(G_{F(\zeta_{p^n})}), \gk^{0,\vee}) = 0.$

Then $H^1(\Gal(L(\zeta_{p^n})/F), \gk^{0,\vee}(1)) = 0.$

Let us now recall a form of the Chebotarev density theorem, which we will use to relate the existence of desired semisimple elements to a Frobenius element at some place of $F$.

Let $T$ be a finite set of places of $F$. Then the set of Frobenius elements of the form $\{\Frob_w\}$ for $w$ a place of the maximal extension of $F$ unramified outside $T$ not dividing $T$ is a dense subset of $G_{F,T}$.

We are now ready to prove the standard result on the existence of sets of Taylor–Wiles places with vanishing dual Selmer group under suitable conditions on the image of $\bar{\rho}$.

Let $\mathcal{S} = (\bar{\rho},S,\{\Lambda_v\}_{v \in S}, \psi, \{\mathcal{D}_v\}_{v \in S})$ be a global deformation problem and let $T \subset S$ with $S_p \subset T$.
Let $n \geq 1$.
Suppose that $\bar{\rho}(G_{F(\zeta_{p^n})}) \subset \hat{G}(k)$ satisfies
condition <ref> of Definition <ref>, and if $\zeta_p$ is in the fixed field of $\gk^{0,\vee}$ then suppose further that $H^1(\bar{\rho}(G_{F(\zeta_{p^n})}), \gk^{0,\vee}) = 0$.
Let $q \geq h^1(G_{F,S},\gkv)$.
Then there exists a set $Q$ of Taylor–Wiles places of level $n$ such that

* $H^1_{\mathcal{S}_Q^\perp,T}(\gkv) = 0$

* $\#Q = q.$

By Lemma <ref>, it will suffice to find for each non-zero class $[\psi] \in H^1(G_{F,S},\gkv)$ infinitely many Taylor–Wiles places $v$ of level $n$ with $[\psi]$ having non-zero image in $H^1_{\text{ur}}(G_{F_v},N_v^\vee(1))$.
Indeed, suppose that $t < q$ and that we have inductively found Taylor–Wiles places $Q_t = \{v_1,\ldots,v_t\}$ of level $n$ for which $h^1_{\mathcal{S}_{Q_t}^\perp,T}(\gkv) \leq q-t$.
If there still exists $0 \neq [\psi] \in H^1_{\mathcal{S}_{Q_t}^\perp,T}(\gkv)$ then we can find a Taylor–Wiles place $v_{t+1} \not\in Q_t$ of level $n$ for which $[\psi]$ has non-zero image in $H^1_{\text{ur}}(G_{F_v},N_{v_{t+1}}^\vee(1))$.
It then follows that $h^1_{\mathcal{S}_{Q_{t+1}}^\perp,T}(\gkv) \leq q-t-1$.
So inductively we can always find some $t \leq q$ and $Q_t$ for which $h^1_{\mathcal{S}_{Q_t}^\perp,T}(\gkv) = 0$, and then we are done on extending $Q_t$ by any other $q-t$ choices of Taylor–Wiles places of level $n$.

So let $[\psi] \in H^1(G_{F,S},\gkv)$ be a non-zero class and suppose that we can always find $\sigma \in G_{F(\zeta_{p^n})}$ such that $\bar{\rho}(\sigma)$ is semisimple and $\psi(\sigma)(N) \neq 0$, where $N = \Lie Z(Z_{\hat{G}_k}(\bar{\rho}(\sigma))) \cap \gk^0$.
We claim that by the Chebotarev density theorem we can find infinitely many places $v \not\in S$ with $\bar{\rho}(\sigma) = \bar{\rho}(\Frob_v)$, $\psi(\sigma) = \psi(\Frob_v)$ and $\Frob_v \in G_{F(\zeta_{p^n})}$.
Such a $v$ would be a Taylor–Wiles place of level $n$ with $[\psi]$ having non-zero image in $H^1(G_{F_v},N_v^\vee(1))$.
Indeed, consider the non-empty open subset $U$ of $G_{F,S}$ given by the intersection of $\bar{\rho}^{-1} \{\bar{\rho}(\sigma) \}$, $\Gal(F_S/F(\zeta_{p^n}))$ and $\psi^{-1} \{\psi(\sigma)\}$.
The Frobenius elements are dense in $G_{F,S}$ by Chebotarev, so there exists (infinitely many) Frobenius elements $\Frob_v$ satisfying $\bar{\rho}(\Frob_v) = \bar{\rho}(\sigma)$, $\psi(\Frob_v) = \psi(\sigma)$ and $\Frob_v \in G_{F(\zeta_{p^n})}$.

We now show the existence of such a $\sigma$.
Let $F_n = F(\zeta_{p^n})$ and let $H = \bar{\rho}(G_{F_n})$.
Let $L$ be the fixed field of $\gk^{0,\vee}(1)$ and let $L_n = L(\zeta_{p^n})$.
We will show that the restriction of $\psi$ to $G_{L_n,S}$ is a non-zero homomorphism which we denote $f: G_{L_n,S} \to \gkv$.
This would follow immediately from injectivity of the restriction map
$$H^1(G_{F,S},\gkv) \to H^1(G_{L_n,S},\gkv)^{G_F}.$$

By inflation-restriction, the kernel of this map is given by

$$H^1(\Gal(L(\zeta_{p^n})/F), \gk^{0,\vee}(1))

which therefore vanishes by Lemma <ref>.

Thus $f(G_{L_n})$ is non-zero and moreover is a $G_{F_n,S}$-module, as for $\sigma \in G_{L_n}$ and $\tau \in G_{F_n,S}$ we have

\begin{align*}
\psi(\tau \sigma \tau^{-1}) &= \psi(\tau) + \tau \psi(\sigma\tau^{-1}) \\
&= \psi(\tau) + \tau(\psi(\sigma)+ \sigma \psi(\tau^{-1})) \\
&= \psi(\tau) + \tau \psi(\sigma) + \tau \psi(\tau^{-1}) \\
&= \psi(\id) + \tau \psi(\sigma) \\
&= \tau \psi(\sigma).
\end{align*}

Hence we can take a non-zero simple $H$-submodule $W \leq f(G_{L_n,S})$. Now use that $H$ satisfies condition <ref> of Definition <ref> to find a $\sigma_0 \in H$ with $\bar{\rho}(\sigma_0)$ semisimple such that there exists a $w \in W$ and $z \in \Lie Z(Z_{\hat{G}_k}(\bar{\rho}(\sigma_0))) \cap \gk^0$ with $w(z) \neq 0$.
We may write $w = \psi(\sigma)$ for some $\sigma \in G_{L_n,S}$.
We claim that there exists $\tau \in G_{L_n}$ with $\psi(\tau \sigma_0)(\Lie Z(Z_{\hat{G}_k}(\bar{\rho}(\sigma_0))) \cap \gk^0) \neq 0$. If $\psi(\sigma_0)(z) \neq 0$ then we're done.
Otherwise $\psi(\tau \sigma_0) = \psi(\tau) + \psi(\sigma_0)$.
So choose $\tau$ to be such that $\psi(\tau) = w$ and let $\sigma = \tau \sigma_0$.
Then $\psi(\sigma)(z) = \psi(\tau)(z) = w(z) \neq 0$, and $\Lie Z(Z_{\hat{G}_k}(\bar{\rho}(\sigma_0))) \cap \gk^0 = \Lie Z(Z_{\hat{G}_k}(\bar{\rho}(\sigma))) \cap \gk^0$, so we're done.

The hypotheses of Proposition <ref> motivates the following definition, which is a weakening of the notion of vast Galois representations of <cit.>.

A Galois representation

\bar{\rho}: G_F \to \hat{G}(k)

is said to be $\hat{G}$-reasonable if the following conditions hold for all sufficiently large $n$

* $\bar{\rho}(G_{F(\zeta_{p^n})}) \subset \hat{G}(k)$ satisfies conditions <ref> and <ref> of Definition <ref>

* if $\zeta_p$ is in the fixed field of $\gk^{0,\vee}$ then $H^1(\bar{\rho}(G_{F(\zeta_{p^n})}), \gk^{0,\vee}) = 0$.

Note that while Definition <ref> is a condition on a subgroup, Definition <ref> is a condition on a representation $\bar{\rho}$.
We can relate these notions as follows

Suppose that $H^1(\bar{\rho}(G_{F(\zeta_p)}), k) = 0$.
Then for every $n \geq 1$, $\bar{\rho}(G_{F(\zeta_p)}) = \bar{\rho}(G_{F(\zeta_{p^n})})$.
In particular, if $\bar{\rho}(G_{F(\zeta_p)})$ is $\hat{G}$-adequate then $\bar{\rho}$ is $\hat{G}$-reasonable.

We have that $\bar{\rho}(G_{F(\zeta_{p^n})})$ is a normal subgroup of $\bar{\rho}(G_{F(\zeta_p)})$ of $p$-power index.
If they weren't equal, there would therefore exist a non-trivial homomorphism $\bar{\rho}(G_{F(\zeta_p)}) \to \mathbb{Z}/p\mathbb{Z}$, which would contradict the hypothesis that $H^1(\bar{\rho}(G_{F(\zeta_p)}), k) = 0$.

§.§ Dual groups and the $\Delta_Q$-action

To begin this section, we will recall some properties of (pinned) root data over a general scheme from [21] and the relationship to reductive group schemes.
Let $S$ be a scheme and $T$ a torus over $S$.
We recall the notion of a root datum in $T$ over $S$ from <cit.>.
This consists of

* a finite subgroup scheme $\mathcal{R} \subset \Hom_{S-gp}(T,\mathbb{G}_{m,S})$

* a finite subgroup scheme $\mathcal{R}^\vee \subset \Hom_{S-gp}(\mathbb{G}_{m,S},T)$

* an isomorphism $\mathcal{R} \to \mathcal{R}^\vee$ denoted $\alpha \mapsto \alpha^\vee$

such that for every $S' \to S$

* for every $\alpha \in \mathcal{R}(S')$ we have $\alpha \circ \alpha^\vee = 2$

* for every $\alpha,\beta \in \mathcal{R}(S')$ we have

\begin{align*}
\alpha - (\beta^\vee,\alpha) \beta \in \mathcal{R}(S') \quad \alpha^\vee - (\alpha^\vee,\beta) \beta^\vee \in \mathcal{R}^\vee(S').
\end{align*}

The root datum is called reduced if whenever $S' \to S$ is non-empty and $\alpha \in \mathcal{R}(S')$ we have $2 \alpha \not\in \mathcal{R}(S')$.
Suppose now that the $T$ torus is split, so that we can identify the characters and cocharacters of $T$ with finite free $\mathbb{Z}$-modules.
Then $\mathcal{R}$ (resp. $\mathcal{R}'$) can be identified with a finite subset $\Phi \subset X^*(T)$ (resp. $\Phi^\vee \subset X_*(T)$).
A set of simple roots $\Delta \subset \Phi$ is a subset such that each $\alpha \in \Phi$ can be written uniquely as a linear combination of elements of $\Delta$ with integral coefficients all of the same sign.
A pinned root datum over $S$ is then the data of a root datum together with a system of simple roots (<cit.>).
We can denote such a pinned root datum by a tuple
$$R = (X^*(T),\Phi,\Delta, X_*(T), \Phi^\vee, \Delta^\vee),$$
where $\Delta^\vee = \{\alpha^\vee : \alpha \in \Delta\}$.
We can then form the dual root datum

R^\vee = ( X_*(T), \Phi^\vee, \Delta^\vee,X^*(T),\Phi,\Delta)

given by interchanging the roles of $X^*(T)$ and $X_*(T)$.

Suppose now that $G$ is a reductive group scheme over $S$ together with a split maximal torus $T$.
A pinning of $G$ with respect to $T$, as in <cit.> is the data of a root basis $\Delta$ of the arising set of roots together with sections $X_\alpha \in \Gamma(S,\mathfrak{g}_\alpha)^\times$ for every $\alpha \in \Delta$.
The functor assigning a pinned reductive group $G$ over $S$ to its pinned root datum $R(G)$ defines an equivalence of categories to the category of pinned reduced root data over $S$, as stated in <cit.>.
The data of the sections $X_{\alpha}$ is to ensure faithfulness of this functor and does not change the arising pinned root datum.
If $B \subset G$ is a Borel subgroup containing $T$, then $B$ determines a unique choice of root basis $\Delta$ by insisting $\Delta \subset \Phi^+$, the positive roots with respect to $B$. Hence the choice of $B$ determines a pinned root datum.
We note that if we have an isomorphism of pinned root data then it is unique, by <cit.>.
Given a reduced pinned root datum then, we can view this as a reduced pinned root datum over $\mathbb{Z}$ and hence this determines (up to isomorphism) a reductive group scheme over $\mathbb{Z}$ together with a split maximal torus and Borel subgroup containing it.

Now let $\hat{T} \subset \hat{B} \subset \hat{G}$ be a choice of split maximal torus and Borel subgroup of $\hat{G}$, determining a pinned root datum $R(\hat{G})$ and dual root datum $R(\hat{G})^\vee$.
Let $G$ be a reductive group scheme defined over either $\mathcal{O}_F$ in the case that $F$ is a number field, or $\mathbb{F}_q$ in the function field case, together with a split maximal torus $T$ and Borel subgroup $B$ with root datum $R(G)$ and suppose there exists an isomorphism $R(G) \cong R(\hat{G})^\vee$.
We see that for every such choice of split maximal torus $\hat{T}$ and Borel subgroup $\hat{B}$ containing $\hat{T}$ we get unique isomorphisms $X^*(\hat{T}) \cong X_*(T)$ and $X_*(\hat{T}) \cong X^*(T)$.
We will now suppose that we have fixed such a $\hat{T}$ and $\hat{B}$ and let $\iota$ denote this isomorphism of pinned root data.

Suppose that $\hat{P}$ is a standard parabolic subgroup of $\hat{G}$ (so $\hat{B} \subset \hat{P}$) and $\hat{L}$ is a standard Levi factor of $\hat{P}$ (so $\hat{T} \subset \hat{L}$).
Then the isomorphism of root data determines dual subgroups $P$ and $L$ of $G$, which are a standard parabolic and standard Levi subgroup respectively.
We will explain this now, following the explanation of <cit.>.
Let $\hat{\Delta}$ be the set of simple roots of $\hat{G}$, and $\hat{\Delta}_{\hat{P}} \subset \hat{\Delta}$ be the set of simple roots corresponding to $\hat{P}$ under the bijection between subsets of simple roots and standard parabolic subgroups.
We can then form the parabolic subgroup of $P \subset G$ dual to $\hat{P}$ by defining $P$ to be the standard parabolic subgroup of $G$ corresponding to the subset of simple roots given by the image of $\hat{\Delta}^\vee_{\hat{P}}$ under $\iota$.
The dual Levi subgroup $L$ can then be taken to be the unique Levi factor containing the maximal torus $T$.
There will then be an isomorphism of pinned root data between that of $L$ and $\hat{L}$ induced by $\iota$, where the pinned root datum of $L$ (resp $\hat{L}$) is defined via the maximal torus $T$ (resp. $\hat{T}$) and Borel subgroup $B \cap L$ (resp. $\hat{B} \cap \hat{L}$).

There is also a duality induced between $Z(\hat{G})^\circ$ and $C_G$.
Recall here that the cocenter $C_G = G/G^{\der}$ is the quotient of $G$ by its derived group.
We may view $X_*(Z(\hat{G})^\circ)$ as a submodule of $X_*(\hat{T})$ and $X^*(C_G)$ as a submodule of $X_*(T)$; we claim that these submodules are identified via $\iota$.
This is immediate from the characterizations of these submodules as the annihilators of the roots of $\hat{G}$ (resp. coroots of $G$).
This description of the coroots of the connected center follows from viewing $Z(\hat{G}) = \cap_{\alpha \in \hat{\Delta}} \ker(\alpha)$, a consequence of $Z(\hat{G})$ being the kernel of the adjoint representation of $\hat{G}$.
This characterization of the cocenter, on the other hand, follows from the start of the proof of <cit.>.

Suppose now that $(Q,\{(\hat{T}_v,\hat{B}_v)\}_{v \in Q})$ is a Taylor–Wiles datum and let $v \in Q$.
The data of the split maximal torus $\hat{T}_v$ and Borel subgroup $\hat{B}_v$ thus determines unique isomorphisms $X^*(T) \cong X_*(\hat{T}_v)$ and $X_*(T) \cong X^*(\hat{T}_v)$ which we will denote by $\iota_v$ in both cases.
Let $\bar{g}_v = \bar{\rho}(\phi_v)$ and recall that the centralizer of $\bar{g}_v$ in $\hat{G}_k$ is a closed subgroup $M_{\bar{g}_v}$ of $\hat{G}_k$ with reductive identity component containing the torus $\hat{T}_v$.
It is not, in general, a Levi subgroup of $\hat{G}_k$ (consider, for example, a semisimple element of $\Sp_4(k)$ of order $2$ with $\ch k \neq 2$: its centralizer will be isomorphic to $\SL_2 \times \SL_2$, which is not the centralizer of any torus).
However, we can use the connected center of $M_{\bar{g}_v}$ to construct a Levi subgroup $\hat{L}_v$ of $\hat{G}_k$.

Let $\hat{L}_v = Z_{\hat{G}_k}(Z(M_{\bar{g}_v})^{\circ})$ denote the centralizer of the identity component of the center of $M_{\bar{g}_v}$.
This is a standard Levi subgroup of $\hat{G}_k$.
Let $L_v$ denote the dual Levi subgroup of $G$ arising from $\iota_v$.

Note that $\hat{L}_v$ will always contain $M_{\bar{g}_v}$ and their connected centers will coincide.
As above, $\iota_v$ allows us to identify $X_*(Z(M_{\bar{g}_v})^{\circ}) \subset X_*(\hat{T}_v)$ with $X^*(C_{L_v}) \subset X^*(T)$.

Suppose now that $\rho_v \in \DvTW(A)$ for some $A \in \CNL_\CalO$ and let $g_v = \rho(\phi_v)$.
Then since $\rho_v$ lifts the unramified representition $\bar{\rho}_v$, we have by definition of $\DvTW$ that $\restr{\rho}{I_v}$ is valued in $\ker(Z(M_{g_v})(A) \to Z(M_{g_v})(k))$, where $M_{g_v}$ is as in Theorem <ref>.
This group is pro-$p$ and abelian, so $\restr{\rho}{I_v}$ factors through the maximal $p$-power quotient of $k(v)^\times$, viewing $k(v)^\times$ as a quotient of $I_v$.
We thus obtain a map in $\Hom(k(v)^\times, Z(M_{g_v})^{\circ}(A))$.
Given $\alpha \in X_*(C_{L_v})$ we have $\iota_v(\alpha) \in X^*(Z(M_{\bar{g}})^{\circ})$ which lifts to a unique homomorphism of $A$-tori, $Z(M_g)^{\circ} \to \mathbb{G}_{m,A}$.
We can thus define a bijection

\begin{align*}
\Hom(k(v)^\times, Z(M_{g_v})^{\circ}(A)) &\to \Hom(X_*(C_{L_v}) \otimes k(v)^\times, A^\times) \\
\varphi &\mapsto (\alpha \otimes x \mapsto \iota_v(\alpha)(\varphi(x)))
\end{align*}

which can be thought as an instance of tensor-hom adjunction.
Thus we obtain a map $C_{L_v}(k(v)) \to A^\times$, and it can be checked that this map factors through the maximal $p$-power quotient of $C_{L_v}(k(v))$.
Since $\restr{\psi}{I_v}$ is trivial, this map is also trivial on the image of $Z(G)(k(v))$ in $C_{L_v}(k(v))$, as $\iota_v$ induces an isomorphism $X_*(Z(G)^{\circ}) \cong X^*(C_{\hat{G}})$.
Note that since $p$ is a prime of very good characteristic, the images of $Z(G)^{\circ}(k(v))$ and $Z(G)(k(v))$ in the maximal $p$-power order quotient of $C_{L_v}(k(v))$ coincide.

We thus define $\Delta_v$ to be the maximal quotient of $C_{L_v}(k(v))$ which is of $p$-power order and for which the image of $Z(G)(k(v))$ is trivial.
From this discussion, we see that $\rho$ induces a group homomorphism $\Delta_v \to A^\times$, and it is clear that this construction is functorial in $A$.
The assignment of a representation to the $\Delta_v$-action is also constant on strict equivalence classes.
Indeed, if $\gamma \in \ker(\hat{G}(A) \to \hat{G}(k))$, set $g_v' = \Ad(\gamma)(g_v)$.
Then $\Ad(\gamma)(Z(M_g)) = Z(M_{g'})$ by Lemma <ref> and hence $\gamma$ will define an isomorphism $X^*(Z(M_{g_v})) \to X^*(Z(M_{g_v'}))$ which is the identity on reduction modulo $m_A$.

Associated to the Taylor–Wiles datum $(Q,\{(\hat{T}_v,\hat{B}_v)\}_{v \in Q})$, we can now set $\Delta_Q = \prod_{v \in Q} \Delta_v$.
Suppose that $\Sglobdp$ is any global deformation problem, $T \subset S$ is any subset, and consider $\mathcal{S}_Q$, the augmented deformation problem.
If $\rho$ defines a class in $\mathcal{D}^T_{\mathcal{S}_Q}(A)$ then we obtain a map $\Delta_v \to A^\times$ for every $v \in Q$, and hence a map $\Delta_Q \to A^\times$.
In particular, we obtain a map $\Delta_Q \to (R_{\mathcal{S}_Q}^T)^{\times}$.
If we let $\mathfrak{a}_Q$ denote the ideal of $(R_{\mathcal{S}_Q}^T)^\times$ generated by the images of $\delta - 1$ for $\delta \in \Delta_Q$, we have an isomorphism $R_{\mathcal{S}_Q}^T/\mathfrak{a}_Q \to R^T_{\mathcal{S}}$.
This is clear from noting that, for $v \in Q$, a lift in $\DvTW(A)$ is unramified if and only if the map $\Delta_v \to A^\times$ is trivial.

§.§ Presentations of framed deformation rings in the number fields case

In this section let $F$ be a number field and suppose that $p > 2$.
Let $T \subset S$ with $S_p \subset T$.
Suppose that $\Sglobdp$ is a global deformation problem such that for every $v \in S \setminus T$ we have $\mathcal{D}_v^\square = D_v^\square$ and $\Lambda_v = \CalO$.
Then for $v \in S \setminus T$ we have $\mathcal{L}_v = H^1(G_{F_v},\gk^0)$.
Set $R^{T,\loc} = \hat{\otimes}_{v \in T} R_v^\square$.
This has the structure of a $\Lambda = \otimes_{v \in T} \Lambda_v$-algebra.
Now let $(Q,\{(\hat{T}_v,\hat{B}_v)\}_{v \in Q})$ be a Taylor–Wiles datum (with $Q$ possibly empty) and consider the augmented deformation problem $\mathcal{S}_Q$.
For $v \in T$ there is a natural transformation of functors $\mathcal{D}_{\mathcal{S}_Q}^T \to \mathcal{D}_v^\square$ on $\CNL_{\Lambda_v}$  given by $(\rho,\{\gamma_v\}_{v \in T}) \mapsto \gamma_v^{-1} \restr{\rho}{G_{F_v}} \gamma_v$.
Thus for each $v \in T$ we have a morphism $R_v^\square \to R_{\mathcal{S}_Q}^T$ in $\CNL_{\Lambda_v}$.
Tensoring, we obtain a map $R^{T,\loc} \to R_{\mathcal{S}_Q}^{T}$ in $\CNL_\Lambda$.
The Selmer groups in this case become

\begin{align*}
H^1_{\mathcal{S}_Q,T}(\gk^0) &= \ker\left(H^1(G_{F,S \cup Q},\gk^0) \to (\prod_{v \in Q}\frac{H^1(G_{F_v},\gk^0)}{\mathcal{L}_v} \times \prod_{v \in T} H^1(G_{F_v},\gk^0))\right) \\
H^1_{\mathcal{S}_Q^\perp,T}(\gkv) &= \ker\left(H^1(G_{F,S \cup Q},\gkv) \to \prod_{v \in S \setminus T} H^1(G_{F_v},\gkv) \times \prod_{v \in Q} \frac{H^1(G_{F_v},\gkv)}{\mathcal{L}^\perp_v}\right).
\end{align*}

With the above setup, there exists a surjective morphism $R^{T,\loc}[[X_1,\ldots,X_g]] \to R_{\mathcal{S}_Q}^{T}$ in $\CNL_\Lambda$ with

\begin{align*}
g = h^1_{\mathcal{S}_Q^\perp,T}(\gkv) - h^0(G_{F,S},\gkv) - \sum_{v | \infty} h^0(G_{F_v},\gk^0) \\
+ \sum_{v \in S \setminus T} h^0(G_{F_v},\gkv) + z(\#T - 1) + \sum_{v \in Q} n_v.
\end{align*}

Here $z = \dim Z(\hat{G}_k)$ and for $v \in Q$ we have $n_v = \dim Z(M_{\bar{\rho}(\phi_v)}) - z$.

Note firstly that if $A \to B$ is a morphism in $\CNL_{\Lambda}$ then taking $g = \dim_k m_B/(m_A,m_B^2)$ we can find a surjection $A[[X_1,\ldots,X_g]] \to B$ by sending the $X_i$ to lifts of a $k$-basis of $m_B/(m_A,m_B^2)$.
Viewed in terms of relative tangent spaces we have an exact sequence of $k$-vector spaces

m_A/(m_\Lambda,m_A^2) \to m_B/(m_\Lambda,m_B^2) \to m_B/(m_A,m_B^2) \to 0

so it is equivalent to compute the dimension of

\ker\left[\left(m_B/(m_\Lambda,m_B^2)\right)^* \to \left(m_A/(m_\Lambda,m_A^2)\right)^*\right],

the map on relative cotangent spaces.
For $R \in \CNL_{\Lambda}$ we can identify $(m_R/(m_\Lambda,m_R^2))^* \cong \Hom_{\CNL_{\Lambda}}(R,k[\epsilon])$.
Hence taking $A = R^{T,\loc}$ and $B = R_{\mathcal{S}_Q}^T$ now, we can understand these maps explicitly in terms of $k[\epsilon]$-points of the functors they represent.
By definition, the map will send a strict equivalence class to a tuple $(\rho,\{\gamma_v\}_{v \in T}) \mapsto (\gamma_v^{-1} \restr{\rho}{G_{F_v}} \gamma_v)_{v \in T}$.
Before continuing further, we introduce the following notation:

\begin{align*}
Z^1_Q = \ker \left(Z^1(G_{F_{S \cup Q}},\gk^0) \to \prod_{v \in Q} \frac{H^1(G_{F_v},\gk^0)}{\mathcal{L}_v}\right) \\
H^1_Q = \ker\left(H^1(G_{F_{S \cup Q}},\gk^0) \to \prod_{v \in Q} \frac{H^1(G_{F_v},\gk^0)}{\mathcal{L}_v}\right).
\end{align*}

Since we are working with $k[\epsilon]$-points, we can view the assignment above in terms of cocyles as a map

\begin{align*}
\alpha_2: \left(Z^1_Q \times \prod_{v \in T} \gk \right)/ \sim &\to \prod_{v \in T} Z^1(G_{F_v},\gk^0)  \\
(\psi,(\gamma_v)_{v \in T}) &\mapsto (\restr{\psi}{G_{F_v}} - \delta(\gamma_v))
\end{align*}

where $\delta$ is the usual coboundary map and the equivalence relation $\sim$ is given by $(\psi,(\gamma_v)_{v \in T}) \sim (\psi',(\gamma_v')_{v \in T})$ if there exists $\alpha \in \gk$ such that $\psi' = \psi + \delta(\alpha)$ and $\gamma_v' = \gamma_v + \alpha$ for every $v \in T$ (see Definition <ref>).

Now consider the following commutative diagram, whose rows are short exact sequences.

0 [r]     ^0 ×v ∈T ∏ [r, "δ×𝕀"] [d, "α_1"]     Z^1_Q ×v ∈T ∏ [r, "α_3"] [d, "α_2"]     H^1_Q [r] [d]                                     0

0 [r]     v ∈T ∏ Z^0(G_F_v,)/H^0(G_F_v,) [r, "δ"]                                            v ∈T ∏ Z^1(G_F_v,^0) [r]                                                       v ∈T ∏ H^1(G_F_v,^0) [r]     0

Here the map $\alpha_1$ is defined by $(\gamma,\{\gamma_v\}_{v \in T}) \mapsto (\gamma + \gamma_v)_{v \in T}$.
The map $\alpha_3$ sends $(\psi,\{\gamma_v\}_{v \in T}) \mapsto [\psi]$, forgetting the data of the $\{\gamma_v\}_{v \in T}$.
The final row is then just the product over $v \in T$ of the exact sequences
$$0 \to \frac{Z^0(G_{F_v},\gk)}{H^0(G_{F_v},\gk)} \to Z^1(G_{F_v},\gk^0) \to H^1(G_{F_v},\gk^0) \to 0,$$

where we have used the isomorphism $\frac{Z^0(G_{F_v},\gk^0)}{H^0(G_{F_v},\gk^0)} \cong \frac{Z^0(G_{F_v},\gk)}{H^0(G_{F_v},\gk)}$.
Since $\alpha_1$ is surjective, it follows by the snake lemma that

\begin{align*}
g &= \sum_{v \in T} h^0(G_{F_v}, \gk) + \dim_k (\gk^0) - h^0(G_{F,S},\gk^0) + h^1_{\mathcal{S}_Q,T} - \dim \gk \\ &= \sum_{v \in T} h^0(G_{F_v}, \gk) - h^0(G_{F,S},\gk) + h^1_{\mathcal{S}_Q,T},
\end{align*}

where we have used the decomposition of $\gk$ as a direct sum of $\gk^0$ and a trivial submodule again and that the equivalence relation $\sim$ defines a quotient by a subspace of dimension $\dim_k \gk$ since $T \neq \emptyset$.

We have by <cit.> that

\begin{align*}
h^1_{\mathcal{S}_Q,T}(\gk^0) = h^1_{\mathcal{S}_Q^\perp,T}(\gkv) + h^0(G_{F,S},\gk^0) - h^0(G_{F,S}, \gkv) - \sum_{v| \infty} h^0(G_{F_v},\gk^0) \\ - \sum_{v \in T} h^0(G_{F_v},\gk^0) + \sum_{v \in S \setminus T} \left(h^1(G_{F_v},\gk^0 - h^0(F_v,\gk^0)\right) + \sum_{v \in Q} n_v,
\end{align*}

where we have used that $H^1(G_{F_v}, \gk) = 0$ if $v | \infty$ by the assumption that $\ch k > 2$.
The result then follows on applying the local Euler characteristic formula together with Tate duality at those places $v \in S \setminus T$.

Continue with the same setup as above, but with $T = S$.
Let $n \geq 1$.
Suppose that $\bar{\rho}$ is $\hat{G}$-reasonable.
Let $q \geq h^1(G_{F,S},\gkv)$.
Then there exists a set $Q$ of Taylor–Wiles places of level $n$ such that

* $H^1_{\mathcal{S}_Q^\perp,S}(\gkv) = 0$

* $\#Q = q$

* There exists a surjection $R^{S,\loc}[[X_1,\ldots,X_g]] \to R_{S_Q,S}$ with
$$g = \sum_{v \in Q} n_v - \sum_{v | \infty} h^0(G_{F_v},\gk^0) + z(\#S - 1).$$

Here $z = \dim  Z(\hat{G}_k)$ and $n_v = \dim Z(M_{\bar{\rho}(\phi_v)}) - z$, for $v \in Q$.

Taking $n$ sufficiently large as necessary, this is immediate from Proposition <ref> together with Proposition <ref>.

§.§ Case of function fields

Let $Q$ be a set of Taylor–Wiles places.
Assume that both $H^0(G_{F,S},\gkv)$ and $H^0(G_{F,S},\gk)$ vanish, and that for every $v \in S$ we have $H^0(\GamKv,\gkv) = 0$.

\begin{align*}
h^1_{\mathcal{L}}(\gk) = h^1_{\mathcal{L}^\perp}(\gkv) + \sum_{v \in Q} \dim_k(N_v).
\end{align*}

and this is equal to the dimension of the relative cotangent space of the universal deformation ring $R_{S,Q}^\text{univ}$ as a $k$-vector space.

The identifications

\begin{align*}
H^1_{\mathcal{L}}(\gk) \cong \mathcal{D}_{S \cup Q}(k[\epsilon]) \cong \Hom_{\hat{C}_\mathcal{O}}(R_{S,Q}^\text{univ},k[\epsilon]) \cong \Hom_k\left(\frac{m_{R_{S,Q}^\text{univ}}}{(\lambda,m_{R_{S,Q}^\text{univ}}^2)},k\right)
\end{align*}

show the relative cotangent space of $R_{S,Q}^\text{univ}$ admits a generating set of size $h^1_{\mathcal{L}}(\gk)$ and any choices of lift of such a set to $R_{S,Q}^\text{univ}$ will topologically generate as an $\mathcal{O}$-algebra.

Now we apply the Cassels-Poitou-Tate exact sequence as in <cit.> to obtain the following exact sequence:

\begin{align}\label{poitou-tate}
0 \to& H^1_{\mathcal{L}}(\gk) \to H^1(\Gamma_{K,S \cup Q},\gk) \to \prod_{v \in Q} \frac{H^1(\GamKv,\gk)}{\mathcal{L}_v} \to H^1_{\mathcal{L}^\perp}(\gkv)^* \to\\ & H^2(\Gamma_{K,S \cup Q},\gk)
\to \prod_{v \in S \cup Q} H^2(\GamKv,\gk) \to H^0(\Gamma_{K,S \cup Q},\gkv). \nonumber
\end{align}

The final term is zero since it equals $H^0(G_{F,S},\gkv)$, which vanishes by assumption. We also have by Tate duality that for $v \in S$, $h^2(\GamKv,\gk) = h^0(\GamKv,\gkv) = 0$.
Thus we can relate the dimensions of the remaining terms in (<ref>) to get

\begin{align}\label{selmer_dims}
& h^1_{\mathcal{L}}(\gk) + \sum_{v \in Q} h^1(\GamKv,\gk) + h^2(\Gamma_{K,S \cup Q},\gk) \\= &h^1(\Gamma_{K,S \cup Q},\gk) + \sum_{v \in Q} (\dim_k(\mathcal{L}_v) + h^2(\GamKv,\gk)) + h^1_{\mathcal{L}^\perp}(\gkv) . \nonumber
\end{align}

By the global Euler characteristic formula (see <cit.>), we have

$h^1(\Gamma_{K, S \cup Q}, \gk) - h^2(\Gamma_{K, S \cup Q}, \gk) = h^0(\Gamma_{K, S \cup Q}, \gk) = 0$ by assumption. Now let $v \in Q$. We firstly show $h^1(\GamKv,k) = 2$ and $h^1_{\text{ur}}(\GamKv,k) = 1$. The former follows by the local Euler characteristic formula and Tate duality:

\begin{align*}
h^1(\GamKv,k) &= h^0(\GamKv,k) +h^2(\GamKv,k) \\
&= 1 +h^0(\GamKv,k^\vee(1)) = 2
\end{align*}

since the residual $l$-adic cyclotomic character is trivial, as $q_v \equiv 1 \mod l$ once again. The latter is exactly $\dim_k(\Hom(G_{F_v}/I_v,k))$, which equals 1 since any such homomorphism is determined by the image of Frobenius of which all may occur. Now let $l_v = \dim_k(L_{0,v})$ and $n_v = \dim_k(N_v)$. We have by the local Euler characteristic formula again that $h^2(\GamKv,\gk) - h^1(\GamKv,\gk) = -h^0(\GamKv,\gk) = -l_v$.
We have $\mathcal{L}_v = H^1(G_{F_v},N_v) \oplus H^1_{\text{ur}}(G_{F_v},M_v)$ for trivial $\GamKv$-modules $N_v$ and $M_v$ of respective dimensions $n_v$ and $l_v-n_v$. It follows $\dim_k(\mathcal{L}_v) = l_v + n_v$.

So (<ref>) becomes

\begin{align*}
h^1_{\mathcal{L}}(\gk) = h^1_{\mathcal{L}^\perp}(\gkv) + \sum_{v \in Q} (l_v + n_v - l_v)
\end{align*}

from which the result follows.

Let $n \geq 1$.
If $n=1$, suppose that $\bar{\rho}(\Gamma_{K(\zeta_l)}) \subset \hat{G}(k)$
satisfies the conditions of Definition <ref>, except perhaps vanishing of <ref> and <ref>.
If $n > 1$, suppose $\bar{\rho}(\Gamma_{K(\zeta_l)}) \subset \hat{G}(k)$ is $\hat{G}$-adequate. Suppose also that for every $v \in S$ we have $H^0(\GamKv,\gkv) = 0$. Then there exists a set $Q$ of Taylor–Wiles places of level $n$ such that

* $H^1_{\mathcal{L}^\perp}(\gkv) = 0$

* $\#Q = h^1(G_{F,S},\gkv)$

* The relative cotangent space $m_{R_{Q,S}^\text{univ}}/(\lambda,m_{R_{Q,S}^\text{univ}}^2)$ of $R_{Q,S}^\text{univ}$ has dimension $\sum_{v \in Q} n_v$ as a $k$-vector space. (Recall $n_v = \dim_k(\Lie Z(M_{\bar{\rho}(\phi_v)})$).

By Proposition <ref> if we can find such a set $Q$ satisfying the first two bullet-points then the third immediately follows.
Recall that for $v \in Q$ we had $\mathcal{L}_v^\perp = H^1_{\text{ur}}(G_{F_v},M_v^\vee(1))$ where $M_v$ was any choice of vector space complement to $N_v = \Lie Z(M_{\bar{\rho}(\phi_v)})$ in $L_{0,v} = \Lie M_{\bar{\rho}(\phi_v)}$.
We claim firstly that any class in $H^1_{\mathcal{L}^\perp}(\gkv) = \ker(H^1(\Gamma_{K,S \cup Q}, \gkv) \to \prod_{v \in Q} \frac{H^1(\GamKv,\gkv}{\mathcal{L}_v^\perp})$ lies in the subgroup $H^1(G_{F,S},\gkv) \leq H^1(\Gamma_{K,S \cup Q},\gkv)$.
To see this, let $Q = \{v_1,\ldots,v_r\}$ and $[\psi] \in H^1_{\mathcal{L}^\perp}(\gkv)$. For $0 \leq t \leq r$ let $Q_t = \{v_1,\ldots,v_t\}$
We show that if $[\psi] \in H^1(\Gamma_{K,S \cup Q_t},\gkv)$ for some $t \geq 1$ then in fact $[\psi] \in H^1(\Gamma_{K,S \cup Q_{t-1}},\gkv)$. To simplify notation, let $v$ denote $v_t$.
Inflation-restriction gives an exact sequence

\begin{align*}
0 \to H^1(\Gamma_{K,S \cup Q_{t-1}},\gkv) \to H^1(\Gamma_{K,S \cup Q_t},\gkv) \to H^1(I_{v,t},\gkv)
\end{align*}

where $I_{v,t}$ is an inertia subgroup at a place of $K_{S \cup Q_{t-1}}$ above $v$ in $K_{S \cup Q_t}$.
Since $I_{v,t}$ may be identified as a quotient of $I_v$ (noting that, as $K_{S \cup Q_{t-1}}/K$ is unramified at $v$, we have $I_{v,t}$ is equal to the inertia subgroup at $v$ in $K_{S \cup Q_t}$), we have an inclusion $H^1(I_{v,t},\gkv) \hookrightarrow H^1(I_v,\gkv)$ under which $\res_{I_{v,t}} [\psi]$ has image $0$, being an unramified class in $H^1(\GamKv,\gkv)$.
Thus $[\psi]$ naturally lies in $H^1(\Gamma_{K,S \cup Q_{t-1}},\gkv)$ completing the induction.

As a consequence, we see can think of

\begin{align*}
H^1_{\mathcal{L}^\perp}(\gkv) \cong \ker(H^1(G_{F,S},\gkv) \to \prod_{v \in Q} H^1_{\text{ur}}(\GamKv,N_v^\vee(1)))
\end{align*}

where we have used that $H^1(\GamKv,\gkv) = H^1(\GamKv,N_v^\vee(1)) \oplus H^1(\GamKv,M_v^\vee(1))$ and that the images of classes in $H^1(G_{F,S},\gkv)$ will necessarily be unramified.

It will thus suffice to find for each non-zero class $[\psi] \in H^1(\Gamma_{K,S \cup Q},\gkv)$ infinitely many Taylor–Wiles places $v$ of level $n$ with $[\psi]$ having non-zero image in $H^1_{\text{ur}}(\GamKv,N_v^\vee(1))$.
Indeed, having inductively found distinct places $v_1,\ldots,v_t$ for linearly independent classes $[\psi_1],\ldots,[\psi_t]$ with $t<r$, we have that taking $Q_t = \{v_1,\ldots,v_t\}$ to define dual Selmer conditions, $h^1_{\mathcal{L}^\perp}(\gkv)$ is at most $r-t$.
Thus we can continue by taking any non-zero class $[\psi_{t+1}]$ and a Taylor–Wiles place $v_{t+1} \not\in Q_t$ for which $[\psi_{t+1}]$ has non-zero image in $H^1_{\text{ur}}(\GamKv,N_{v_{t+1}}^\vee(1))$ until all non-zero classes in $H^1(G_{F,S},\gkv)$ have non-zero image, and the kernel is trivial.

So let $[\psi] \in H^1(\Gamma_{K,S \cup Q})$ be a non-zero class and suppose we can always find $\sigma \in \Gamma_{K(\zeta_l)}$ such that $\bar{\rho}(\sigma)$ is semisimple and $\psi(\sigma)(N) \neq 0$ where $N = \mathfrak{z}(\gk^{\sigma})$. We claim that by the Chebotarev density theorem we can find infinitely many places $v \not\in S$ with $\bar{\rho}(\sigma) = \bar{\rho}(\Frob_v)$, $\psi(\sigma) = \psi(\Frob_v)$ and $\Frob_v \in \Gamma_{K(\zeta_l)}$.
Such a $v$ would be a Taylor–Wiles place (as $\zeta_{l} \in k(v)^\times$ gives $q_v \equiv 1 \mod l$) with $\psi$ having non-zero image in $H^1(\GamKv,N_v^\vee(1))$.
To see this then, consider the non-empty open subset $U$ of $G_{F,S}$ given by $\bar{\rho}^{-1}(\bar{\rho}(\sigma))$, $\Gal(K_S/K(\zeta_{l}))$ and $\psi^{-1} \{\psi(\sigma)\}$.
The Frobenius elements are dense in $G_{F,S}$ by Chebotarev, so there exists (infinitely many) Frobenius elements $\Frob_v$ satisfying $\bar{\rho}(\Frob_v) = \bar{\rho}(\sigma)$, $\psi(\Frob_v) = \psi(\sigma)$ and $\Frob_v \in \Gamma_{K(\zeta_l)}$.

To find our $\sigma$ we use here the conditions of $\hat{G}$-adequacy of $H = \bar{\rho}(\Gamma_{K(\zeta_l)})$.
For $m \geq 1$ let $K_m = K(\zeta_{l^m})$ and let $L_m$ be the finite extension of $K_m$ cut out by $\bar{\rho}$ - that is $\Gal(K_S/L_m) = \ker(\restr{\bar{\rho}}{\Gal(K_S/K_m)} \to \hat{G}(k))$, and denote this Galois group by $\Gamma_{L_m}$.
We show that the restriction of $\psi$ to $\Gamma_{L_n}$ is a non-zero homomorphism which we denote $f: \Gamma_{L_n} \to \gkv$.
This is immediate from injectivity of the restriction map $H^1(G_{F,S},\gkv) \to H^1(\Gamma_{L_n},\gkv)$.
This map may be written as the composite of the restrictions

\begin{align*}
H^1(G_{F,S},\gkv) \to  H^1(\Gamma_{K(\zeta_l),S},\gkv) \to
H^1(\Gamma_{K_n,S},\gkv) \to
\end{align*}

The kernel of the first restriction is $H^1(\Gal(K(\zeta_l)/K),\gkv^{\Gamma_{K(\zeta_l),S}})$, which is zero as the order of the module (a power of $l$) is coprime to the order of the group (dividing $l-1$).
The kernel of the second restriction map is given by
$H^1(\Gal(K_n/K(\zeta_l), \gkv^{\Gamma_{K_n,S}}))$.
By definition, $\gkv^{\Gamma_{K_n,S}} = H^0(\bar{\rho}(\Gamma_{K_n,S}),\gkv)$.
Thus it would vanish due the assumption $H^0(H,\gkv) = 0$ provided we knew $\bar{\rho}(\Gamma_{K(\zeta_{l}),S}) = \bar{\rho}(\Gamma_{K_n,S})$.
If $n=1$ this is a tautology, while if $n > 1$ the quotient map is to an abelian group of $l$-power order: $H \to H/\bar{\rho}(\Gamma_{K_n,S})$. Thus if we did not have equality, we could compose with a non-zero homomorphism to $k$, contradicting the assumption $H^1(H,k) = 0$.

Lastly, the kernel of the third restriction is given by $H^1(\Gal(L_n/K_n),\gkv)$.
We saw already that $\bar{\rho}(\Gamma_{K(\zeta_{l}),S}) = \bar{\rho}(\Gamma_{K_n,S})$ so this equals $H^1(H,\gkv)$, which we assumed to vanish.

Thus $f(\Gamma_{L_n})$ is non-zero and moreover is a $\Gamma_{K_n,S}$-module, as for $\sigma \in \Gamma_{L_n}$ and $\tau \in \Gamma_{K_n,S}$ we have

\begin{align*}
\psi(\tau \sigma \tau^{-1}) &= \psi(\tau) + \tau \psi(\sigma\tau^{-1}) \\
&= \psi(\tau) + \tau(\psi(\sigma)+ \sigma \psi(\tau^{-1})) \\
&= \psi(\tau) + \tau \psi(\sigma) + \tau \psi(\tau^{-1}) \\
&= \psi(\id) + \tau \psi(\sigma) \\
&= \tau \psi(\sigma).
\end{align*}

Hence we can take a non-zero simple $H$-submodule $W \leq f(\Gamma_{L_n})$. Now use $\hat{G}$-adequacy of $H$ to take a $\sigma_0 \in H$ with $\bar{\rho}(\sigma_0)$ semisimple whose centralizer is connected and Levi, and such that there exists a $w \in W$ and $z \in \mathfrak{z}(\gk^{\sigma_0})$ with $w(z) \neq 0$.
We may write $w = \psi(\sigma)$ for some $\sigma \in \Gamma_{L_n}$.
We claim that there exists $\tau \in \Gamma_{L_n}$ with $\psi(\tau \sigma_0)(\mathfrak{z}(\gk^{\sigma_0})) \neq 0$. If $\psi(\sigma_0)(z) \neq 0$ then we're done.
Otherwise $\psi(\tau \sigma_0) = \psi(\tau) + \psi(\sigma_0)$.
So choose $\tau$ to be such that $\psi(\tau) = w$ and let $\sigma = \tau \sigma_0$.
Then $\psi(\sigma)(z) = \psi(\tau)(z) = w(z) \neq 0$, and $\mathfrak{z}(\gk^{\sigma_0}) = \mathfrak{z}(\gk^{\sigma})$, so we're done.

§ $\HAT{G}$-ADEQUATE SUBGROUPS

In this section let $p$ be a prime number and let $\hat{G}$ be a connected reductive group over $\Fpbar$.
We assume throughout this section that $p$ is a prime of very good characteristic for $\hat{G}$.
We fix a finite subgroup $\Gamma \leq \hat{G}(\Fpbar)$ (so $\Gamma$ is defined over a finite extension $k$ of $\mathbb{F}_p$).
We aim to relate the notions of $\hat{G}$-irreducibility and $\hat{G}$-adequacy of $\Gamma$.
We recall these firstly.

We say $\Gamma$ is $\hat{G}$-irreducible if, for every proper parabolic subgroup $P$ of $\hat{G}$, we have $\Gamma \not\subset P(\Fpbar)$.

Note that this coincides with the usual definition of irreducibility in the case $\hat{G} = \GL_n$.
Now let $\g^0$ be the Lie algebra of the derived group $\hat{G}^{\der}$, a finite dimensional $\Fpbar$-vector space, and $\g^{0,\vee}$ its linear dual.
Both are $\Gamma$-modules, via the adjoint action of $\hat{G}$ on its Lie algebra.

Here we recall that $M_h$ is the centralizer of $h$ in $\hat{G}$.
It suffices to check these conditions when we replace each instance of $k$ with $\Fpbar$ in Definition <ref>, and we will do so throughout this section.
For computational purposes, we recall that if $h \in \hat{G}(\Fpbar)$ is semisimple with connected centralizer $M_h$ then
$\Lie Z(M_h) \cap \g^0 = \mathfrak{z}(\g^h) \cap \g^0 =  \mathfrak{z}((\g^0)^h)$.

Let $\Gss$ denote the set of semisimple elements of $\Gamma$; since we are working over a finite field these are exactly the elements of order prime to $p$.
An equivalent characterisation of condition <ref> in Definition <ref> is as follows:

\begin{align} \label{equiv characterisation}
\sum_{\gamma \in \Gss} (\Lie Z(M_\gamma) \cap \g^0) = \g^0.
\end{align}

Indeed, letting $U \leq (\g^0)^\vee$ be the annihilator of $\sum_{\gamma \in \Gss} (\Lie Z(M_\gamma) \cap \g^0)$, $U$ is non-zero if and only if there exists a non-zero simple $\Fpbar[\Gamma]$-submodule $W \leq (\g^0)^\vee$ such that for every $\gamma \in \Gss$, every $w \in W$ and $z \in \Lie Z(M_\gamma) \cap \g^0$ we have $w(z) = 0$.

One way to compute $\Lie Z(M_\gamma)$ which we do not explicitly use but motivates the proof of some later results is as follows.
Suppose that $T \subset \hat{G}$ is a maximal torus with Weyl group $W = N_{\hat{G}}(T)/T$ and let $\gamma \in~\hat{T}(\Fpbar)$.

\Lie Z(M_\gamma) = (\Lie T)^{\Stab_{W}(\gamma)}.

Indeed we have
$Z(M_\gamma^\circ)^\circ = (T^{W_{M_{\gamma}^\circ}})^\circ$ by [31], where $W_{M_{\gamma}^\circ}$ is the Weyl group of the identity component of $M_\gamma$.
Since $M_\gamma$ is generated by $M_\gamma^\circ$ together with $\Stab_{W}(\gamma)$ we have
$Z(M_\gamma)^\circ = (Z(M_\gamma^\circ)^{\Stab_W(\gamma)})^\circ = (T^{\Stab_W(\gamma)})^\circ$ from which the claim follows on taking Lie algebras.

§.§ $\GL_n$-irreducible implies $\hat{G}$-adequate

We firstly try to answer the question of when does irreducibility imply adequacy.
In the case $\hat{G} = \GL_n$ these notions are already known to be equivalent away from finitely many primes.

Suppose that $p \geq n+4$ and that $p \neq 2n \pm 1$.
Then $\Gamma \leq \GL_n(\Fpbar)$ is $\GL_n$-adequate if and only if $\Gamma$ is absolutely irreducible.

Let $V$ be the natural $\Fpbar[\Gamma]$-module of dimension $n$.
Letting $\Gamma^+$ denote the subgroup generated by the elements of $\Gamma$ of $p$-power order, by the assumptions on $p$ we can always find an irreducible $\Fpbar[\Gamma^+]$-submodule $W$ of $V$ of dimension $d$ with $d > p-2$ and $d \neq (p \pm 1)/2$.
The result now follows from <cit.>.

Note that each semisimple element $\gamma$ of $\GL_n(\Fpbar)$ has connected centralizer and that $\mathfrak{z}(\gllie_n^\gamma)$ is equal to both the span of the powers of $\gamma$ and to the span of the projections to the eigenspaces of $\gamma$ (viewing $\gllie_{n} = \End_{\Fpbar}(\Fpbar^n)$).
Hence if $\Gamma$ is absolutely irreducible then $\Gamma$ is $\GL_n$-adequate by <cit.> and the converse is given by <cit.>.

In the rest of this section, let $\hat{G}$ be one of the following simple linear algebraic groups over $\Fpbar$:

* the special orthogonal group $\SO_{n}$ for $n \geq 3$

* the symplectic group $\Sp_{2n}$ for $n \geq 1$

* the simply connected exceptional groups $G_2,F_4,E_6,E_7,E_8$.

We will use Theorem <ref> to prove an analogous statement for $\hat{G}$, showing that if $\Gamma$ is $\GL_n$-irreducible via a certain embedding $\hat{G} \hookrightarrow \GL_n$ then $\Gamma$ is $\hat{G}$-adequate.
We firstly prove some lemmas which will allow us to verify that a finite subgroup of $\hat{G}(\Fpbar)$ is $\hat{G}$-adequate by working in $\gllie_n$.

Let $\hat{G}$ be as above.
View $\hat{G} \subset \GL_n$ via an irreducible faithful representation of $\hat{G}$ of minimal dimension.
If $p$ is a prime of very good characteristic for $\hat{G}$ then the Lie algebra $\g \leq \gllie_n$ admits a $\hat{G}$-module complement.

In the proof of <cit.>, it is shown that for some embedding $\hat{G} \to \GL_n$ there is a $\hat{G}$-module complement to $\g$ inside $\gllie_n$.
For the cases of the classical simple groups, these embeddings are of minimal dimension.
However, the cases of the exceptional groups

are instead handled by considering the inclusion $\g \to \gllie(\g)$ given by the adjoint representation.
There it is shown that $\g$ admits a $\hat{G}$-module complement by showing that the trace form $(X,Y) \mapsto \tr(XY)$ on $\gllie(\g)$ is invertible on restriction to $\g$ in primes of very good characteristic by computing the determinant of the restriction.
We perform a similar computation with respect to the faithful irreducible representation of minimal dimension, computing the restriction of the trace form $B$ on $\gllie_n$ to $\g$.

Note that $\hat{G}$ is defined over $\mathbb{Z}$ by means of a Chevalley basis for the Lie algebra.
Let $V$ be a highest weight module giving rise to such a faithful irreducible representation.
Then $V$ is defined over $\mathbb{Q}$ and there exists a finite set $S$ of primes such that this representation is defined over the localization $\mathbb{Z}_S$.
The set $S$ can be taken to consist of those primes appearing in the denominators of the images of the Chevalley basis in $\gllie(V)$.
This minimal set $S$ together with the determinant of the trace form is computed in $\texttt{magma}$ and displayed below in Table <ref>.
In the case $\hat{G} = E_8$, the smallest dimension faithful irreducible representation is given by the $248$-dimensional adjoint representation and is computed in the proof of <cit.>.
We are done on observing that the prime numbers not appearing in $S \cup \{p : v_p( \det(\restr{B}{\g})) > 0\}$ are exactly the primes of very good characteristic for $\hat{G}$.

Determinant of the trace form on restriction to $\g$

$\hat{G}$     $n$       $\det(\restr{B}{\g})$     $S$
$G_2$         7       $2^{14} \cdot 3^7$               $\emptyset$

$F_4$         26      $2^{78} \cdot 3^{52}$                             $\emptyset$

$E_6$         27      $2^{78} \cdot 3^{77}$                             $\{3\}$

$E_7$         56      $-2^{265} \cdot 3^{133}$                             $\{2\}$

$E_8$         248     $2^{496} \cdot 3^{248} \cdot 5^{248}$                             $\emptyset$

Let $\hat{G}$ be an arbitrary closed reductive subgroup of $\GL_n$ over $\Fpbar$ and suppose that there exists a decomposition $\gllie_n = \g \oplus \mathfrak{m}$ as $\hat{G}$-modules.
Let $\pi: \g \oplus \mathfrak{m} \to \g$ be the projection onto the first factor.
Then for any set $S$ of semisimple elements of $\hat{G}(\Fpbar)$ we have

$$ \pi\big(\sum_{\gamma \in S} \mathfrak{z}(\gllie_{n}^\gamma)\big) \subset \sum_{\gamma \in S} \mathfrak{z}(\g^\gamma).$$

Observe that it suffices to show the inclusion

\begin{equation} \label{projection equality}
\pi(\mathfrak{z}(\gllie_{n}^\gamma)) \subset \mathfrak{z}(\g^\gamma)
\end{equation}

for any $\gamma \in \hat{G}(\Fpbar)$ semisimple.
Now suppose that $x+y \in \mathfrak{z}(\gllie_{n}^\gamma)$ with $x \in \g$ and $y \in \mathfrak{m}$.
We just need to show that $\pi(x+y) = x \in \mathfrak{z}(\g^\gamma)$. If $w \in \g^\gamma$, then $w \in \gllie_n^\gamma$ and hence
$$0 = [x+y,w] = [x,w] + [y,w].$$

Differentiating the action of $\hat{G}$ on $\gllie_n$, we see that $[\g,\g] \subset \g$ and $[\g,\mathfrak{m}] = [\mathfrak{m},\g] \subset \mathfrak{m}$.
Therefore $[x,w] \in \g$ and $[y,w] \in \mathfrak{m}$, so since these subspaces are disjoint both terms in the above sum must equal zero.
We deduce that $x \in \mathfrak{z}(\g^\gamma)$, as desired.

We temporarily focus on the case where $\hat{G}$ is special orthogonal or symplectic.
Let $\hat{H}$ be either $\mathrm{O}_n$ or $\Sp_{n}$, defined as a subgroup of $\GL_{n}$ by those matrices preserving a non-degenerate symmetric or alternating bilinear form $J$ on a vector space $V = \Fpbar^{n}$ (so $n$ is necessarily even in the case of $\Sp_n$).
We then let $\hat{G} = \SL_{n} \cap \hat{H}$ be the subgroup of determinant one matrices.
We have an irreducible faithful representation $\hat{G} \to \GL_n = \GL(V)$.
We assume that $n \geq 3$ if $\hat{G} = \SO_n$.

An explicit realisation of $\g$ as a subalgebra of $\gllie_n$ is given by

\g = \{A \in \gllie_n : A^T J + J A = 0\}.

It follows that a $\hat{G}$-invariant complement to $\g$ inside $\gllie_n$ is given by

\mathfrak{m} = \{A \in \gllie_n : A^T J - J A = 0\},

since we assumed $p>2$.
We let $\pi: \gllie = \g \oplus \mathfrak{m} \to \g$ denote the arising $\hat{G}$-equivariant projection.

The following lemma shows that the inclusion <ref> is an equality in most cases and thereby allows us to compute centers of centralizers by working inside $\gllie_n$.

Suppose that $\hat{G}$ is special orthogonal or symplectic and that $\gamma \in \hat{G}(\Fpbar)$ is semisimple.

* the inclusion

\begin{equation}
\pi(\mathfrak{z}(\gllie_{n}^\gamma)) \subset \mathfrak{z}(\g^\gamma)
\end{equation}

fails to be an equality if and only if both $\hat{G} = \SO_n$ and $2 \in \{m_1, m_{-1}\}$;

* the inclusion

\begin{equation} \label{classical inclusion}
\pi(\mathfrak{z}(\gllie_{n}^\gamma)) \subset \Lie Z(Z_{\hat{G}}(\gamma))
\end{equation}

always holds and this inclusion fails to be an equality if and only if both $\hat{G} = \SO_n$ and $ \{0,2\} = \{m_1, m_{-1}\}$.

Here for $\alpha \in \Fpbar^\times$, $m_\alpha$ is the dimension of the $\alpha$-eigenspace for the action of $\gamma$ on $V$.

The bilinear form $J$ is non-degenerate on restriction to the sum of eigenspaces $X_\alpha = V_\alpha + V_{\alpha^{-1}}$.
Since the centralizer of $\gamma$ inside $\GL_n$ is equal to $\prod_{\alpha} \GL(V_\alpha)$,
we have $Z_{\hat{H}}(\gamma) = \prod_{\{\alpha, \alpha^{-1}\}} Z_{\hat{H}_\alpha}(\restr{\gamma}{X_\alpha})$.
Here $\hat{H}_\alpha = \hat{H} \cap \GL(X_\alpha)$ is the subgroup of $\GL(X_\alpha)$ which preserves $\restr{J}{X_\alpha}$.
We see that
$$Z_{\hat{H}_\alpha}(\restr{\gamma}{X_\alpha}) \cong \begin{cases}
\GL_{m_\alpha} &\text{ if } \alpha \neq \alpha^{-1} \\
\hat{H}_\alpha &\text{ if } \alpha = \alpha^{-1},
\end{cases}$$

where the copy of $\GL_{m_\alpha}$ is embedded into $\GL(V_\alpha) \times \GL(V_{\alpha^{-1}})$ with determinant one image.
The centralizer $Z_{\hat{G}}(\gamma)$ is therefore isomorphic to
$$(\SL(X_1 \oplus X_{-1}) \cap (\hat{H}_1 \times \hat{H}_{-1})) \times \prod_{\{\alpha,\alpha^{-1}\} \not\in \{\{1\},\{-1\}\}} \GL_{m_\alpha}.$$

We claim that

$$\pi(\mathfrak{z}(\gllie_{n}^\gamma)) = \bigoplus_{\{\alpha,\alpha^{-1}\} \not\in \{\{1\},\{-1\}\}} \mathfrak{z}(\gllie_{m_\alpha})$$

where, writing $\gllie(V) = \oplus_{\beta,\gamma} \Hom(V_\beta,V_\gamma)$, we identify $\mathfrak{z}(\gllie_{m_\alpha})$ with the subspace spanned by the map $V \to V$ which restricts to $\pm \id$ on $V_{ \alpha^{\pm 1}}$ and restricts to $0$ on every $V_\beta$ for $\beta \neq \alpha^{\pm 1}$.
This is because, for both choices of $\pm$, $\mathfrak{z}(\gllie(X_{\pm 1})) \cap \Lie \hat{G} = 0$, as there are no non-zero scalar matrices in the Lie algebra of an orthogonal or symplectic group (recalling that $p>2$).
For $\alpha \neq \pm 1$ an eigenvalue of $\gamma$, we have $\Lie Z(\GL_{m_\alpha}) = \mathfrak{z}(\gllie_{m_\alpha})$.
We deduce that the inclusion $\pi(\mathfrak{z}(\gllie_{n}^\gamma)) \subset \Lie Z(Z_{\hat{G}}(\gamma))$ always holds.

It remains to check in what cases we have either

\begin{equation} \label{eqn: lie algebra center nonzero}
\mathfrak{z} (\Lie (\SL(X_1 \oplus X_{-1}) \cap (\hat{H}_1 \times \hat{H}_{-1}))) \neq 0
\end{equation}

\begin{equation} \label{eqn: center of lie algebra nonzero}
\Lie Z(\SL(X_1 \oplus X_{-1}) \cap (\hat{H}_1 \times \hat{H}_{-1})) \neq 0.
\end{equation}

For the former, we are computing the center of the direct sum of Lie algebras of symplectic or special orthgonal groups, which is non-zero if and only if at least one of the Lie algebras is $\mathfrak{so}_2$.
Hence <ref> holds if and only if $\hat{G}$ is special orthogonal and $2 \in \{m_1,m_{-1}\}$.
For the latter, we similarly see that $J$ must be symmetric and that $2 \in \{m_1,m_{-1}\}$ if <ref> is to hold; without loss of generality suppose that $m_1 = 2$.
If $m_{-1} > 0$ then $\hat{H}_{-1}$ is isomorphic to a disconnected group, $\mathrm{O}_{m_{-1}}$.
Thus for any pair of matrices $(A,B)$ defining a point of $Z(\SL(X_1 \oplus X_{-1}) \cap (\hat{H}_1 \times \hat{H}_{-1}))$ it must be the case that $A$ commutes with every matrix in $\hat{H}_1 \cong \mathrm{O}_2$ and that $Z(\SL(X_1 \oplus X_{-1}) \cap (\hat{H}_1 \times \hat{H}_{-1}))$ must therefore be a finite group scheme with zero Lie algebra.
Otherwise, if $m_{-1} = 0$ then $\Lie Z(\SL(X_1 \oplus X_{-1}) \cap (\hat{H}_1 \times \hat{H}_{-1})) \cong \Lie \SO_2 \neq 0$.