#  Wiles defect of Hecke algebras via local-global arguments
With an appendix by N. Fakhruddin and C. Khare

Gebhard Böckle, Chandrashekhar B. Khare, Jeffrey Manning

###### Abstract

In his work on modularity of elliptic curves and Fermat’s Last Theorem, A.
Wiles introduced two measures of congruences between Galois representations
and between modular forms. One measure is related to the order of a Selmer
group associated to a newform $f\in S_{2}(\Gamma_{0}(N))$ (and closely linked
to deformations of the Galois representation $\rho_{f}$ associated to $f$),
whilst the other measure is related to the congruence module associated to $f$
(and is closely linked to Hecke rings and congruences between $f$ and other
newforms in $S_{2}(\Gamma_{0}(N))$). The equality of these two measures led to
isomorphisms $R=\mathbf{T}$ between deformation rings and Hecke rings (via a
numerical criterion for isomorphisms that Wiles proved) and showed these rings
to be complete intersections.

We continue our study begun in [BKM21] of the Wiles defect of deformation
rings and Hecke rings (at a newform $f$) acting on the cohomology of Shimura
curves over $\mathbf{Q}$: it is defined to be the difference between these two
measures of congruences. The Wiles defect thus arises from the failure of the
Wiles numerical criterion at an augmentation
$\lambda_{f}:\mathbf{T}\to{\mathcal{O}}$. In situations we study here the
Taylor-Wiles-Kisin patching method gives an isomorphism $R=\mathbf{T}$ without
the rings being complete intersections. Using novel arguments in commutative
algebra and patching, we generalize significantly and give different proofs of
the results in [BKM21] that compute the Wiles defect at
$\lambda_{f}:R=\mathbf{T}\to{\mathcal{O}}$, and explain in an a priori manner
why the answer in [BKM21] is a sum of local defects. As a curious application
of our work we give a new and more robust approach to the result of
Ribet–Takahashi that computes change of degrees of optimal parametrizations of
elliptic curves over $\mathbf{Q}$ by Shimura curves as we vary the Shimura
curve.

###### Contents

  1. 1 Introduction
  2. 2 Wiles defect for rings of dimension one
  3. 3 Wiles defect for higher dimensional Cohen–Macaulay rings
  4. 4 Galois deformation theory
  5. 5 Computation of Wiles defect for some local lifting rings
  6. 6 Wiles defect of Hecke algebras and global deformation rings
  7. 7 Cohomological Wiles defects and degrees of parametrizations by Shimura curves
  8. A A formula of Venkatesh by N. Fakhruddin and C. Khare

##  1 Introduction

In the work on modularity of elliptic curves, Wiles pioneered methods to prove
$R=\mathbf{T}$ theorems where $R$ is a deformation ring and $\mathbf{T}$ a
Hecke algebra, thus proving an equality of moduli spaces of Galois
representations to pro-$p$ Artinian rings arising from modular forms with the
a priori larger moduli space of corresponding abstract Galois representations,
both with certain prescribed local (ramification) behavior.

The injectivity of the a priori surjective map $R\twoheadrightarrow\mathbf{T}$
was proven by using two different types of criteria/methods:

(i)

the numerical criterion of [Wil95, Proposition 2 of Appendix];

(ii)

the patching method of [TW95].

In [TW95] the local conditions imposed on the deformations were smooth. Kisin
[Kis09] later generalized the patching method to allow local conditions on the
deformations that were not necessarily smooth. The generic fiber of the local
deformation rings in question was smooth and Kisin proved a
$R[1/p]=\mathbf{T}[1/p]$ theorem, thus proving a coarser equality of moduli
spaces of $p$-adic Galois representations arising from modular forms with the
a priori larger moduli space of corresponding abstract Galois representations,
both with certain prescribed local behavior. When the local conditions are
Cohen–Macaulay, one sees a posteriori that $R$ has no $p$-torsion (see[KW09,
paragraph before Corollary 4.7], [Sno18, §5] or [BKM21, Theorem 6.3] for
instance) and thus as $\mathbf{T}$ is also torsion-free one can promote an
$R[1/p]=\mathbf{T}[1/p]$ theorem to an integral $R=\mathbf{T}$ theorem,
without the rings in question turning out to be complete intersections.

Wiles applied his numerical criterion for maps between rings to be
isomorphisms of complete intersections to prove, when the local conditions on
the deformations considered were not minimal, the relevant surjective map
$R\twoheadrightarrow\mathbf{T}$ was an isomorphism of complete intersections
(see[Wil95, Theorem 2.17 of §2]). Wiles deduced in this manner $R=\mathbf{T}$
theorems in the non-minimal case from $R=\mathbf{T}$ theorems in the minimal
case. The latter were proved via the patching method of [TW95]. The numerical
criterion has been used subsequently in [Kha03] to prove $R=\mathbf{T}$
theorems without any reliance on patching. The numerical criterion of Wiles
has not as yet been generalized to give a criterion for maps between rings to
be an isomorphism when the rings are known to not be complete intersections.

The work of this paper, like that of the previous paper [BKM21] of this
series, arises when considering situations when we have $R=\mathbf{T}$
theorems proved by patching, but $R$ and $\mathbf{T}$ fail to be complete
intersections. In [BKM21] and the present paper we seek to study the failure
(quantified in a numerical quantity called the Wiles defect introduced in
[TU18], see also [BKM21, Definition 3.10]) of the numerical criterion for
being a complete intersection locally at an augmentation
$\lambda_{f}:\mathbf{T}\to{\mathcal{O}}$ induced by a newform $f$.

In [BKM21] we studied the Wiles defect (at $\lambda_{f}$ of a certain Hecke
ring $\mathbf{T}$ acting on the cohomology of a Shimura curve) using a
combination of patching and level lowering results of Ribet-Takahashi [RT97].
In the present paper we combine the new results in commutative algebra that we
prove here with patching to determine the Wiles defect. The patching method
allows one to show that the Wiles defect of a global deformation ring at an
augmentation $\lambda_{f}$ depends only on the in induced augmentations of the
corresponding local deformation rings. This gives yet another illustration of
the versatility of the patching method, and its ability to reduce proving
properties of global deformation rings to proving properties of the
corresponding local deformation rings.

As a curious consequence we derive and strengthen the results of
Ribet–Takahashi in [RT97] on degrees of optimal parametrizations of elliptic
curves over $\mathbf{Q}$ by Shimura curves, via a new argument. The methods of
Ribet–Takahashi use arithmetic geometry, while the method here uses patching.

###  1.1 A particular case of our main theorem

In [BKM21, Theorem 10.1] we determined the Wiles defect associated to a
newform $f\in S_{2}(\Gamma_{0}(NQ))$ of squarefree level $NQ$ that arises by
the Jacquet Langlands correspondence from a newform in
$S_{2}(\Gamma^{Q}_{0}(N))$. Here $\Gamma^{Q}_{0}(N)$ is the congruence
subgroup of a quaternion algebra that is ramified at the set of primes
dividing $Q$, of level $\Gamma_{0}(N)$, and maximal at the primes in $Q$.

We state an improvement of [BKM21, Theorem 10.1] referring to it for any of
the unexplained notation in the statement below (we do recall the definition
of the Wiles defect below). The proof relies on the Taylor-Wiles-Kisin
patching method, but not on [RT97], and also explains en passant why the Wiles
defect computed below is a sum of local defects in a sense we make precise
later in the introduction.

######  Theorem 1.1.

Let $N$ and $Q$ be relatively prime squarefree integers. Let $p>2$ be a prime
not dividing $NQ$ and let $E/\mathbf{Q}_{p}$ be a finite extension with ring
of integers ${\mathcal{O}}$, uniformizer $\varpi$ and residue field $k$. Let
$\rho_{f}:G_{\mathbf{Q}}\to\mathrm{GL}_{2}({\mathcal{O}})$ be a Galois
representation arising from a newform $f\in S_{2}(\Gamma_{0}(NQ))$, and let
$\overline{\rho}_{f}:G_{\mathbf{Q}}\to\mathrm{GL}_{2}(k)$ be the residual
representation. Assume that $\overline{\rho}_{f}$ is irreducible and
$N|N(\overline{\rho}_{f})$.

Let $R^{{\mathrm{st}}}$ be the Galois deformation ring of
$\overline{\rho}_{f}$ parameterizing lifts of $\overline{\rho}_{f}$ of fixed
determinant which are Steinberg at each prime dividing $Q$, finite flat at $p$
and minimal at all other primes.

Let $D$ be the quaternion algebra with discriminant $Q$ and let
$\Gamma_{0}^{Q}(N)$ be the congruence subgroup for $D$. Let
$\mathbf{T}^{Q}(N)$ and $S^{Q}(\Gamma_{0}^{Q}(N))$ be the Hecke algebra and
cohomological Hecke module at level $\Gamma^{Q}_{0}(N)$ and let
${\mathfrak{m}}\subseteq\mathbf{T}^{Q}(N)$ be the maximal ideal corresponding
to $f$. Let $\mathbf{T}^{{\mathrm{st}}}=\mathbf{T}^{Q}(N)_{\mathfrak{m}}$ and
let $\lambda:\mathbf{T}^{{\mathrm{st}}}\to{\mathcal{O}}$ be the augmentation
corresponding to $f$.

Then the Wiles defects of $\mathbf{T}^{{\mathrm{st}}}$ and
$S^{Q}(\Gamma_{0}^{Q}(N))$ with respect to the map
$R^{{\mathrm{st}}}\twoheadrightarrow\mathbf{T}^{{\mathrm{st}}}$ and the
augmentation $\lambda$ are

$\delta_{\lambda}(R^{\mathrm{st}})=\delta_{\lambda}(\mathbf{T}^{\mathrm{st}})=\delta_{\lambda}(S^{Q}(\Gamma_{0}^{Q}(N))_{{\mathfrak{m}}})=\sum_{q|Q}\frac{2n_{q}}{e}$

where $e$ is the ramification index of ${\mathcal{O}}$ and for each $q|Q$,
$n_{q}$ is the largest integer for which
$\rho_{f}|_{G_{\mathbf{Q}_{q}}}\pmod{\varpi^{n_{q}}}$ is unramified and
$\rho_{f}(\operatorname{Frob}_{q})\equiv\pm{\rm Id}\pmod{\varpi^{n_{q}}}$.

The improvement as far as the statement of the theorem is concerned, if one
compares to [BKM21, Theorem 10.1], is that the assumptions needed there on
$Q$:

  1. 1.

$Q$ is a product of an even number of primes (i.e. $D$ is indefinite),and
$(N(\overline{\rho}),Q)>1$;

  2. 2.

$Q$ is a product of an odd number of primes (i.e. $D$ is definite), and $N>1$;

  3. 3.

$N(\overline{\rho})$ is divisible by at least two primes,

which arose from our relying on delicate results in [RT97], are no longer
needed because of the innovations introduced in this paper. We prove a much
more general theorem below, see Theorem (CI), that works with more general
local conditions than being Steinberg at trivial primes (see [BKM21, §2]) and
with the field $\mathbf{Q}$ replaced by any totally real field $F$, but focus
on this special case for the purposes of the introduction to more easily
explain the novelty of our methods in comparison to [BKM21].

If we look at the shape of the formula:

$\delta_{\lambda}(\mathbf{T}^{\mathrm{st}})=\delta_{\lambda}(S^{Q}(\Gamma_{0}^{Q}(N))_{{\mathfrak{m}}})=\sum_{q|Q}\frac{2n_{q}}{e}$

we see that the Wiles defect $\delta_{\lambda}(\mathbf{T}^{\mathrm{st}})$ that
as defined is a global quantity arising from the augmentation
$\lambda_{f}:\mathbf{T}^{\mathrm{st}}\to{\mathcal{O}}$ is expressed as a sum
over the primes dividing $Q$ of terms $2n_{q}/e$. Furthermore each of the
integers $n_{q}$ depends only on $\rho_{f}|_{G_{\mathbf{Q}_{q}}}$. In [BKM21],
it is only after having proved the theorem that one observes that the formula
depends only on $(\rho_{f}|_{G_{\mathbf{Q}_{q}}})_{q\in Q}$. In this paper we
show that the Wiles defect $\delta_{\lambda}(R^{\mathrm{st}})$ is a priori
local, and in fact is a sum of the defects of local deformation rings
(equivalently, local defects) at primes in $Q$ that we define below. The proof
of [BKM21, Theorem 10.1] did not shed light on the local-global aspect of the
statement of the theorem.

Further the proof in [BKM21] computed the Wiles defect using a combination of
patching and arguments related to level lowering results of [RT97], which were
used to first show that

$\delta_{\lambda}(S^{Q}(\Gamma_{0}^{Q}(N))_{{\mathfrak{m}}})=\sum_{q|Q}\frac{2n_{q}}{e}.$

Then delicate results from [Man21] were used to prove [BKM21, Theorem 3.10,
Theorem 8.1, Corollary 8.3] that

$\delta_{\lambda}(\mathbf{T}^{\mathrm{st}})=\delta_{\lambda}(S^{Q}(\Gamma_{0}^{Q}(N))_{{\mathfrak{m}}}),$

and hence that

$\delta_{\lambda}(\mathbf{T}^{\mathrm{st}})=\sum_{q|Q}\frac{2n_{q}}{e}.$

Here we reverse the logic of the proof in [BKM21], and first show (see Theorem
(CI)) that

$\delta_{\lambda}(R^{\mathrm{st}})=\delta_{\lambda}(\mathbf{T}^{\mathrm{st}})=\sum_{q|Q}\frac{2n_{q}}{e},$

and deduce from this (see Theorem (CI) (ii) and Proposition (CI)) that

$\delta_{\lambda}(S^{Q}(\Gamma_{0}^{Q}(N))_{{\mathfrak{m}}})=\sum_{q|Q}\frac{2n_{q}}{e}.$

Thus we show how to use defects of Hecke rings to compute the defects of their
“cohomological” modules (arising from the first cohomology of modular curves
and Shimura curves that they act on). This also allows one to give a more
robust approach to the main result proved by Ribet and Takahashi [RT97,
Theorem 1] that computes changes of degrees of optimal parametrizations of
elliptic curves over $\mathbf{Q}$ by Shimura curves as one varies the Shimura
curve. For all this, see Theorem (CI)(ii), Corollary (CI) and Corollary (CI)
below.

###  1.2 Main ideas of proof of Theorem 1.1

Let $C_{\mathcal{O}}$ be the category of tuples $(R,\lambda_{R})$ with:

  * •

$R$ a complete, Noetherian local ${\mathcal{O}}$-algebras, with maximal ideal
${\mathfrak{m}}$ and residue field $k={\mathcal{O}}/\sf m$;

  * •

flat over ${\mathcal{O}}$ and Cohen–Macaulay;

  * •

together with an augmentation $\lambda_{R}:R\to{\mathcal{O}}$ (that is by
definition a continuous surjective ${\mathcal{O}}$-algebra homomorphism) that
is formally smooth over the generic fiber.

The morphisms in the category $C_{\mathcal{O}}$ are local homomorphisms of
${\mathcal{O}}$-algebras compatible with the augmentation, namely local
${\mathcal{O}}$-algebra maps $f\colon R\to S$ such that
$\lambda_{S}f=\lambda_{R}$. (As the augmentation considered will be clear from
the context, we will often denote $\lambda_{R}$ by just $\lambda$, and also
given a pair $(R,\lambda)\in C_{\mathcal{O}}$ we will sometimes write $R\in
C_{\mathcal{O}}$.)

We take a cue from a formula discovered by Venkatesh [Ven16, Ven20] (see
Proposition (CI) of the appendix) and define in §2 the Wiles defect
$\delta_{\lambda}(R)$ for $(R,\lambda)\in C_{\mathcal{O}}$. The defect
$\delta_{\lambda}(R)$ is expressed in terms of two invariants first introduced
by Venkatesh:

(i)

the length of the ${\mathcal{O}}$-module
$\widehat{\operatorname{Der}}_{\mathcal{O}}^{1}(R,E/{\mathcal{O}})$ which can
be directly defined using a continuous version of the André–Quillen cohomology
of rings (cf. §3.3), (which will agree with the standard André–Quillen
cohomology module $\operatorname{Der}_{\mathcal{O}}^{1}(R,E/{\mathcal{O}})$ in
the case when $R$ has dimension $1$) and

(ii)

the length of the ${\mathcal{O}}$-module $C_{1,\lambda}(R)$ (cf. §3.2, in
particular Corollary (CI)).

The Wiles defect $\delta_{\lambda}(R)$ is then defined (cf. Definition (CI))
to be

$\displaystyle\delta_{\lambda}(R)=\frac{\log|\widehat{\operatorname{Der}}^{1}_{\mathcal{O}}(R,E/{\mathcal{O}})|-\log|C_{1,\lambda}(R)|}{\log|{\mathcal{O}}/p|}=\frac{\ell_{\mathcal{O}}(\widehat{\operatorname{Der}}^{1}_{\mathcal{O}}(R,E/{\mathcal{O}}))-\ell_{\mathcal{O}}(C_{1,\lambda}(R))}{\ell_{\mathcal{O}}({\mathcal{O}}/p)}.$

This definition of the defect we give for $R\in C_{\mathcal{O}}$ agrees, by
Proposition (CI) and Proposition (CI), in the case when $R\in C_{\mathcal{O}}$
is of dimension one with the definition of the Wiles defect given in [BKM21]
as

$\delta_{\lambda}(R)=\frac{\log|\Phi_{\lambda}(R)|-\log|\Psi_{\lambda}(R)|}{\log|{\mathcal{O}}/p|}.$

Our main technique for the proof of Theorem 1.1 is the Taylor–Wiles–Kisin
patching method. Specifically, under some mild global hypotheses, one can
write $R^{\mathrm{st}}$ as a quotient
$R_{\operatorname{loc}}^{\mathrm{st}}[[x_{1},\ldots,x_{g}]]/(y_{1},\ldots,y_{d})$
(see Theorem (CI) and Theorem (CI)), where
$R_{\operatorname{loc}}^{\mathrm{st}}$ is a completed tensor product of local
Galois deformation rings, and is thus determined by local Galois theoretic
information. In the case when $R_{\operatorname{loc}}^{\mathrm{st}}$ is
Cohen–Macaulay111Which happens in many cases in which the relevant deformation
rings have been explicitly computed, including the case considered in [BKM21],
and is conjectured to hold far more generally. we prove general results (see
Theorem (CI) and Theorem (CI)) that imply that
$\widehat{\operatorname{Der}}^{1}_{\mathcal{O}}(R,E/{\mathcal{O}})$ and
$C_{1,\lambda}(R)$ are independent of the choice of ideal
$(y_{1},\ldots,y_{d})$, and thus depend only on the ring
$R_{\operatorname{loc}}^{\mathrm{st}}$ and the induced composite map
$R_{\operatorname{loc}}^{\mathrm{st}}\to
R^{\mathrm{st}}\xrightarrow{\lambda}{\mathcal{O}}$, which shows that

$\delta_{\lambda}(R^{\mathrm{st}})=\delta_{\lambda}(R_{\operatorname{loc}}^{{\mathrm{st}}})=\sum_{q|Q}\delta_{\lambda}(R_{q}^{\mathrm{st}})$

where $\delta(R_{q}^{\mathrm{st}})$ is the defect of the local deformation
ring $R_{q}^{\mathrm{st}}\in C_{\mathcal{O}}$. Thus to determine
$\delta_{\lambda}(R^{\mathrm{st}})$, we have to compute the defects
$\delta_{\lambda}(R_{q}^{\mathrm{st}})$ of the local deformation rings
$R_{q}^{\mathrm{st}}$. These computations are quite elaborate and are done in
Theorem (CI) of §5 (Theorems (CI) and (CI) do analogous computations for local
deformation rings defined by conditions of being unipotent, and unipotent
together with a choice of Frobenius eigenvalue).

###  1.3 Broader context

We make some more informal remarks about the broader context of our work and
further questions to pursue in this context.

Our work is in the general context of understanding deformation rings $R$ when
they are “obstructed”, and are thus not expected to be complete intersections.
The Wiles defect is in a sense a measure of the obstructedness of $R$ at a
given augmentation $\lambda:R\to{\mathcal{O}}$. In the context of the present
paper the obstructions are local in nature. The Wiles defect is a global
quantity which in our case turns out to be a sum of local defects. This is
proved by patching and showing that that the invariants
$\widehat{\operatorname{Der}}_{\mathcal{O}}^{1}(R,E/{\mathcal{O}})$ and
$C_{1,\lambda}(R)$ remain invariant under going modulo regular sequences. In
other situations (as in [TU18]) the obstructedness of deformation rings $R$ is
because of global reasons, in that one is in a situation of positive defect
$\ell_{0}>0$, and the natural “automorphic cohomology” to consider lives in
more than one degree. The work in [GV18] gives a framework to understand this
more deeply via considering derived deformation rings $\cal R$ such that
$R=\pi_{0}(\cal R)$, and $\pi_{*}(\cal R)$ acts as a graded ring on the
“automorphic cohomology”. It seems interesting to explore these ideas in the
context of the paper, and for instance “derive” the local deformation rings at
trivial primes.

We have not dealt with cases when the local deformation ring at $p$ is not a
complete intersection in this paper, but our results will still be applicable
provided that the local deformation rings are Cohen–Macaulay. For example
[Sno18] considers a fixed weight ordinary deformation ring when the residual
representation is trivial at $p$ and shows that this ring is Cohen–Macaulay
but not a complete intersection (or even Gorenstein). Our methods show that
the global Wiles defect is again a sum of local defects in this case. However
we have not been able to determine the local defect at $p$ in this case (due
largely to the fact that [Sno18] only computes the special fiber of the ring,
while computing the local defect would require the integral version of the
ring).

In the tame cases we have considered here and in [BKM21] the local defect at
$q$ is related to tame regulators (in the sense of Mazur-Tate) of the $q$-adic
Mumford-Raynaud-Tate periods of the corresponding abelian variety $A_{f}$
which has multiplicative reduction at $q$. In the wild case one imagines that
the local defect will be related to $p$-adic regulators.

Our work should also help in formulating and proving Bloch–Kato conjectures
for newforms $f\in S_{2}(\Gamma_{0}(N))$ (say $N$ squarefree) and the $p$-part
of special value of the $L(1,\operatorname{Ad})$ for the adjoint $L$-function
of $f$ for suitable primes $p$. The algebraic part of the $L$-value is
traditionally related to congruence modules of $f$ by the work of Hida
[Hid81]. The Selmer group for the adjoint motive of $f$ can be related to the
cotangent space at the augmentation $\lambda_{f}:R\to{\mathcal{O}}$ where the
local deformation problem at primes dividing $N$ is the unipotent condition.
The Wiles defect here by Theorem (CI) is $\sum_{q|N}n_{q}$, and is the
discrepancy between the length of the congruence module for $f$ and the Selmer
group for the adjoint motive of $f$. It will be interesting to see this defect
emerge from automorphic considerations. We believe that the Selmer group we
are alluding to here is the natural (primitive) Selmer group to consider for
the adjoint motive of $f$, reflecting nature of $\pi_{f}$ locally at primes
dividing $N$. ( See [TU18, Theorem 5.20] that relates the ratio of different
integral normalizations of periods (cohomological and motivic) of the adjoint
motive of a Bianchi form to the Wiles defect, and to Bloch-Kato conjectures.)
Note that if we relax the Selmer conditions at primes dividing $N$ to be
unrestricted of fixed determinant, and consider the corresponding imprimitive
Selmer group, then the Wiles defect becomes 0 and one is in a setting where
Wiles-type methods prove the Bloch-Kato conjecture for this imprimitive Selmer
group.

If we consider the Jacquet-Langlands correspondent $g$ of $f$ on a quaternion
algebra $D_{Q}$ ramified at the set of primes $Q$ dividing $N$ which we assume
to be of even cardinality, normalized (as in [Pra06]) using the schematic
structure over $\mathbf{Z}_{p}$ of the corresponding Shimura curve $X^{Q}$
over $\mathbf{Q}$, with $p$ a prime such that $(p,N)=1$, then one sees easily
that the ratio of Petersson inner products

$\frac{(f,f)}{(g,g)}=\frac{\deg(\phi)}{\deg(\phi’)}$

where $\phi,\phi’$ are optimal parametrizations of abelian varieties in the
isogeny class ${\cal A}_{f}$ over $\mathbf{Q}$ associated to $A_{f}$. We could
ask for a different “natural” normalization $g’$ such that

$\frac{(f,f)}{(g’,g’)}=\frac{\deg(\phi)}{\deg(\phi’)}\Pi_{q\in
Q}\omega^{-2n_{q}}$

would be the change of the corresponding Selmer groups (when we check the
local conditions at primes in $Q$ from Steinberg to unrestricted with fixed
determinant) and thus would incorporate the Wiles defect $\sum_{q\in
Q}\frac{2n_{q}}{e}$.

Our method to compute $p$-parts of change of degrees of parametrizations of
elliptic curves over $\mathbf{Q}$ by Shimura curves gives results that are
stronger than the ones which can be obtained using the arithmetic-geometric
methods of [RT97]. To have these results in the fullest possible generality is
important for Diophantine applications (see [Pas17]).

###  1.4 Structure of this paper

We begin by developing the commutative algebra tools that are needed for our
main theorem Theorem (CI). In §2 we state a formula for Wiles defects of rings
of dimension one that is proved in Appendix A. In the key §3 we define and
prove properties of the invariants
$\widehat{\operatorname{Der}}_{\mathcal{O}}^{1}(R,E/{\mathcal{O}})$ and
$C_{1,\lambda}(R)$ for rings $R\in C_{\mathcal{O}}$. In §4 we summarize
information about local and global deformation rings. In §5 we compute the
invariants defined in §3 for the local deformation rings we consider. This is
a key input in computing the Wiles defect of global deformation rings in
Theorem (CI). In §6 we use patching and the work in §3 to show that the Wiles
defect of global deformation rings and Hecke rings we consider is the sum of
local defects. As the local defects have been computed in §5 this allows us to
complete the proof of our main Theorem (CI). In §7 we apply Theorem (CI) to
compute the Wiles defect for modules over Hecke algebras that arise from their
action on the cohomology of modular and Shimura curves. This also leads to a
new approach to, and strengthening of, the results in [RT97] about change of
degrees of optimal parametrizations of elliptic curves by Shimura curves as
one changes the Shimura curve.

In Appendix A (written by N. Fakhruddin and C. Khare) a proof of a formula
stated by Venkatesh is given, which has been proven earlier in a special case
in [TU18, Proposition 4]).

###  1.5 Notation

By $F$ we denote our base field, a totally real number field, by $F_{v}$ its
completion at any place $v$ of $F$, and we choose algebraic closures
$\overline{F}$ of $F$ and $\overline{F}_{v}$ if $F_{v}$ for all places $v$.
These choices define the absolute Galois groups
$G_{F}=\operatorname{Gal}(\overline{F}/F)$ and
$G_{F_{v}}=\operatorname{Gal}(\overline{F}_{v}/F_{v})$. We write $I_{v}\subset
G_{F_{v}}$ for the inertia subgroup. We also fix embeddings
$\overline{F}\to\overline{F}_{v}$, extending the canonical embeddings $F\to
F_{v}$. This determines for each place $v$ of $F$ an embedding $G_{F_{v}}\to
G_{F}$. By $\operatorname{Frob}_{v}$ we denote a Frobenius automorphism in
$G_{F_{v}}$, that is unique up to $I_{v}$, and we also write
$\operatorname{Frob}_{v}$ for its image in $G_{F}$. All representations of
$G_{F}$ or of $G_{F_{v}}$ will be assumed to be continuous. If $v$ is a finite
place of $F$, then we write $q_{v}$ for the cardinality of its residue field.

Throughout the paper, we fix a prime $p>2$, and we denote by
$\overline{\mathbf{Q}}_{p}$ an algebraic closure of $\mathbf{Q}_{p}$. We will
call a finite extension $E$ of $\mathbf{Q}_{p}$ inside
$\overline{\mathbf{Q}}_{p}$ a coefficient field. For a coefficient field $E$,
we let ${\mathcal{O}}$ be its ring of integers, $k$ its residue field and
$\varpi\in{\mathcal{O}}$ a uniformizer. We write $\Sigma_{p}$ for the set of
places of $F$ above $p$.

The category of complete Noetherian local ${\mathcal{O}}$-algebras with
residue field $k$ is denoted by ${\mathrm{CNL}}_{\mathcal{O}}$, and for any
object $R$ in ${\mathrm{CNL}}_{\mathcal{O}}$, we write
${\mathfrak{m}}_{R}\subset R$ for its maximal ideal. Each object
$R\in{\mathrm{CNL}}_{\mathcal{O}}$ will be endowed with its profinite
(${\mathfrak{m}}_{R}$-adic) topology. By a complete Noetherian local
${\mathcal{O}}$-algebra, we implicitly mean that its residue field is equal to
$k$; we feel justified because our rings typically have an augmentation to
${\mathcal{O}}$.

We denote by $\varepsilon_{p}$ the $p$-adic cyclotomic character
$\varepsilon_{p}:G_{F}\to\mathbf{Z}_{p}^{\times}$; if we compose
$\varepsilon_{p}$ on the right with any map $G_{F_{v}}\to G_{F}$ or on the
left with $\mathbf{Z}_{p}^{\times}\to R^{\times}$, induced from any morphism
$\mathbf{Z}_{p}\to R$ in ${\mathrm{CNL}}_{\mathbf{Z}_{p}}$, then we also write
$\varepsilon_{p}$, by slight abuse of notation.

For an ${\mathcal{O}}$-algebra $R$, an augmentation $\lambda$ of $R$ will
always mean a surjective ${\mathcal{O}}$-algebra homomorphism
$\lambda:R\to{\mathcal{O}}^{\prime}$, where ${\mathcal{O}}^{\prime}$ is the
ring of integers in a finite extension of $E$ (we will almost always take
${\mathcal{O}}={\mathcal{O}}^{\prime}$). For an ${\mathcal{O}}$-module $M$
that is a finite abelian group, we denote by $\ell_{\mathcal{O}}(M)$ the
length of $M$ as an ${\mathcal{O}}$-module. For $\alpha\in{\mathcal{O}}$, we
denote by
$\operatorname{ord}_{\mathcal{O}}(\alpha)=\ell_{\mathcal{O}}({\mathcal{O}}/(\alpha))$.

For a Galois representation
$\overline{\rho}:G_{F}\to\mathrm{GL}_{2}(\overline{\mathbf{F}}_{p})$ which is
finite flat at $p$, we will let $N(\overline{\rho})$ represent its Artin
conductor.

###  1.6 Acknowledgements

We would like to thank Najmuddin Fakhruddin, Tony Feng, Michael Harris,
Srikanth Iyengar, Akshay Venkatesh for helpful discussions related to this
paper. G.B. acknowledges support by Deutsche Forschungsgemeinschaft (DFG)
through CRC-TR 326 ‘Geometry and Arithmetic of Uniformized Structures’,
project number 444845124.

##  2 Wiles defect for rings of dimension one

In this section we state results from the Appendix A in the form in which they
are used in the paper, and also with a view to generalizing these results to
higher dimensional rings in §3.

For any ring $R$, any ideal $I\subseteq R$ and any $R$-module $M$, we will
always use $M[I]\subseteq M$ for the submodule of $I$-torsion elements of $M$.
In particular, $R[I]=\operatorname{Ann}_{R}(I)\subseteq R$ is the annihilator
of the ideal $I$.

If $M$ is a finitely generated $R$-module, with generating set
$m_{1},\ldots,m_{n}$ inducing a surjection $R^{n}\twoheadrightarrow M$, then
we will let $\operatorname{Fitt}_{R}(M)\subseteq R$ (called the
$0^{\mathrm{th}}$ _fitting ideal_) denote the ideal generated by all elements
of the form $\det(v_{1},\ldots,v_{n})\in R$ for
$v_{1},\ldots,v_{n}\in\ker(R^{n}\twoheadrightarrow M)$. It is well known that
this is independent of the choice of generating set $m_{1},\ldots,m_{n}$, and
moreover that $\operatorname{Fitt}_{R}(M)\subseteq\operatorname{Ann}_{R}(M)$.
When the ring $R$ is clear from context we will sometimes write
$\operatorname{Fitt}(M)$ in place of $\operatorname{Fitt}_{R}(M)$.

Let $R$ be a complete, local Noetherian ${\mathcal{O}}$-algebra with
$\dim(R)=1$, and assume that $R$ is finite over ${\mathcal{O}}$. Let
$\lambda:R\twoheadrightarrow{\mathcal{O}}$ be any _augmentation_ (i.e.
surjective ${\mathcal{O}}$-algebra homomorphism). Let $R^{\mathrm{tf}}$ be the
maximal $\varpi$-torsion free quotient of $R$, which is automatically finite
free over ${\mathcal{O}}$.222In the rest of this paper we will always work in
the case where $R=R^{\mathrm{tf}}$, but we still state the general version in
this section for the sake of completeness. Also use $\lambda$ to denote the
augmentation $R^{\mathrm{tf}}\twoheadrightarrow{\mathcal{O}}$ induced by
$\lambda$. Define

$\Phi_{\lambda}(R)=(\ker\lambda)/(\ker\lambda)^{2}=\Omega_{R/{\mathcal{O}}}\otimes_{\lambda}{\mathcal{O}}$

and

$\Psi_{\lambda}(R)={\mathcal{O}}/\eta_{\lambda}(R)={\mathcal{O}}/(\lambda(R^{\mathrm{tf}}[\ker\lambda])),$

which we will call the _cotangent space_ and _congruence module_ of $R$ (with
respect to $\lambda$). From now on we will assume that $\Phi_{\lambda}(R)$ is
finite, which geometrically means that $\lambda$ is smooth on the generic
fiber of $R$.

In [BKM21] we define the _Wiles defect_ of $R$ with respect to $\lambda$ to be

$\delta_{\lambda}(R)=\frac{\log|\Phi_{\lambda}(R)|-\log|\Psi_{\lambda}(R)|}{\log|{\mathcal{O}}/p|}=\frac{\ell_{\mathcal{O}}(\Phi_{\lambda}(R))-\ell_{\mathcal{O}}(\Psi_{\lambda}(R))}{\ell_{\mathcal{O}}({\mathcal{O}}/p)},$

which is known to be a non-negative rational number. Moreover (cf. [Wil95,
Len95]) $\delta_{\lambda}(R)=0$ if and only if $R=R^{\mathrm{tf}}$ and $R$ is
a complete intersection. To deduce this from the literature we note that
$\delta_{\lambda}(R)=0$ implies that the map $R\to R^{\mathrm{tf}}$ is an
isomorphism of complete intersections. (The reason for the normalization
factor of $\log|{\mathcal{O}}/p|$ is to ensure that $\delta_{\lambda}(R)$ is
invariant under expanding the coefficient ring ${\mathcal{O}}$.)

Venkatesh, in an unpublished note [Ven16], observed that $\delta_{\lambda}(R)$
can be expressed in terms of two other invariants of $R$ (see Appendix A of
this paper, for a detailed proof of a more general version of Venkatesh’s
observation).

First, let $R$ act on $E/{\mathcal{O}}$ through its quotient
$R\xrightarrow{\lambda}{\mathcal{O}}$. Venkatesh’s first invariant is simply
the first André–Quillen cohomology group
$\operatorname{Der}^{1}_{\mathcal{O}}(R,E/{\mathcal{O}})$.

To define Venkatesh’s second invariant, we will fix an ${\mathcal{O}}$-algebra
$\widetilde{R}$ and a surjection $\varphi:\widetilde{R}\twoheadrightarrow R$
with the properties that

  * •

$\widetilde{R}$ is a complete intersection of dimension $1$, finite free over
${\mathcal{O}}$.

  * •

$\Phi_{\lambda\circ\varphi}(\widetilde{R})$ is finite.

(such a ring always exists, as explained in Appendix A). When there is no
chance of confusion we will also use $\lambda$ to denote the induced map
$\lambda\circ\varphi:\widetilde{R}\twoheadrightarrow
R\twoheadrightarrow{\mathcal{O}}$.

Now write $I=\ker\varphi$ so that $\lambda(I)=0$. As $\widetilde{R}$-modules,
we have that $\operatorname{Fitt}(I)\subseteq\widetilde{R}[I]$, and hence
$\lambda(\operatorname{Fitt}(I))\subseteq\lambda(\widetilde{R}[I])$ as ideals
of ${\mathcal{O}}$ (and in fact, both of these ideals are nonzero as explained
in Appendix A). We then define Venkatesh’s second invariant to be the cyclic
${\mathcal{O}}$-module

$C_{1,\lambda}(R)=\lambda\left(\widetilde{R}[I]\right)/\lambda\left(\operatorname{Fitt}(I)\right).$

_A priori_ , this looks like it will depend on the choice of complete
intersection $\widetilde{R}$, but the work of Appendix A shows that it in fact
depends only on $R$ and $\lambda$. The main result Proposition (CI) of
Appendix A is the following formula for the Wiles defect
$\delta_{\lambda}(R)$. We recall as noted earlier that [TU18, Proposition 4]
proves a particular case (when $C_{1,\lambda}(R)$ is trivial) of this formula.

######  Theorem 2.1 (see (CI)).

If $R$ and $\lambda:R\twoheadrightarrow{\mathcal{O}}$ are as described above,
and $\Phi_{\lambda}(R)$ is finite, then

$\frac{|\operatorname{Der}^{1}_{\mathcal{O}}(R,E/{\mathcal{O}})|}{|C_{1,\lambda}(R)|}=\frac{|\Phi_{\lambda}(R)|}{|\Psi_{\lambda}(R)|}.$

In particular,
$\displaystyle\delta_{\lambda}(R)=\frac{\log|\operatorname{Der}^{1}_{\mathcal{O}}(R,E/{\mathcal{O}})|-\log|C_{1,\lambda}(R)|}{\log|{\mathcal{O}}/p|}$.

######  Remark 2.2.

In practice, one is often interested in the Wiles defect $\delta_{\lambda}(M)$
(as defined in [BKM21, Section 3]) of a particular module $M$ over $R$, as
well as, or instead of $\delta_{\lambda}(R)$. However in many cases relevant
to us, the results of [BKM21] imply that
$\delta_{\lambda}(R)=\delta_{\lambda}(M)$, so we will focus mainly on
$\delta_{\lambda}(R)$ in this paper, except in §7 in which we apply Theorem
(CI) which determines defects of Hecke rings to detect the defect of modules
that they act on.

We do suspect that there may exist some generalization of Theorem 2.1 which
would directly express $\delta_{\lambda}(M)$ in terms of similar invariants.
Such a generalization would allow us to directly study $\delta_{\lambda}(M)$
in cases when we can not prove it is equal to $\delta_{\lambda}(R)$, and could
possibly work in cases when the results of this paper do not apply. The
results of [BIK21, Theorem 1.2] support such a suspicion.

##  3 Wiles defect for higher dimensional Cohen–Macaulay rings

We begin this section by remarking that the definition of the Wiles defect
$\delta_{\lambda}(R)$ in [BKM21], which depends on finiteness of
$\Phi_{\lambda}(R)$, makes sense for a complete Noetherian, Cohen–Macaulay
local ${\mathcal{O}}$-algebra $R$ only when $R$ is of dimension one.

######  Lemma 3.1.

Let $R$ be a complete Noetherian local ${\mathcal{O}}$-algebra together with
an augmentation $\lambda:R\to{\mathcal{O}}$, such that $\Phi_{\lambda}(R)$ is
a finite abelian group then $\ker(\lambda)$ is a minimal prime ideal. If we
further assume that $R$ is Cohen–Macaulay then $R$ is of dimension one.

###### Proof.

Let $\ker(\lambda)=\mathfrak{p}$ and we observe that the localization
$R_{\mathfrak{p}}$ is a local ring with maximal ideal
$m=\mathfrak{p}R_{\mathfrak{p}}$ and infinite residue field $E$, and by our
assumption that $\ker(\lambda)/\ker(\lambda)^{2}$ is finite we deduce that
$m=m^{2}$ and thus $m=0$. This implies that $R_{\mathfrak{p}}$ is a field, and
thus $\mathfrak{p}$ is a minimal prime ideal of $R$. As Cohen–Macaulay rings
are equidimensional, we deduce the last statement of the lemma. ∎

In light of this we give a definition (cf. Definition (CI)) of the Wiles
defect $\delta_{\lambda}(R)$ for $R\in C_{\mathcal{O}}$ motivated by the
Venkatesh formula of the defect $\delta_{\lambda}(R)$ for $R\in
C_{\mathcal{O}}$ when $R$ is one-dimensional. This is expressed in terms of:

(i)

the invariant
$\widehat{\operatorname{Der}}_{\mathcal{O}}^{1}(R,E/{\mathcal{O}})$ which can
be directly defined using a continuous version of the André–Quillen cohomology
of rings (cf. §3.3, in particular Theorem (CI)); and

(ii)

the invariant $C_{1,\lambda}(R)$ (cf. §3.2, in particular Corollary (CI)) that
is defined by reduction, via quotienting by regular sequences, to the case of
dimension 1 treated in the Appendix A, and where it was originally defined by
Venkatesh.

The Wiles defect $\delta_{\lambda}(R)$ is then defined (cf. Definition (CI))
via the formula

$\displaystyle\delta_{\lambda}(R)=\frac{\log|\widehat{\operatorname{Der}}^{1}_{\mathcal{O}}(R,E/{\mathcal{O}})|-\log|C_{1,\lambda}(R)|}{\log|{\mathcal{O}}/p|}.$

In the case when $R$ is of dimension one this definition of the defect for
$R\in C_{\mathcal{O}}$ agrees by Theorem 2.1 and Proposition (CI), with the
definition of the Wiles defect defined in [BKM21] as

$\delta_{\lambda}(R)=\frac{\log|\Phi_{\lambda}(R)|-\log|\Psi_{\lambda}(R)|}{\log|{\mathcal{O}}/p|}.$

(Note that when $R$ is of dimension one, the finiteness of
$|\Phi_{\lambda}(R)|$ is equivalent to saying that $\lambda:R\to{\mathcal{O}}$
is formally smooth over the generic fiber.)

We show below the independence of the invariants we define under forming
quotients by regular sequences: this is used to even define the invariant
$C_{1,\lambda}(R)$. We also provide formulas for the invariants in terms of
certain complete intersection rings that surject onto $R\in C_{\mathcal{O}}$,
similar to the treatment in the appendix, but in higher dimensions.

###  3.1 Complete intersection (CI) covers

Consider $R\in C_{\mathcal{O}}$, and a power series ring
$S={\mathcal{O}}[[y_{1},\ldots,y_{d}]]$. We will say that an inclusion
$\theta:S\hookrightarrow R$ satisfies (P) the following conditions hold:

######  Property (P).

  * •

$\theta:S\hookrightarrow R$ is a continuous ${\mathcal{O}}$-algebra
homomorphism.

  * •

$\theta$ makes $R$ into a finite free $S$-module (so that
$(\theta(y_{1}),\ldots,\theta(y_{d}),\varpi)$ is a regular sequence for $R$).

  * •

$(\theta(y_{1}),\ldots,\theta(y_{d}))\subseteq\ker\lambda$.

  * •

If
$R_{\theta}=R/(\theta(y_{1}),\ldots,\theta(y_{d}))=R\otimes_{S}{\mathcal{O}}$
and $\lambda_{\theta}:R_{\theta}\twoheadrightarrow{\mathcal{O}}$ is the map
induced by $\lambda$, then $\Phi_{\lambda_{\theta}}(R_{\theta})$ is finite.

######  Proposition (P).

A map $\theta$ satisfying property (P) exists.

We will give the proof later in this subsection after the proof of Lemma (CI).

Given a $\theta$ satisfying (P), we will usually identify $S$ with its image
in $R$, so that in particular $y_{1},\ldots,y_{d}\in R$. As in the statement
of Property (P), we will let
$R_{\theta}=R/(y_{1},\ldots,y_{d})=R\otimes_{S}{\mathcal{O}}$ and let
$\lambda_{\theta}:R_{\theta}\twoheadrightarrow{\mathcal{O}}$ denote the map
induced by $\lambda$. Note that by the second condition of Property (P), the
ring $R_{\theta}$ is a finite and free module over ${\mathcal{O}}$.

Similarly to Section 2, we will sometimes need to write $R$ as a quotient of
some auxiliary complete intersection. We will say that a triple
$(\widetilde{R},I,\varphi)$ satisfies (CI) if:

######  Property (CI).

  * •

$\widetilde{R}$ is a complete, Noetherian local ${\mathcal{O}}$-algebra, flat
and equidimensional over ${\mathcal{O}}$ of relative dimension $d$.

  * •

$\widetilde{R}$ is a complete intersection.

  * •

$\varphi:\widetilde{R}\to R$ is a continuous surjection of
${\mathcal{O}}$-algebras with $I=\ker\varphi$.

  * •

The point corresponding to $\lambda\circ\varphi$ in
$\operatorname{Spec}\widetilde{R}[1/\varpi]$ is a formally smooth point.

If $(\widetilde{R},I,\varphi)$ satisfies (CI) we will use
$\widetilde{\lambda}$ to denote the composition
$\lambda\circ\varphi:\widetilde{R}\twoheadrightarrow
R\twoheadrightarrow{\mathcal{O}}$.

Given $(\widetilde{R},I,\varphi)$ with Property (CI), Theorem (CI) will give a
formula for $C_{1,\lambda}(R)$ in terms of this triple, independent of any
$\theta$, and Theorem (CI) will give a similar result for
$\widehat{\operatorname{Der}}_{\mathcal{O}}^{1}(R,E/{\mathcal{O}})$.

######  Proposition (CI).

For any pair $(R,\lambda)$ there exists a triple $(\widetilde{R},I,\varphi)$
satisfying Property (CI).

Proposition (CI) will be a direct consequence of Lemma (CI). We begin with the
following lemma:

######  Lemma (CI).

Let $S$ be a complete, Noetherian local ${\mathcal{O}}$-algebra with an
augmentation $\lambda\colon S\to{\mathcal{O}}$ and let $d>0$. Suppose that
$S[1/\varpi]$ is formally smooth at $\lambda$ of dimension $n\geq d$ and that
there are elements $f_{1},\ldots,f_{d}\in\operatorname{ker}\lambda$ such that
$f_{1},\ldots,f_{d},\varpi$ is a regular sequence in $S$. Then there exist
$h_{1},\ldots,h_{d}\in(\operatorname{ker}\lambda\cap(f_{1},\ldots,f_{d},\varpi))$
such that $h_{1},\ldots,h_{d},\varpi$ is a regular sequence in $S$ and such
that for $A=S/(h_{1},\ldots,h_{d})$ and the induced augmentation
$\lambda_{A}\colon A\to{\mathcal{O}}$, the ring $A[1/\varpi]$ is formally
smooth at $\lambda_{A}$ of dimension $n-d$.

###### Proof.

By replacing $(f_{1},\ldots,f_{d})$ by $(f_{1}^{2},\ldots,f_{d}^{2})$ we may
assume that $(f_{1},\ldots,f_{d})\subset\operatorname{ker}\lambda^{2}$; see
[Mat80, 15.A, Theorem 26]. Write $S[1/\varpi]$ for the localization of $S$ at
$\varpi$ and $\widehat{S[1/\varpi]}$ for the completion of the latter at the
point corresponding to $\lambda$. By our hypothesis, the ring
$\widehat{S[1/\varpi]}$ is a power series ring over $E$ in $n\geq d$
indeterminates. Let $\widehat{I}$ denote its maximal ideal. Choose
$g_{1},\ldots,g_{d}$ in $\ker\lambda$ whose images in
$\widehat{I}/\widehat{I}^{2}$ are linearly independent over $E$. Then
$(h_{1},\ldots,h_{d})$ with $h_{i}=f_{i}+\varpi g_{i}$ has all properties
required. ∎

######  Lemma (CI).

Suppose $B$ is a complete, Noetherian local ${\mathcal{O}}$-algebra with $\dim
B=d+1$ and $\dim B/\varpi=d$, and $\lambda:B\to{\mathcal{O}}$ is an
augmentation, such that $\operatorname{Spec}B[1/\varpi]$ is formally smooth at
$\lambda$ of dimension $d$. Then there exists a Noetherian
${\mathcal{O}}$-algebra $A$ and a surjective homomorphism $\pi\colon A\to B$
such that the following holds:

  1. 1.

The ring $A$ is local and complete, a complete intersection, flat over
${\mathcal{O}}$ and of relative dimension $d$.

  2. 2.

The map $\pi[1/\varpi]\colon A[1/\varpi]\to B[1/\varpi]$, obtained from $\pi$
by inverting $\varpi$, induces an isomorphism after completion at the points
corresponding to the augmentations $\lambda$ and $\mu=\lambda\pi\colon
A\to{\mathcal{O}}$, respectively. In particular,
$\operatorname{Spec}A[1/\varpi]$ is formally smooth at $\mu$ of dimension $d$.

###### Proof.

Let $\Pi\colon S={\mathcal{O}}[[z_{1},\ldots,z_{n}]]\to B$ be a surjective
ring homomorphism. Let ${\mathfrak{p}}_{\lambda}\subset{\mathfrak{m}}_{B}$ be
the prime ideal $\ker\lambda$, and denote by
${\mathfrak{q}}_{\lambda}\subset{\mathfrak{m}}_{S}$ its inverse image under
$\Pi$, i.e. ${\mathfrak{q}}_{\lambda}=\ker\lambda\Pi$. Let $m=n-d\geq 0$.

By hypothesis $B/\varpi$ has dimension $d$. Because $S$ is $\varpi$-torsion
free and $S/\varpi$ is regular, we can find a regular sequence
$(f_{1},\ldots,f_{m})$ in $\ker\Pi\subset S$ such that
$(f_{1},\ldots,f_{m},\varpi)$ is a regular sequence. Because $S[1/\varpi]$ is
regular of dimension $n$ and ${\mathfrak{q}}_{\lambda}[1/\varpi]$ is a maximal
ideal of that ring, the ring $S[1/\varpi]$ is formally smooth at
${\mathfrak{q}}_{\lambda}[1/\varpi]$ of dimension $n$.

It follows from Lemma (CI) that there exist
$h_{1},\ldots,h_{m}\in\operatorname{ker}\Pi+\varpi S$ such that
$h_{1},\ldots,h_{m},\varpi$ is a regular sequence in $S$ and such that for
$A=S/(h_{1},\ldots,h_{m})$ and induced augmentation $\lambda_{A}\colon
A\to{\mathcal{O}}$ the ring $A[1/\varpi]$ is formally smooth at $\lambda_{A}$
of dimension $n-m=d$. It follows that one has an induced surjection $A\to B$
where $A$ is a local complete, complete intersection ${\mathcal{O}}$-algebra,
flat over ${\mathcal{O}}$ of relative dimension $d$, and that the induced
surjection $A[1/\varpi]\to B[1/\varpi]$ becomes an isomorphism after
completion at ${\mathfrak{q}}_{\lambda}[1/\varpi]$. ∎

###### Proof of Proposition (P).

Because $R$ is Cohen–Macaulay and flat over ${\mathcal{O}}$ of relative
dimension $d$, we can find a regular sequence $\varpi,f_{1},\ldots,f_{d}$ in
$R$. If we replace each $f_{i}$ by an element in $f_{i}+\varpi R$ the
resulting sequence is again regular. Now using that
$\operatorname{ker}\lambda$ together with $\varpi$ generate the maximal ideal
of $R$, we may assume that $f_{1},\ldots,f_{d}$ lie in
$\operatorname{ker}\lambda$. Again by hypothesis $R[1/\varpi]$ is
Cohen–Macaulay of dimension $d$ and formally smooth at $\lambda$, and hence it
is formally smooth at $\lambda$ of dimension $d$.

Then by Lemma (CI), there exist
$h_{1},\ldots,h_{d}\in\operatorname{ker}\lambda$ such that
$h_{1},\ldots,h_{d},\varpi$ is a regular sequence in $R$ and such that for
$B=R/(h_{1},\ldots,h_{d})$ and the induced augmentation $\lambda_{B}\colon
B\to{\mathcal{O}}$ the ring $B[1/\varpi]$ is formally smooth at $\lambda_{B}$
of dimension $0$. It follows that the continuous ${\mathcal{O}}$-algebra map
$\theta\colon S={\mathcal{O}}[[y_{1},\ldots,y_{d}]]\to R$ with $y_{i}\mapsto
f_{i}$ makes $R$ into a finite free $S$-module, such that in the notation of
(P), we have $B=R_{\theta}$ and $\lambda_{B}=\lambda_{\theta}$, and moreover
$R_{\theta}$ is finite free over ${\mathcal{O}}$. Hence $R_{\theta}[1/\varpi]$
is a product of Artin $E$-algebras, and the smoothness at $\lambda_{\theta}$
shows that the component corresponding to $\lambda_{\theta}$ is equal to $E$.
From this it follows that
$\Phi_{\lambda_{\theta}}(R_{\theta})=\operatorname{ker}\lambda_{\theta}/(\operatorname{ker}\lambda_{\theta})^{2}$
is of finite ${\mathcal{O}}$-length, as it is finitely generated over
${\mathcal{O}}$ and ${\mathcal{O}}$-torsion. ∎

Next we observe that we can lift regular sequences of $R$ along
$\widetilde{R}\to R$.

######  Lemma (CI).

Assume that $\theta:S\hookrightarrow R$ satisfies (P) and
$(\widetilde{R},I,\varphi)$ satisfies (CI). Then $\theta$ lifts to a morphism
$\widetilde{\theta}:S\to\widetilde{R}$ (making $\varphi$ into a $S$-algebra
homomorphism) which makes $\widetilde{R}$ into a finite free $S$-module. That
is, identifying $S$ with its image in $\widetilde{R}$, that
$(y_{1},\ldots,y_{d},\varpi)$ is a regular sequence for both $\widetilde{R}$
and $R$.

Moreover if $\widetilde{R}_{\theta}=\widetilde{R}/(y_{1},\ldots,y_{d})$ and
$\widetilde{\lambda}_{\theta}:\widetilde{R}_{\theta}\twoheadrightarrow{\mathcal{O}}$
is the map induced by $\widetilde{\lambda}$, then $\widetilde{R}_{\theta}$ is
a complete intersection of dimension $1$, finite free over ${\mathcal{O}}$,
and $\Phi_{\widetilde{\lambda}_{\theta}}(\widetilde{R}_{\theta})$ is finite.

This will follow from the following lemma:

######  Lemma (CI).

Let $A$ be a Noetherian local ring, and let $B=A/I$ for some ideal $I$ of $A$.
Let $x\in{\mathfrak{m}}_{B}$ be an element not contained in any minimal prime
of $B$. Then $x$ lifts to an element $\widetilde{x}\in{\mathfrak{m}}_{A}$
which is not contained in any minimal primes of $A$.

###### Proof.

Pick any lift $\widetilde{x}_{0}\in{\mathfrak{m}}_{A}$ of $x$. Let the set of
minimal primes of $A$ be $\\{P_{1},\ldots,P_{n}\\}$, labeled so that there is
some $0\leq a\leq n$ for which $\widetilde{x}_{0}\not\in
P_{1},P_{2},\ldots,P_{a}$, and $\widetilde{x}_{0}\in P_{a+1},\ldots,P_{n}$.

Now fix any $i>a$, so that $\widetilde{x}_{0}\in P_{i}$. Note that if
$I\subseteq P_{i}$ then $P_{i}/I$ would be a minimal prime of $B$ containing
$x$, contradicting our assumption. Hence $I\not\subseteq P_{i}$ and so there
is some $r_{i}\in I\smallsetminus P_{i}$.

Also for any $j\neq i$, $P_{j}\not\subseteq P_{i}$, and so there is some
$s_{ij}\in P_{j}\smallsetminus P_{i}$. Now define

$y_{i}:=r_{i}\prod_{j\neq i}s_{ij}$

so that $y_{i}\in I$, $y_{i}\in P_{j}$ for $j\neq i$ and $y_{i}\not\in P_{i}$.
Finally let

$\widetilde{x}=\widetilde{x}_{0}+y_{a+1}+y_{b+2}+\cdots+y_{n}.$

Then we have $\widetilde{x}\equiv\widetilde{x}_{0}\equiv
x\operatorname{mod}{I}$, $\widetilde{x}\equiv\widetilde{x}_{0}\not\equiv
0\operatorname{mod}{P_{i}}$ for $i\leq a$ and $\widetilde{x}\equiv
y_{i}\not\equiv 0\operatorname{mod}{P_{i}}$ for $i>a$. So $\widetilde{x}$ is
our desired lift. ∎

###### Proof of Lemma (CI).

Identifying $S$ with its image in $R$, we get that
$(y_{1},\ldots,y_{d},\varpi)$, and thus $(\varpi,y_{1},\ldots,y_{d})$, is a
regular sequence for $R$. We claim that we can inductively construct a
sequence
$\widetilde{y}_{1},\widetilde{y}_{2},\ldots,\widetilde{y}_{d}\in\widetilde{R}$
such that $\varphi_{\infty}(\widetilde{y}_{i})=y_{i}$ for all $i$ and
$\dim\widetilde{R}/(\varpi,\widetilde{y}_{1},\ldots,\widetilde{y}_{j})=d-j=\dim
R/(\varpi,y_{1},\ldots,y_{j})$ for all $0\leq j\leq d$.

As $\widetilde{R}$ and $R$ are both flat over ${\mathcal{O}}$ of relative
dimension $d$, we have $\dim\widetilde{R}/(\varpi)=d=\dim R/(\varpi)$. Now
assume that $\widetilde{y}_{1},\ldots,\widetilde{y}_{j}$ have been constructed
for some $j<d$. Let
$A_{j}=\widetilde{R}/(\varpi,\widetilde{y}_{1},\ldots,\widetilde{y}_{j})$ and
$B_{j}=R/(\varpi,y_{1},\ldots,y_{j})$, so that
$\varphi_{\infty}:\widetilde{R}\to R$ induces a map $\varphi_{j}:A_{j}\to
B_{j}$. As $(\varpi,y_{1},\ldots,y_{d})$ is a regular sequence for $R$,
$y_{j+1}$ is by definition not a zero divisor in $B_{j}$, and so in particular
cannot be contained in any minimal primes of $B_{j}$. By Lemma (CI) it follows
there is some $y_{j+1}^{\prime}\in A_{j}$ with
$\varphi_{j}(y_{j+1}^{\prime})=y_{j+1}$ which is not contained in any minimal
prime of $A_{j}$. Let $\widetilde{y}_{j+1}\in\widetilde{R}$ be any lift of
$y_{j+1}^{\prime}$. But now

$\widetilde{R}/(\varpi,\widetilde{y}_{1},\ldots,\widetilde{y}_{j},\widetilde{y}_{j+1})\cong
A_{j}/(y_{j+1}^{\prime})$

which has dimension $\dim A_{j}-1=d-(j+1)$, by the assumption that
$y_{j+1}^{\prime}$ is not contained in any minimal prime of $A_{j}$. This
completes the induction.

Now $(\varpi,\widetilde{y}_{1},\ldots,\widetilde{y}_{d})$ is a system of
parameters for $\widetilde{R}$. As $\widetilde{R}$ is a complete intersection,
and thus Cohen–Macaulay, it follows that
$(\varpi,\widetilde{y}_{1},\ldots,\widetilde{y}_{d})$, and thus
$(y_{1},\ldots,y_{d},\varpi)$, is a regular sequence for $\widetilde{R}$.

So now defining $\widetilde{\theta}:S\to\widetilde{R}$ by
$\widetilde{\theta}(y_{i})=\widetilde{y}_{i}$ makes $\widetilde{R}$ into a
finite free $S$ module, as desired.

The fact that $\widetilde{R}_{\theta}$ is a complete intersection of dimension
$1$, and finite free over ${\mathcal{O}}$, now follows immediately from the
fact that $\widetilde{R}_{\theta}$ was a complete intersection. For the last
assertion, the proof of [BKM21, Theorem 7.16] gives rise to a commutative
diagram with exact rows:

${\mathcal{O}}^{d}$$\Phi_{\widetilde{\lambda}}(\widetilde{R})$$\Phi_{\widetilde{\lambda}_{\theta}}(\widetilde{R}_{\theta})$$0$${\mathcal{O}}^{d}$$\Phi_{\lambda}(R)$$\Phi_{\lambda_{\theta}}(R_{\theta})$$0$$=$$\widetilde{\Theta}$$\Theta$

where
$\Phi_{\lambda}(R)=(\ker\lambda)/(\ker\lambda)^{2}={\widehat{\Omega}}_{R/{\mathcal{O}}}\otimes_{\lambda}{\mathcal{O}}$
and
$\Phi_{\widetilde{\lambda}}(\widetilde{R})=(\ker\widetilde{\lambda})/(\ker\widetilde{\lambda})^{2}={\widehat{\Omega}}_{\widetilde{R}/{\mathcal{O}}}\otimes_{\widetilde{\lambda}}{\mathcal{O}}$,
and the maps $\Theta$ and $\widetilde{\Theta}$ are given in terms of
differentials by $e_{i}\mapsto dy_{i}$.

Now as in [BKM21, Theorem 7.16], the fact that
$\operatorname{Spec}R[1/\varpi]$ and
$\operatorname{Spec}\widetilde{R}[1/\varpi]$ are both equidimensional of
dimension $d$ and $\lambda$ and $\widetilde{\lambda}$, respectively,
correspond to formally smooth points on these schemes, implies that
$\Phi_{\lambda}(R)$ and $\Phi_{\widetilde{\lambda}}(\widetilde{R})$ both have
rank $d$ as ${\mathcal{O}}$-modules.

But now the fact that $\Phi_{\lambda_{\theta}}(R_{\theta})$ is finite implies
that $\Theta$ must be injective. By commutativity, this implies that
$\widetilde{\Theta}$ is also injective, which in turn implies that
$\Phi_{\widetilde{\lambda}_{\theta}}(\widetilde{R}_{\theta})$ is also finite.
∎

###  3.2 Invariance of $C_{1,\lambda_{\theta}}(R_{\theta})$ of $\theta$

For this section we will fix $\theta$ satisfying (P) and
$(\widetilde{R},I,\varphi)$ satisfying (CI). We will let
$\widetilde{\theta}:S\hookrightarrow\widetilde{R}$ be a lift of $\theta$
satisfying the conclusion of Lemma (CI), and we will identify $S$ with its
images in $R$ and $\widetilde{R}$.

Let $\widetilde{R}_{\theta}$ and $\widetilde{\lambda}_{\theta}$ be as in Lemma
(CI), and let
$\varphi_{\theta}=\varphi\otimes_{S}{\mathcal{O}}:\widetilde{R}_{\theta}\twoheadrightarrow
R_{\theta}$ (so that $\widetilde{\lambda}=\lambda\circ\varphi$) and let
$I_{\theta}=\ker\varphi_{\theta}\subseteq\widetilde{R}_{\theta}$. Also let
$\pi_{\theta}:\widetilde{R}\to\widetilde{R}_{\theta}$ be the quotient map, so
that $\widetilde{\lambda}=\widetilde{\lambda}_{\theta}\circ\pi_{\theta}$ and
$I_{\theta}=\pi_{\theta}(I)$.

The ring $\widetilde{R}_{\theta}$ now satisfies the conditions from Section 2,
so we have

$C_{1,\lambda_{\theta}}(R_{\theta})=\widetilde{\lambda}_{\theta}\left(\widetilde{R}_{\theta}[I_{\theta}]\right)/\widetilde{\lambda}_{\theta}\left(\operatorname{Fitt}(I_{\theta})\right).$

The main result of this subsection is the following:

######  Theorem (CI).

We have the following:

  1. 1.

$\widetilde{R}_{\theta}[I_{\theta}]=\pi_{\theta}(\widetilde{R}[I])$

  2. 2.

$\operatorname{Fitt}(I_{\theta})=\pi_{\theta}(\operatorname{Fitt}(I))$

So in particular,

$C_{1,\lambda_{\theta}}(R_{\theta})=\widetilde{\lambda}_{\theta}\left(\widetilde{R}_{\theta}[I_{\theta}]\right)/\widetilde{\lambda}_{\theta}\left(\operatorname{Fitt}(I_{\theta})\right)=\widetilde{\lambda}_{\theta}\left(\pi_{\theta}(\widetilde{R}[I])\right)/\widetilde{\lambda}_{\theta}\left(\pi_{\theta}(\operatorname{Fitt}(I))\right)=\widetilde{\lambda}\left(\widetilde{R}[I]\right)/\widetilde{\lambda}\left(\operatorname{Fitt}(I)\right),$

which depends only on $\widetilde{R}$, $R$ and
$\widetilde{\lambda}:R\to{\mathcal{O}}$, all of which are independent of
$\theta$.

Thus if we define
$C_{1,\widetilde{\lambda}}(\widetilde{R})=\widetilde{\lambda}\left(\widetilde{R}[I]\right)/\widetilde{\lambda}\left(\operatorname{Fitt}(I)\right)$,
then we have

$C_{1,\widetilde{\lambda}}(\widetilde{R})=C_{1,\lambda_{\theta}}(R_{\theta}).$

###### Proof of Theorem (CI)(1).

Clearly we have
$\pi_{\theta}(\widetilde{R}[I])\subseteq\widetilde{R}_{\theta}[I_{\theta}]$
(since $I_{\theta}=\pi_{\theta}(I)$ and so
$\widetilde{R}_{\theta}[I_{\theta}]=\widetilde{R}[I]$), so it suffices to
prove that
$\pi_{\theta}|_{\widetilde{R}[I]}:\widetilde{R}[I]\to\widetilde{R}_{\theta}[I_{\theta}]$
is surjective.

We first note that as $\widetilde{R}$ and $\widetilde{R}_{\theta}$ are
complete intersections, and thus are Gorenstein, we get the following:

######  Lemma (CI).

There are isomorphisms
$\Psi:\widetilde{R}\xrightarrow{\sim}\operatorname{Hom}_{S}(\widetilde{R},S)$
and
$\Psi_{\theta}:\widetilde{R}_{\theta}\xrightarrow{\sim}\operatorname{Hom}_{{\mathcal{O}}}(\widetilde{R}_{\theta},{\mathcal{O}})$
of $\widetilde{R}$-modules, fitting into a commutative diagram:

$\widetilde{R}$$\operatorname{Hom}_{S}(\widetilde{R},S)$$\widetilde{R}_{\theta}$$\operatorname{Hom}_{{\mathcal{O}}}(\widetilde{R}_{\theta},{\mathcal{O}})$$\pi_{\theta}$$\sigma$$\Psi$$\Psi_{\theta}$

where the vertical map
$\sigma:\operatorname{Hom}_{S}(\widetilde{R},S)\to\operatorname{Hom}_{S}(\widetilde{R},{\mathcal{O}})=\operatorname{Hom}_{{\mathcal{O}}}(\widetilde{R}_{\theta},{\mathcal{O}})$
is just composition with the map $S\to S/(y_{1},\ldots,y_{d})={\mathcal{O}}$.

###### Proof.

As $\widetilde{R}$ is Cohen–Macaulay and free of finite rank over $S$, we have
$\omega_{\widetilde{R}}\cong\operatorname{Hom}_{S}(\widetilde{R},S)$. But as
$\widetilde{R}$ is a complete intersection, it is Gorenstein, and so
$\omega_{\widetilde{R}}\cong\widetilde{R}$. Composing these isomorphisms gives
the desired isomorphism
$\Psi:\widetilde{R}\xrightarrow{\sim}\operatorname{Hom}_{S}(\widetilde{R},S)$.

Now note that (as $\widetilde{R}$ is a free $S$-module):

$\displaystyle\Psi(\ker\pi_{\theta})$
$\displaystyle=\Psi(y_{1}\widetilde{R}+\cdots+y_{d}\widetilde{R})=y_{1}\Psi(\widetilde{R})+\cdots+y_{d}\Psi(\widetilde{R})$
$\displaystyle=y_{1}\operatorname{Hom}_{S}(\widetilde{R},S)+\cdots+y_{d}\operatorname{Hom}_{S}(\widetilde{R},S)=\operatorname{Hom}_{S}(\widetilde{R},y_{1}S+\cdots+y_{d}S)$
$\displaystyle=\ker\sigma,$

which implies that there is an injection
$\Psi_{\theta}:\widetilde{R}\xrightarrow{\sim}\operatorname{Hom}_{{\mathcal{O}}}(\widetilde{R},{\mathcal{O}})$
making the above diagram commute. As $\sigma$ is clearly surjective (since
$\widetilde{R}$ is a projective $S$-module), it follows that $\Psi_{\theta}$
is also surjective. ∎

######  Lemma (CI).

We have

$\Psi(\widetilde{R}[I])=\\{f:\widetilde{R}\to
S|f(I)=0\\}=\operatorname{Hom}_{S}(\widetilde{R}/I,S)$

and

$\Psi_{\theta}(\widetilde{R}_{\theta}[I_{\theta}])=\\{f:\widetilde{R}_{\theta}\to{\mathcal{O}}|f(I_{\theta})=0\\}=\operatorname{Hom}_{{\mathcal{O}}}(\widetilde{R}_{\theta}/I_{\theta},{\mathcal{O}})=\operatorname{Hom}_{S_{\infty}}(\widetilde{R}/I,{\mathcal{O}}).$

###### Proof.

As $\Psi$ is an isomorphism of $\widetilde{R}$-modules, we have
$\Psi(\widetilde{R}[I])=\operatorname{Hom}_{S}(\widetilde{R},S)[I]$ and thus

$\displaystyle\Psi(\widetilde{R}[I])$ $\displaystyle=\\{f:\widetilde{R}\to
S|rf=0\text{ for all }r\in I\\}$ $\displaystyle=\\{f:\widetilde{R}\to
S|(rf)(x)=0\text{ for all }r\in I\text{ and }x\in\widetilde{R}\\}$
$\displaystyle=\\{f:\widetilde{R}\to S|f(rx)=0\text{ for all }r\in I\text{ and
}x\in\widetilde{R}\\}$ $\displaystyle=\\{f:\widetilde{R}\to S|f(I)=0\\}$
$\displaystyle=\operatorname{Hom}_{S}(\widetilde{R}/I,S).$

The proof for $\Psi_{\theta}(\widetilde{R}_{\theta}[I_{\theta}])$ is
identical. ∎

Now since $\widetilde{R}/I\cong R$ is a projective $S$-module, $\sigma$
induces a surjective map
$\operatorname{Hom}_{S}(\widetilde{R}/I,S)\to\operatorname{Hom}_{S}(\widetilde{R}/I,{\mathcal{O}})$.
By Lemma (CI), this is a surjective map
$\sigma|_{\Psi(\widetilde{R}[I])}:\Psi(\widetilde{R}[I])\to\Psi_{\theta}(\widetilde{R}_{\theta}[I_{\theta}])$,
so the commutative diagram from Lemma (CI) gives that
$\pi_{\theta}|_{\widetilde{R}[I]}:\widetilde{R}[I]\to\widetilde{R}_{\theta}[I_{\theta}]$
is surjective. This completes the proof of (1). ∎

###### Proof of Theorem (CI)(2).

By the definition of $I$, we have a short exact sequence of $S$-modules

$0\to I\to\widetilde{R}\xrightarrow{\varphi}R\to 0.$

Applying $-\otimes_{S}{\mathcal{O}}$ to this gives an exact sequence

$\operatorname{Tor}_{1}^{S}(R,{\mathcal{O}})\to
I\otimes_{S}{\mathcal{O}}\to\widetilde{R}_{\theta}\xrightarrow{\varphi}R_{\theta}\to
0.$

and so as $I_{\theta}=\ker\varphi_{\theta}$, this gives as exact sequence

$\operatorname{Tor}_{1}^{S}(R,{\mathcal{O}})\to I\otimes_{S}{\mathcal{O}}\to
I_{\theta}\to 0.$

But now as $R$ is a finite free $S$-module,
$\operatorname{Tor}_{1}^{S}(R,{\mathcal{O}})=0$ and so we have an isomorphism
$I\otimes_{S}{\mathcal{O}}\cong I_{\theta}$ of
$\widetilde{R}_{\theta}$-modules.

Now by [Sta19, Lemma 07ZA] we indeed have:

$\pi_{\theta}(\operatorname{Fitt}(I))=\operatorname{Fitt}(I\otimes_{S}{\mathcal{O}})=\operatorname{Fitt}(I_{\theta}),$

as desired. This completes the proof of (2), and hence of Theorem (CI). ∎

We note the following corollary.

######  Corollary (CI).

With notation as above

$C_{1,\widetilde{\lambda}}(\widetilde{R})=\widetilde{\lambda}(\widetilde{R}[I])/\widetilde{\lambda}(\operatorname{Fitt}(I))$

depends only on its quotient $\widetilde{R}/I\simeq R$ and we define

$C_{1,\lambda}(R)\stackrel{{\scriptstyle\mathrm{def}}}{{=}}C_{1,\widetilde{\lambda}}(\widetilde{R}).$

###### Proof.

This follows from Theorems (CI) which shows that

$C_{1,\lambda_{\theta}}(R_{\theta})=C_{1,\widetilde{\lambda}}(\widetilde{R}),$

and the results of Appendix A which show that
$C_{1,\lambda_{\theta}}(R_{\theta})$ is well defined and independent of
$\widetilde{R}_{\theta}$. ∎

######  Remark (CI).

The above Corollary (CI) can also be proved directly by using the proof of
Lemma (CI) instead of reducing to the statement of Lemma (CI).

For later use, we also state the following result.

######  Lemma (CI).

As $R$-modules one has $\widetilde{R}[I]\cong\omega_{R}$.

###### Proof.

As $R$ is Cohen–Macaulay and $\widetilde{R}$ is Gorenstein, we have that
$\omega_{R}\cong\operatorname{Hom}_{S}(R,S)$ and
$\widetilde{R}\cong\operatorname{Hom}_{S}(\widetilde{R},S)$ as
$\widetilde{R}$-modules. Now by [Sta19, Lemma 08YP]:

$\displaystyle\widetilde{R}[I]$
$\displaystyle\cong\operatorname{Hom}_{\widetilde{R}}(R,\widetilde{R})\cong\operatorname{Hom}_{\widetilde{R}}(R,\operatorname{Hom}_{S}(\widetilde{R},S))\cong\operatorname{Hom}_{S}(R,S)\cong\omega_{R}$

as $R$-modules. ∎

###  3.3 Invariance of
$\operatorname{Der}^{1}_{\mathcal{O}}(R_{\theta},E/{\mathcal{O}})$

In this section, we will let $R\in C_{\mathcal{O}}$ and
$S={\mathcal{O}}[[y_{1},\ldots,y_{d}]]$ be as above. We shall show that for
any inclusion $\theta:S\hookrightarrow R$ satisfying (P), the André–Quillen
cohomology group
$\operatorname{Der}^{1}_{\mathcal{O}}(R_{\theta},E/{\mathcal{O}})$ does not
depend on the choice of $\theta$.

In order to do this, we will need to make use of a continuous version of
André–Quillen cohomology, as the classical version does not behave well for
rings that are not of finite type but only topologically of finite type over
the base. We will define this in terms of the analytic cotangent complex
defined in [GR03, Chapter 7].

For any ring $A$, we will let $\operatorname{Mod}_{A}$ denote the category of
$A$-modules, $D(\operatorname{Mod}_{A})$ its derived category, and
$D^{-}(\operatorname{Mod}_{A})\subseteq D(\operatorname{Mod}_{A})$ the
subcategory of bounded above complexes.

For any map of ring $A\to B$, let $L_{B/A}\in D^{-}(\operatorname{Mod}_{B})$
denote the relative cotangent complex.

Now consider any $A\in{\mathrm{CNL}_{\mathcal{O}}}$ and let
$\wedge:\operatorname{Mod}_{A}\to\operatorname{Mod}_{A}$ denote the
${\mathfrak{m}}_{A}$-adic completion functor. As in [GR03, Chapter 7.1], let
$\wedge:D^{-}(\operatorname{Mod}_{A})\to D^{-}(\operatorname{Mod}_{A})$ denote
its left-derived functor.

If $A\to B$ is a _continuous_ map of rings in ${\mathrm{CNL}_{\mathcal{O}}}$,
then define the analytic relative cotangent complex to be
$L^{\operatorname{an}}_{B/A}=(L_{B/A})^{\wedge}$. For any $B$-module $M$ and
any $i\geq 0$ we may then define the $i^{th}$ continuous André–Quillen
cohomology group to be

$\widehat{\operatorname{Der}}^{i}_{A}(B,M)=H^{i}(\operatorname{RHom}_{B}(L_{B/A}^{\operatorname{an}},M)).$

Similarly if $A\to B$ is any ring map and $M$ is any $B$-module, the $i^{th}$
Ardré–Quillen cohomology group is just

$\operatorname{Der}^{i}_{A}(B,M)=H^{i}(\operatorname{RHom}_{B}(L_{B/A},M)).$

We will begin by recording the basic properties of continuous André–Quillen
cohomology we will need in our arguments.

######  Proposition (CI).

Given any $A,B,C\in{\mathrm{CNL}_{\mathcal{O}}}$, and continuous ring
homomorphisms $A\to B\to C$ and any $C$-module $M$, there is a long exact
sequence:

$0\to\widehat{\operatorname{Der}}^{0}_{B}(C,M)\to\widehat{\operatorname{Der}}^{0}_{A}(C,M)\to\widehat{\operatorname{Der}}^{0}_{A}(B,M)\to\widehat{\operatorname{Der}}^{1}_{B}(C,M)\to\widehat{\operatorname{Der}}^{1}_{A}(C,M)\to\widehat{\operatorname{Der}}^{1}_{A}(B,M)\to\cdots$

###### Proof.

This follows from the distinguished triangle

$C\otimes^{\mathbf{L}}_{B}L_{B/A}^{\operatorname{an}}\to
L_{C/A}^{\operatorname{an}}\to L_{C/B}^{\operatorname{an}}\to
C\otimes^{\mathbf{L}}_{B}L_{B/A}^{\operatorname{an}}[1]$

from [GR03, Theorem 7.1.33]. ∎

######  Proposition (CI).

If $A\to B$ is a continuous map of rings in ${\mathrm{CNL}_{\mathcal{O}}}$
which makes $B$ into a finite $A$-module then
$L_{B/A}^{\operatorname{an}}\cong L_{B/A}$, and so
$\widehat{\operatorname{Der}}^{i}_{A}(B,M)\cong\operatorname{Der}^{i}_{A}(B,M)$
for all $i\geq 0$ and all $M\in\operatorname{Mod}_{B}$.

###### Proof.

As the map $A\to B$ is finite, it is finite type (and not merely
_topologically_ finite type). By [Iye07, 6.11], $L_{B/A}$ is quasi-isomorphic
to a bounded above complex of finite free $B$-modules
${\mathcal{L}}^{\bullet}$. Using ${\mathcal{L}}^{\bullet}$ to compute
$(L_{B/A})^{\wedge}$ we get

$L_{B/A}^{\operatorname{an}}=(L_{B/A})^{\wedge}\cong({\mathcal{L}}^{\bullet})^{\wedge}={\mathcal{L}}^{\bullet}\cong
L_{B/A},$

as finitely generated $B$-modules are already ${\mathfrak{m}}_{B}$-adically
complete. The last claim now follows from the definition of
$\widehat{\operatorname{Der}}^{i}_{A}(B,M)$ and
$\operatorname{Der}^{i}_{A}(B,M)$. ∎

######  Proposition (CI).

If $A\to B$ is a continuous map of rings in ${\mathrm{CNL}_{\mathcal{O}}}$.
Then the module
${\widehat{\Omega}}_{B/A}=\varprojlim\Omega_{(B/{\mathfrak{m}}_{B}^{n})/A}$ of
continuous Kähler differentials defined in [BKM21, Section 7.1] is the
${\mathfrak{m}}_{B}$-adic completion of $\Omega_{B/A}$ and we have
$\widehat{\operatorname{Der}}^{0}_{A}(B,M)\cong\operatorname{Hom}_{A}({\widehat{\Omega}}_{B/A},M)$
for any $B$-module $M$.

###### Proof.

For the first claim, we argue as in [BKM21, Lemma 7.1] (and note that the
assumption that ${\mathcal{R}}$ is finitely generated over $A$ in that lemma
was used only in the last step, to conclude that $\Omega_{{\mathcal{R}}/A}$
was finitely generated over $A$). Specifically, for any $n>k$ we have
$\Omega_{B/A}/{\mathfrak{m}}_{B}^{k}\Omega_{B/A}=\Omega_{B/A}\otimes_{B}B/{\mathfrak{m}}_{B}^{k}\cong\Omega_{(B/{\mathfrak{m}}_{B}^{n})/A}\otimes
B/{\mathfrak{m}}_{B}^{k}$ and so taking inverse limits gives

$\Omega_{B/A}/{\mathfrak{m}}_{B}^{k}\Omega_{B/A}\cong\varprojlim_{n}\left(\Omega_{(B/{\mathfrak{m}}_{B}^{n})/A}\otimes_{B}B/{\mathfrak{m}}_{B}^{k}\right)\cong\varprojlim_{n}\left(\Omega_{(B/{\mathfrak{m}}_{B}^{n})/A}\right)\otimes_{B}B/{\mathfrak{m}}_{B}^{k}={\widehat{\Omega}}_{B/A}\otimes_{B}B/{\mathfrak{m}}_{B}^{k}.$

Taking inverse limits again and using the fact that ${\widehat{\Omega}}_{B/A}$
is finite over $B$, and hence ${\mathfrak{m}}_{B}$-adically complete gives

${\widehat{\Omega}}_{B/A}\cong\varprojlim{\widehat{\Omega}}_{B/A}\otimes_{B}B/{\mathfrak{m}}_{B}^{k}\cong\varprojlim_{k}\Omega_{B/A}/{\mathfrak{m}}_{B}^{k}\Omega_{B/A}$

as desired.

In particular, this shows that the module ${\widehat{\Omega}}_{B/A}$ is simply
the module $\Omega_{B/A}^{\operatorname{an}}=(\Omega_{B/A})^{\wedge}$ from
[GR03], and so the second claim follows from [GR03, Lemma 7.1.27(iii)] and the
definition of $\widehat{\operatorname{Der}}^{i}_{A}(B,M)$. ∎

We will also need the following specific computations of continuous
André–Quillen cohomology:

######  Lemma (CI).

For any $n\geq 0$, and any ${\mathcal{O}}[[x_{1},\ldots,x_{n}]]$-module $M$,
we have

$\widehat{\operatorname{Der}}^{i}_{\mathcal{O}}({\mathcal{O}}[[x_{1},\ldots,x_{n}]],M)=\begin{cases}M^{n}&i=0\\\
0&i\geq 1.\end{cases}$

###### Proof.

By [GR03, Proposition 7.1.29] we have
$L^{\operatorname{an}}_{{\mathcal{O}}[[x_{1},\ldots,x_{n}]]/{\mathcal{O}}}={\widehat{\Omega}}_{{\mathcal{O}}[[x_{1},\ldots,x_{n}]]/{\mathcal{O}}}[0]={\mathcal{O}}[[x_{1},\ldots,x_{n}]]^{n}[0]$
and so

$\operatorname{RHom}_{{\mathcal{O}}[[x_{1},\ldots,x_{n}]]}(L^{\operatorname{an}}_{{\mathcal{O}}[[x_{1},\ldots,x_{n}]]/{\mathcal{O}}},M)=\operatorname{RHom}_{{\mathcal{O}}[[x_{1},\ldots,x_{n}]]}({\mathcal{O}}[[x_{1},\ldots,x_{n}]]^{n}[0],M)=M^{n}[0]$

so the claim follows. ∎

######  Lemma (CI).

If $A$ is a ring and $B=A/I$ for some ideal $I\subseteq A$, then for any
$B$-module $M$, $\widehat{\operatorname{Der}}^{0}_{A}(B,M)=0$ and
$\widehat{\operatorname{Der}}^{1}_{A}(B,M)=\operatorname{Hom}_{B}(I/I^{2},M)$.

###### Proof.

As $B=A/I$ is clearly finite over $A$, Proposition (CI) gives
$\widehat{\operatorname{Der}}^{i}_{A}(B,M)=\operatorname{Der}^{i}(B,M)$ for
all $i\geq 0$ and all $M$. The claim now follows from [Iye07, 6.12]. ∎

For the remainder of this section, we always treat $E/{\mathcal{O}}$ as an
$R_{\theta}$-module (and hence as an $R$-module) via
$\lambda_{\theta}:R_{\theta}\to{\mathcal{O}}$. Our main result is the
following:

######  Theorem (CI).

We have
$\operatorname{Der}^{1}_{\mathcal{O}}(R_{\theta},E/{\mathcal{O}})\cong\widehat{\operatorname{Der}}^{1}_{\mathcal{O}}(R,E/{\mathcal{O}})$.

This implies that
$\operatorname{Der}^{1}_{\mathcal{O}}(R_{\theta},E/{\mathcal{O}})$ depends
only on $R$ and $\lambda:R\to E/{\mathcal{O}}$, and not on $\theta$, and so
will complete the proof of Theorem (CI).

We first observe the following:

######  Lemma (CI).

For any $i\geq 0$ and any $R_{\theta}$-module $M$, we have

$\widehat{\operatorname{Der}}^{i}_{S}(R,M)\cong\operatorname{Der}^{i}_{S}(R,M)\cong\operatorname{Der}^{i}_{\mathcal{O}}(R_{\theta},M)\cong\widehat{\operatorname{Der}}^{i}_{\mathcal{O}}(R_{\theta},M).$

###### Proof.

The first and last isomorphisms follow from Proposition (CI), as $R$ is finite
over $S$ and $R_{\theta}$ is finite over ${\mathcal{O}}$.

For the second isomorphism, first note that as $R$ is a finite free
$S$-module, it is a projective resolution for itself in $D(S)$, and so we have
$R\otimes^{\mathbf{L}}_{S}{\mathcal{O}}=R\otimes_{S}{\mathcal{O}}\cong
R_{\theta}$. By [Sta19, Lemma 08QQ] this implies that
$L_{R/S}\otimes^{\mathbf{L}}_{R}R_{\theta}\cong L_{R_{\theta}/{\mathcal{O}}}$.
But now [Sta19, Lemma 0E1W] gives that

$\operatorname{RHom}_{R}(L_{R/S},M)=\operatorname{RHom}_{R_{\theta}}(L_{R/S}\otimes^{\mathbf{L}}_{R}R_{\theta},M)\cong\operatorname{RHom}_{R_{\theta}}(L_{R_{\theta}/{\mathcal{O}}},M)$

so the claim follows by definition. ∎

So to prove Theorem (CI) it will suffice to prove the following:

######  Proposition (CI).

$\widehat{\operatorname{Der}}^{1}_{S}(R,E/{\mathcal{O}})\cong\widehat{\operatorname{Der}}^{1}_{\mathcal{O}}(R,E/{\mathcal{O}})$.

###### Proof.

Applying Proposition (CI) to the ring maps ${\mathcal{O}}\to S\to R$ gives an
exact sequence:

$\displaystyle 0$
$\displaystyle\to\widehat{\operatorname{Der}}^{0}_{S}(R,E/{\mathcal{O}})\to\widehat{\operatorname{Der}}^{0}_{\mathcal{O}}(R,E/{\mathcal{O}})\to\widehat{\operatorname{Der}}^{0}_{\mathcal{O}}(S,E/{\mathcal{O}})$
$\displaystyle\to\widehat{\operatorname{Der}}^{1}_{S}(R,E/{\mathcal{O}})\to\widehat{\operatorname{Der}}^{1}_{\mathcal{O}}(R,E/{\mathcal{O}})\to\widehat{\operatorname{Der}}^{1}_{\mathcal{O}}(S,E/{\mathcal{O}})$

By Lemma (CI),
$\widehat{\operatorname{Der}}^{0}_{\mathcal{O}}(S,E/{\mathcal{O}})=(E/{\mathcal{O}})^{d}$
and $\widehat{\operatorname{Der}}^{1}_{\mathcal{O}}(S,E/{\mathcal{O}})=0$.

But now by the assumption that $\lambda:R\to{\mathcal{O}}$ represents a smooth
point of $\operatorname{Spec}R[1/\varpi]$ we get that
${\widehat{\Omega}}_{R/{\mathcal{O}}}\otimes_{\lambda}{\mathcal{O}}$ has rank
$d$ as an ${\mathcal{O}}$-module (as in [BKM21, Theorem 7.16]), and so

$\widehat{\operatorname{Der}}^{0}_{\mathcal{O}}(R,E/{\mathcal{O}})=\operatorname{Hom}_{R}({\widehat{\Omega}}_{R/{\mathcal{O}}},E/{\mathcal{O}})=\operatorname{Hom}_{{\mathcal{O}}}({\widehat{\Omega}}_{R/{\mathcal{O}}}\otimes_{\lambda}{\mathcal{O}},E/{\mathcal{O}})=(E/{\mathcal{O}})^{d}\oplus
G,$

for some finite group $G$. Also as
$\Phi_{\lambda_{\theta}}(R_{\theta})={\widehat{\Omega}}_{R^{\theta}/{\mathcal{O}}}\otimes_{\lambda_{\theta}}{\mathcal{O}}$
is finite (as $\theta$ satisfies (P)),

$\widehat{\operatorname{Der}}^{0}_{S}(R,E/{\mathcal{O}})\cong\widehat{\operatorname{Der}}^{0}_{\mathcal{O}}(R_{\theta},E/{\mathcal{O}})=\operatorname{Hom}_{{\mathcal{O}}}({\widehat{\Omega}}_{R_{\theta}/{\mathcal{O}}},E/{\mathcal{O}})=\operatorname{Hom}_{{\mathcal{O}}}(\Phi_{\lambda_{\theta}}(R_{\theta}),E/{\mathcal{O}})$

is finite as well. Now the exact sequence simplifies to

$0\to\widehat{\operatorname{Der}}^{0}_{S}(R,E/{\mathcal{O}})\to(E/{\mathcal{O}})^{d}\oplus
G\to(E/{\mathcal{O}})^{d}\to\widehat{\operatorname{Der}}^{1}_{S}(R,E/{\mathcal{O}})\to\widehat{\operatorname{Der}}^{1}_{\mathcal{O}}(R,E/{\mathcal{O}})\to
0.$

But comparing ranks in the sequence
$0\to\widehat{\operatorname{Der}}^{0}_{S}(R,E/{\mathcal{O}})\to(E/{\mathcal{O}})^{d}\oplus
G\to(E/{\mathcal{O}})^{d}$ implies that $(E/{\mathcal{O}})^{d}\oplus
G\to(E/{\mathcal{O}})^{d}$ has finite cokernel, and hence must be surjective,
as $E/{\mathcal{O}}$ does not have any nontrivial finite quotients. This
implies that the map
$\widehat{\operatorname{Der}}^{1}_{S}(R,E/{\mathcal{O}})\to\widehat{\operatorname{Der}}^{1}_{\mathcal{O}}(R,E/{\mathcal{O}})$
is indeed an isomorphism. This completes the proof of Theorem (CI). ∎

We note that in Theorem (CI) and Corollary (CI), we have proved that

$\widehat{\operatorname{Der}}_{\mathcal{O}}^{1}(R,E/{\mathcal{O}})\cong\widehat{\operatorname{Der}}_{\mathcal{O}}^{1}(R_{\theta},E/{\mathcal{O}}).$
(3.1) $C_{1,\lambda}(R)=C_{1,\lambda_{\theta}}(R_{\theta}).$ (3.2)

In order to actually compute $\delta_{\lambda_{\theta}}(R_{\theta})$, we will
need a method for computing
$\widehat{\operatorname{Der}}^{1}_{\mathcal{O}}(R,E/{\mathcal{O}})$. For this,
take any triple $(\widetilde{R},I,\varphi)$ satisfying (CI). Then we now have
the following generalization of (A.3):

######  Theorem (CI).

There is a $4$-term exact sequence:

$0\to\operatorname{Hom}_{R}({\widehat{\Omega}}_{R/{\mathcal{O}}},E/{\mathcal{O}})\to\operatorname{Hom}_{\widetilde{R}}({\widehat{\Omega}}_{\widetilde{R}/{\mathcal{O}}},E/{\mathcal{O}})\to\operatorname{Hom}_{R}(I/I^{2},E/{\mathcal{O}})\to\widehat{\operatorname{Der}}^{1}_{\mathcal{O}}(R,E/{\mathcal{O}})\to
0$

###### Proof.

Applying Proposition (CI) to the ring maps ${\mathcal{O}}\to\widetilde{R}\to
R$ gives an exact sequence:

$\displaystyle 0$
$\displaystyle\to\widehat{\operatorname{Der}}^{0}_{\widetilde{R}}(R,E/{\mathcal{O}})\to\widehat{\operatorname{Der}}^{0}_{\mathcal{O}}(R,E/{\mathcal{O}})\to\widehat{\operatorname{Der}}^{0}_{\mathcal{O}}(\widetilde{R},E/{\mathcal{O}})$
$\displaystyle\to\widehat{\operatorname{Der}}^{1}_{\widetilde{R}}(R,E/{\mathcal{O}})\to\widehat{\operatorname{Der}}^{1}_{\mathcal{O}}(R,E/{\mathcal{O}})\to\widehat{\operatorname{Der}}^{1}_{{\mathcal{O}}}(\widetilde{R},E/{\mathcal{O}})$

and Lemma (CI) implies that
$\widehat{\operatorname{Der}}^{0}_{\widetilde{R}}(R,E/{\mathcal{O}})=0$ and
$\widehat{\operatorname{Der}}^{1}_{\widetilde{R}}(R,E/{\mathcal{O}})=\operatorname{Hom}_{R}(I/I^{2},E/{\mathcal{O}})$,
so it’s enough to prove that
$\widehat{\operatorname{Der}}^{1}_{\mathcal{O}}(\widetilde{R},E/{\mathcal{O}})=0$
(since by Proposition (CI),
$\widehat{\operatorname{Der}}^{0}_{\mathcal{O}}(R,E/{\mathcal{O}})=\operatorname{Hom}_{R}({\widehat{\Omega}}_{R},E/{\mathcal{O}})$
and
$\widehat{\operatorname{Der}}^{0}_{\mathcal{O}}(\widetilde{R},E/{\mathcal{O}})=\operatorname{Hom}_{\widetilde{R}}({\widehat{\Omega}}_{\widetilde{R}},E/{\mathcal{O}})$).

Since $\widetilde{R}$ is a complete intersection, we can write
$\widetilde{R}=P/J$ where $P={\mathcal{O}}[[x_{1},\ldots,x_{d+n}]]$ and
$J=(f_{1},\ldots,f_{n})$ is generated by a regular sequence. Applying
Proposition (CI) to the ring maps ${\mathcal{O}}\to P\to\widetilde{R}$ gives
an exact sequence:

$\displaystyle 0$
$\displaystyle\to\widehat{\operatorname{Der}}^{0}_{P}(\widetilde{R},E/{\mathcal{O}})\to\widehat{\operatorname{Der}}^{0}_{\mathcal{O}}(\widetilde{R},E/{\mathcal{O}})\to\widehat{\operatorname{Der}}^{0}_{\mathcal{O}}(P,E/{\mathcal{O}})$
$\displaystyle\to\widehat{\operatorname{Der}}^{1}_{P}(\widetilde{R},E/{\mathcal{O}})\to\widehat{\operatorname{Der}}^{1}_{\mathcal{O}}(\widetilde{R},E/{\mathcal{O}})\to\widehat{\operatorname{Der}}^{1}_{\mathcal{O}}(P,E/{\mathcal{O}}).$

Now Lemma (CI) gives
$\widehat{\operatorname{Der}}^{0}_{\mathcal{O}}(P,E/{\mathcal{O}})=(E/{\mathcal{O}})^{d+n}$
and $\widehat{\operatorname{Der}}^{1}_{\mathcal{O}}(P,E/{\mathcal{O}})=0$ and
Lemma (CI) gives
$\widehat{\operatorname{Der}}^{0}_{P}(\widetilde{R},E/{\mathcal{O}})=0$ and
$\widehat{\operatorname{Der}}^{1}_{P}(\widetilde{R},E/{\mathcal{O}})=\operatorname{Hom}_{\widetilde{R}}(J/J^{2},E/{\mathcal{O}})$.
Moreover as $J$ is generated by a regular sequence of length $n$, it follows
that $J/J^{2}\cong(\widetilde{R})^{n}$ as $\widetilde{R}$-modules, and so
$\widehat{\operatorname{Der}}^{1}_{P}(\widetilde{R},E/{\mathcal{O}})=\operatorname{Hom}_{\widetilde{R}}(J/J^{2},E/{\mathcal{O}})\cong(E/{\mathcal{O}})^{n}$.
Thus the above exact sequence simplifies to

$0\to\widehat{\operatorname{Der}}^{0}_{\mathcal{O}}(\widetilde{R},E/{\mathcal{O}})\to(E/{\mathcal{O}})^{n+d}\to(E/{\mathcal{O}})^{n}\to\widehat{\operatorname{Der}}^{1}_{\mathcal{O}}(\widetilde{R},E/{\mathcal{O}})\to
0.$

But now, just as in the proof of Proposition (CI) above, the fact that
$\operatorname{Spec}\widetilde{R}[1/\varpi]$ is smooth of dimension $d$ at
$\widetilde{\lambda}$ implies that
$\widehat{\operatorname{Der}}^{0}_{\mathcal{O}}(\widetilde{R},E/{\mathcal{O}})\cong(E/{\mathcal{O}})^{d}\oplus
H$ for some finite group $H$, and so comparing ranks gives that
$(E/{\mathcal{O}})^{n+d}\to(E/{\mathcal{O}})^{n}$ has finite cokernel, and
hence is surjective. Thus
$\widehat{\operatorname{Der}}^{1}_{\mathcal{O}}(\widetilde{R},E/{\mathcal{O}})=0$,
and so the claim follows. ∎

###  3.4 Wiles defect for augmented rings $(R,\lambda)\in C_{\mathcal{O}}$

We make the following definitions and in particular define the Wiles defect
for tuples $(R,\lambda)\in C_{\mathcal{O}}$.

######  Definition (CI).

Let $R$ be a complete, Noetherian local ${\mathcal{O}}$-algebra which is
Cohen–Macaulay and flat over ${\mathcal{O}}$ of relative dimension $d$, and
with an augmentation $\lambda:R\to{\mathcal{O}}$ such that
$\operatorname{Spec}R[1/\varpi]$ is formally smooth at the point corresponding
to $\lambda$.

  * •

Define

$D_{1,\lambda}(R)=\frac{\log|\widehat{\operatorname{Der}}^{1}_{\mathcal{O}}(R,E/{\mathcal{O}})|}{\log|{\mathcal{O}}/p|}$

(see Theorem (CI)).

  * •

Define

$c_{1,\lambda}(R)=\frac{\log\left|C_{1,\lambda}(R)\right|}{\log|{\mathcal{O}}/p|}=\frac{\log\left|\widetilde{\lambda}(\widetilde{R}[I])/\widetilde{\lambda}(\operatorname{Fitt}(I))\right|}{\log|{\mathcal{O}}/p|},$

for any triple $(\widetilde{R},I,\varphi)$ satisfying (CI).

  * •

The _Wiles defect_ $\delta_{\lambda}(R)$ of $R$ at $\lambda$ is defined to be

$\delta_{\lambda}(R)=D_{1,\lambda}(R)-c_{1,\lambda}(R).$

######  Lemma (CI).

The numbers

$D_{1,\lambda}(R),c_{1,\lambda}(R),\delta_{\lambda}(R)$

are well defined.

###### Proof.

This is a consequence of Theorem (CI), Theorem (CI), Corollary (CI), and
Theorem (CI), combined with Remark (CI) which confirms the finiteness of
length of the terms involved in the one-dimensional case. ∎

Here is the main theorem of this section which uses all the work we have done
here.

######  Theorem (CI).

Let $R$ and $\lambda:R\twoheadrightarrow{\mathcal{O}}$ be as above, and let
$\theta:S\hookrightarrow R$ be a map satisfying (P). Then the invariants
$C_{1,\lambda_{\theta}}(R_{\theta})$,
$\operatorname{Der}_{\mathcal{O}}^{1}(R_{\theta},E/{\mathcal{O}})$ and
$\delta_{\lambda_{\theta}}(R_{\theta})$ are independent of the choice of
$\theta$.

###### Proof.

The proofs of the independence statements for
$C_{1,\lambda_{\theta}}(R_{\theta})$ and
$\operatorname{Der}_{\mathcal{O}}^{1}(R_{\theta},E/{\mathcal{O}})$ follow from
Theorems (CI) and (CI) respectively. The assertion for the Wiles defect
$\delta_{\lambda_{\theta}}(R_{\theta})$ is then immediate from Theorem 2.1. ∎

We note the consistency of this definition with the definition of Wiles defect
for tuples $(R,\lambda)\in C_{\mathcal{O}}$ when $R$ is of dimension one.

######  Proposition (CI).

In the case when $(R,\lambda)\in C_{\mathcal{O}}$ and $R$ is of dimension one,
then

$\delta_{\lambda}(R)=D_{1,\lambda}(R)-c_{1,\lambda}(R)=\frac{\log|\Phi_{\lambda}(R)|-\log|\Psi_{\lambda}(R)|}{\log|{\mathcal{O}}/p|}.$

###### Proof.

This follows from Proposition (CI) and Proposition (CI) of Appendix A (cf.
Theorem 2.1). ∎

######  Proposition (CI).

For $(R,\lambda)\in C_{\mathcal{O}}$, $\delta_{\lambda}(R)=0$ if and only if
$R$ is a complete intersection. In particular,
$\delta_{\lambda}({\mathcal{O}}[[x_{1},\ldots,x_{n}]])=0$ for any $n\geq 1$
and any
$\lambda:{\mathcal{O}}[[x_{1},\ldots,x_{n}]]\twoheadrightarrow{\mathcal{O}}$

###### Proof.

If $R$ is a complete intersection then
$\widehat{\operatorname{Der}}^{1}_{\mathcal{O}}(R,E/{\mathcal{O}})=0$ by the
argument given in the proof of Theorem (CI). Further $C_{1,\lambda}(R)=0$ (as
we can take the CI cover $\widetilde{R}=R$). This gives that
$\delta_{\lambda}(R)=0$.

Conversely assume $\delta_{\lambda}(R)=0$. Then by our results we have a
quotient $(R_{\theta},\lambda_{\theta})\in C_{\mathcal{O}}$ of $(R,\lambda)\in
C_{\mathcal{O}}$ by a regular sequence $(y_{1},\ldots,y_{d})$, namely
$R_{\theta}=R/(y_{1},\ldots,y_{d})$ and $\lambda_{\theta}:R\to
R_{\theta}\to{\mathcal{O}}$ (the last map being $\lambda$) with $R_{\theta}$
of dimension one. Further
$\delta_{\lambda_{\theta}}(R_{\theta})=\delta_{\lambda}(R)=0$. Thus by the
result of Wiles and Lenstra, $R_{\theta}$ is a complete intersection, which
implies that $R$ is a complete intersection. ∎

######  Remark (CI).

For $(R,\lambda)\in C_{\mathcal{O}}$ and $R$ of dimension one, by the
Wiles–Lenstra result note that the vanishing of
$\operatorname{Der}^{1}_{\mathcal{O}}(R,E/{\mathcal{O}})$ implies that $R$ is
a complete intersection because of the inequality
$|\Phi_{\lambda}(R)|\geq|\Psi_{\lambda}(R)|$ which follows from the usual
Fitting ideals argument. From this we again deduce by invariance of
$\widehat{\operatorname{Der}}^{1}_{\mathcal{O}}(R,E/{\mathcal{O}})$ on going
modulo regular sequences that in general for $(R,\lambda)\in C_{\mathcal{O}}$
the vanishing of
$\widehat{\operatorname{Der}}^{1}_{\mathcal{O}}(R,E/{\mathcal{O}})$ implies
that $R$ is a complete intersection.

###  3.5 Properties of the Wiles defect

Theorem (CI) can be restated as:

######  Theorem (CI).

If $(y_{1},\ldots,y_{d},\varpi)$ is a regular sequence for $R$ with
$y_{1},\ldots,y_{d}\in\ker\lambda$, where we will also use $\lambda$ to denote
the induced map $R/(y_{1},\ldots,y_{d})\twoheadrightarrow{\mathcal{O}}$, then
$\delta_{\lambda}(R)=\delta_{\lambda}(R/(y_{1},\ldots,y_{d}))$. In particular,
$\delta_{\lambda}(R/(y_{1},\ldots,y_{d}))$ is independent of the choice of
regular sequence.

We now deduce some additivity properties of $\delta_{\lambda}(R)$ that we use
later.

######  Proposition (CI).

Let $R_{1}$ and $R_{2}$ be complete, Noetherian, Cohen–Macaulay, reduced
${\mathcal{O}}$-algebras, which are flat over ${\mathcal{O}}$ of relative
dimensions $d_{1}$ and $d_{2}$. Pick augmentations
$\lambda_{i}:R_{i}\to{\mathcal{O}}$ such that
$\operatorname{Spec}R_{i}[1/\varpi]$ is formally smooth at the point
corresponding to $\lambda_{i}$. Let
$R=R_{1}{\widehat{\otimes}}_{{\mathcal{O}}}R_{2}$ and
$\lambda=\lambda_{1}{\widehat{\otimes}}\lambda_{1}:R\to{\mathcal{O}}$.

Then

  1. 1.

$D_{1,\lambda}(R)=D_{1,\lambda_{1}}(R_{1})+D_{1,\lambda_{2}}(R_{2})$

  2. 2.

$c_{1,\lambda}(R)=c_{1,\lambda_{1}}(R_{1})+c_{1,\lambda_{2}}(R_{2})$

  3. 3.

$\delta_{\lambda}(R)=\delta_{\lambda_{1}}(R_{1})+\delta_{\lambda_{2}}(R_{2})$.

###### Proof.

By definition, (3) will follow from (1) and (2).

For (1), we will first reduce to dimension $1$. Let
$S_{1}={\mathcal{O}}[[x_{1},\ldots,x_{d_{1}}]]$ and
$S_{2}={\mathcal{O}}[[y_{1},\ldots,y_{d_{2}}]]$. By Proposition (P), we may
find maps $\theta_{1}:S_{1}\hookrightarrow R_{1}$ and
$\theta_{2}:S_{2}\hookrightarrow R_{2}$ satisfying (P). Then the map
$\theta=\theta_{1}{\widehat{\otimes}}_{{\mathcal{O}}}\theta_{2}:S_{1}{\widehat{\otimes}}_{{\mathcal{O}}}S_{2}\hookrightarrow
R$ satisfies (P) as well. So consider the rings

$\displaystyle R_{1,\theta_{1}}$
$\displaystyle=R_{1}\otimes_{S_{1}}{\mathcal{O}},$ $\displaystyle
R_{2,\theta_{1}}$ $\displaystyle=R_{1}\otimes_{S_{1}}{\mathcal{O}},$ and
$\displaystyle R_{\theta}$
$\displaystyle=R\otimes_{S_{1}{\widehat{\otimes}}_{{\mathcal{O}}}S_{2}}{\mathcal{O}}=R_{1,\theta_{1}}\otimes_{\mathcal{O}}R_{2,\theta_{2}}$

and note that these are all finite free over ${\mathcal{O}}$.

By Theorem (CI) we now have that

$\displaystyle\widehat{\operatorname{Der}}^{1}_{{\mathcal{O}}}(R_{1},E/{\mathcal{O}})$
$\displaystyle=\operatorname{Der}^{1}_{{\mathcal{O}}}(R_{1,\theta_{1}},E/{\mathcal{O}}),$
$\displaystyle\widehat{\operatorname{Der}}^{1}_{{\mathcal{O}}}(R_{2},E/{\mathcal{O}})$
$\displaystyle=\operatorname{Der}^{1}_{{\mathcal{O}}}(R_{2,\theta_{2}},E/{\mathcal{O}}),$
$\displaystyle\widehat{\operatorname{Der}}^{1}_{{\mathcal{O}}}(R,E/{\mathcal{O}})$
$\displaystyle=\operatorname{Der}^{1}_{{\mathcal{O}}}(R_{\theta},E/{\mathcal{O}}).$

But now by [Sta19, Lemma 09DA] as $R_{1}$ and $R_{2}$ are both free over
${\mathcal{O}}$, and hence Tor-independent we have

$\displaystyle L_{R_{\theta}/{\mathcal{O}}}$ $\displaystyle\cong
L_{R_{1,\theta_{1}}\otimes_{\mathcal{O}}R_{2,\theta_{2}}/{\mathcal{O}}}\cong
L_{R_{1,\theta_{1}}/{\mathcal{O}}}\otimes^{\mathbf{L}}_{R_{1,\theta_{1}}}R_{\theta}\oplus
L_{R_{2,\theta_{2}}/{\mathcal{O}}}\otimes^{\mathbf{L}}_{R_{2,\theta_{1}}}R_{\theta}.$

Thus

$\displaystyle\widehat{\operatorname{Der}}^{1}_{{\mathcal{O}}}(R,E/{\mathcal{O}})$
$\displaystyle\cong\operatorname{Der}^{1}_{{\mathcal{O}}}(R_{\theta},E/{\mathcal{O}})=H^{1}(\operatorname{RHom}_{R_{\theta}}(L_{R/{\mathcal{O}}},E/{\mathcal{O}}))$
$\displaystyle\cong
H^{1}(\operatorname{RHom}_{R_{\theta}}(L_{R_{1,\theta_{1}}/{\mathcal{O}}}\otimes^{\mathbf{L}}_{R_{1,\theta_{1}}}R_{\theta}\oplus
L_{R_{2,\theta_{2}}/{\mathcal{O}}}\otimes^{\mathbf{L}}_{R_{2,\theta_{1}}}R_{\theta},E/{\mathcal{O}}))$
$\displaystyle\cong
H^{1}(\operatorname{RHom}_{R_{\theta}}(L_{R_{1,\theta_{1}}/{\mathcal{O}}}\otimes^{\mathbf{L}}_{R_{1,\theta_{1}}}R_{\theta},E/{\mathcal{O}}))\oplus
H^{1}(\operatorname{RHom}_{R_{\theta}}(L_{R_{2,\theta_{2}}/{\mathcal{O}}}\otimes^{\mathbf{L}}_{R_{2,\theta_{1}}}R_{\theta},E/{\mathcal{O}}))$
$\displaystyle\cong
H^{1}(\operatorname{RHom}_{R_{1,\theta_{1}}}(L_{R_{1,\theta_{1}}/{\mathcal{O}}},E/{\mathcal{O}}))\oplus
H^{1}(\operatorname{RHom}_{R_{2,\theta_{2}}}(L_{R_{2,\theta_{2}}/{\mathcal{O}}},E/{\mathcal{O}}))$
$\displaystyle=\operatorname{Der}^{1}_{{\mathcal{O}}}(R_{1,\theta_{1}},E/{\mathcal{O}})\oplus\operatorname{Der}^{1}_{{\mathcal{O}}}(R_{2,\theta_{2}},E/{\mathcal{O}})=\widehat{\operatorname{Der}}^{1}_{{\mathcal{O}}}(R_{1},E/{\mathcal{O}})\oplus\widehat{\operatorname{Der}}^{1}_{{\mathcal{O}}}(R_{2},E/{\mathcal{O}})$

and so (1) follows.

It remains to prove (2). Consider triples
$(\widetilde{R}_{1},I_{1},\varphi_{1})$ and
$(\widetilde{R}_{2},I_{2},\varphi_{2})$ satisfying (CI) (with
$(R_{1},\lambda_{1})$ and $(R_{2},\lambda_{2})$, respectively, in place of
$(R,\lambda)$).

Define
$\widetilde{R}=\widetilde{R}_{1}{\widehat{\otimes}}_{{\mathcal{O}}}\widetilde{R}_{2}$,
and note that $I_{1}{\widehat{\otimes}}_{{\mathcal{O}}}\widetilde{R}_{2}$ and
$\widetilde{R}_{1}{\widehat{\otimes}}_{{\mathcal{O}}}I_{2}$ are both ideals of
$\widetilde{R}$. Let
$\varphi=\varphi_{1}\otimes\varphi_{2}:\widetilde{R}=\widetilde{R}_{1}{\widehat{\otimes}}_{{\mathcal{O}}}\widetilde{R}_{2}\twoheadrightarrow
R_{1}{\widehat{\otimes}}_{{\mathcal{O}}}R_{2}=R$, and note that
$\ker\varphi=\left(I_{1}{\widehat{\otimes}}_{{\mathcal{O}}}\widetilde{R}_{2}\right)+\left(\widetilde{R}_{1}{\widehat{\otimes}}_{{\mathcal{O}}}I_{2}\right)$.
Denoting this ideal $I\subseteq\widetilde{R}$, the triple
$(\widetilde{R},I,\varphi)$ satisfies (CI). So by the definition of
$c_{1,\lambda}$,

$\displaystyle c_{1,\lambda_{1}}(R_{1})\log|{\mathcal{O}}/p|$
$\displaystyle=\log\left|\lambda_{1}(\widetilde{R}_{1}[I_{1}])/\lambda_{1}(\operatorname{Fitt}(I_{1}))\right|$
$\displaystyle c_{1,\lambda_{2}}(R_{1})\log|{\mathcal{O}}/p|$
$\displaystyle=\log\left|\lambda_{2}(\widetilde{R}_{2}[I_{2}])/\lambda_{2}(\operatorname{Fitt}(I_{2}))\right|$
$\displaystyle c_{1,\lambda}(R)\log|{\mathcal{O}}/p|$
$\displaystyle=\log\left|\lambda(\widetilde{R}[I])/\lambda(\operatorname{Fitt}(I))\right|$

Hence it will suffice to show that

$\displaystyle\lambda\left(\widetilde{R}[I]\right)$
$\displaystyle=\lambda_{1}\left(\widetilde{R}_{1}[I_{1}]\right)\lambda_{2}\left(\widetilde{R}_{2}[I_{2}]\right),\text{
and }$ $\displaystyle\lambda\left(\operatorname{Fitt}(I)\right)$
$\displaystyle=\lambda_{1}\left(\operatorname{Fitt}(I_{1})\right)\lambda_{2}\left(\operatorname{Fitt}(I_{2})\right)$

as ideals of ${\mathcal{O}}$. For the first claim, standard properties of
annihilators imply that

$\displaystyle\widetilde{R}[I]$
$\displaystyle=\widetilde{R}\left[\left(I_{1}{\widehat{\otimes}}_{{\mathcal{O}}}\widetilde{R}_{2}\right)+\left(\widetilde{R}_{1}{\widehat{\otimes}}_{{\mathcal{O}}}I_{2}\right)\right]=\widetilde{R}\left[\left(I_{\infty,1}{\widehat{\otimes}}_{{\mathcal{O}}}\widetilde{R}_{2}\right)\right]\cap\widetilde{R}\left[\left(\widetilde{R}_{1}{\widehat{\otimes}}_{{\mathcal{O}}}I_{2}\right)\right]$
$\displaystyle=\left(\widetilde{R}_{1}\left[I_{1}\right]{\widehat{\otimes}}_{{\mathcal{O}}}\widetilde{R}_{2}\right)\cap\left(\widetilde{R}_{1}{\widehat{\otimes}}_{{\mathcal{O}}}\widetilde{R}_{2}\left[I_{2}\right]\right)=\widetilde{R}_{1}\left[I_{1}\right]{\widehat{\otimes}}_{{\mathcal{O}}}\widetilde{R}_{2}\left[I_{2}\right]$

(where we’ve used that fact that
$\left(A{\widehat{\otimes}}_{{\mathcal{O}}}\widetilde{R}_{2}\right)\cap\left(\widetilde{R}_{1}{\widehat{\otimes}}_{{\mathcal{O}}}B\right)=\left(A{\widehat{\otimes}}_{{\mathcal{O}}}\widetilde{R}_{2}\right)\left(\widetilde{R}_{\infty,1}{\widehat{\otimes}}_{{\mathcal{O}}}B\right)=A{\widehat{\otimes}}_{{\mathcal{O}}}B$
for any ideals $A\subseteq\widetilde{R}_{1}$ and
$B\subseteq\widetilde{R}_{2}$). Thus

$\lambda\left(\widetilde{R}[I]\right)=(\lambda_{1}\otimes\lambda_{2})\left(\widetilde{R}_{1}\left[I_{1}\right]{\widehat{\otimes}}_{{\mathcal{O}}}\widetilde{R}_{2}\left[I_{2}\right]\right)=\lambda_{1}\left(\widetilde{R}_{1}\left[I_{1}\right]\right)\lambda_{2}\left(\widetilde{R}_{2}\left[I_{2}\right]\right).$

For the statement about fitting ideals, fix presentations

$\displaystyle 0$ $\displaystyle\to
K_{1}\to\widetilde{R}_{1}^{m}\xrightarrow{A}I_{1}\to 0$ $\displaystyle 0$
$\displaystyle\to K_{2}\to\widetilde{R}_{2}^{n}\xrightarrow{B}I_{2}\to 0$

where $K_{i}$ is a finitely generated $\widetilde{R}_{\infty,i}$-module. Then
$A$ and $B$ induce surjective maps
$A\otimes\operatorname{Id}:\widetilde{R}^{m}=\widetilde{R}_{1}^{m}{\widehat{\otimes}}_{{\mathcal{O}}}\widetilde{R}_{2}\to
I_{1}{\widehat{\otimes}}_{{\mathcal{O}}}\widetilde{R}_{2}$ and
$\operatorname{Id}\otimes
B:\widetilde{R}^{n}=\widetilde{R}_{1}{\widehat{\otimes}}_{{\mathcal{O}}}\widetilde{R}_{2}^{n}\to\widetilde{R}_{1}{\widehat{\otimes}}_{{\mathcal{O}}}I_{2}$,
and so we may combine them to produce a surjective map

$C=(A\otimes\operatorname{Id})-(\operatorname{Id}\otimes
B):\widetilde{R}^{m+n}=\widetilde{R}^{m}\oplus\widetilde{R}^{n}\to\left(I_{1}{\widehat{\otimes}}_{{\mathcal{O}}}\widetilde{R}_{2}\right)+\left(\widetilde{R}_{1}{\widehat{\otimes}}_{{\mathcal{O}}}I_{2}\right)=I.$

Write $K\subseteq\widetilde{R}^{m+n}$ for the kernel of $C$.

By definition: $\operatorname{Fitt}(I_{1})$ is the ideal of
$\widetilde{R}_{1}$ generated by all elements of the form
$\det\left(u_{1},\ldots,u_{m}\right)\in\widetilde{R}_{\infty,1}$ for
$u_{1},\ldots,u_{m}\in K_{1}\subseteq\widetilde{R}_{1}^{m}$;
$\operatorname{Fitt}(I_{2})$ is the ideal of $\widetilde{R}_{2}$ generated by
all elements of the form
$\det\left(v_{1},\ldots,v_{n}\right)\in\widetilde{R}_{1}$ for
$v_{1},\ldots,v_{n}\in K_{2}\subseteq\widetilde{R}_{2}^{n}$; and
$\operatorname{Fitt}(I_{\infty})$ is the ideal of $\widetilde{R}$ generated by
all elements of the form
$\det\left(w_{1},\ldots,w_{m+n}\right)\in\widetilde{R}$ for
$w_{1},\ldots,w_{m+n}\in K\subseteq\widetilde{R}^{m+n}$.

Now given any $u_{1},\ldots,u_{m}\in K_{1}$ and $v_{1},\ldots,v_{n}\in K_{2}$
it’s easy to see that $\displaystyle\binom{u_{i}\otimes
1}{0},\binom{0}{1\otimes v_{j}}\in K$ for all $i$ and $j$, and so
$\operatorname{Fitt}(I)$ contains the element

$\det\begin{pmatrix}u_{1}\otimes 1&\cdots&u_{m}\otimes 1&0&\cdots&0\\\
0&\cdots&0&1\otimes v_{1}&\otimes&1\otimes
v_{n}\end{pmatrix}=\det(u_{1},\ldots,u_{m})\otimes\det(v_{1},\ldots,v_{m}).$

If follows that
$\operatorname{Fitt}(I_{1}){\widehat{\otimes}}_{{\mathcal{O}}}\operatorname{Fitt}(I_{2})\subseteq\operatorname{Fitt}(I)$
and so
$\lambda_{1}\left(\operatorname{Fitt}(I_{1})\right)\lambda_{2}\left(\operatorname{Fitt}(I_{2})\right)\subseteq\lambda\left(\operatorname{Fitt}(I)\right)$.

For the reverse inclusion, we will use the following simple lemma:

######  Lemma (CI).

For any $\displaystyle w=\binom{w_{1}}{w_{2}}\in K$, for
$w_{1}\in\widetilde{R}^{m}$ and $w_{2}\in\widetilde{R}^{n}$, there exist $u\in
K_{1}$ and $v\in K_{2}$ for which $\lambda(w_{1})=\lambda_{1}(u)$ and
$\lambda(w_{2})=\lambda_{2}(v)$.

###### Proof.

As $w\in K$, we have
$(A\otimes\operatorname{Id})(w_{1})-(\operatorname{Id}\otimes
B)(w_{2})=C(w)=0$ so let
$r=(A\otimes\operatorname{Id})(w_{1})=(\operatorname{Id}\otimes
B)(w_{2})\in\widetilde{R}$. By the definitions of $A$ and $B$ we have
$r=(A\otimes\operatorname{Id})(w_{1})\in
I_{1}{\widehat{\otimes}}_{{\mathcal{O}}}\widetilde{R}_{2}$ and
$r=(\operatorname{Id}\otimes
B)(w_{2})\in\widetilde{R}_{\infty,1}{\widehat{\otimes}}_{{\mathcal{O}}}I_{2}$
and so

$r\in\left(I_{1}{\widehat{\otimes}}_{{\mathcal{O}}}\widetilde{R}_{2}\right)\cap\left(\widetilde{R}_{1}{\widehat{\otimes}}_{{\mathcal{O}}}I_{2}\right)=I_{1}{\widehat{\otimes}}_{{\mathcal{O}}}I_{2}$

Now as $\lambda_{1}(I_{1})=\lambda_{2}(I_{2})=0$ by assumption, we get that
$(\lambda_{1}\otimes\operatorname{Id})(r)=(\operatorname{Id}\otimes\lambda_{2})(r)=0$.
Now let
$u=(\operatorname{Id}\otimes\lambda_{2})(w_{1})\in\widetilde{R}_{1,\infty}^{m}$
and $v=(\lambda_{1}\otimes\operatorname{Id})(w_{2})\in\widetilde{R}_{2}^{n}$,
so that

$\displaystyle\lambda_{1}(u)$
$\displaystyle=\lambda_{1}((\operatorname{Id}\otimes\lambda_{2})(w_{1}))=(\lambda_{1}\otimes\lambda_{2})(w_{1})=\lambda(w_{1})$
$\displaystyle\lambda_{2}(v)$
$\displaystyle=\lambda_{2}((\lambda_{1}\otimes\operatorname{Id})(w_{2}))=(\lambda_{1}\otimes\lambda_{2})(w_{2})=\lambda(w_{2})$

and

$\displaystyle A(u)$
$\displaystyle=(A\otimes\operatorname{Id})(\operatorname{Id}\otimes\lambda_{2})(w_{1})=(\operatorname{Id}\otimes\lambda_{2})(A\otimes\operatorname{Id})(w_{1})=(\operatorname{Id}\otimes\lambda_{2})(r)=0$
$\displaystyle B(v)$ $\displaystyle=(\operatorname{Id}\otimes
B)(\lambda_{1}\otimes\operatorname{Id})(w_{2})=(\lambda_{1}\otimes\operatorname{Id})(\operatorname{Id}\otimes
B)(w_{2})=(\lambda_{1}\otimes\operatorname{Id})(r)=0.$

So now $w_{1}\in\ker A=K_{1}$ and $w_{2}\in\ker B=K_{2}$, as desired. ∎

So now take any $w_{1},\ldots,w_{m+n}\in K$. The lemma allows us to write
$\displaystyle\lambda(w_{i})=\binom{\lambda_{1}(u_{i})}{\lambda_{2}(v_{1})}$
for $u_{i}\in K_{1}$ and $v_{i}\in K_{2}$, which gives

$\lambda(\det(w_{1},\ldots,w_{m+n}))=\det\begin{pmatrix}\lambda_{1}(u_{1})&\cdots&\lambda_{1}(u_{m+n})\\\
\lambda_{2}(v_{1})&\cdots&\lambda_{2}(v_{m+n})\end{pmatrix}$

But now by standard properties of determinants, the determinant of this
$(m+n)\times(m+n)$ matrix may be written as an alternating sum in the form

$\sum_{X,Y}(\pm 1)\det\big{(}(\lambda_{1}(u_{i}))_{i\in
X}\big{)}\det\big{(}(\lambda_{2}(v_{j}))_{j\in Y}\big{)}=\sum_{X,Y}(\pm
1)\lambda_{1}\left(\det\big{(}(u_{i})_{i\in
X}\big{)}\right)\lambda_{2}\left(\det\big{(}(v_{j})_{j\in Y}\big{)}\right)$

(where the sum is taken over partitions $X\sqcup Y=\\{1,\ldots,m+n\\}$ with
$|X|=m$ and $|Y|=n$). As this sum is in
$\lambda_{1}\left(\operatorname{Fitt}(I_{1})\right)\lambda_{2}\left(\operatorname{Fitt}(I_{2})\right)$,
it follows that
$\lambda\left(\operatorname{Fitt}(I)\right)\subseteq\lambda_{1}\left(\operatorname{Fitt}(I_{1})\right)\lambda_{2}\left(\operatorname{Fitt}(I_{2})\right)$,
giving the desired equality
$\lambda\left(\operatorname{Fitt}(I)\right)=\lambda_{1}\left(\operatorname{Fitt}(I_{1})\right)\lambda_{2}\left(\operatorname{Fitt}(I_{2})\right)$,
and completing the proof. ∎

##  4 Galois deformation theory

This section recalls basic results on Galois deformation theory and fixes some
notation for the remainder of this work. Our main references are [Tho16, § 5]
and [BKM21, § 4].

Recall the notation from the end of Section 1. We fix a continuous, absolutely
irreducible residual representation

$\overline{\rho}:G_{F}\to\mathrm{GL}_{2}(k)$

with $\det\overline{\rho}=\epsilon_{p}$, for simplicity. We will assume that
$k$ contains the eigenvalues of all elements in the image of
$\overline{\rho}$. We also fix a finite set $\Sigma$ of finite places $v$ of
$F$ disjoint from $\Sigma_{p}$ that contains all places $v\notin\Sigma_{p}$ at
which $\overline{\rho}$ is ramified, and possibly further places of $F$.

#### Local deformation rings

Let $v\in\Sigma$. We write
${\mathcal{D}}_{v}^{\square}:{\mathrm{CNL}}_{{\mathcal{O}}}\to\mathrm{Sets}$
for the functor that associates to $R\in\mathrm{CNL}_{{\mathcal{O}}}$ the set
of all continuous homomorphisms $r:G_{F_{v}}\to\mathrm{GL}_{2}(R)$ such that
$r\pmod{{\mathfrak{m}}_{R}}=\overline{\rho}|_{G_{F_{v}}}$ and $\det
r=\varepsilon_{p}$. The functor ${\mathcal{D}}_{v}^{\square}$ is representable
by an object $R_{v}^{\square}\in{\mathrm{CNL}}_{{\mathcal{O}}}$. We will write
$\rho_{v}^{\square}:G_{F_{v}}\to\mathrm{GL}_{2}(R_{v}^{\square})$ for the
universal lifting.

A local deformation problem for $\overline{\rho}|_{G_{F_{v}}}$ is a subfunctor
${\mathcal{D}}_{v}\subset{\mathcal{D}}_{v}^{\square}$ satisfying the following
conditions:

  1. 1.

The functor ${\mathcal{D}}_{v}$ is represented by a quotient $R_{v}$ of
$R_{v}^{\square}$.

  2. 2.

For all $R\in{\mathrm{CNL}}_{{\mathcal{O}}}$,
$g\in\ker(\mathrm{GL}_{2}(R)\to\mathrm{GL}_{2}(k))$ and
$r\in{\mathcal{D}}_{v}(R)$, we have $grg^{-1}\in{\mathcal{D}}_{v}(R)$.

If a quotient $R_{v}$ of $R_{v}^{\square}$ corresponding to a local
deformation problem ${\mathcal{D}}_{v}$ has been fixed, we will write
$\rho_{v}:G_{F_{v}}\to\mathrm{GL}_{2}(R_{v})$ for the universal lifting of
type ${\mathcal{D}}_{v}$. A sufficient condition for a quotient $R_{v}$ of
$R_{v}^{\square}$ to be a deformation ring is the following; see [Tho14, Lemma
5.12].

######  Lemma (CI).

Let $\pi\colon R_{v}^{\square}\to R_{v}$ be a surjective morphism in
$\mathrm{CNL}_{{\mathcal{O}}}$ with specialization
$r:G_{F_{v}}\to\mathrm{GL}_{2}(R_{v})$ induced from the universal lifting, and
assume the following conditions:

  1. 1.

The ring $R_{v}$ is reduced, and not isomorphic to $k$.

  2. 2.

For all $g\in\ker(\mathrm{GL}_{2}(R_{v})\to\mathrm{GL}_{2}(k))$, the
homomorphism $R_{v}^{\square}\to R_{v}$ associated to the representation
$grg^{-1}$ by universality factors through $\pi$.

Then the subfunctor of ${\mathcal{D}}_{v}^{\square}$ defined by $R_{v}$ is a
local deformation problem.

Below, we consider quotients of $R_{v}^{\square}$ which are defined as in
[Kis09] as reduced, flat over ${\mathcal{O}}$ quotients of $R_{v}^{\square}$,
that are characterized by the $\overline{\mathbf{Q}}_{p}$-valued points of
their generic fiber; hence these $R_{v}$ satisfy Lemma (CI) and thus give rise
to a local deformation problem. [Kis09] computes the dimension of generic
fibers of the quotients we consider, and proves that they are regular.

#### Modified local deformation rings

We shall also need modified deformation problems as introduced in [Cal18]. For
this, we fix an eigenvalue $\alpha_{v}$ of
$\overline{\rho}(\operatorname{Frob}_{v})$. Note that we have $\alpha_{v}\in
k$ by our hypothesis $\overline{\rho}(G_{F})\subset\mathrm{GL}_{2}(k)$.

######  Definition (CI).

The functor
$\operatorname{\widetilde{{\mathcal{D}}}}\\!{}_{v}^{\square}:{\mathrm{CNL}}_{{\mathcal{O}}}\to\mathrm{Sets}$
of modified framed deformations associates to
$R\in\mathrm{CNL}_{{\mathcal{O}}}$ a pair $(r,a)$ with
$r\in{\mathcal{D}}_{v}^{\square}(R)$ and $a\in R$ a root of the characteristic
polynomial of $r$ such that
$a\equiv\alpha_{v}\operatorname{mod}{{\mathfrak{m}}_{R}}$.

There is an obvious natural transformation
$u_{v}\colon\operatorname{\widetilde{{\mathcal{D}}}}\\!{}_{v}^{\square}\Rightarrow{\mathcal{D}}\\!{}_{v}^{\square}$,
and $\operatorname{\widetilde{{\mathcal{D}}}}\\!{}_{v}^{\square}$ is
representable by the localization $\widetilde{R}{}_{v}^{\square}$ of the ring
$R_{v}^{\square}[x]/(x^{2}-x\operatorname{tr}\rho_{v}^{\square}(\operatorname{Frob}_{v})+\det\rho_{v}^{\square}(\operatorname{Frob}_{v}))$
at the maximal ideal generated by ${\mathfrak{m}}_{R_{v}^{\square}}$ and
$(x-\alpha_{v})$. If $\overline{\rho}(\operatorname{Frob}_{v})$ has a multiple
eigenvalue, the ring
$R_{v}^{\square}[x]/(x^{2}-x\operatorname{tr}\rho_{v}^{\square}(\operatorname{Frob}_{v})+\det\rho_{v}^{\square}(\operatorname{Frob}_{v}))$
is local and hence isomorphic to $\widetilde{R}{}_{v}^{\square}$. This proves
the following result; see [Cal18, Lemma 2.1].

######  Lemma (CI).

If $\overline{\rho}(\operatorname{Frob}_{v})$ has distinct eigenvalues, the
canonical map $R{}_{v}^{\square}\to\widetilde{R}{}_{v}^{\square}$ is an
isomorphism. Otherwise, the extension
$R{}_{v}^{\square}\to\widetilde{R}{}_{v}^{\square}$ is a finite flat extension
of degree two.

The following definition is extracted from [Cal18, § 2].

######  Definition (CI).

A modified local deformation problem for $\overline{\rho}|_{G_{F_{v}}}$ is a
subfunctor
$\operatorname{\widetilde{{\mathcal{D}}}}_{v}\subset\operatorname{\widetilde{{\mathcal{D}}}}\\!{}_{v}^{\square}$
satisfying the following conditions:

  1. 1.

The composition $u_{v}\circ\operatorname{\widetilde{{\mathcal{D}}}}_{v}$ is a
subfunctor of ${\mathcal{D}}_{v}^{\square}$.

  2. 2.

The functor $\operatorname{\widetilde{{\mathcal{D}}}}_{v}$ is represented by a
quotient $\widetilde{R}_{v}$ of $\widetilde{R}{}_{v}^{\square}$.

One has the following analog of Lemma (CI).

######  Lemma (CI).

Let $\widetilde{\pi}\colon\widetilde{R}_{v}^{\square}\to\widetilde{R}_{v}$ be
a surjective morphism in $\mathrm{CNL}_{{\mathcal{O}}}$, and let the subring
$R_{v}\subset\widetilde{R}_{v}$ be the image of $R_{v}^{\square}$ with induced
surjection $\pi\colon R_{v}^{\square}\to R_{v}$. Suppose that

  1. 1.

The ring $\widetilde{R}_{v}$ is reduced, and not isomorphic to $k$.

  2. 2.

The surjection $\pi$ satisfies condition 2 of Lemma (CI).

Then the subfunctor $\operatorname{\widetilde{{\mathcal{D}}}}_{v}$ of
$\operatorname{\widetilde{{\mathcal{D}}}}\\!{}_{v}^{\square}$ defined by
$\widetilde{R}_{v}$ is a modified local deformation problem.

###### Proof.

From the explicit description of $\widetilde{R}_{v}^{\square}$ it is clear
that there exists $x\in\widetilde{R}_{v}$ such that
$\widetilde{R}_{v}=R_{v}[x]$ and $x$ satisfies a monic quadratic polynomial
over $R_{v}$. Since we also assume that $\alpha_{v}$ lies in $k$, and since
$\widetilde{R}_{v}$ is reduced, condition 1 implies that $R_{v}$ is different
from $k$ and hence by Lemma (CI), $R_{v}$ defines a local deformation problem
${\mathcal{D}}_{v}$ represented by $R_{v}$. It follows that
$\operatorname{\widetilde{{\mathcal{D}}}}\\!{}_{v}$ represented by
$\widetilde{R}_{v}$ is a modified local deformation functor in the sense of
Definition (CI). ∎

#### Local deformation conditions

We now define the local deformation conditions relevant to this work; the
resulting lifting rings will be denoted by $R_{v}^{\tau_{v}}$, where the
superscripts
$\tau_{v}\in\\{\operatorname{fl},\operatorname{min},{\mathrm{st}},{\mathrm{uni}},{\operatorname{\varphi-
uni}},\square\\}$ indicate the type of condition used to define $R_{v}$, and
the corresponding universal lifting by $\rho_{v}^{\tau_{v}}$. Our conditions
for liftings $r$ of $\overline{\rho}|_{G_{v}}$ will _always_ include the
condition $\det r=\varepsilon_{p}$; we shall not repeat this below. We shall
be brief, as we closely follow [BKM21, § 4].

For $v\in\Sigma_{p}$ the extension $F_{v}/\mathbf{Q}_{p}$ is unramified, so
that Fontaine–Laffaille theory applies. We assume that
$\overline{\rho}|_{G_{v}}$ is flat for all $v\in\Sigma_{v}$, and we let

  * •

$R_{v}^{\operatorname{fl}}$ be the quotient of $R_{v}^{\square}$
parameterizing _flat_ liftings of $\overline{\rho}|_{G_{v}}$.

For $v\in\Sigma$ we let

  * •

$R_{v}^{\operatorname{min}}$ be the quotient of $R_{v}^{\square}$
parametrizing _minimally ramified_ liftings of $\overline{\rho}|_{G_{v}}$. If
$\overline{\rho}$ is unramified at $v$, then $R_{v}^{\operatorname{min}}$
parameterizes unramified liftings, and then, occasionally we write
$R^{{\mathrm{unr}}}_{v}$ for $R^{\operatorname{min}}_{v}$.

Let $Q\subset\Sigma$ be the subset of those $v$ such that the representation
$\overline{\rho}|_{G_{F_{v}}}$ is of the form

$\left(\begin{array}[]{cc}\varepsilon_{p}\overline{\chi}&*\\\
0&\overline{\chi}\end{array}\right)$ (4.1)

with respect to some basis $e_{1},e_{2}$ of $k^{2}$ and where the character
$\overline{\chi}$ is unramified;333Let us note that the set $Q$ here and the
sets $Q$ in Sections 6 and 7 are (related but) in general not the same. we
further assume that the basis is chosen so that $*$ is trivial whenever
$\overline{\rho}|_{G_{F_{v}}}$ is split, which holds if $\overline{\rho}$ is
unramified and $\varepsilon_{p}$ is non-trivial. Also $\overline{\chi}$ has to
be quadratic and we let $\chi$ be its unique (quadratic) lift to
${\mathcal{O}}$. Let $\beta_{v}=\chi(\operatorname{Frob}_{v})$.

For $v\in Q$, we define the Steinberg quotient $R_{v}^{\mathrm{st}}$ of
$R_{v}^{\square}$ as follows:

  * •

If $\overline{\rho}$ is ramified at $v$, then $R_{v}^{\mathrm{st}}$ is defined
to be $R^{\operatorname{min}}_{v}$.

  * •

If $\overline{\rho}$ is unramified at $v$, we define $R_{v}^{\mathrm{st}}$ as
the unique reduced quotient of $R_{v}^{\square}$ characterized by the fact
that the $L$-valued points of its generic fiber, for any finite extension
$L/E$, correspond to representations of the form

$\left(\begin{array}[]{cc}\varepsilon\chi&\ast\\\ 0&\chi\end{array}\right),$

and with the additional condition $\chi(\operatorname{Frob}_{v})=\beta_{v}$ in
the case $q_{v}\equiv-1\operatorname{mod}p$. In the latter case, without
fixing $\beta_{v}$, $\operatorname{Spec}R_{v}^{\mathrm{st}}$ would have two
components, because here $\varepsilon_{p}$ is quadratic and unramified; see
also [BKM21, § 4].

For $v\in Q$ such that $\overline{\rho}|_{G_{F_{v}}}$ is unramified, we also
define:

  * •

The unipotent quotient $R_{v}^{\mathrm{uni}}$ of $R_{v}^{\square}$ is the
unique reduced quotient such that
$\operatorname{Spec}R_{v}^{\mathrm{uni}}=\operatorname{Spec}R_{v}^{\mathrm{st}}\cup\operatorname{Spec}R_{v}^{{\mathrm{unr}}}$
inside $\operatorname{Spec}R_{v}^{\square}$. If
$q\equiv-1\operatorname{mod}p$, then note that $R_{v}^{\mathrm{st}}$ depends
on $\beta_{v}$.

  * •

The modified unipotent quotient $\widetilde{R}_{v}^{\mathrm{uni}}$ of
$\widetilde{R}{}_{v}^{\square}$ is the unique reduced quotient of
$\widetilde{R}{}_{v}^{\square}$ characterized by the fact that the $L$-valued
points of its generic fiber, for any finite extension $L/E$, correspond to
pairs $(r,a)$ where $r$ is a representation of the form

$\begin{pmatrix}\varepsilon_{p}\chi&*\\\ 0&\chi\end{pmatrix}$

with $\chi$ unramified, and such that $\chi(\operatorname{Frob}_{v})=a$.

It is clear from the definitions, that the natural map
$R_{v}^{\square}\to\widetilde{R}{}_{v}^{\mathrm{uni}}$ factors via
$R^{\square}_{v}\to
R_{v}^{\mathrm{uni}}\to\widetilde{R}{}_{v}^{\mathrm{uni}}$, and by Lemma (CI),
the map $R_{v}^{\mathrm{uni}}\to\widetilde{R}{}_{v}^{\mathrm{uni}}$ is an
isomorphism, unless $q_{v}\equiv 1\operatorname{mod}p$.

For a more uniform notation, from now on we write
$R_{v}^{\operatorname{\varphi-uni}}$ instead of
$\widetilde{R}{}_{v}^{\mathrm{uni}}$.

The following result summarizes basic ring theoretic properties of the
$R_{v}^{\tau_{v}}$.

######  Proposition (CI).

The following hold:

  1. 1.

We have
$R^{\operatorname{fl}}_{v}\cong{\mathcal{O}}[[x_{1},\ldots,x_{3+[F_{v}:\mathbf{Q}_{p}]}]]$
for $v\in\Sigma_{p}$ and
$R^{\operatorname{min}}_{v}\cong{\mathcal{O}}[[x_{1},x_{2},x_{3}]]$ for
$v\in\Sigma$.

  2. 2.

For $v\in\Sigma$, the ring $R_{v}^{\square}$ is a complete intersection,
reduced, and flat over ${\mathcal{O}}$ of relative dimension $3$.

  3. 3.

For $v\in Q$, the ring $R_{v}^{\mathrm{st}}$ is Cohen–Macaulay, flat of
relative dimension $3$ over ${\mathcal{O}}$ and geometrically integral, and if
$v$ is not a trivial prime for $\overline{\rho}$, we in fact have
$R^{\mathrm{st}}_{v}\cong{\mathcal{O}}[[x_{1},x_{2},x_{3}]]$.

  4. 4.

For each $v\in Q$ and each minimal prime ${\mathfrak{p}}$ of
$R_{v}^{\square}$, $R_{v}^{\square}/{\mathfrak{p}}$ is flat over
${\mathcal{O}}$ and geometrically integral.

  5. 5.

For $v\in Q$ such that in addition $\overline{\rho}$ is unramified at $v$, the
rings $R_{v}^{\mathrm{uni}}$ and $R_{v}^{\operatorname{\varphi-uni}}$ are
Gorenstein, reduced, and flat over ${\mathcal{O}}$ of relative dimension $3$.

Moreover the rings $R_{v}^{\tau_{v}}$ in 1.–5. are the completion of a finite
type ${\mathcal{O}}$-algebra at a maximal ideal.

###### Proof.

For all but 5 we refer to [BKM21, Prop. 4.3] and the references given in its
proof. The proof of 5 is given in Lemmas (CI) and (CI) below. ∎

For each $v\in\Sigma$, fix a
$\tau_{v}\in\\{\operatorname{min},{\mathrm{st}},{\mathrm{uni}},{\operatorname{\varphi-
uni}},\square\\}$, and let $\tau=(\tau_{v})_{v\in\Sigma}$, and define

$\displaystyle R_{\operatorname{loc}}^{\tau}$
$\displaystyle=\left({\widehat{\bigotimes_{v\in\Sigma}}}\,R_{v}^{\tau_{v}}\right){\widehat{\otimes}}\left({\widehat{\bigotimes_{v|p}}}\,R_{v}^{\operatorname{fl}}\right).$

We simply write $R_{\operatorname{loc}}$ for $R^{\tau}_{\operatorname{loc}}$,
if $\tau_{v}=\square$ for all $v$. Note in particular, that for any $\tau$
there is a natural morphism $R_{\operatorname{loc}}\to
R^{\tau}_{\operatorname{loc}}$, and that it factors via
$R^{\tau^{\prime}}_{\operatorname{loc}}$ where $\tau^{\prime}$ is obtained
from $\tau$ be replacing all ${\operatorname{\varphi-uni}}$ by $\mathrm{uni}$.

Proposition (CI) and [BKM21, Lemma 4.4] yield:

######  Proposition (CI).

The ring $R_{\operatorname{loc}}$ is a complete intersection, the ring
$R^{\tau}_{\operatorname{loc}}$ is Cohen–Macaulay, and both are reduced and
flat over ${\mathcal{O}}$. If $R_{v}^{\tau_{v}}$ is Gorenstein for all
$v\in\Sigma$, then so is $R^{\tau}_{\operatorname{loc}}$.

Moreover, each irreducible component of
$\operatorname{Spec}R_{\operatorname{loc}}$ is of the form

$\operatorname{Spec}\left[\widehat{\bigotimes_{v\in\Sigma}}\,R_{v}^{\square}/{\mathfrak{p}}^{(v)}\right]\widehat{\otimes}\,R^{\operatorname{fl}}_{p}$

where each $\operatorname{Spec}R^{\square}_{v}/{\mathfrak{p}}^{(v)}$ is an
irreducible component of $\operatorname{Spec}R_{v}^{\square}$, i.e., each
${\mathfrak{p}}^{(v)}$ is a minimal prime of $R_{v}^{\square}$.

#### Global deformation rings

Now we set up the notation for the corresponding global deformation rings,
following [BKM21, Section 4.3], where further details can be found.

Let $R$ (resp. $R^{\square}$) denote the global unframed (resp. framed)
deformation ring parameterizing lifts of $\overline{\rho}$ with determinant
$\varepsilon_{p}$ which are unramified outside $\Sigma\cup\Sigma_{p}$
(together with a choice of basis at every $v\in\Sigma\cup\Sigma_{p}$), One may
non-canonically fix an isomorphism
$R^{\square}=R[[X_{1},\ldots,X_{4\\#(\Sigma\cup\Sigma_{p})+3}]]$, so that we
may treat the subring $R$ of $R^{\square}$ also as a quotient of
$R^{\square}$. One also has a natural map $R_{\operatorname{loc}}\to
R^{\square}$ (and thus a map $R_{\operatorname{loc}}\to R$), by restricting a
the global lifting and performing locally a base change.

Let $\tau=(\tau_{v})_{v\in\Sigma}$ be as in the previous subsection. Then we
define

$R^{\square,\tau}=R_{\operatorname{loc}}^{\tau}\otimes_{R_{\operatorname{loc}}}R^{\square}\hbox{
and }R^{\tau}=R_{\operatorname{loc}}^{\tau}\otimes_{R_{\operatorname{loc}}}R.$

##  5 Computation of Wiles defect for some local lifting rings

In this section, $R$ will denote a ring $R_{v}^{\tau_{v}}$ as defined in
Section 4 for a residual representation
$\overline{\rho}_{v}=\overline{\rho}|_{G_{F_{v}}}:G_{F_{v}}\to\mathrm{GL}_{2}(k)$
at a place $v$ of $F$, and a deformation condition $\tau_{v}$. We let
$q=q_{v}$ be the cardinality of the residue field of $F$ at $v$ and $e$ the
ramification index of ${\mathcal{O}}$ over $W(k)$. We also fix an augmentation
$\lambda:R\twoheadrightarrow{\mathcal{O}}$.

Throughout this section, we assume that $q\equiv 1\operatorname{mod}p$ and
that $\overline{\rho}_{v}$ is trivial.

######  Definition (CI).

Let $\rho_{\lambda}:G_{F_{v}}\to\mathrm{GL}_{2}({\mathcal{O}})$ be the
representation at $v$ induced from the augmentation $\lambda$. We define the
local monodromy invariant $n_{v}$ of $\lambda$ to be the largest integers $n$
such that $\rho_{\lambda}(G_{F_{v}})$ mod $\varpi^{n}$ has trivial projective
image. 444This definition also applies in the case where our current setup is
twisted by a character that is quadratic and unramified at $v$. The results of
this section also apply to this twisted setup.

The aim of this section is to compute the invariants $D_{1,\lambda}(R)$ and
$c_{1,\lambda}(R)$ of Venkatesh and the Wiles defect $\delta_{\lambda}(R)$ as
attached in Definition (CI) to the pair $(R,\lambda)$ for certain types of
$\overline{\rho}_{v}$ and $\tau_{v}$. The three types of deformation
conditions that we shall investigate are weight $2$ Steinberg representations,
weight $2$ unipotent representations, and weight $2$ unipotent representations
with an additional choice of Frobenius eigenvalue; we call the corresponding
cases $({\mathrm{st}})$, $({\mathrm{uni}})$ and $({\operatorname{\varphi-
uni}})$, respectively. We shall see that the invariants will only depend on
the monodromy invariant $n_{v}$ and on the type of deformation condition.

The overall strategy in each case is the same. The actual computations between
case $({\mathrm{st}})$ and cases $({\mathrm{uni}})$ and
$({\operatorname{\varphi-uni}})$ differ greatly. In each case, we first give
(or recall) an explicit description of $R$, as a quotient of a power series
ring over ${\mathcal{O}}$ modulo some ideal given by explicit relations. Then
we need to find a ring $\widetilde{R}$ and a morphism
$\varphi:\widetilde{R}\twoheadrightarrow R$ that satisfy property (CI). In the
unipotent cases, we also need a morphism
$\widetilde{\theta}:S\to\widetilde{R}$ as in Lemma (CI). We greatly benefit
from the freedom in choosing $\widetilde{R}$ and $\varphi$. Venkatesh’s
invariants do not depend on this choice. So we do this in a way amenable to
computation. Our choices are not ‘natural’, but they ‘work’. 555It is shown in
[Sho18] that the unrestricted lifting ring $R_{v}^{\square}$ of any trivial
$\overline{\rho}_{v}:G_{F_{v}}\to\mathrm{GL}_{n}(k)$ is a local complete
intersection ring and so the induced surjection
$\widetilde{R}=R_{v}^{\square}\to R$ might appear as a natural candidate for
$\widetilde{\theta}$. However for the purpose of computations, this seems not
useful. The ring $R_{v}^{\square}$ can be significantly more complicated than
$R$. For instance in case $({\mathrm{st}})$, the ring $R$ can be defined
entirely by quadratic polynomials, whereas the equations defining
$R_{v}^{\square}$ involve expressions of degree $q$. The latter makes the sort
of computations we need to preform with $\widetilde{R}$ quite difficult.  They
allow us to explicitly compute at least the following objects that by Theorem
(CI) and Theorem (CI) give Venkatesh’s invariants: (a) the first two steps in
a finite free $\widetilde{R}$-resolution of $I=\operatorname{ker}\varphi$, (b)
the $\widetilde{R}$-annihilator $\widetilde{R}[I]$ of $I$, and (c) the modules
of formal differentials ${\widehat{\Omega}}_{R}$ and
${\widehat{\Omega}}_{\widetilde{R}}$.

The computation of the quantities in (c) is done as in [BKM21]. They can be
related to ${\mathcal{O}}$-linear subspaces of
${\widehat{\Omega}}_{{\mathcal{O}}[[x_{1},\ldots,x_{n}]]/{\mathcal{O}}}$
formed by differentials in the kernel ideal of a surjective presentation
${\mathcal{O}}[[x_{1},\ldots,x_{n}]]\to\widetilde{R}$, and are not difficult
to compute. The resolutions needed for (a) turned out to be manageable, even
by hand calculation. The most difficult quantity to compute was (b). In case
$({\mathrm{st}})$, we can rely on the rich theory of determinantal rings. In
the other cases, we needed explicit bases of $\widetilde{R}$ and $R$ as free
modules over $S$, and we need to understand the socle of the mod $p$ fiber of
the latter rings modulo the standard regular sequence of $S$ and the chain of
isomorphisms in the proof of Lemma (CI).

In the Steinberg case, we were able to perform all computations by hand. For
(a) we made use of a standard resolution from commutative algebra, the Eagon-
Northcott complex. Also (b) and (c) turned out to be directly computable. The
reason is that the ring we consider is the completion of a certain
determinantal variety of $2\times 2$-minors of a $4\times 2$-matrix. The
equations defining such varieties possess many symmetries and have been much
studied in commutative algebra.

In the unipotent cases, the defining equations had no structure that we could
link to well-studied classical varieties. In these two cases, we employed for
nearly all computations the computer algebra system Macaulay2.666We thank Dan
Grayson for answering some questions and the Macaulay developers for this
useful software. To do so, we modeled the sequence of maps
$S\to\widetilde{R}\to R$ by a sequence of rings $S_{A}\to\widetilde{R}_{A}\to
R_{A}$ of finite type over $A=\mathbf{Z}[\frac{1}{2}]$, in case
$({\mathrm{uni}})$, or $A=\mathbf{Z}$, in case $({\operatorname{\varphi-
uni}})$. With the help of Macaulay, and suitable choices of integral models,
that we found by experiment, we were able to work out (a)–(c) in fact over $A$
(or over $\mathbf{Q}$ when this was sufficient). Using base change and
completion, we convert these computations to answers to (a)–(c) for
$S\to\widetilde{R}\to R$. Our models in fact work for all primes $p$
simultaneously (with $p\neq 2$ in case $({\mathrm{uni}})$). The models we find
satisfy in particular, that $\widetilde{R}_{A}$ and $R_{A}$ are finite free
over $S_{A}$, and that certain related models for the mod $p$ fibers of
$S\to\widetilde{R}\to R$ have the analogous property with the same rank.
Finding models that are in addition smooth at the augmentation point in the
generic fiber of $\widetilde{R}_{A}$ posed an additional challenge.

Let us also mention here that in Subsection 5.5, at the end of this section,
we gather some results on Cohen–Macaulay and Gorenstein rings that we use
repeatedly. It also contains some elementary results on generating sets on
dual modules that were useful in explicit computations in Subsections 5.3 and
5.4.

###  5.1 Presentations of and basic results on the rings $R$

#### Case $({\mathrm{st}})$

In case $({\mathrm{st}})$, the ring $R$ is the Steinberg quotient
$R^{\mathrm{st}}_{v}$ defined in Section 4. The set-up is as in [BKM21, § 7.2]
except for two minor differences: Here we choose the base point $(0,0)$ for
our coordinates while there it was $(s,t)$. Moreover, here $F_{v}$ is an
arbitrary $l$-adic field, there it was $\mathbf{Q}_{l}$, where $l$ the prime
divisor of $q$. As recalled in Proposition (CI), the ring
$R_{v}^{\mathrm{st}}$ is a reduced Cohen–Macaulay domain (but non-Gorenstein),
and it is flat over ${\mathcal{O}}$ of relative dimension $3$. From [BKM21, §
7.3] we have the explicit presentation
$R_{v}^{\mathrm{st}}={\mathcal{R}}/J_{\mathrm{st}}$ where
${\mathcal{R}}={\mathcal{O}}[[a,b,c,\alpha,\beta,\gamma]]$ and
$J_{\mathrm{st}}$ is the ideal of ${\mathcal{R}}$ generated by the $2\times
2$-minors of the matrix

$\left(\begin{array}[]{cccc}\alpha&\beta&(q\\!-\\!1\\!+\\!a)&b\\\
\gamma&-\alpha&c&-a\end{array}\right).$ (5.1)

To describe various explicit calculations to be given below, we denote by
$t_{i,j}$ the $2\times 2$-minor for columns $i<j$, and we set

$r^{\mathrm{st}}_{1}=-t_{1,2}=\alpha^{2}+\beta\gamma,\quad
r^{\mathrm{st}}_{2}=t_{2,3}=(q-1+a)\alpha+c\beta,\quad
r^{\mathrm{st}}_{3}=-t_{3,4}=(q-1+a)a+bc,$

and $r^{\mathrm{st}}_{4}=-t_{1,3}=(q-1+a)\gamma-c\alpha$,
$r^{\mathrm{st}}_{5}=-t_{1,4}=a\alpha+b\gamma$,
$r^{\mathrm{st}}_{6}=-t_{2,4}=a\beta-b\alpha$, so that
$J_{\mathrm{st}}=(r^{\mathrm{st}}_{1},\ldots,r^{\mathrm{st}}_{6})$.

As in [BKM21, § 7.2], we consider the augmentation $\lambda\colon
R_{v}^{{\mathrm{st}}}\to{\mathcal{O}}$ given by
$\lambda(a)=\lambda(\alpha)=\lambda(c)=\lambda(\gamma)=0$ and $\lambda(b)=s$,
$\lambda(\beta)=t$, with $t\in{\mathfrak{m}}_{\mathcal{O}}$ non-zero.

#### Case $({\operatorname{\varphi-uni}})$

Fix a lift $\sigma\in G_{F_{v}}$ of Frobenius. In case
$({\operatorname{\varphi-uni}})$, the ring $R$ is the universal lifting ring
$R^{\operatorname{\varphi-uni}}_{v}$ defined in [Cal18, § 2.1; called there
$R^{\operatorname{mod}}_{\ell}$] for liftings $\rho$ of $\overline{\rho}_{v}$
of trivial inertia type together with a choice of eigenvalue $(1+X)$ of
$\rho(\sigma)$, and with $\det\rho(\sigma)=q$. In other words, the $p$-adic
liftings parameterized by $R^{\operatorname{\varphi-uni}}_{v}$ are those that
can be made upper-triangular with unipotent inertia, and with $q(1+X)^{-1}$
and $(1+X)$ as diagonal entries of $\rho(\sigma)$ for some $X$. It is shown in
[Cal18, Lem. 2.4 and its proof], that we have

$R^{\operatorname{\varphi-uni}}_{v}={\mathcal{R}}/{\mathcal{I}},$

where ${\mathcal{R}}={\mathcal{O}}[[\alpha,\beta,\gamma,X,a,b,c]]$ and
${\mathcal{I}}\subset{\mathcal{R}}$ is the ideal generated by the entries of
the matrices

$N^{2},N(A-(1+X)I),(A-q(1+X)^{-1})N,AN-qNA,\det A-q$

with $A:=\scalebox{0.8}{$\begin{pmatrix}q(1+X)^{-1}+a&b\\\
c&1+X-a\end{pmatrix}$}$ and $N:=\scalebox{0.8}{$\begin{pmatrix}\alpha&\beta\\\
\gamma&-\alpha\end{pmatrix}$}$. The corresponding universal lifting factors
through the tame quotient $G^{t}_{q}$ of $G_{F_{v}}$, and if $\tau$ is a
topological generator of the inertia subgroup of $G^{t}_{q}$, such that
$\sigma\tau\sigma^{-1}=\tau^{q}$, then this lifting is given by $\sigma\mapsto
A$ and $\tau\mapsto I+N$.

######  Lemma (CI).

We have ${\mathcal{I}}=(r^{\operatorname{\varphi-
uni}}_{1}\ldots,r^{\operatorname{\varphi-uni}}_{9})$ for

$r^{\operatorname{\varphi-uni}}_{1}=\alpha X,\ r^{\operatorname{\varphi-
uni}}_{2}=\beta X,\ r^{\operatorname{\varphi-uni}}_{3}=\gamma X,\
r^{\operatorname{\varphi-uni}}_{4}=aq+(a^{2}+bc)(1+X)-a(1+X)^{2},\
r^{\operatorname{\varphi-uni}}_{5}=\alpha^{2}+\beta\gamma,$
$r^{\operatorname{\varphi-uni}}_{6}=\alpha c-\gamma(q-1+a),\
r^{\operatorname{\varphi-uni}}_{7}=\alpha a+\gamma b,\
r^{\operatorname{\varphi-uni}}_{8}=\beta c+\alpha(q-1+a),\
r^{\operatorname{\varphi-uni}}_{9}=\beta a-\alpha b.$

###### Proof.

We claim that ${\mathcal{I}}$ is generated by the elements $\alpha X,\beta
X,\gamma X$, $\det A-q$, $\det N$ together with the entries of the $2\times
2$-matrix $N(A-(1+X)I)$ with $X$ specialized to zero. From the claim, and in
particular $\alpha X,\beta X,\gamma X\in{\mathcal{I}}$, it is straightforward
to see that the $r^{\operatorname{\varphi-uni}}_{i}$, $i=1,\ldots,9$ generate
${\mathcal{I}}$.

To show the claim, denote for a $2\times 2$-matrix $D$ over a ring $R$ by
$D^{\iota}$ the main involution applied to $D$ as in the proof of [BKM21, Lem.
7.2]; recall that it is $R$-linear and satisfies
$D+D^{\iota}=\operatorname{tr}D\cdot I$, and that, up to sign, the set of
entries of $D$ and $D^{\iota}$ are the same.

It follows that $N^{\iota}=-N$ and $A^{\iota}=-A+(q(1+X)^{-1}+(1+X))I$, and
from this one deduces that the matrix $(A-q(1+X)^{-1})N$ is obtained from
$N(A-(1+X)I)$ via the main involution. Hence either the entries of
$N(A-(1+X)I)$ or those of $(A-q(1+X)^{-1})N$ can be omitted when generating
${\mathcal{I}}$.

The vanishing of $N^{2}$ is easily be seen equivalent to that of $\det N$. It
remains to show that assuming $N(A-(1+X)I)=0$, we have $AN=qNA$
$\Longleftrightarrow$ $\alpha X=\beta X=\gamma X=0$: To see ‘$\Rightarrow$’,
we compute

$0=qN\cdot(A-(1+X)I)=qNA-q(1+X)N=AN-q(1+X)N=(A-q(1+X)I)N.$

Subtracting the latter from $(A-q(1+X)^{-1})N=0$ yields
$q(1+X-(1+X)^{-1})N=0$, and from this it is straightforward to see that
$XN=0$, i.a., that $\alpha X=\beta X=\gamma X=0$. For ‘$\Leftarrow$’, observe
that the steps can be reverted. ∎

######  Lemma (CI).

The ring $R^{\operatorname{\varphi-uni}}_{v}$ has the following properties:

  1. 1.

It is reduced, flat over ${\mathcal{O}}$ and of relative dimension $3$.

  2. 2.

Its two minimal primes $I_{1}$ and $I_{2}$ can be labeled so that
$R^{\operatorname{\varphi-uni}}_{v}/I_{1}$ parameterizes unramified liftings
of $\overline{\rho}$ with a choice of Frobenius eigenvalue, and
$R^{\operatorname{\varphi-uni}}_{v}/I_{2}$ is the Steinberg lifting ring
$R_{v}^{\mathrm{st}}$ from case $({\mathrm{st}})$.

  3. 3.

The elements $\varpi,b-c,b-\beta,X-\gamma$ form a regular system of parameters
and $R^{\operatorname{\varphi-uni}}$ is Gorenstein.

###### Proof.

Part 1 is [Cal18, Lem. 2.2]. To see 2, set
${\mathcal{I}}_{1}={\mathcal{I}}+(\alpha,\beta,\gamma)$ and
${\mathcal{I}}_{2}={\mathcal{I}}+(X)$. From the description of
$R^{\operatorname{\varphi-uni}}_{v}$ and its universal lifting, it follows
that the rings $R^{\operatorname{\varphi-uni}}_{1}/{\mathcal{I}}_{j}$ have the
moduli interpretation we claim in 2. It remains to show
${\mathcal{I}}\supseteq{\mathcal{I}}_{1}\cap{\mathcal{I}}_{2}$. Observe first
that
${\mathcal{R}}/{\mathcal{I}}_{1}\cong{\mathcal{O}}[[a,b,c,X]]/(aq+(a^{2}+bc)(1+X)-a(1+X)^{2})$
is a domain because $aq+(a^{2}+bc)(1+X)-a(1+X)^{2}$ cannot be factored in the
regular ring ${\mathcal{O}}[[a,b,c,X]]$. Hence $X$ is a non-zero divisor in
this quotient. Suppose now that we are given $r+sX$ with $r\in{\mathcal{I}}$
and $s\in{\mathcal{R}}$ that in addition lies in ${\mathcal{I}}_{1}$. Reducing
modulo ${\mathcal{I}}_{1}$ yields $s\in{\mathcal{I}}_{1}$ and hence
$sX\in{\mathcal{I}}_{1}\cdot{\mathcal{I}}_{2}\subset{\mathcal{I}}$. This
concludes 2.

We prove 3. The ring ${\mathcal{R}}/{\mathcal{I}}_{2}$ is isomorphic to
$R_{v}^{\mathrm{st}}$ and hence Cohen–Macaulay of dimension $4$. The rings
${\mathcal{R}}/{\mathcal{I}}_{1}$, given explicitly above, and its quotient by
$X$, i.e., the ring ${\mathcal{R}}/({\mathcal{I}}_{1}+{\mathcal{I}}_{2})$, are
Cohen–Macaulay of dimension $4$ and $3$, respectively, by Proposition (CI).3.
Hence $R_{v}^{\operatorname{\varphi-uni}}={\mathcal{R}}/(I_{1}\cap I_{2})$ is
Cohen–Macaulay of dimension $4$ by [Eis95, Exerc. 18.13]. In particular
systems of parameters of $R_{v}^{\operatorname{\varphi-uni}}$ are regular
sequences by Proposition (CI).

Let now $A$ be the quotient of $R_{v}^{\operatorname{\varphi-uni}}$ modulo the
sequence $\varpi,b-c,b-\beta,X-\gamma$. The relations allow one to eliminate
the variables $c,\beta,\gamma$, and after some simple manipulations one finds

$A\cong k[[a,b,X,\alpha]]/(\alpha X,bX,X^{2},a^{2}-2aX,\alpha^{2},\alpha
b-aX,\alpha a,b^{2},ab-aX).$

It is a $k$-vector space of dimension $6$ with basis $1,a,b,X,\alpha,a^{2}$