In what follows we consider derived actions of rings on complexes. We introduce some language and notation to facilitate the discussion.

Let $\Lambda$ be a ring, $M$ a $\Lambda$-complex and $R$ a $\Lambda$-algebra.  We say that $M$ is a derived $R$-complex, or that $R$ has a derived action on $M$, to mean that there is a map of $\Lambda$-algebras $R\to \End_{\dcat \Lambda}(M)$. When $M$ is a module this means exactly that there is an $R$-module structure on $M$ extending its $\Lambda$-module structure. For a general $M$ one only gets an $R$-module structure on the homology modules $\hh_i(M)$ extending their $\Lambda$-structure.

Let $\rdcat {\Lambda}R$ denote the category of pairs $(M,\iota)$  consisting of an $M$ in $\dcat{\Lambda}$ and a map $\iota\colon R\to \End_{\dcat \Lambda}(M)$ of $\Lambda$-algebras. We usually write $M$, instead of the pair, for an object on $\rdcat{\Lambda}R$; one has to keep in mind that an $M$ in $\dcat{\Lambda}$ may host different derived $R$-actions. The morphisms in $\rdcat{\Lambda}R$ are the morphisms of $\Lambda$-complexes compatible with the derived $R$-action, that is to say, a morphism $f\colon M\to N$ in $\dcat \Lambda$ where  for each $r\in R$ the diagram

\[
\begin{tikzcd}
M \arrow{d}[swap]{r} \arrow{r}{f} & N \arrow{d}{r} \\
M \arrow{r}[swap]{f} & N
\end{tikzcd}
\]

in $\dcat \Lambda$ is commutative.   We record some stability properties of derived $R$-actions.

Let $(M,\iota)$ be a derived $R$-complex. For any $\Lambda$-complex, $C$, the $\RHom_{\Lambda}(M,C)$ has  a derived $R$-action with structure map the composition

\[
R\xra{\ \iota\ } \End_{\dcat{\Lambda}}(M)\lra \End_{\dcat{\Lambda}}(\RHom_{\Lambda}(M,C))
\]

where the one on the right is induced by $\RHom_{\Lambda}(-,C)$. An analogous statement holds for $\RHom_{\Lambda}(C,M)$.

A map $\Lambda\to \Lambda'$ of rings   induces a derived $R'\colonequals (R\otimes_\Lambda \Lambda')$-action on $\Lambda'\lotimes_\Lambda M$ in $\dcat{\Lambda}$ via the natural map

\[
\rho\colon \Lambda'\otimes_\Lambda \End_{\dcat{\Lambda}}(M)\lra \End_{\dcat{\Lambda'}}(\Lambda'\lotimes_{\Lambda}M)\,.
\]

Thus one gets a functor $\rdcat{\Lambda}R\to \rdcat{\Lambda'}{R'}$ that sends $(M,\iota)$ to $(\Lambda'\lotimes_{\Lambda}M,\rho(\Lambda'\otimes\iota))$.

Fix integers $d$ and $\ell_0$, and consider a category $\PatchSys$ of patching systems whose objects are collections $\perfs C\colonequals \left(C_n,\alpha_n\right)_{n\geqslant 0}$ where

* $C_n$ is a perfect $\Lambda_n$-complex;

* $\hh_i(k\lotimes_{\Lambda_n}C_n) = 0$ for $i\not\in [d,d+\ell_0]$;

* $C_n$ is a derived $R_n$-complex;

* $\alpha_n\colon  \mco \lotimes_{\Lambda_n}C_n \iso C_0$ is an isomorphism  in $\rdcat{\mco}{R_n}$, where the $R_n$-action on $C_0$ is via the surjection $R_n\to  R_0$.

Given  (2), condition (1) is equivalent to requiring that $C_n$ is in $\dbcat{\Lambda_n}$.

A morphism  $f\colon \perfs C \to \perfs D$ in $\PatchSys$ is a family $f_n\colon C_n\to D_n$  of morphisms in $\rdcat{\Lambda_n}{R_n}$ commuting with the morphisms in the systems defining $\perfs C$ and $\perfs D$. The category $\PatchSys$ is defined over the system of rings $(\Lambda_n)$; this will be emphasized only if needed.

Consider the power series ring

\begin{align*}
S_\infty  &\colonequals   \mco\pos{\bs y,\bs w}  \quad\text{where $\bs w\colonequals  w_1,\ldots,w_j$, and set}\\
\fn &\colonequals (\bs y,\bs w)\,.
\end{align*}

The ring $\mco\pos{\bs y}$ is a subring of $S_\infty$. In what follows we write $\base{(-)}$ for the extension of scalars functor (also known as framing) from the category of finitely generated $\mco\pos{\bs y}$-modules to finitely generated $S_\infty$-modules; thus

\[
\base M \colonequals S_{\infty}\otimes_{\mco\pos{\bs y}}M\,.
\]

When $\Lambda$ is a module-finite $\mco\pos{\bs y}$-algebra and $M$ a finitely generated $\Lambda$-module, $\base{\Lambda}$ is a module-finite $S_\infty$-algebra and $\base{M}$ a finitely generated $\base{\Lambda}$-module. Moreover, since the extension $\mco\pos{\bs y}\to S_\infty$ is flat, $\base{(-)}$ extends to a functor on appropriate derived categories, derived complexes, and even to the category of patching systems. In particular, one gets a functor from patching systems over $(\Lambda_n)$ to those defined over $(\base{\Lambda}_n)$. These remarks will be used without further comment.

Let $r,\ell_0$ and $j$ be the integers from <ref>, <ref>, and <ref>, respectively. Fix a complete local, flat, noetherian $\mco$-algebra $R_\infty$ of dimension  $r+j-\ell_0+1$, equipped with surjective $\mco$-algebra morphism $\pi_n\colon R_\infty\twoheadrightarrow \base R_n$ for $n\ge 1$. We do not assume  the  $\pi_n$ are compatible.  The ultrapatching construction of <cit.> and the work of <cit.> give the following

There exists a homomorphism $\varphi_\infty\colon S_\infty\to R_\infty$ making $R_\infty$ into a finite $S_\infty$-algebra and a functor $\patch\colon \PatchSys\to \mathrm{mod}\, R_\infty$ with the following properties:

* $\patch(\perfs C)$ is a maximal Cohen–Macaulay $R_\infty$-module, nonzero when $\perfs C\ne 0$.

* There is a surjection $R_\infty/\fn R_\infty \twoheadrightarrow  R_0$ and an isomorphism of $R_0$-modules

\[
\patch(\perfs C)/\fn\patch(\perfs C) \cong \hh_{d}(C_0)\,.
\]

* Treating $\patch(\perfs C)$ as an $S_\infty$-module via $\varphi_\infty$, for any open ideal $\fa \subseteq S_\infty$ and for infinitely many $n$, there are isomorphisms

\[
(S_\infty/\fa) \lotimes_{S_\infty} \patch(\perfs C)[d] \longiso (S_\infty/\fa) \lotimes_{\base{\Lambda}_n}\base{C}_n,
\]

of derived $R_\infty$-complexes, where $R_\infty$ acts on $\base{C}_n$ via $\base{\iota_n}\pi_n$.

* There is an isomorphism of $R_\infty$-algebras:

\[
\End_{\dcat{S_\infty}}(\patch(\perfs C))
\cong \lim_\fa\End_{\dcat{S_\infty/\fa}}((S_\infty/\fa) \lotimes_{S_\infty} \patch(\perfs C))
\]

* Fix a map $f\colon \perfs C \to \perfs C$ in $\PatchSys$. If there exists an element $\tau\in R_\infty$ such that

\[
\pi_n(\tau) = \base{f}_n  \quad \text{ as elements in } \End_{\dcat{\base{\Lambda}_n}}(\base{C}_n)
\]

for all but finitely many $n$, then $\patch(f)=\tau$ in $\End_{R_\infty}(\patch(\perfs C))$.

As noted in <ref>, each patching system $\perfs C$ over $(\Lambda_n)$ gives rise to the framed patching system $\base{\perfs C}$ over $(\base{\Lambda}_n)$. Parts (3)–(5) of the statement only involve ${\base{\perfs C}}$, so does the construction of the functor $\patch$. Thus replacing $(\Lambda_n), (R_n)$ and  $\perfs C$ by $(\base{\Lambda}_n), (\base{R}_n)$, and $(\base{\perfs C})$, we assume we are in the framed context.

Pick a non-principal ultrafilter $\uf$ on $\mathbb N$. For any finite local ring $A$ (that is to say, a ring with finite cardinality) there is a unique prime ideal $\fp\subseteq \prod_{n=1}^\infty A$ with the properties that $\left(\prod_{n=1}^\infty A\right)_{\fp} \cong A$ and for any sequence $M_1,M_2,\ldots$ of finite $A$-modules (respectively,  finite $A$-algebras) with uniformly bounded cardinality, the set of $i\in \mathbb N$ for which there is an isomorphism

\[
\left(\prod_{n=1}^\infty M_n\right)_{\fp} \cong M_i
\]

as $A$-modules (respectively, as $A$-algebras) is an element of $\uf$. In particular, $\left(\prod_{n=1}^\infty M_n\right)_{\fp}$ is isomorphic to $M_i$ for infinitely many $i$. See, for instance, <cit.>.

For any open ideal $\fa\subseteq S_\infty$ and integer $s\ge 0$ set

\[
R(s,\fa,\infty) \colonequals
\left(\prod_{n=1}^\infty S_\infty/\fa \otimes_{\Lambda_n}  R_n/\fm_{R_n}^s
\right)_{\fp}
\]

where when $ I_n \not\subseteq \fa$ we interpret

\[
S_\infty/\fa \otimes_{\Lambda_n} R_n/\fm_{R_n}^s = 0 \,;
\]

this only happens for finitely many $n$. As in <cit.>, we get surjections $R_\infty\twoheadrightarrow  R(s,\fa,\infty)$ for all $s,\fa$,  inducing a surjection $R_\infty\twoheadrightarrow  \lim_{s,\fa}R(s,\fa,\infty)$. Since each $R(s,\fa,\infty)$ is an $S_\infty$-algebra,  the structure map $S_\infty\to \lim_{s,\fa}R(s,\fa,\infty)$ lifts to a homomorphism

\[
\varphi_\infty\colon S_\infty\to R_\infty
\]

as desired. For the moment, any lift will do, but later on we prove that there exists a lift that ensures that $R_\infty$ is finite as an $S_\infty$-module. In any case, <cit.> gives the surjection

\[
R_\infty/\fn R_\infty = \mco\otimes_{S_\infty} R_\infty \twoheadrightarrow  R_0\,.
\]

Let $\perfs C\colonequals \left(C_n,\alpha_n\right)_{n\geqslant 0}$ be a patching system. Since each $C_n$ is perfect,  we can replacing it by its minimal free resolution over $\Lambda_n$, and assume  $C_n$ is a bounded complex of free modules; see <cit.>. Then $\mco\lotimes_{\Lambda_n}C_n$ is represented by the complex $\mco\otimes_{\Lambda_n}C_n$, which is also free and minimal. Thus we can assume  $\alpha$ is a morphism of $\mco$-complexes:

\[
\alpha_n \colon \mco\otimes_{\Lambda_n}C_n \longiso C_0\,.
\]

Since this is a quasi-isomorphism between minimal free complexes, it is an isomorphism; see <cit.>. For any open ideal $\fa\subseteq S_\infty$ set

\[
C(\fa,\infty) \colonequals \left(\prod_{n=1}^\infty S_\infty/\fa \otimes_{\Lambda_n} C_n \right)_{\fp}
\]

where as before when $I_n \not\subseteq \fa$ the tensor product in question is assumed to be $0$.

Since $C_n$ is a minimal free complex over $\Lambda_n$, for each integer $i$ one has

\begin{align*}
\rank_{\Lambda_n}(C_n)_i
&= \rank_k \hh_i(k\otimes_{\Lambda_n} C_n) \\
&= \rank_k \hh_i(k \otimes_{\mco} (\mco\otimes_{\Lambda_n} C_n)) \\
&=\rank_k \hh_i(k\otimes_{\mco}C_0)
\end{align*}

The last equality holds because $\mco \otimes_{\Lambda_n}C_n \cong C_0$, via $\alpha_n$.  Thus the integers

\[
c_i\colonequals \rank_{\Lambda_n}(C_n)_i
\]

are independent of $n$. It follows that the complex $S_\infty/\fa \otimes_{\Lambda_n} C_n$ of $S_\infty/\fa$-modules is minimal, free and  for each $i\in \mathbb Z$ and all $n$, one has

\[
\rank_{S_\infty/\fa}(S_\infty/\fa  \otimes_{\Lambda_n} C_n)_i = c_i\,.
\]

In particular, the modules $(S_\infty/\fa \otimes_{\Lambda_n}C_n)_i$ are all finite of bounded cardinality. It follows that $C(\fa,\infty)$ is a minimal complex of finite free modules over $S_\infty/\fa$  and that for infinitely many $n$ there are isomorphisms

\[
C(\fa,\infty)\cong S_\infty/\fa \otimes_{\Lambda_n}C_n\,.
\]

Thus $\rank_{S_\infty/\fa}C(\fa,\infty)_i = c_i$ for each $i\in\mathbb Z$.  As in <cit.> one gets

\[
S_\infty/\fa  \otimes_{S_\infty/\fb} C(\fb,\infty) \cong C(\fa,\infty)
\]

for any $\fb\subseteq \fa$. Set

\[
C_\infty\colonequals \lim_s C \left(\fm_{S_\infty}^s,\infty\right).
\]

By <cit.> this is a minimal complex of $S_\infty$-modules with

\[
S_\infty/\fa \otimes_{S_\infty} C_\infty \cong C(\fa,\infty) \quad\text{for all $\fa$,}
\]

and for each $i\in\mathbb Z$ we have

\[
\hh_i(C_\infty) \cong \lim_s \hh_i\left(C\left(\fm_{S_\infty}^s,\infty\right)\right)\,.
\]

Also (the proof of) <cit.> implies that the natural map

\[
\End_{\dcat{S_\infty}}(C_\infty)\lra\lim_\fa\End_{\dcat{S_\infty/\fa}}(C(\fa,\infty))
\]

is an isomorphism.

The structure maps $R_\infty\xrightarrow{\pi_n}R_n \to \End_{\dcat{\Lambda_n}}(C_n)$ induce maps

\[
R_\infty \lra R(s,\fa,\infty)\lra \End_{\dcat{S_\infty/\fa}}(C(\fa,\infty))
\]

for all $s\gg 0$, compatible with the maps

\[
\End_{\dcat{S_\infty/\fb}}(C(\fb,\infty))\lra \End_{\dcat{S_\infty/\fa}}(C(\fa,\infty))
\]

for $\fb\subseteq \fa$. Thus these maps induce a map

\[
\iota_\infty\colon R_\infty\lra \End_{\dcat{S_\infty}}(C_\infty)\,.
\]

As the maps

\[
S_\infty\lra R_n \lra \End_{\dcat{\Lambda_n}}(C_n)
\]

induce the natural action of $S_\infty$ on $C_n$ it follows that the map

\[
S_\infty\xrightarrow{\varphi_\infty}R_\infty\lra \End_{\dcat{S_\infty}}(C_\infty)
\]

induces the natural action of $S_\infty$ on $C_\infty$. Thus the $S_\infty$ action on $C_\infty$ extends to a derived $R_\infty$-action.

\[
\patch(\perfs C) \colonequals \hh_{d}(C_\infty) \quad \text{in $\operatorname{Mod}{R_\infty}$.}
\]

This is finitely generated as an $S_\infty$-module, for $C_\infty$ is a finite free complex over $S_\infty$, and hence also as an $R_\infty$-module. Thus $\patch(\perfs C)$ is in $\rmod{R_\infty}$.

We  check that this assignment is functorial on $\PatchSys$. Without loss of generality, in the remainder of the proof we assume $d=0$, to ease up notation. Let $f\colon \perfs C\to\perfs D$ be a morphism in $\PatchSys$. As before we assume each $D_n$ is a finite free $\Lambda_n$-complex, and that $\mco\otimes_{\Lambda_n}D_n\iso D_0$ is an isomorphism of $\mco$-complexes. Moreover, we assume that the maps $f_n\colon C_n\to D_n$ are morphisms of complexes; these are uniquely defined up to homotopy, and we leave it to the reader to check that the patching process preserves these homotopies.

For each open ideal $\fa\subseteq S_\infty$ the $f_n$ induce maps

\[
f_n \colon C_n \lra D_n\quad\text{and} \quad
f_{\fa,n}\colon S_\infty/\fa \otimes_{\Lambda_n} C_n \lra S_\infty/\fa \otimes_{\Lambda_n} D_n\,,
\]

and hence a map $f_{\fa,\infty} \colon C(\fa,\infty)\to D(\fa,\infty)$. By construction

\[
S_\infty/\fa \otimes_{S_\infty/\fb} f_{\fb,n} = f_{\fa,n}\quad\text{for all $\fb\subseteq \fa$ and $n$},
\]

so  $S_\infty/\fa \otimes_{S_\infty/\fb} f_{\fb,\infty}  = f_{\fa,\infty}$. By <cit.>, for each $s$ the map $f_{\fm_{S_\infty}^s,\infty}$ determine a unique, up to homotopy, map $f_\infty\colon C_\infty\to D_\infty$ satisfying

\[
S_\infty/\fm_{S_\infty}^s \otimes_{S_\infty} f_\infty  = f_{\fm_{S_\infty}^s,\infty}
\]

and hence $S_\infty/\fa \otimes_{S_\infty} f_\infty = f_{\fa,\infty}$. We can now define the $S_\infty$-module morphism

\[
\patch(f) \colonequals \hh_{0}(f_\infty)\colon \hh_{0}(C_\infty)\lra \hh_{0}(D_\infty),.
\]

This map depends only on the homotopy class of $f_\infty$,  so does not depend on the choices of $f_n$. It follows that $f\mapsto \patch(f)$ is functorial.

As the maps $f_n$ commute with the structure maps

\[
R_n\to \End_{\dcat{\Lambda_n}}(C_n)\quad\text{and}\quad  R_n\to \End_{\dcat{\Lambda_n}}(D_n)
\]

the map $f_\infty\colon C_\infty\to D_\infty$ commutes with the maps

\[
R_\infty\lra \End_{\dcat{S_\infty}}(C_\infty)\quad\text{and}\quad R_\infty\lra \End_{\dcat{S_\infty}}(D_\infty)\,,
\]

and so $\patch(f)$ is in fact an $R_\infty$-module homomorphism. It follows that $\patch$  defines a functor $\PatchSys\to \mathrm{mod}\, {R_\infty}$.

Now we verify claims (1)–(5). Recall that we have assumed $d=0$.

(1) Each  $C_\infty$ is a finite free $S_\infty$-complex with a derived $R_\infty$-action. For each $n$ one has $(C_n)_i = 0$ for $i\not\in [0,\ell_0]$, thus $(C_\infty)_i = 0$ for the same range of values of $i$. Since $\ell_0=\dim S_\infty - \dim R_\infty$, we can apply  Lemma <ref> below to deduce that the $R_\infty$-module $\patch(\perfs C)$ is maximal Cohen–Macaulay, as claimed.

Let $R'$ denote the image of $R_\infty$ in $\End_{S_\infty}(\patch(\perfs C))$. Then $\dim R'=\dim R_\infty$, as the $R_\infty$-module $\patch(\perfs C)$ is maximal Cohen–Macaulay. Moreover, $R'$ is a finite $S_\infty$-algebra. At this point, one can readily adapt the proof of <cit.> to deduce that the lift $S_\infty \to R_\infty$ of the map $S_\infty\to R'$ can be chosen to ensure that $R_\infty$ is finite as an $S_\infty$-module.

(2) The fact that $\hh_i(C_\infty) = 0$ for $i\ne 0$ also implies that

\[
C_\infty\simeq  \hh_{0}(C_\infty) =  \patch(\perfs C) \quad \text{in $\rdcat{S_\infty}{R_\infty}$.}
\]

The discussion above thus yields

\[
(S_\infty/\fa)  \lotimes_{S_\infty} \patch(\perfs C) \simeq
(S_\infty/\fa) \otimes_{S_\infty} C_\infty \cong C(\fa,\infty)\cong  (S_\infty/\fa) \otimes_{\Lambda_n} C_n
\]

for infinitely many $n$, proving (2).

(3) This now follows from the above observation that the natural map

\[
\End_{\dcat{S_\infty}}(C_\infty)\lra \lim_\fa\End_{\dcat{S_\infty/\fa}}(C(\fa,\infty))
\]

is an isomorphism.

(4) Take any integer $s\ge 0$ and consider the open ideal $\fa_s \colonequals \fn+\varpi^s S_\infty$. Then

\begin{align*}
\patch(\perfs C)/\fn\patch(\perfs C)\otimes_{\mco}\mco/(\varpi^s)
\patch(\perfs C)/{\fa_s}\patch(\perfs C) \\
& = \hh_{0}(S_\infty/{\fa_s} \lotimes_{S_\infty}  \patch(\perfs C) )\\
&\cong \hh_{0}(S_\infty/{\fa_s} \otimes_{S_\infty} C_\infty) \\
& \cong \hh_{0}(C(\fa_s,\infty)).
\end{align*}

But now as $\mco\otimes_{\Lambda_n} C_n \cong C_0$, in $\dcat{\mco}$ one gets

\begin{align*}
&= \left(\prod_{n=1}^\infty  S_\infty/{\fa_s} \otimes_{\Lambda_n} C_n \right)_{\fp} \\
& = \left(\prod_{n=1}^\infty
S_\infty/{\fa_s} \otimes_{\mco}(\mco \otimes_{\Lambda_n} C_n) \right)_{\fp} \\
&= \left(\prod_{n=1}^\infty
S_\infty/{\fa_s} \otimes_{\mco} C_0 \right)_{\fp} \\
& = \left(\prod_{n=1}^\infty
\mco/(\varpi^s)\otimes_{\mco}  C_0 \right)_{\fp} \\
& \cong \mco/(\varpi^s) \otimes_{\mco} C_0\,.
\end{align*}

Combining the computations above, one gets isomorphisms

\[
\patch(\perfs C)/\fn\patch(\perfs C)\otimes_{\mco}\mco/(\varpi^s)
\cong \hh_{0}(\mco/(\varpi^s) \otimes_{\mco} C_0 )
\cong \mco/(\varpi^s) \otimes_{\mco} \hh_{0}(C_0) \,.
\]

Taking inverse limits gives the desired isomorphism $\patch(\perfs C)/\fn\patch(\perfs C)\cong \hh_{0}(C_0)$.

(5) If $f_n =\pi_n(\tau)$ in $\End_{\dcat{\Lambda_n}}(C_n)$ for all but finitely many $n$, then for any open ideal $\fa$ the map $f_{\fa,\infty}$ is the image of $\tau$ under the map

\[
R_\infty\lra R(s,\fa,\infty)\lra \End_{\dcat{S_\infty/\fa}}(C(\fa,\infty)) = \End_{{\cat K}(S_\infty/\fa)}(C(\fa,\infty))\,,
\]

and so by the construction of $\patch(f)$ we get $f_\infty = \iota_\infty(\tau)$, which gives $\patch(f) = \tau$ by the definition of the $R_\infty$-module structure on $\patch(\perfs C)$.

The result below was used in proof of Theorem <ref>(1); see  <cit.>.
The basic argument goes back a long way, to the acyclicity criteria of Buchsbaum and Eisenbud <cit.>, and Peskine and Szpiro <cit.>.

Let $S$ be a Cohen–Macaulay local ring with residue field $k$. If $C$ is an $S$-complex in $\dbcat S$ admitting a derived action of an $S$-algebra $R$ and

\[
\hh_i(k\lotimes_SC)=0\quad \text{for $i\notin [0,\dim S - \dim R]$}\,,
\]

then $C\iso \hh_0(C)$ and the $R$-module $\hh_0(C)$ is maximal Cohen–Macaulay.

Given that $C$ is in $\dbcat S$ and the hypothesis on $\hh_i(k\lotimes_SC)$ replacing $C$ by its minimal free resolution, we can assume $C$  is a finite free complex with $C_i=0$ for $i\notin [0,\dim S - \dim R]$. Let $R'$ denote the image of $R$ in $\End_{\dcat S}(C)$. Then $R'$ is a finite $S$-algebra and $C$ has a derived $R'$-action. Thus the $S$-complex $\Hom_S(C,S)$ inherits a derived $R'$-action so each $\hh_i(\Hom_S(C,S))$ is an $R'$-module. Since $R'$ is a finite $S$-algebra,  for each $i$ we get

\begin{align*}
\dim_S \hh_i(\Hom_S(C,S))  \le \dim_S R' =  \dim R' \le \dim R\,.
\end{align*}

For the next step, it is convenient to use the notion of dimension of the complex $\Hom_S(C,S)$, defined as follows:

\[
\dim_S \Hom_S(C,S)
\colonequals \max\{\dim_S \hh_i(\Hom_S(C,S))-i\mid  i\in [\dim R - \dim S, 0] \}\,.
\]

See <cit.> and references therein.  Since the complex $\Hom_S(C,S)$ is zero outside the range $[\dim R - \dim S,0]$, one immediately gets the inequality below:

\[
\dim_S \Hom_S(C,S) \le  \dim S\,.
\]

This gives the inequality on the right in:

\[
0\le \max\{i\mid \hh_i(C)\ne 0\} = \dim_S\Hom_S(C,S) - \dim S\le 0\,.
\]

The equality is from <cit.>. It follows that  $\hh_i(C)=0$ for $i>0$, that is to say, $C$ is a free resolution of  $\hh_0(C)$ over $S$. Then the Auslander–Buchsbaum formula <cit.> implies the inequality below:

\begin{align*}
\depth_R \hh_0(C)
&= \depth_{R'}\hh_0(C) \\
& = \depth_S \hh_0(C) \\
& \ge \dim S - (\dim S - \dim R) = \dim R\,.
\end{align*}

The equalities hold because the maps $R\to R'$ and $S\to R'$ are finite. Thus the $R$-module $\hh_0(C)$ is  maximal Cohen–Macaulay.

§ DUALITY

In this section we prove that patching commutes with duality, in a suitable sense. The setup and notation is as in Section <ref>. In particular, we consider local rings

\[
\mco\pos{\bs y}\,, \quad S \colonequals \mco\pos{\bs y,\bs w}\,, \quad \text{and $R_\infty$.}
\]

All rings considered are quotients of these local rings, and hence possess dualizing complexes. We normalize them as in Section <ref>, making them unique up to isomorphism in the appropriate derived category. Recall that $\ddual A$ denotes the dualizing complex of a local ring $A$ and $\ddual A(-)$ the duality functor; see (<ref>).

The following observations about dualizing complexes are used implicitly.

* If $A$ is Gorenstein, for $M\in\dbcat A$ and free resolution $F\iso M$, one has

\[
\ddual A(M) \cong \Hom_A(F,A)[\dim A] \qquad\text{in $\dcat A$.}
\]

In particular, when $M$ is perfect, so is $\ddual A(M)$.

* If $A\to B$ is a finite map, then  $\ddual A(M) \cong  \ddual B(M)$ for $M\in\dbcat B$.

* If $A\to B$ is a flat map with $A,B$ Gorenstein, and $M$ is in $\dbcat A$, then

\[
\ddual A(M)\otimes_AB \cong \ddual B(B\otimes_AM)[\dim A-\dim B] \quad\text{in $\dbcat B$.}
\]

Indeed, $A$ Gorenstein means $\ddual A\cong A[\dim A]$—see <cit.>—so (1) follows from isomorphisms

\[
\RHom_A(M,\ddual A) \cong \Hom_A(F,\ddual A) \cong \Hom_A(F,A)[\dim A]\,.
\]

As to (2), since $\RHom_A(B,\ddual A)\cong\ddual B$ in $\dcat B$, by
<cit.>,  one has

\[
\RHom_A(M,\ddual A) \cong \RHom_B(M \RHom_A(B,\ddual A))\cong \RHom_B(M, \ddual B)\,.
\]

Part (3) is a direct consequence of the isomorphism:

\[
\RHom_A(M,A) \otimes_A B \cong \RHom_B(B\otimes_AM, B) \,,
\]

which is valid because $M$ is in $\dbcat A$ and $B$ is flat as an $A$-module.

Let  $\perfs C \colonequals (C_n, \alpha_n)_{n\geqslant 0}$ be a patching system over $(\Lambda_n)$; see <ref>.  The dual of $\perfs C$ is the patching system ${\perfs C}^{\dagger} \colonequals (C^{\dagger}_n,\alpha^{\dagger}_n)_{n\geqslant 0}$ where

\[
C^{\dagger}_n \colonequals \RHom_{\mco}(C_n, \mco) [2d+\ell_0] = \ddual{\mco}(C_n)[2d+\ell_0-1]
\]

Since  $\Lambda_n$ is Gorenstein and $\dim\Lambda_n=1$, one gets

\[
C^{\dagger}_n = \ddual{\Lambda_n}(C_n)[2d+\ell_0-1] \cong  \RHom_{\Lambda_n}(C_n, \Lambda_n) [2d+\ell_0]\,.
\]

In particular,  $C^{\dagger}_n$ is a perfect complex over $\Lambda_n$, and hence it satisfies condition (1) in <ref>. The suspension by $2d+\ell_0$ ensures that condition (2)  is also satisfied. Since duals and suspension are functors on the category of derived $R_n$-complexes, $C^{\dagger}_n$ satisfies (3) as well. Finally, a standard computation yields that applying $\ddual {\mco}(-)$ to $\alpha_n$ yields an isomorphism

\[
\ddual{\mco}(\alpha_n)\colon \ddual {\mco}(C_0) \longiso \mco\lotimes_{\Lambda_n} \ddual{\Lambda_n}(C_n)
\]

compatible with derived $R_n$-actions. Setting $\alpha^{\dagger}_n$ to be the $(2d+\ell_0)$ suspension of the inverse of this morphism completes the definition of the ${\perfs C}^{\dagger}$.

It is clear that $(-)^\dagger$ defines a contravariant functor on $\PatchSys$, and that the equivalence $(-) \iso \ddual {\Lambda_n}^2(-)$ induce a natural isomorphism in $\PatchSys$:

\[
\perfs C \longiso ({\perfs C}^{\dagger})^{\dagger}
\]

The statement below is the desired result on duality. The argument is an extension of that for <cit.>. Here $(-)^{\vee}$ denotes the duality functor on Cohen–Macaulay modules defined in (<ref>). Applying it is justified for $\patch(-)$ takes values in maximal Cohen–Macaulay $R_\infty$-modules by the Theorem <ref>.

For $\perfs C$ in $\PatchSys$, there is an natural isomorphism of $R_\infty$-modules

\[
\patch({\perfs C}^{\dagger})\cong \patch(\perfs C)^{\vee}\,.
\]

This is functorial in $\perfs C$, in that, if $f\colon \perfs C\to \perfs D$ is a morphism in $\PatchSys$ then

\[
\patch(f^{\dagger})= \patch(f)^{\vee}\,.
\]

To begin with, given the discussion in <ref>, we can assume we are already in the framed situation, $j=0$, as in the proof of Theorem <ref>. Moreover, we can assume the $\Lambda_n$-complex $C_n$ is finite free and concentrated in degrees $[0,\ell_0]$ for each $n$. The functor $(-)^\dagger$ preserves these properties. Let

\[
\patcht \colon \PatchSys\lra \rdcat{S_\infty}{R_\infty}
\]

be the functor $\perfs C\mapsto C_\infty$ and  $f\mapsto f_\infty$ constructed in the proof of Theorem <ref>, so that $\patch(\perfs C) = \hh_{0}(\patcht(\perfs C))$. It suffices to verify that there is an isomorphism

\[
\patcht ({\perfs C}^{\dagger})
\longiso  \ddual{S_\infty}(\patcht(\perfs C))[-\dim R_\infty]
\]

in $\dcat{S_\infty}$, functorial in $\perfs C$, and compatible with $R_\infty$-actions. Indeed, given this isomorphism one gets

\begin{align*}
\patch ({\perfs C}^{\dagger})
&=\hh_0(\patcht ({\perfs C}^{\dagger})) \\
&\cong \hh_{\dim R_\infty}(\ddual{S_\infty}(\patcht(\perfs C))) \\
&\cong \hh_{\dim R_\infty}(\ddual{S_\infty}(\patch(\perfs C)))\\
&=\patch(\perfs C)^\vee
\end{align*}

keeping in mind that $\patch(\perfs C)$ is Cohen–Macaulay of dimension $\dim R_\infty$.

As to the isomorphism above, fix $\perfs C = (C_n,\alpha_n)_{n\geqslant 0}$ in $\PatchSys$. For any open ideal $\fa\subseteq S_\infty$ containing the ideal $\Ker(S_\infty\twoheadrightarrow  \Lambda_n)$ the complex $S_\infty/\fa \lotimes_{\Lambda_n}C_n $ of $S_\infty/\fa$-modules is finite free,  so using the properties of duality listed in <ref>, one gets a natural isomorphism

\[
S_\infty/\fa \lotimes_{\Lambda_n} \ddual{\Lambda_n}(C_n) \longiso
\RHom_{S_\infty/\fa}(S_\infty/\fa \lotimes_{\Lambda_n}C_n, S_\infty/\fa)[1]
\]

respecting the action of $R_\infty$ on both sides.  Here we are using the fact that $\Lambda_n$ is Gorenstein and  $C_n$ is a perfect $\Lambda_n$-complex. Similarly there is an isomorphism

\[
S_\infty/\fa \lotimes_{S_\infty} \ddual{S_\infty}(\patcht(\perfs C))\longiso
\RHom_{S_\infty/\fa}(S_\infty/\fa \lotimes_{S_\infty}\patcht(\perfs C), S_\infty/\fa)[\dim S_\infty]
\]

again compatible with the action of $R_\infty$ and functorial in $\perfs C$. This uses the fact that $S_\infty$ is Gorenstein and that the $S_\infty$-complex $\patcht(\perfs C)$ is perfect. Then, for any open ideal $\fa\subseteq S_\infty$, Theorem <ref>(2) gives an isomorphism

\begin{align*}
S_\infty/\fa \lotimes_{S_\infty} \patcht(\perfs C^\dagger)
&\cong S_\infty/\fa  \lotimes_{\Lambda_n} C_n^{\dagger} \\
&=  S_\infty/\fa  \lotimes_{\Lambda_n} \ddual{\Lambda_n}(C_n)[\ell_0-1]\\
&\cong \RHom_{S_\infty/\fa}(S_\infty/\fa \lotimes_{\Lambda_n}C_n, S_\infty/\fa)[\ell_0]\\
&\cong \RHom_{S_\infty/\fa}(S_\infty/\fa \lotimes_{S_\infty}\patcht(\perfs C), S_\infty/\fa)[\ell_0]\\
&\cong S_\infty/\fa \lotimes_{S_\infty}\ddual{S_\infty}(\patcht(\perfs C))[-\dim R_\infty]
\end{align*}

for infinitely many $n$, again, compatible with the action of $R_\infty$ and functorial in $\perfs C$. As $\patcht(\perfs C)$ is a bounded complex of finite free $S_\infty$ modules, it follows from <cit.> that we have natural isomorphisms

\begin{align*}
\patcht(\perfs C^\dagger)
&\cong \lim_\fa\left(S_\infty/\fa \lotimes_{S_\infty} \patcht(\perfs C^\dagger) \right)\\
&\cong \lim_\fa\left(S_\infty/\fa \lotimes_{S_\infty}\ddual{S_\infty}(\patcht(\perfs C))[-\dim R_\infty]\right)\\
&\cong \ddual{S_\infty}(\patcht(\perfs C))[-\dim R_\infty]
\end{align*}

respecting the action of $R_\infty$ and functorial in $\perfs C$. This is as desired.

As an immediate application of Theorem <ref>, one can generalize the main result of <cit.>.

Specifically let $F$ be a CM field in which $\ell$ does not ramify, let $D$ be a quaternion algebra over $F$, and let $Y_K$ be the manifold associated to a compact open $K\subseteq D^\times(\mbb{A}_F^\infty)$ (analogous to the manifolds constructed in Section <ref>). Assume appropriate analogues of Conjectures <ref>, <ref> and <ref>. Let $\fm$ be a non-Eisenstein ideal of the Hecke algebra of $Y_K$, corresponding to a Galois representation $\rhobar_\fm\colon G_F\to \GL_2(k)$, satisfying certain “Taylor–Wiles conditions.”

Similarly to the construction given in Sections <ref> and <ref>, one can use the chain complexes for the $Y_K$'s (localized at $\fm$) to produce a patching system ${\perfs C}$ and then apply the functor $\patch$ to produce a maximal Cohen–Macaulay module $M_\infty$ over a ring $R_\infty$. By Theorem <ref>(2), one gets

\[
M_\infty/\fm_{R_\infty}M_\infty\cong \hh_d(Y_K,\mco)_\fm/\fm_{R_0} \hh_d(Y_K,\mco)_\fm\,,
\]

with $d$ the lowest degree for which $\hh_*(Y_K,\mco)_\fm\ne 0$. Thus determining $M_\infty$ allows us to determine the multiplicity of $\rhobar_\fm$ in $\hh_d(Y_K,\mco)$, just as in <cit.>.

Crucially $R_\infty$ is the same ring as the one  in <cit.>, since both rings are determined by local information at finite places, which is not affected by the transition from totally real fields to CM fields (or general number fields). Moreover, by an analogous construction to the one used in Proposition <ref>, one can show that ${\perfs C}^\dagger\cong {\perfs C}$, and so Theorem <ref> gives $M_\infty^\vee \cong M_\infty$, just as in <cit.>.

If one has that $\hh_1(Y_K,E)_{\fm} \ne 0$, then standard multiplicity one theorems for automorphic forms imply that $M_\infty$ has generic rank $1$, and so <cit.> implies that $\dim M_\infty/\fm_{R_\infty}M_\infty = 2^k$, giving $\dim \hh_1(Y_K,\mco)_{\fm}/\fm_{R_0} = 2^k$, where $k$ is an integer (defined in <cit.>) depending only the local properties of $\rhobar_\fm$ at the places where the quaternion algebra $D$ ramifies. Note that the method of <cit.> crucially relies on the assumption that $M_\infty$ has generic rank $1$.

This observation is not original to this paper. Frank Calegari has remarked to one of us (JM) that he discovered this result (and Theorem <ref>) before we did.

In addition to the multiplicity statement, <cit.> also implies (again under the assumption that $\hh_1(Y_K,E)_{\fm} \ne 0$) that the natural map

\[
\tau_{M_\infty}\colon M_\infty \otimes_{R_\infty} M_\infty\lra \omega_{R_\infty}
\]

induced by the self-duality of $M_\infty$ is surjective. In the setting of <cit.>, that is to say, the “$\ell_0=0$” case, this implies an important statement about the associated congruence module (see <cit.> and <cit.>). This argument does not generalize to the “$\ell_0>0$” case considered here, but it seems plausible to us that the surjectivity of $\tau_{M_\infty}$ may still imply some statement about the homology group $\hh_*(Y_K,\mco)_\fm$.

Deformation Rings and Hecke Algebras

We now  use our work in Parts <ref> and <ref>  to prove integral, non-minimal modularity lifting theorems in defect $\ell_0>0$. The main result here is Theorem <ref>. The result is conditional on Conjectures  <ref>, <ref>, <ref> and <ref>. The work in this part  is partly meant to be  illustrative of  the applicability of the commutative algebra developed earlier to number theory. We have indicated in the introduction some other plausible   number theoretic applications that will be developed elsewhere.

§ GALOIS DEFORMATION THEORY

For the remainder of this paper we fix a prime $\ell>2$ and a finite extension $E/{\mbb Q}_\ell$ with ring of integers $\mco$, uniformizer $\varpi$ and residue field $k\colonequals \mco/\varpi$. Let $F$ denote an arbitrary number field and assume that $\ell$ does not ramify in $F$. Let

\[
\rhobar\colon G_F\to \GL_2(k)
\]

be a continuous Galois representation with $\det\rhobar = \varepsilon_\ell$, the cyclotomic character.   Assume that $\rhobar|_{G_{F_v}}$ is flat for all $v|\ell$ and that $\rhobar|_{G_{F(\zeta_\ell)}}$ is irreducible.

§.§ Local deformation rings

We introduce the various local (framed) deformation rings needed for the rest of the paper.

Fix a prime $v$ of $F$, and consider the local Galois representation

\[
\rhobar_v\colonequals \rhobar|_{G_{F_v}}\colon G_{F_v}\to \GL_2(k)
\]

Write $q_v = \Nm(v) = \#(\mco_F/v)$ for the norm of $v$. Let $I_{F_v}\unlhd G_{F_v}$ be the inertia subgroup and $P_{F_v}\unlhd I_{F_v}$ be the wild inertia subgroup.

Let $\varphi_v\in G_{F_v}$ be a lift of  (arithmetic) Frobenius  $\Frob_v$ and let
$\sigma_v\in G_{F_v}$ be a lift of a topological generator of $I_{F_v}/P_{F_v}$, so that $\varphi_v\sigma_v\varphi_v^{-1} = \sigma_v^{q_v}$ in $G_{F_v}/P_{F_v}$. Also note that $\det\rhobar_v(\varphi_v) = q_v$, as $\det\rhobar = \varepsilon_\ell$.

Let $R_v^\square$ be the unrestricted framed deformation ring parameterizing lifts of $\rhobar_v$ with determinant $\varepsilon_{\ell}|_{G_{F_v}}$. Let $\rho_v^\square\colon G_{F_v}\to \GL_2(R_v^\square)$ be the universal lift of $\rhobar_v$.

Suppose $v|\ell$ and let $R^{\fl}_v$ be the quotient of $R_v^{\square}$ parameterizing flat deformations of $\rhobar_v$, with determinant $\varepsilon_{\ell}$.  As $\ell$ does not ramify in $F$,  from <cit.> we get

\[
R_v^{\fl}\cong \mco\pos{x_1,x_2,\ldots,x_{3+[F_v:{\mbb Q}_\ell]}}\,.
\]

From now on assume that $v\nmid \ell$. It follows (see for example <cit.>) that $R_v^\square$ is a reduced complete intersection,  flat over $\mco$ of relative dimension $3$.

Also, as $\Ker(\GL_2(R_v^\square)\to \GL_2(k))$ is pro-$\ell$, the natural map $\rho_v^\square(P_{F_v})\to \rhobar_v^\square(P_{F_v})$ is an isomorphism, and so if $\rhobar_v$ is tamely ramified, $\rho^\square_v$ will be as well.

Let $R^{\min}_v$ be the quotient of $R_v^\square$ parameterizing “minimally ramified” lifts of $\rhobar_v$ (see <cit.>). Then by <cit.> we get that

\[
R_v^{\min}\cong \mco\pos{x_1,x_2,x_3}\,.
\]

Now consider the case where $v$ is unramified in $\rhobar$, and $q_v\equiv -1\pmod p$ and $\rhobar_v(\Frob_v)$ has two eigenvalues $q_v\epsilon_v$ and $\epsilon_v$ with $\epsilon_v=\pm 1$.  We define the Steinberg quotient  $R_q^{{\rm St}(\epsilon_v)}$ as the unique torsion free 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_\ell \chi_v& \ast \\ 0 & \chi_v\end{array} \right)\]

such that $\chi_v$ is an unramified character  with $\chi_v(\Frob_v)=\epsilon_v$, and $\varepsilon_\ell$ is the $\ell$-adic cyclotomic character.

For such $v$ the unipotent quotient $R_v^{{\rm uni}(\epsilon_v)}$ of $R_v^\square$ is defined as
the unique reduced quotient of $R_v^\square$ such that

\[
\operatorname{Spec} R_v^{{\rm uni}(\epsilon_v)}=\operatorname{Spec} R_v^{{\rm St}(\epsilon_v)}\cup\operatorname{Spec} R_v^{\rm min}
\]

inside $\operatorname{Spec} R_v^\square$.

The computations of <cit.> give the following result.

Assume that $\rhobar_v$ is unramified and $q_v\not\equiv 1\pmod{\ell}$.

If the ratio of the eigenvalues of $\rhobar_v(\varphi_v)$ is not $q_v^{\pm 1}$, then

\[
R_v^\square = R_v^{\min} \cong \mco\pos{x_1,x_2,x_3}\,.
\]

If the eigenvalues of $\rhobar_v(\varphi_v)$ are $\epsilon_v$ and $q_v\epsilon_v$ (for $\epsilon_v=\pm 1$),    then  we have the deformation rings $R_v^\square$ (when $q_v\not\equiv  \pm 1\pmod{\ell}$) and  $R_v^{{\rm uni}(\epsilon_v)}$ (when $q_v \equiv  -1\pmod{\ell}$). Each of them is  isomorphic to  $   \mco\pos{A_v,B_v,X_v,Y_v}/(A_vB_v)$ and the corresponding universal representation in each case sends:

\begin{align*}
\sigma_v &\mapsto
\begin{pmatrix}
\end{pmatrix}^{-1}
\begin{pmatrix}
\end{pmatrix}
\begin{pmatrix}
\end{pmatrix}\\
\varphi_v &\mapsto
\begin{pmatrix}
\end{pmatrix}^{-1}
\begin{pmatrix}
\end{pmatrix}
\begin{pmatrix}
\end{pmatrix}
\end{align*}

and $R^{\min}_v = R^\square_v/(A_v)= R^{{\rm uni}(\epsilon_v)}/(A_v)=\mco\pos{B_v,X_v,Y_v}$.

In our main results (e.g., Theorem <ref>) we restrict ourselves to  allowing (non-minimal)  ramification of lifts of $\rhobar$  only at the places  in Proposition <ref> above (these are our “level raising’’ primes); this is done   mainly for simplicity. We should be able to treat unrestricted ramification at places  $v$ such that
$q_v\equiv 1\pmod{\ell}$  and $\rhobar$ is unramified at $v$ with  $\rhobar(\Frob_{v})$  having  distinct eigenvalues, or unipotent ramification at places  $v$ such that
$q_v\equiv 1\pmod{\ell}$  and $\rhobar$ is unramified at $v$ with  $\rhobar(\Frob_{v})$  of order divisible by $\ell$,    without  too much trouble. (It would be more work to allow unipotent ramification at  places $v$ that are trivial  for $\rhobar$.)

We note that if $\rhobar$ is odd at a real place of $F$, with corresponding (conjugacy class of)  complex conjugation $c \in G_F$, then any $v$ such that $\rhobar(\Frob_v)$ is conjugate to  $\rhobar(c)$ is a level raising prime (with $q_v=-1$ mod $\ell$) in our sense.
If the projective image of $\rhobar$ is ${\rm PSL_2}(k)$ (for $|k| \geq 5$)  and $[F(\zeta_\ell):F]>2$ then there are places $v$ such that $\rhobar(\Frob_v)$ has eigenvalues   $\{q_v\epsilon_v,\epsilon_v\}$ and $q_v \not\equiv \pm 1$ mod $\ell$; these are again level raising primes in our sense.

§.§ Global deformation rings

Let $\rhobar\colon G_F\to \GL_2(k)$ be as before. Let $S$ be the set of all finite places $v$ of $F$, where either $\rhobar_v$ is ramified or $v|\ell$.  Also fix two disjoint finite collections $T$ and $Q$ of finite places of $F$ such that for each $v\in T$:

* $\rhobar_v$ is unramified.

* $v\nmid \ell$ and $q_v \not\equiv 1\pmod{\ell}$.

* $\rhobar_v(\Frob_v)$ has eigenvalues $q_v\epsilon_v$ and $\epsilon_v$ for some $\epsilon_v=\pm 1$.

and for each $v\in Q$:

* $\rhobar_v$ is unramified.

* $q_v \equiv 1\pmod{\ell}$.

* $\rhobar_v(\Frob_v)$ has has distinct eigenvalues in $k$.

Let $\Sigma$ be any subset of $T$.

In our applications, $\Sigma$ will represent a collection of `level raising primes' for $\rhobar$ and $Q$ will represent a collection of `Taylor–Wiles primes', which will be used in our patching construction.

The goal of this section is to construct global Galois deformation rings $R_{\Sigma}$ and $R_{\Sigma,Q}$, and their framed variants $R_\Sigma^\square$ and $R_{\Sigma,Q}^\square$.

Let $\Art$ (respectively, $\CNLO$) denote the category of Artinian (respectively, of complete local noetherian) $\mco$-algebras with residue field $k$.

Define a functor $\mcd\colon \Art\to \Sets$ which sends a ring $A\in\Art$ to the set $\mcd(A)$ of equivalence classes of continuous representations $\rho\colon G_F\to \GL_2(A)$ for which $\det\rho = \varepsilon_\ell$ and the composition

\[
G_F\xrightarrow{\rho}\GL_2(A)\onto \GL_2(k)
\]

is equal to $\rhobar\colon G_F\to \GL_2(k)$, where two such representations $\rho,\rho\colon G_F\to \GL_2(A)$ are considered equivalent if $\rho' = \gamma\rho\gamma^{-1}$ for some $\gamma\in 1+M_2(\fm_A)$.

Define subfunctors $\mcd_\Sigma\subseteq \mcd_{\Sigma,Q}\subseteq \mcd\colon \Art\to \Sets$ such that for any $\rho\in \mcd(A)$, we have $\rho\in \mcd_\Sigma(A)$ if

* For all places $v|\ell$, $\rho$ is flat at $v$;

* If $v$ is any place of $F$ for which $v\nmid \ell$ and $\rhobar$ is ramified at $v$, then $\rho$ is minimally ramified at $v$;

* If $v$ is any place of $F$ with $v\not\in S\cup\Sigma$ (including the case $v\in T\sm\Sigma$) then $\rho$ is unramified at $v$.

* If $v \in \Sigma$ and $q_v\equiv- 1\pmod{\ell}$ then $\rho$ arises from $R_v^{{\rm uni}(\epsilon_v)}$.

and $\rho\in \mcd_{\Sigma,Q}(A)$ if

* For all places $v|\ell$, $\rho$ is flat at $v$;

* If $v$ is any place of $F$ for which $v\nmid \ell$ and $\rhobar$ is ramified at $v$, then $\rho$ is minimally ramified at $v$;

* If $v$ is any place of $F$ with $v\not\in S\cup\Sigma\cup Q$ (including the case $v\in T\sm\Sigma$) then $\rho$ is unramified at $v$.

* If $v \in \Sigma$ and $q_v\equiv- 1\pmod{\ell}$ then $\rho$ arises from $R_v^{{\rm uni}(\epsilon_v)}$.

Note that for $\rho\in \mcd_\Sigma(A)$ (respectively, $\rho\in \mcd_{\Sigma,Q}(A)$) there is no restriction on the ramification of $\rho$ at primes in $\Sigma$ (respectively, at primes in $\Sigma\cup Q$) with $q_v\not\equiv-1\pmod{\ell}$.

Similarly define framed versions of these functors

\[
\mcd^\square_\Sigma,\mcd^\square_{\Sigma,Q}\colon \Art\lra \Sets
\]

as follows: For $A\in \Art$, let $\mcd^\square_\Sigma(A)$ (respectively, $\mcd^\square_{\Sigma,Q}(A)$) denote the set of tuples $(\rho,(\beta_v)_{v\in S\cup T})$ where $\rho\in \mcd_\Sigma(A)$ (respectively, $\rho\in \mcd_{\Sigma,Q}(A)$) and each $\beta_v$ is an element of $1+M_2(\fm_A)$, where two tuples $(\rho,(\beta_v)_{v\in S\cup T})$ and $(\rho',(\beta'_v)_{v\in S\cup T})$ are equivalent if there is some $\gamma\in 1+M_2(\fm_A)$ satisfying $\rho' = \gamma\rho\gamma^{-1}$ and $\beta_v' = \gamma\beta_v$ for all $v\in S\cup T$.

One may  view  $\beta_v$ as a choice of basis for $A^2$ lifting the standard basis for $k^2$.

It is well known that the functors $\mcd_\Sigma$, $\mcd^\square_\Sigma$, $\mcd_{\Sigma,Q}$ and $\mcd_{\Sigma,Q}^\square$ are all pro-representable by rings $R_\Sigma, R_\Sigma^\square, R_{\Sigma,Q}$ and $R_{\Sigma,Q}^\square$, respectively $\CNLO$.

By definition we have $\mcd_\Sigma\subseteq \mcd_{\Sigma,Q}$ and for any $\Sigma_1\subseteq \Sigma_2\subseteq T$ we have $\mcd_{\Sigma_1}\subseteq \mcd_{\Sigma_2}$ and $\mcd_{\Sigma_1,Q}\subseteq \mcd_{\Sigma_2,Q}$. These maps on functors induce a commutative diagram

\[
\begin{tikzcd}
R_{\Sigma_2,Q} \arrow[twoheadrightarrow]{d} \arrow[twoheadrightarrow]{r} & R_{\Sigma_2} \arrow[twoheadrightarrow]{d}  \\
R_{\Sigma_1,Q} \arrow[twoheadrightarrow]{r} & R_{\Sigma_1}
\end{tikzcd}
\]

Similarly we have $\mcd_\Sigma^\square\subseteq \mcd_{\Sigma,Q}^\square$ (for any $\Sigma$), $\mcd_{\Sigma_1}^\square\subseteq \mcd_{\Sigma_2}^\square$ and $\mcd_{\Sigma_1,Q}^\square\subseteq \mcd_{\Sigma_2,Q}^\square$ giving rise to a commutative diagram

\[
\begin{tikzcd}
R_{\Sigma_2,Q}^\square \arrow[twoheadrightarrow]{d} \arrow[twoheadrightarrow]{r} & R_{\Sigma_2}^\square \arrow[twoheadrightarrow]{d}  \\
R_{\Sigma_1,Q}^\square \arrow[twoheadrightarrow]{r} & R_{\Sigma_1}^\square
\end{tikzcd}
\]

It is important here that the definitions of $\mcd^\square_\Sigma,\mcd^\square_{\Sigma,Q}$ included $\beta_v$'s for all $v\in S\cup T$, including $v\in T\sm \Sigma$ (but not for $v\in Q$). Otherwise we would not be able to compare the functors $\mcd_{\Sigma_1}^\square$, $\mcd_{\Sigma_2}^\square$, $\mcd_{\Sigma_1,Q}^\square$ and $\mcd_{\Sigma_2,Q}^\square$ in this way.

The map $(\rho,(\beta_v)_{v\in S\cup T})\mapsto \rho$ clearly induces maps $R_\Sigma\to R_\Sigma^\square$ and $R_{\Sigma,Q}\to R_{\Sigma,Q}^\square$. It is well-known and easy to see that this map is  formally smooth, and thus induces (non-canonical) isomorphisms

\[
R_\Sigma^\square\cong R_\Sigma\pos{w_1,\ldots,w_{4|S\cup T|-1}}\quad\text{and}\quad
R_{\Sigma,Q}^\square\cong R_{\Sigma,Q}\pos{w_1,\ldots,w_{4|S\cup T|-1}}\,,
\]

respecting the commutative diagrams above.

Also for any $v\in S\cup T$, the map $(\rho,(\beta_v)_{v\in S\cup T})\mapsto \beta_v^{-1}\rho|_{G_{F_v}}\beta_v$ induces a map $R_v^\square\to R_{\Sigma,Q}^\square$ and (and hence a map $R_v^\square\to R_{\Sigma,Q}^\square\to R_{\Sigma}^\square$). By the definition of $R_{\Sigma,Q}^\square$, it is easy to see that this induces a map

\begin{equation*}\label{R_loc}
R_{\loc,\Sigma} \colonequals
\widehat{\bigotimes_{v|\ell}}R^{\fl}_v\widehat{\otimes}
\widehat{\bigotimes_{\substack{v\in S,\\v\nmid\ell}}}R^{\min}_v\widehat{\otimes}
\widehat{\bigotimes_{\substack{{v\in\Sigma},\\\ell\nmid(q_v+1)}}}R^\square_v
\widehat{\otimes}
\widehat{\bigotimes_{\substack{{v\in\Sigma},\\\ell|(q_v +1)}}}R_v^{{\rm uni}(\epsilon_v)}
\widehat{\otimes}
\widehat{\bigotimes_{v\in T\sm\Sigma}} R^{\min}_v
\to R_{\Sigma,Q}^\square.
\end{equation*}

Moreover for $\Sigma_1\subseteq \Sigma_2\subseteq T$ it is easy to see that the natural map $R_{\loc,\Sigma_2}\onto R_{\loc,\Sigma_1}$, given by the quotient map

\[
R_v^\square\onto R_v^\square/(A_v) = R_v^{\min} \quad (\textrm{respectively, }   R_v^{{\rm uni}(\epsilon_v)}\onto  R_v^{{\rm uni}(\epsilon_v)} /(A_v) =R_v^{\min})
\]

for all $v\in\Sigma_2\sm\Sigma_1, q_v \not\equiv -1 \pmod{\ell}$  (respectively,  $v\in\Sigma_2\sm\Sigma_1, q_v \equiv -1 \pmod{\ell}$),   gives the commutative diagram

\[
\begin{tikzcd}
R_{\loc,\Sigma_2} \arrow[twoheadrightarrow]{d} \arrow[twoheadrightarrow]{r} & R_{\Sigma_2,Q}^\square \arrow[twoheadrightarrow]{d} \arrow[twoheadrightarrow]{r} & R_{\Sigma_2}^\square \arrow[twoheadrightarrow]{d}  \\
R_{\loc,\Sigma_1} \arrow[twoheadrightarrow]{r} &R_{\Sigma_1,Q}^\square \arrow[twoheadrightarrow]{r} & R_{\Sigma_1}^\square
\end{tikzcd}
\]

§.§ Taylor–Wiles deformations

Suppose $v$ is a prime of $F$ that is unramified in $\rhobar$ and  that $q_v \equiv 1 \text{ mod }p$, and $\overline{\rho}|_{G_{F_v}}$ is unramified. Let $\Delta_v = k(v)^\times(\ell)$ and $\Lambda_v = \mco[\Delta_v]$, and suppose that $\overline{\rho}(\Frob_v)$ has  distinct eigenvalues $\gamma_{v, 1}, \gamma_{v, 2} \in k$ (which by our assumptions  are inverses of each other).  Then the universal representation $\rho^{\rm univ}_{\Sigma,Q}:G_F \to \GL_2(R_{\Sigma,Q})$ when restricted to $G_{F_v}$  is of the form

\[
\chi_{1,v}  \oplus \chi_{2,v},
\]

for continuous characters $\chi_{1,v}, \chi_{2,v} \colon G_{F_v} \to R_{\Sigma,Q}^\times$ satisfying the following conditions: we have $(\chi_i)(\Frob_v) \equiv \gamma_{v, i}\pmod{{\fm}_{R_{\Sigma,Q}}}$ and $\chi_i|_{I_{F_v}}$ induces via the Artin map a homomorphism $\Delta_v \to R_{\Sigma,Q}^{\times}$ that we denote by the same symbol $\chi_i$.
(Note that the  characters  $\chi_i|_{I_{F_v}}$ for $i=1,2$ are inverses of each other.) Let $\Delta_Q = \prod_{v\in Q}\Delta_v$, and consider the group algebra $\mco[\Delta_Q]$.
Then $R_{\Sigma, Q}$ is naturally a $\mco[\Delta_Q]$-algebra via $\prod_v \chi_{1,v}\colon \mco[\Delta_Q] \to R_{\Sigma, Q}^\times$. If $\fa_Q \subset \mco[\Delta_Q]$ is the augmentation ideal, then there is a canonical isomorphism $R_{\Sigma,Q}/(\fa_Q) \cong R_\Sigma$.  We record this as the following proposition.

For any $\Sigma$, there is a map $\mco[\Delta_Q]\to R_{\Sigma,Q}$ such that

\[
R_{\Sigma,Q}\otimes_{\mco[\Delta_Q]}\mco = R_\Sigma
\]

via the natural map $R_{\Sigma,Q}\onto R_\Sigma$, and for any $\Sigma_1\subseteq \Sigma_2$, the map $R_{\Sigma_2,Q}\onto R_{\Sigma_1,Q}$ is an $\mco[\Delta_Q]$-algebra homomorphism.

§ HECKE ALGEBRAS

As before, is $F$ an arbitrary number field such that the prime $\ell$ does not ramify in $F$. Let $r_1$ and $r_2$ respectively denote the number of real and complex places of $F$. For the remainder of this paper, we use the notation and results of Sections <ref> and <ref> with $d=r_1+r_2$ and $\ell_0 = r_2$. In particular, for any $C\in \dcat{\mco}$, we  set

\[
C^{\dagger} \colonequals \RHom_\mco(C,\mco)[2d+\ell_0] = \RHom_\mco(C,\mco)[2r_1+3r_2].
\]

In the case when $C$ is a derived $A$-complex for an $\mco$-algebra $A$, this induces a derived $A$-complex structure on $C^{\dagger}$, and so we may view $(-)^{\dagger}$ as a contravariant functor $\rdcat{\mco}{A}\to \rdcat{\mco}{A}$.

§.§ Manifolds and complexes

Consider the algebraic group $\PGL_{2}$ over $F$. Let $K_\infty\subseteq \PGL_{2}(F\otimes_\Q\R)$ be a maximal compact subgroup. For any compact open subgroup  $K = \prod_vK_v \subseteq \PGL_2(\mbb{A}_{F}^\infty)$  consider the topological space:

\[
Y_K = \PGL_2(F)\backslash \PGL_2(\mbb{A}_F)/KK_\infty
\]

which is an orbifold of dimension $2r_1+3r_2$. We say that $K$ is sufficiently small if $gKg^{-1} \cap \PGL_2(F)$ is  torsion-free for all $g \in \PGL_2(\mbb{A}_F^\infty)$.

We note the following lemma (<cit.>).

Let $K \subset \PGL_2(\mbb{A}_{F}^\infty)$ be a sufficiently small subgroup.

* Then for all $g \in \PGL_2(\mbb{A}_{F}^\infty)$, the group $\overline{\Gamma}_{K, g}\colonequals gKg^{-1} \cap \PGL_2(F)$ acts freely on $\PGL_{2}(F\otimes_\Q\R)/K_\infty$, and $Y_K$ is endowed with the structure of smooth manifold of dimension $2r_1+3r_2$.

* Let $V = \prod_v V_v$ be a normal open compact subgroup of $K$. Then the map $Y_V \to Y_K$ is a Galois covering space, with Galois group $K/V$.

For any $K$, let $C_{K}$ be the complex of singular chains on $Y_K$ with coefficients in $\mco$, so that $C_{K}$ computes of the homology $\hh_*(Y_K,\mco)$. Then $C_{K}$ is quasi-isomorphic to a bounded complex of free $\mco$-modules, as so may be viewed as a perfect complex in $\dcat{\mco}$.

§.§ Double coset operators

Let $G = \PGL_2(\mbb{A}_{F}^\infty)$
Let $C_c(G)$ be the abelian group of compactly supported continuous functions $f\colon G\to \Z$. For any compact open subgroups $K_1,K_2\subseteq G$, let

\[
\hecke{G}{K_2}{K_1} = \{f\in C_c(G)|f(k_2xk_1) = f(x) \text{ for all }x\in G,k_1\in K_1, k_2\in K_2\},
\]

which is an additive subgroup of $C_c(G)$. For any $\alpha\in G$ and any compact opens $K_1,K_2\subseteq G$, let $[K_2\alpha K_1]\in \hecke{G}{K_2}{K_1}$ denote the indicator function of the double coset $K_2\alpha K_1 = \{k_2\alpha k_1|k_1\in K_1,k_2\in K_2\}\subseteq G$. Then $\hecke{G}{K_2}{K_1}$ is clearly a free abelian group generated by the distinct $[K_2\alpha K_1]$'s.

Moreover we may define a convolution operation

\[*:\hecke{G}{K_3}{K_2}\times \hecke{G}{K_2}{K_1} \to \hecke{G}{K_3}{K_1}\]

\[
(g*f)(x) = \sum_{K_2y\in K_2\backslash G} g(xy^{-1})f(y).
\]

This operation is clearly bilinear and associative, and satisfies

\[
[K_2]* f = f = f*[K_1]
\]

for any $f\in \hecke{G}{K_2}{K_1}$. In particular, this makes $\hecke{G}{K}{K}$ into a ring.

Moreover it is well known that the convolution operation is given by

\[
[K_3\beta K_2]*[K_2\alpha K_1] = \sum_{K_1\gamma K_3}c_{\gamma}[K_3\gamma K_1]
\]

where the sum runs over all double cosets $K_3 \gamma K_1\subseteq G$ and

\[
c_\gamma = \#\{(i,j)|\beta_j\alpha_i K_1 = \gamma K_1\}
\]

where $\{\alpha_i\}$ and $\{\beta_j\}$ are (finite) sets of coset representatives, $K_2\alpha K_1 = \sqcup_i \alpha_i K_1$ and $K_3\beta K_2 = \sqcup_j \beta_jK_2$.

Now let $K_1,K_2\subseteq \PGL_2(\mbb{A}_F^{\infty})$ be any compact open subgroups, and let $\alpha\in \PGL_2(\mbb{A}_F^{\infty})$ be any element. We will define a map $[K_2\alpha K_1]: C_{K_1}\to C_{K_2}$ in $\dcat{\mco}$ as follows.

Let $L = \alpha K_1\alpha^{-1}\cap K_2$, which is also a compact open subgroup of $\PGL_2(\mbb{A}_F^{\infty})$. Define  maps $p_1\colon Y_L\to Y_{K_1}$ and $p_2\colon Y_L\to Y_{K_2}$ by $p_1([x]_L) = [x\alpha]_{K_1}$ and $p_2([x]_L) = [x]_{K_2}$ for $x\in \PGL_2(\mbb{A}_F^{\infty})$ (where for any $U$ and any $y\in \PGL_2(\mbb{A}_F^{\infty})$, $[y]_U$ denotes the equivalence class of $y$ in $Y_U = \PGL_2(F)\backslash \PGL_2(\mbb{A}_F)/UK_\infty$). Note that the map $p_1$ is well-defined as $\alpha^{-1} L\alpha\subseteq K_1$.

The maps $p_i\colon Y_L\to Y_{K_i}$ for $i=1,2$ are both finite-to-one maps of topological spaces (and are covering maps in the case where the $K_i$'s are sufficiently small, Lemma <ref>). Thus they induce maps $p_{i,*}:C_{L}\to C_{K_i}$ and $p_i^*\colon C_{K_i}\to C_{L}$.

Define the double coset operator $[K_2\alpha K_1]\in \Hom_{\dcat{\mco}}(C_{K_1},C_{K_2})$ as the composition $C_{K_1}\xrightarrow{p_1^*} C_{L}\xrightarrow{p_{2,*}} C_{K_2}$. As shown in <cit.>[Technically <cit.> only proves this in the case when $K_1 = K_2$. However their methods give the result stated here without any significant modifications.] we have

The assignment $[K_2\alpha K_1]\mapsto[K_2\alpha K_1]$ defines an additive group homomorphism $\hecke{G}{K_2}{K_1}\to \Hom_{\dcat{\mco}}(C_{K_1},C_{K_2})$ such that the map

\[
\Hom_{\dcat{\mco}}(C_{K_2},C_{K_3})\times \Hom_{\dcat{\mco}}(C_{K_1},C_{K_2})\to \Hom_{\dcat{\mco}}(C_{K_1},C_{K_3})
\]

induced by convolution $*\colon \hecke{G}{K_3}{K_2}\times \hecke{G}{K_2}{K_1}\to \hecke{G}{K_3}{K_1}$ is just function composition.

In particular, $\hecke{G}{K}{K}\to \End_{\dcat{\mco}}(C_{K})$ is a ring homomorphism.

§.§ Hecke algebras

From now on, take a compact open subgroup $K = \prod_v K_v\subseteq \PGL_2(\mbb{A}_{F}^\infty)$, and  let $S$ be a finite set of places such that for each $v\not\in S$, $K_v$ is  a maximal compact subgroup of $\PGL_2(F_v)$ ($S$ need not be the minimal set with these properties). For each $v\not\in S$, let $T_v\in\End_{\dcat{\mco}}(C_{K})$ denote the double coset operator

\[
T_v = \left[K\begin{pmatrix}\varpi_v&0\\0&1\end{pmatrix}K\right]
\]

also for $v\not\in S$ with $K_1(v)\subseteq K_v\subseteq K_0(v)$ and $d\in K_0(v)/K_v\into (\mco_F/v)^\times$ let $U_v,\langle d\rangle\in \End_{\dcat{\mco}}(C_{K})$ denote the double coset operators

\begin{align*}
U_v &= \left[K\begin{pmatrix}\varpi_v&0\\0&1\end{pmatrix}K\right]&
\langle d\rangle_v &= \left[K\begin{pmatrix}\widetilde{d}&0\\0&1\end{pmatrix}K\right]
\end{align*}

for any lift $\widetilde{d}\in \mco_{F,v}^\times$ of $d$.

Define $\TT^S(K) = \mco[T_v|v\not\in S]\subseteq \End_{\dcat{\mco}}(C_{K})$, which is well known to be a finite, commutative $\mco$-algebra.

We will now assume the following conjecture  about existence of Galois representations attached to Hecke eigenclasses (which might be torsion) arising from the cohomology of $C_{K}$. In the case when $F$ is a CM field, part (i) is known by the work of Scholze and part (ii) is known modulo a nilpotent ideal: see <cit.> for what is known about the conjecture. We just assume the conjecture for the purposes of this paper. It is similar to Conjecture A of <cit.>

Let $K = \prod_v K_v\subseteq \PGL_2(\mbb{A}_F^{\infty})$ be a compact open subgroup, and let $S$ be any finite set of places such that for each $v\not\in S$, $K_v$ is  a maximal compact subgroup of $\PGL_2(F_v)$. Then:

* For every maximal ideal $\fm$ of $\TT^S(K)$, there is a  semisimple  Galois representation $\rhobar_{\fm}\colon G_F\to \GL_2(\TT^S(K)/\fm)$ such that for all $v\not\in S$, $v \nmid \ell$, $\rhobar_{\fm}|_{G_{F_v}}$ is unramified and $\rhobar_{\fm}(\Frob_v)$ has characteristic polynomial $x^2-T_vx+\Nm(v)$.

* Furthermore there is a lift  of $\rhobar_{\fm}$ to a representation

\[
\rho_K\colon G_F\to \GL_2(\TT^S(K)_\fm)
\]

such that  for all $v\not\in S$,  $v \nmid \ell$, $\rho_{K}|_{G_{F_v}}$ is unramified and $\rho_{K}(\Frob_v)$ has characteristic polynomial $x^2-T_vx+\Nm(v)$.

Note that if we assumed in (ii) above the weaker statement that, for a $\TT \in \CNL_{\mco}$  with an inclusion   $\TT^S(K)_\fm \hookrightarrow \TT$,  there is a lift  of $\rhobar_{\fm}$ to a representation $\rho_K\colon G_F\to \GL_2(\TT)$ such that  for all $v\not\in S$,  $v$ not above $\ell$, $\rho_{K}|_{G_{F_v}}$ is unramified and $\rho_{K}(\Frob_v)$ has characteristic polynomial $x^2-T_vx+\Nm(v)$, then the stronger hypothesis in (ii) that the representation can be chosen to take values in $\GL_2(\TT^S(K)_\fm )$ follows provided the residual representation $\rhobar_{\fm}$ is irreducible, using the Chebotarev density theorem as traces of $\Frob_v$ for $v \not \in S$, $v \nmid \ell$,   with $S$ a finite set of places, are in $\TT^S(K)_\fm $.

We will say that a maximal ideal $\fm\subseteq \TT^S(K)$ is non-Eisenstein if the representation $\rhobar_{\fm}$ is absolutely irreducible.
We will use  often in what follows the following lemma which is a consequence of the Chebotarev density theorem (see  <cit.>).

Assume Conjecture <ref>.  Then for any finite set of places $S'$ containing $S$, the natural map  $\TT^{S’}(K)_\fm \to  \TT^S(K)_\fm $  is an isomorphism when $\fm$ is non-Eisenstein.

Thus if $\fm$ is non-Eisenstein the localization $\TT^S(K)_\fm$ does not depend on $S$, and so we will  often use $\TT(K)_\fm$ to denote this localization, eliding $S$ in the notation.
As shown in <cit.>, for any maximal ideal $\fm\subseteq \TT(K)$ the localization $(C_{K})_\fm$ is a direct summand of $C_{K}$ and we have $\hh_*(Y_K,\mco)_\fm= \hh_*(C_{K})_\fm = \hh_*((C_{K})_\fm)$.  Given a maximal ideal $\fm \subseteq \TT^S(K)$ and any compact open $K'\subseteq K$, we will also use $\fm\subseteq \TT^S(K')$ to denote the preimage of $\fm$ under the map $\TT^S(K')\onto \TT^S(K)$.

In what follows we  assume that $\rhobar_\fm$  is such that $\rhobar_\fm|_{F(\zeta_\ell)}$ is irreducible.  We state  the following easy   lemma that is useful for us (see  <cit.>  for the proof of the  first part).

Let $\rhobar:G_F \to \GL_2(k)$ be such that  $\rhobar|_{F(\zeta_\ell)}$ is irreducible.

(i) Then there exists a place $t \notin S$ such that

\begin{gather*}
\tr \rhobar(\Frob_t)/\det \rhobar(\Frob_t) \neq (1+\Nm(t))^2/\Nm(t)\\
\Nm(t) \not\equiv 1 \pmod{\ell}\,,
\end{gather*}

and $\Nm(t)>4^{[F:\Q]}$.

(ii) For such places $t$ the (unrestricted)  deformation ring $R_t^{\square}=R_t^{\rm min}$, and  is  isomorphic to a power series ring over $\mco$ of relative dimension 3.

(iii)  For such places $t$, the compact open subgroup
\begin{align*}
K_1(t^2) &= \left\{
\begin{pmatrix}
\end{pmatrix}\in \PGL_2(\mcohat_F)\middle|c \in t^2, ad^{-1} =1 \pmod{ t^2 }\right\}\subseteq \PGL_2(\mcohat_F)
\end{align*}

is sufficiently small.

In what follows we apply the lemma for $\rhobar=\rhobar_\fm$ and  will always impose level structures at $t$ so that we work with open compact subgroups $K$ of $\PGL_2(\mbb{A}_{F}^\infty)$ that are sufficiently small. Because no lift  of $\rhobar_\fm$ is ramified at $t$ we do not need to explicitly allow the Galois deformations  of $\rhobar_\fm$ we consider below to ramify at $t$. (See   6.5.1,  Lemma 6.5.2, and Lemma 6.5.2 of <cit.> for similar considerations.)

§.§ Sufficiently small level subgroups

We fix a prime $t$ as in Lemma <ref>.  For any nonzero ideal $\mcn\subseteq \mco_F$ define the following  compact open subgroups of $\PGL_2(\mbb{A}_{F}^\infty)$:

\begin{align*}
K_0(\mcn) &= \left\{
\begin{pmatrix}
\end{pmatrix}\in \PGL_2(\mcohat_F)\middle|c\in \mcn t^2, ad^{-1} =1 \pmod{ t^2 }\right\}\subseteq \PGL_2(\mcohat_F)\\
K_1(\mcn) &= \left\{
\begin{pmatrix}
\end{pmatrix}\in \PGL_2(\mcohat_F)\middle|c \in \mcn t^2, ad^{-1} =1 \pmod{ \mcn t^2 }\right\}\subseteq \PGL_2(\mcohat_F)
\end{align*}

so that $K_1(\mcn)\unlhd K_0(\mcn)$ and $K_0(\mcn)/K_1(\mcn)\cong (\mco_F/\mcn)^\times$ via the map

\[
\begin{pmatrix}
\end{pmatrix}\mapsto ad^{-1}\pmod{\mcn}\,.
\]

Also define $K_\Delta(\mcn)$ to be the smallest intermediate subgroup

\[
K_1(\mcn)\le K_\Delta(\mcn)\le K_0(\mcn)
\]

for which $|K_0(\mcn)/K_\Delta(\mcn)|$ is an $\ell^{th}$ power.

In the case when $\mcn = v^e$ for some prime $v$ and some $e\ge 0$, we will also sometimes use $K_0(v^e)$, $K_1(v^e)$ and $K_\Delta(v^e)$ to denote the compact open subgroups $K_0(v^e)\cap \PGL_2(\mco_{F,v})$, $K_1(v^e)\cap \PGL_2(\mco_{F,v})$ and $K_\Delta(v^e)\cap \PGL_2(\mco_{F,v})$ of $\PGL_2(F_v)$.

For any nonzero ideal $\mcn\subseteq \mco_F$ we will write $Y_0(\mcn) = Y_{K_0(\mcn)}$. Also for an ideal $Q$ of $\mco_F$ prime to $\mcn$, write $Y_{0,\Delta}(\mcn,Q) = Y_{K_0(\mcn)\cap K_\Delta(Q)}$. Write $C_0(\mcn)$ and $C_{0,\Delta}(\mcn,Q)$ for the corresponding prefect complexes in $\dcat{\mco}$.

(Thus  we  are imposing  level structure at $t$ for the compact open subgroups $K$ of $\PGL_2(\mbb{A}_F^{\infty})$ we consider;  we suppress this from the notation to make it less clumsy and  hope this will not be misleading for the reader.)

§.§ Duality

From now on fix a nonzero-ideal $\mcn_\es\subseteq \mco_F$ and a non-Eisenstein maximal ideal $\fm\subseteq \TT^S(K_0(\mcn_\es))$.
Assume that $N(\rhobar_\fm) = \mcn_\es$ (i.e. $\mcn_\es$ is the minimal level for $\rhobar_\fm$). By enlarging $\mco$ if necessary we may assume that $\TT^S(K)/\fm\cong k$, and so $\rhobar_\fm$ is a representation $G_F\to \GL_2(k)$.

Assume Conjecture <ref> holds. Then for any compact open $K=\prod_vK_v\subseteq K_0(\mcn_\es)$, there is a natural derived $\TT(K)_\fm$-isomorphism

\[
(C_{K})_\fm\cong \RHom_{\mco}((C_{K})_\fm,\mco)[2r_1+3r_2] = (C_K)_\fm^{\dagger}
\]

in $\rdcat{\mco}{\TT(K)_\fm}$. Moreover, for any $K_1,K_2\subseteq K_0(\mcn_\es)$ the adjoint of the double coset operator $[K_2\alpha K_1]\colon (C_{K_1})_\fm\to (C_{K_2})_\fm$ with respect to these isomorphisms is given by the double coset operator $[K_1\alpha^{-1} K_2]\colon (C_{K_2})_\fm\to (C_{K_1})_\fm$.

By <cit.> and <cit.> there is a Verdier duality isomorphism $(C_{K})_\fm\cong \RHom_{\mco}((C_{K})_\fm,\mco[2r_1+3r_2])$ sending each double coset operator $[K_2\alpha K_1]$ to $[K_1\alpha^{-1}K_2]$. In particular this is $\TT^S(K)$-equivariant as it is easy to check that

\begin{align*}
\varpi_v^{-1}&0\\0&1
\end{pmatrix}
\begin{pmatrix}
\end{pmatrix}
\begin{pmatrix}
\varpi_v^{-1}&0\\0&1
\end{pmatrix}
\begin{pmatrix}
\end{pmatrix}
K \\
\end{pmatrix}
K \\
\varpi_v&0\\0&1
\end{pmatrix}
\end{align*}

whenever $K_v = \PGL_2(\mco_{F,v})$, and so each $T_v$ for $v\not\in S$ is self-adjoint.

The isomorphism from Proposition <ref> is not in general equivariant for the Hecke operators $U_v$ and $\langle d\rangle_v$. However, it is easy to modify this isomorphism to make it equivariant for all Hecke operators.

From now on we will restrict our attention to compact open subgroups $K$ in the form $K = \prod_v K_v$ where for all $v$ either $K_v = \PGL_2(\mco_{F,v})$ or $K_1(v)\le K_v \le K_0(v)$. For each $v$, let

\[
w_v = \left[
\end{pmatrix}
\right]
\]

if $K_1(v)\le K_v \le K_0(v)$ and let $w_v = 1$ if $K_v = \PGL_2(\mco_{F,v})$.
Observe that $K_v\begin{pmatrix}
\end{pmatrix} = \begin{pmatrix}
\end{pmatrix} K_v$ for $K_1(v)\le K_v \le K_0(v)$ and $K_v = \PGL_2(\mco_{F,v})$. It is easy to verify from this that

\[
[K_3\beta K_2]*\left[
\end{pmatrix}K_1
\right] = \left[K_3\beta \begin{pmatrix}
\end{pmatrix}K_1\right]
\]

\[
\left[K_3\begin{pmatrix}
\end{pmatrix} K_2\right]*\left[
K_2\alpha K_1
\right] = \left[K_3 \begin{pmatrix}
\end{pmatrix}\alpha K_1\right]
\]

It follows that $w_v^2 = 1$ for all $v$ and $w_{v}w_{v'} = w_{v'}w_v$ for any $v$ and $v'$. Moreover by definition, $w_v = 1$ whenever $K_v = \PGL_2(\mco_{F,v})$ (and hence in particular, $w_v = 1$ for $v\not\in S$). Hence the operator $w_K = \prod_{v\in S}w_v\in \End_{\dcat{\mco}}((C_{K})_\fm)$ is well-defined and independent of $S$. As $w_K^2 = 1$, $w_K$ is an automorphism in $\dcat{\mco}$. So now we may define an isomorphism $\varphi_K\colon (C_{K})_\fm\isomto (C_K)_\fm^\dagger$ by

\[
\varphi_K:(C_{K})_\fm\xrightarrow{w_K}(C_{K})_\fm\xrightarrow{\sim}(C_K)_\fm^\dagger
\]

where the second map is the isomorphism from Proposition <ref>.

Now we have the following:

The isomorphism $\varphi_K\colon (C_{K})_\fm\cong (C_{K})_\fm^{\dagger}$ commutes with the actions of all the Hecke operators $T_v$, $U_v$ and $\langle d\rangle_v$.

Moreover the adjoint of $[K_2\alpha K_1]\colon (C_{K_1})_\fm\to (C_{K_2})_\fm$ with respect to $\varphi_{K_1}$ and $\varphi_{K_2}$ is $w_{K_1}[K_1\alpha^{-1} K_2]w_{K_2}\colon (C_{K_2})_\fm\to (C_{K_1})_\fm$.

The last claim is immediate from Proposition <ref> and the definition of $\varphi_K$.

For the first claim, we have $w_KT_vw_K = T_v$ for $v\not\in S$ by the definition of $w_K$. The fact that $U_v$ and $\langle d\rangle_v$ are self adjoint now follows from the observation that

\begin{align*}
\begin{pmatrix}
\end{pmatrix}
\begin{pmatrix}
\end{pmatrix}^{-1}
\begin{pmatrix}
\end{pmatrix}
\begin{pmatrix}
\end{pmatrix}
\begin{pmatrix}
\end{pmatrix}
\begin{pmatrix}
\end{pmatrix}\\
\begin{pmatrix}
\end{pmatrix} \\
\begin{pmatrix}
\end{pmatrix}
\end{align*}

in $\PGL_2(F_v)$, for any $a,d\in F_v^\times$.

§.§ Level lowering maps

For this subsection fix a compact open $K = \prod_v K_v$ in the above form and a place $v$ for which $K_v = \PGL_2(\mco_{F,v})$. Write $L = K\cap K_0(v)$. Define two maps $\pi_1,\pi_2\colon (C_{L})_\fm \to (C_{K})_\fm$ by

\[
\pi_1 = \left[K\begin{pmatrix}
\end{pmatrix}L
\right] \quad \text{and}\quad \pi_2=\left[K\begin{pmatrix}
\varpi_v&0\\0&1
\end{pmatrix}L
\right]
\]

and write $\pi_{K,v} = \pi_1\oplus \pi_2:(C_{L})_\fm \to (C_{K})_\fm^{\oplus 2}$.

Let $\pi_{K,v}^\dagger\colon (C_{K})_\fm^{\oplus 2}\to (C_{L})_\fm$ be the adjoint of $\pi_{K,v}$ with respect to $\varphi_K$ and $\varphi_L$. An easy computation using Proposition <ref> gives:

We have

\[\pi_{K,v}\circ \pi^\dagger_{K,v} = \begin{pmatrix}
\Nm(v)+1&T_v\\
\end{pmatrix}\in \End_{\dcat{\mco}}((C_{K})_\fm^{\oplus 2})\]

and $\pi^\dagger_{K,v}\circ \pi_{K,v} = U_v^2-1\in \End_{\dcat{\mco}}((C_{L})_\fm)$.

Also we have

We have

\[
\pi_{K,v}\circ U_v = \begin{pmatrix}
\end{pmatrix}
\circ \pi_{K,v}
\]

as morphisms $(C_{L})_\fm \to (C_{K})_\fm^{\oplus 2}$.

§.§ $\TT_\Sigma$ and $\TT_{\Sigma,Q}$

Pick disjoint finite sets $T$ and $Q$ of places of $F$ satisfying the conditions from Section <ref> (which in particular imply that every element of $T$ and $Q$ is prime to $\mcn_\es$).

For any subset $\Sigma\subseteq T$ let $\mcn_\Sigma = \mcn_\es\prod_{v\in\Sigma}v$, where $\mcn_\es$ is as above. From now on assume that $T\cup Q\subseteq S$, and $S$ contains all primes dividing $\mcn_\es$ and the place $t$.
For any $\Sigma\subseteq T$, define $K_\Sigma = K_0(\mcn_\Sigma)$ and $K_{\Sigma,Q} = K_0(\mcn_\Sigma)\cap K_\Delta(Q)$. Note that $K_{\Sigma,\es} = K_\Sigma$.

Consider the Hecke algebras $\TT^S(K_\Sigma)$ and $\TT^S(K_{\Sigma,Q})$. Let $\fm\subseteq \TT^S(K_0(\mcn_\es))$ be a non-Eisenstein maximal ideal. Assume further that $\rhobar_{\fm}|_{G_{F(\zeta_\ell)}}$ is absolutely irreducible.

Again, for any compact open $K\subseteq K_0(\mcn_\Sigma)$, let $\fm\subseteq \TT^S(K)$ denote the preimage of $\fm$. Write $\TT_\Sigma =\TT^S(K_\Sigma)_\fm$ and $\TT_{\Sigma,Q} =\TT^S(K_{\Sigma,Q})_\fm$.

Now define the full Hecke algebras:

\begin{align*}
\fullT^S(K_\Sigma) &= \TT^S(K_\Sigma)[\{U_v\}_{v\in\Sigma}]\subseteq \End_{\dcat{\mco}}(C_{K_\Sigma})\\
\fullT^S(K_{\Sigma,Q}) &= \TT^S(K_\Sigma)[\{U_v\}_{v\in\Sigma\cup Q},\{\langle d\rangle_v\}_{v\in Q,d\in \Delta_v}]\subseteq \End_{\dcat{\mco}}(C_{K_{\Sigma,Q}}).
\end{align*}

These are  commutative $\mco$-algebras, finite over $\TT^S(K_\Sigma)$ and $\TT^S(K_{\Sigma,Q})$. Again note that $\fullT^S(K_{\Sigma,\es}) = \fullT^S(K_{\Sigma})$.
We define ideals  $\fm_{\Sigma,Q}\subseteq \fullT^S(K_{\Sigma,Q})$ lying over $\fm\subseteq \TT^S(K_{\Sigma,Q})$ by specifying  that
$U_v-\epsilon_v$ (for $v \in \Sigma$) and $U_v-\gamma_{1,v}$ (for $v \in Q$)  are in $\fm_{\Sigma,Q}$.   Then it is easy to see that these are indeed maximal ideals and that the ideal $\fm_{\Sigma,Q}\subseteq \fullT^S(K_{\Sigma,Q})$ lies over the ideal $\fm_{\Sigma,\es}\subseteq \fullT^S(K_{\Sigma})$ and for $\Sigma_1\subseteq \Sigma_2$, the ideal $\fm_{\Sigma_2,Q}\subseteq \fullT^S(K_{\Sigma_2,Q})$ lies over the ideal $\fm_{\Sigma_1,Q}\subseteq \fullT^S(K_{\Sigma_1,Q})$.

The following conjecture  asserts that the Galois representations of Conjecture <ref> satisfy local-global compatibility. Many cases of this conjecture (up to the issue of going modulo a nilpotent ideal) are known from <cit.>).

For any $\Sigma$ and $Q$, the representations $\rho_{\Sigma,Q}\colon G_F\to \GL_2(\TT_{\Sigma,Q})$  stemming from Conjecture <ref>    arise from  the corresponding universal representation  $G_F \to \GL_2( R_{\Sigma,Q})$ via maps $R_{\Sigma,Q}\onto \TT_{\Sigma,Q}$  and satisfy the following properties:

* $\tr\rho_{\Sigma,Q}(\Frob_v) = T_v$ for all $v\not\in S\cup\Sigma\cup Q \cup \{t\}$.

* If $R_{\Sigma,Q}$ is given the $\mco[\Delta_Q]$ structure arising from Proposition <ref>, then  the composition of  maps  $R_{\Sigma,Q}\onto \TT_{\Sigma,Q} \to \fullT^S(K_{\Sigma,Q})_{\fm_{\Sigma,Q}} $ is an $\mco[\Delta_Q]$-algebra homomorphism. Furthermore $\chi_{1,v}(\varphi_v)$ maps to $U_v$ for $v \in Q$ for a suitable lift $\varphi_v$ of $\Frob_v$.

* For $v\in\Sigma$, the image of the element $B_v\in R_v^\square$ (respectively,  $B_v\in R_v^{{\rm uni}(\epsilon_v)}$ when $q_v $ is $ -1$ mod $\ell$)   under the map

\[
R_v^\square\into R_{\Sigma,\loc}\to R_\Sigma^\square \onto \TT_\Sigma^\square
\]

\[
R_v^{{\rm uni}(\epsilon_v)}\into R_{\Sigma,\loc}\to R_\Sigma^\square \onto \TT_\Sigma^\square
\]

when $q_v$ is $-1$ mod $\ell$)   is equal to $\epsilon_vU_v-1\in \TT_\Sigma\subseteq \TT_\Sigma^\square$.

* The diagrams

\[
\begin{tikzcd}
R_{\Sigma,Q} \arrow[twoheadrightarrow]{d} \arrow[twoheadrightarrow]{r} & \TT_{\Sigma,Q} \arrow[twoheadrightarrow]{d}  \\
R_{\Sigma} \arrow[twoheadrightarrow]{r} & \TT_{\Sigma}
\end{tikzcd}
\]

\[
\begin{tikzcd}
R_{\Sigma_2,Q} \arrow[twoheadrightarrow]{d} \arrow[twoheadrightarrow]{r} & \TT_{\Sigma_2,Q} \arrow[twoheadrightarrow]{d}  \\
R_{\Sigma_1,Q} \arrow[twoheadrightarrow]{r} & \TT_{\Sigma_1,Q}
\end{tikzcd}
\]

(for $\Sigma_1\subseteq \Sigma_2\subseteq T$) commute.

Note that the assumption that $\TT_{\Sigma,Q}$ is a quotient of $R_{\Sigma,Q}$ implies that $\rho_{\Sigma,Q}$ satisfies all of the necessary local-global compatibility assumptions (such as the fact that it is flat at all primes $v|\ell$).

We have that  $\fullT^S(K_{\Sigma,Q})_{\fm_{\Sigma,Q}} = \TT^S(K_{\Sigma,Q})_\fm = \TT_{\Sigma,Q}$.

This follows from the above Conjecture <ref> as from it we see that $U_v, v \in \Sigma \cup Q$ and $ \{\langle d\rangle_v\}_{v\in Q,d\in \Delta_v}\subseteq \End_{\dcat{\mco}}(C_{K_{\Sigma,Q}})$ belong to $\TT_{\Sigma,Q}$.

We will write $\fm_\Sigma = \fm_{\Sigma,\es}$. Lemma <ref> implies that we may now treat $U_v$ for $v\in\Sigma\cup Q$ and $\langle d\rangle_v$ for $v\in Q$ and $d\in\Delta_v$ as elements of $\TT_{\Sigma,Q}$. In particular there is now a natural $\mco$-algebra homomorphism $\mco[\Delta_Q] = \otimes_{v\in Q}\mco[\Delta_v]\to \TT_{\Sigma,Q}$, given by $d\mapsto \langle d\rangle_v$ for $d\in\Delta_v$, and so we may view $\TT_{\Sigma,Q}$ as a $\mco[\Delta_Q]$-algebra.

Define the complexes $C_\Sigma = (C_{K_\Sigma})_{\fm_\Sigma}$ and $C_{\Sigma,Q} = (C_{K_{\Sigma,Q}})_{\fm_{\Sigma,Q}}$ in $\dcat{\mco}$. Note that these are not the same as the complexes $(C_{K_\Sigma})_{\fm}$ and $(C_{K_{\Sigma,Q}})_{\fm}$, as we are localizing with respect to the action of a larger ring.
In particular we naturally have $C_\Sigma \in \rdcat{\mco}{\TT_\Sigma}$ and $C_{\Sigma,Q}\in \rdcat{\mco}{\TT_{\Sigma,Q}}$.

For each $\Sigma\subseteq T$ and each $Q$ we have:

* The action $\mco[\Delta_Q]\to \TT_{\Sigma,Q}\to \End_{\dcat{\mco}}(C_{\Sigma,Q})$ gives $C_{\Sigma,Q}$ the structure of a perfect complex of $\mco[\Delta_Q]$-modules.

* $\TT_{\Sigma,Q}\otimes_{\mco[\Delta_Q]}\mco\cong \TT_\Sigma$

* $C_{\Sigma,Q}\lotimes_{\mco[\Delta_Q]}\mco\cong C_{\Sigma}$ in $\rdcat{\mco}{\TT_{\Sigma}}$.

This is proved in  <cit.> in a more general context. It is also proved (for $\GL_2$) in <cit.>.

Now fix $v\in T\sm \Sigma$ and consider the map

\[
\pi_{K,v} = \pi_1\oplus \pi_2\colon (C_{K_{\Sigma \cup \{v\},Q}})_{\fm_{\Sigma,Q}} \lra (C_{K_{\Sigma,Q}})_{\fm_{\Sigma,Q}}^{\oplus 2}
\]

arising from Section <ref> (for $K=K_{\Sigma,Q}$, after localizing at $\fm_{\Sigma,Q}$).  We claim that this induces a map  $\pi_v\colon C_{\Sigma\cup\{v\},Q}\to C_{\Sigma,Q}$. To see this we consider the operator

\[
\begin{pmatrix}
\end{pmatrix}
\]

that we call $U_v'$, acting on  $(C_{K_{\Sigma,Q}})_{\fm_{\Sigma,Q}}^{\oplus 2}$. Consider the maximal ideal $\fm'_{\Sigma,Q}$ of

\[
\TT_{\Sigma,Q}[U_v']/(U_v'^2-T_vU'_v+\Nm(v))
\]

acting on     $(C_{K_{\Sigma,Q}})_{\fm_{\Sigma,Q}}^{\oplus 2}$, that extends the maximal ideal $\fm_{\Sigma,Q}$ and is given by $(\fm_{\Sigma,Q},U'_v-  \epsilon_v)$. We consider the localization of  $(C_{K_{\Sigma,Q}})_{\fm_{\Sigma,Q}}^{\oplus 2}$ at $\fm'_{\Sigma,Q}$. This is isomorphic as a $\TT_{\Sigma,Q}$ module to  $C_{\Sigma,Q}$. Thus we get  a Hecke equivariant  (for the $\TT_{\Sigma \cup \{v\},Q}$-action) map  $\pi_v\colon C_{\Sigma\cup\{v\},Q}\to C_{\Sigma,Q}$. It also induces an adjoint map $\pi_v^\dagger\colon C_{\Sigma,Q} \to C_{\Sigma\cup\{v\},Q}$. (See <cit.> for similar arguments.)

Proposition <ref> gives the following:

There is a family of isomorphisms

\[
\varphi_{\Sigma,Q}\colon C_{\Sigma,Q}\isomto C_{\Sigma,Q}^\dagger
\]

in $\rdcat{\mco}{\TT_{\Sigma,Q}}$ compatible with the isomorphisms $C_{\Sigma,Q}\lotimes_{\mco[\Delta_Q]}\mco\cong C_{\Sigma}$.

Moreover for each $v\in T\sm\Sigma$, if $\pi_v^\dagger:C_{\Sigma,Q}\to C_{\Sigma\cup\{v\},Q}$ is the adjoint of

\[
\pi_v\colon C_{\Sigma\cup\{v\},Q}\to C_{\Sigma,Q}
\]

with respect to $\varphi_{\Sigma,Q}$ and $\varphi_{\Sigma\cup\{v\},Q}$, then

\begin{align*}
\pi_v\circ \pi_v^\dagger & \simeq  U_v^2-1 \in \End_{\dcat{\mco}}(C_{\Sigma,Q})&
\pi_v^\dagger\circ \pi_v & \simeq U_v^2-1 \in \End_{\dcat{\mco}}(C_{\Sigma\cup\{v\},Q}),
\end{align*}
where $\simeq$  means up to units.

Most of this follows immediately by localizing the results of Proposition <ref>. To see the last assertion above we can follow the proof of <cit.>. Namely we see that
\[  \pi_{K,v}  \circ  (U_v^2-1)= \begin{pmatrix}
\end{pmatrix}
\circ\begin{pmatrix}
\Nm(v)+1&T_v\\
\end{pmatrix} \circ \pi_{K,v}\]
as maps  $(C_{K_{\Sigma \cup \{v\},Q}})_{\fm}\to (C_{K_{\Sigma ,Q}})_{\fm}^{\oplus 2}$.

If $K\subseteq \PGL_2(\mbb{A}_F^{\infty})$ is any compact open subgroup and $\fm$ is a non-Eisenstein maximal ideal, then $\hh_i(X_K,k)_{\fm} = 0$ for $i\not\in [r_1+r_2,r_1+2r_2]$.

This  conjecture is known when $F$ is an imaginary quadratic field  as then $X_K$ is a 3-dimensional manifold and  $\hh_i(X_K,k)_{\fm} = 0$ for $i=0,3$ (as $\fm$ is a non-Eisenstein maximal ideal).

§.§ Level raising and Ihara's Lemma

Let $K$ and $v$ be as in Section <ref>, and assume that $\fm\subseteq \TT^S(K)$ is a non-Eisenstein maximal ideal. Let $\pi_{K,v}\colon (C_{K\cap K_0(v)})_\fm\to (C_K)_\fm^{\oplus 2}$ be the level lowering map.

Then the induced map

\[\hh_{r_1+r_2}(\pi_{K,v})\colon \hh_{r_1+r_2}(Y_{K\cap K_0(v)},\mco)_\fm \to \hh_{r_1+r_2}(Y_{K},\mco)_\fm^{\oplus 2}\]

is surjective.

Note that by Conjecture <ref>, $\hh_{i}(Y_{K},\mco)_\fm=0$ for $i<r_1+r_2$, and so Conjecture <ref> concerns the smallest degree in which the homology $\hh_{*}(Y_{K},\mco)_\fm$ does not vanish.

As the map $\pi_v\colon C_{\Sigma\cup\{v\},Q}\to C_{\Sigma,Q}$ constructed above is a localization of the map $\pi_{K_{\Sigma,Q},v}$, we get:

If Conjecture <ref> holds for $K = K_{\Sigma,Q}$ then the map

\[
\hh_{r_1+r_2}(\pi_v)\colon \hh_{r_1+r_2}(C_{\Sigma\cup\{v\},Q})\to \hh_{r_1+r_2}(C_{\Sigma,Q})
\]

is surjective.

When $F$ is an imaginary quadratic field, Conjecture <ref> is true. Namely  the map $\hh_1(\pi_{K,v})\colon \hh_{1}(Y_{K\cap K_0(v)},\mco)_\fm \to \hh_{1}(Y_{K},\mco)_\fm^{\oplus 2}$  is surjective.

This is well known, see <cit.> or <cit.>  for example. It is a consequence of the congruence subgroup property of $\SL_2(\mco_F[\frac{1}{v}])$ for $F$ an imaginary quadratic field.

§ APPLICATIONS TO INTEGRAL MODULARITY LIFTING

In this section we apply the results from Part <ref> in order to prove $R=\TT$ theorems in non-minimal cases. The essential strategy is the same as the arguments given in <cit.> and <cit.>. Namely, one first proves the result in the minimal level case via patching — in our case the relevant patching result is already known, see <cit.>. One then proceeds by induction on the level, using Ihara's Lemma to control the growth of congruence modules, and then using the numerical criterion to prove the isomorphism $R_\Sigma=\TT_\Sigma$.

The key difference in our approach is that we apply the inductive argument and the numerical criterion directly to the patched modules $M_{\Sigma,\infty}$, rather than applying them to the global deformation rings and Hecke algebras. This allows us to sidestep many of the complications that arise by working over non totally real fields (the “$\ell_0>0$” case) as the patched situation over arbitrary number fields behaves quite similarly to that over $\mbb Q$. This modification to the argument is what necessitates working with congruence modules in higher codimension.

In both minimal and non-minimal cases the patched modules $M_{\Sigma,\infty}$ are known to be maximal Cohen–Macaulay over the corresponding patched deformation rings $R_{\Sigma,\infty}$. In the minimal case (i.e. $\Sigma=\es$) $R_{\es,\infty}$ is a power series ring, which is well-known to imply $M_{\es,\infty}$ is free, giving our base case. However in the non-minimal case our patched rings $R_{\Sigma,\infty}$ are not power series rings, and have multiple components (although they are quite nice and easy to describe, and in particular are complete intersections in our case). This causes difficulty in analyzing the structure of patched modules in the non-minimal case purely via patching.

We show by induction on $\Sigma$, using our version of the numerical criterion, Theorem <ref> (although for our purposes Theorem <ref> is sufficient, as we already know that relevant local deformation rings are complete intersections), that each $M_{\Sigma,\infty}$ has a free direct summand. The desired statement about global deformation rings and Hecke algebras (Theorem <ref>) follows immediately from this.

Proposition <ref>, together with Theorem <ref>, provides the necessary generalization of the growth of congruence modules argument of loc. cit., provided one assumes the version of Ihara's Lemma given in Conjecture <ref> (which is known in the case of Bianchi manifolds by Theorem <ref>).

One should note that the augmentation $\lambda\colon R_{\Sigma,\infty}\onto \mco$ which we define below in order to apply our numerical criterion is picked essentially arbitrarily, and need have no relation to the global deformation rings and Hecke algebras. This means in particular that our method does not need to distinguish between the cases where the ring $\TT$ has characteristic $0$ points and the case when it does not.

One slight complication that arises in our argument, compared to that of loc. cit., is that we have no direct control over the generic rank of the patched modules $M_{\Sigma,\infty}$, unless the Hecke algebra $\TT_\Sigma$ has at least one characteristic $0$ point lying on each component of $\operatorname{Spec} R_{\Sigma,\infty}$. Fortunately Theorem <ref> needs no assumption about the generic rank of the module (in contrast to <cit.>), so this does not present an issue for our main application to proving $R=\TT$. This does however prevent us from proving an analogue of the `multiplicity one' result of <cit.>—instead we can only prove the weaker statement in Theorem <ref>. Note that this issue is already present in <cit.>, although it is somewhat more severe in our case as $\operatorname{Spec} R_{\Sigma,\infty}$ has multiple components and one cannot conclude that $M_{\Sigma,\infty}$ has the same generic rank on each component.

Let $\rhobar_\fm$, $T$ and $\mcn_\Sigma$ be as in Section <ref>. Our main result is the following:

Assume Conjectures <ref>, <ref>, <ref> and <ref> hold over $F$. Let $\fm$ be a non-Eisenstein maximal ideal of $\TT(K_0(\mcn_\es))$ such that $N(\rhobar_\fm) = \mcn_\es$ and $\rhobar_\fm|_{G_{F(\zeta_\ell)}}$ is absolutely irreducible. Then there exists an integer $\mu\ge 1$ such that for each $\Sigma\subseteq T$ there exists an $R_\Sigma$-module $W_\Sigma$ and an isomorphism of $R_\Sigma$-modules

\[
\hh_{r_1+r_2}(Y_0(\mcn_\Sigma),\mco)_{\fm_\Sigma}\cong R_\Sigma^\mu \oplus W_\Sigma\,.
\]

In particular, $R_\Sigma$ acts faithfully on $\hh_{r_1+r_2}(Y_0(\mcn_\Sigma),\mco)_{\fm_\Sigma}$ and so the map $R_\Sigma\onto \TT_\Sigma$ from Conjecture <ref> is an isomorphism for all $\Sigma$.

This result is deduced from Theorem <ref> below.  From now on we assume Conjectures <ref>, <ref>, <ref> and <ref>. As in Section <ref>, let $S$ be the set of all finite places of $F$ where either $\rhobar_\fp|_{G_{F_v}}$ ramifies or $v|\ell$. Let $j = 4|S\cup T|-1$, so that for all $\Sigma$ and $Q$ one has

\[
R_\Sigma^\square = R_\Sigma\pos{w_1,\ldots,w_j} \quad\text{and}\quad R_{\Sigma,Q}^\square = R_{\Sigma,Q}\pos{w_1,\ldots,w_j}\,.
\]

The  result below from <cit.> allows us to construct sets of Taylor–Wiles primes $Q_n$:

Assume that $\rhobar_\fm|_{F(\zeta_\ell)}$ is absolutely irreducible. Then there exist integers $r,g\ge 1$ such that for all integers $n\ge 1$ there is a set of finite places $Q_n$ of $F$ for which:

* $|Q_n| = r$;

* $Q_n\cap (S\cup T) = \es$;

* $\Nm(v)\equiv 1\pmod{\ell^n}$ for each $v\in Q_n$;

* $\rhobar_\fm$ is unramified at $v$ and $\rhobar_\fm(\Frob_v)$ has distinct eigenvalues in $k$ for each $v\in Q_n$;

* The map $R_{\loc,T}\to R_{T,Q_n}^\square$ extends to a surjection

\[
R_{\loc,T}\pos{x_1,\ldots,x_g}\onto R_{T,Q_n}^\square
\]

thus inducing compatible surjections $R_{\loc,\Sigma}\pos{x_1,\ldots,x_g}\onto R_{\Sigma,Q_n}^\square$ for  $\Sigma\subseteq T$.

Moreover we have

\[
\dim R_{T,\loc}\pos{x_1,\ldots,x_g} = \dim R_{T,\loc} + g = (1+j+r)-r_2\,.
\]

Now for each $\Sigma\subseteq T$ let $R_{\Sigma,\infty} = R_{\Sigma,\loc}\pos{x_1,\ldots,x_g}$. Also let

\[
S_\infty = \mco\pos{{\bs y},{\bs w}}=\mco\pos{y_1,\ldots,y_r,w_1,\ldots,w_j}
\]

so that $\dim R_{\Sigma,\infty} = \dim S_\infty - r_2$ for all $\Sigma$. For $v\in \Sigma$, let $A_v,B_v\in R_v^\square\subseteq R_{\Sigma,\infty}$  if $q_v \not\equiv -1\pmod{\ell}$, and
$A_v,B_v\in R_v^{{\rm uni}(\epsilon_v)} \subseteq R_{\Sigma,\infty}$  if $q_v \equiv -1\pmod{\ell}$,  be as in Proposition <ref>, so that $R_{\Sigma\cup\{v\},\infty}/(A_v) = R_{\Sigma,\infty}$.

Write $c = j+r-r_2$, so that $\dim R_{\Sigma,\infty} = c+1$ for all $\Sigma$.

For any $n\ge 1$, let $\Lambda_n=\mco\pos{\Delta_{Q_n}}$. Since $|Q_n| = r$, $\Delta_{Q_n}$ is isomorphic to $\prod_{i=1}^r (\mbb Z/\ell^{e(i,n)}\mbb Z)$ for some integers $e(i,n)\ge n$. Thus we may write $\Lambda_n = \mco\pos{{\bs y}}/I_n$ for some ideal $I_n\subseteq \mco\pos{{\bs y}}$ as in Section <ref>.

Now let $R_{\Sigma,n} = R_{\Sigma,Q_n}$ and $C_{\Sigma,n} = C_{\Sigma,Q_n}$. Also let $R_{\Sigma,0} = R_\Sigma$ and $C_{\Sigma,0} = C_{\Sigma}$. Note that we may regard $C_{\Sigma,n}$ as an element of $\rdcat{\Lambda_n}{R_{\Sigma,n}}$ via the composition $R_{\Sigma,n}\onto \TT_{\Sigma,Q_n}\into \End_{\dcat{\Lambda_n}}(C_{\Sigma,n})$. Let $\alpha_{\Sigma,n}$ be the isomorphism

\[
C_{\Sigma,n}\lotimes_{\Lambda_n}\mco\isomto C_{\Sigma,0}
\]

from Proposition <ref>. Again taking $d = r_1+r_2$ and $\ell_0 = r_2$, recall that Conjecture <ref> implies that $\hh_*(C_{\Sigma,n})$ vanishes outside of $[d,d+\ell_0]$.

The work of Section <ref> gives the following:

For each $\Sigma\subseteq T$ the tuple ${\perfs C}_\Sigma= \left(C_{\Sigma,n},\alpha_{\Sigma,n}\right)_{n\geqslant 0}$ is a patching system. Moreover there is an isomorphism ${\perfs C}_\Sigma^\vee\cong {\perfs C}_\Sigma$ of patching systems.

Now for any $\Sigma\subseteq T$ let $M_{\Sigma,\infty} = \patch({\perfs C}_\Sigma)$. By Theorems <ref> and <ref> each $M_{\Sigma,\infty}$ is a self-dual maximal Cohen–Macaulay $R_{T,\infty}$-module. Also by construction the action of $R_{T,\infty}$ on $M_{\Sigma,\infty}$ factors through $R_{\Sigma,\infty}$.

Moreover (after picking an appoperiate homomorphism $S_\infty\to R_{T,\infty}$ as in Theorem <ref>) we have $R_{\Sigma,\infty}\otimes_{S_\infty}\mco\cong R_\Sigma$ and $M_{\Sigma,\infty}\otimes_{S_\infty}\mco\cong \hh_d(C_{\Sigma})$.

Theorem <ref> will thus follow from the following:

There is an integer $\mu\ge 1$ such that for each $\Sigma\subseteq T$ there is an isomorphism $M_{\Sigma,\infty}\cong R_{\Sigma,\infty}^\mu\oplus W_{\Sigma,\infty}$ for some $R_{\Sigma,\infty}$-module $W_{\Sigma,\infty}$.

Now Proposition <ref>, Theorem <ref> and Lemma <ref> give:

For each $\Sigma\subseteq T$ and each $v\in T\sm\Sigma$ the family of maps $\pi_v\colon C_{\Sigma\cup\{v\},n}\to C_{\Sigma,n}$ induces a morphism ${\perfs C}_{\Sigma\cup\{v\}}\to {\perfs C}_\Sigma$ and hence a $R_{T,\infty}$-module homomorphism $\pi_v\colon M_{\Sigma\cup\{v\},\infty}\to M_{\Sigma,\infty}$.

Moreover (assuming Conjecture <ref>), the map $\pi_v\colon M_{\Sigma\cup\{v\},\infty}\to M_{\Sigma,\infty}$ is surjective, and if $\pi_v^\vee\colon M_{\Sigma,\infty}\to M_{\Sigma\cup\{v\},\infty}$ is the dual map, induced by the self-duality of $M_{\Sigma,\infty}$ and  $M_{\Sigma\cup\{v\},\infty}$, then  for some units $u_v,u'_v\in R_{T,\infty}^\times$ we have

\[
\pi_v\circ \pi_v^\vee = u_vB_v\in R_{T,\infty}\quad\text{and}\quad \pi_v^\vee\circ\pi_v = u'_vB_v\in R_{T,\infty}\,.
\]

This is mostly automatic from Proposition <ref>, Theorem <ref> and the work in Section <ref>. The surjectivity of $\pi_v$ follows from Lemma <ref> and Nakayama's Lemma. Lastly, under the map $R_v^\square\into R_{T,\infty}\onto R_\Sigma^\square \onto \TT_\Sigma^\square$  when $q_v\not\equiv-1\pmod{\ell}$ (respectively, $R_v^{{\rm uni}(\epsilon_v)}\into R_{T,\infty}\onto R_\Sigma^\square \onto \TT_\Sigma^\square$  when $q_v\equiv-1\pmod{\ell}$), $B_v$ maps to $\epsilon_v U_v-1$ by Conjecture <ref>(3) which means that $B_v(2+B_v)$ maps to

\[
(\epsilon_v U_v-1)(\epsilon_v U_v+1) = (\epsilon_v U_v)^2-1 = U_v^2-1
\]

(as $\epsilon_v=\pm 1$). Since $2+B_v\in R_{T,\infty}^\times$, as $B_v\in \fm_{R_{T,\infty}}$ and $2\in \mco^\times$ the claims about $\pi_v\circ \pi_v^\vee$ and $\pi_v^\vee\circ\pi_v$ follow from Proposition <ref>.

Now pick an augmentation $\lambda\colon R_{T,\infty}\onto R_{\es,\infty}\onto \mco$ such that $\lambda(A_v) = 0$ and $\lambda(B_v)\ne 0$ for all $v\in T$. It follows that each $R_{\Sigma,\infty}$ is regular at $\fp\colonequals \Ker\lambda$, and so $(R_{\Sigma,\infty},\lambda) \in \acat(c)$. Let $\mu = \rank_\fp M_{\es,\infty}$. (Note that $M_{\es,\infty}\ne 0$ as $(C_{K_0(\mcn_\es)})_{\fm}\ne 0$ by the choice of $\fm$, and so $\mu\ge 1$.)

For each $\Sigma\subseteq T$ and each $v\in T\sm\Sigma$ the map

\[
\pi_v\colon M_{\Sigma\cup\{v\},\infty}\lra M_{\Sigma,\infty}
\]

is an isomorphism at $\fp$. In particular, $\rank_\fp M_{\Sigma,\infty} = \mu$ for all $\Sigma$.

Looking on lowest degree homology, $\pi_v$ induces a surjective map

\[
\hh_d(\pi_{v})\colon \hh_d(C_{\Sigma\cup\{v\},n})\to \hh_d(C_{\Sigma,n})
\]

for each $n\ge 0$. Let $K_n = \Ker \hh_d(\pi_{v})\subseteq \hh_d(C_{\Sigma\cup\{v\},n})$.

Since the $\pi_v^\dagger\circ \pi_v\colon C_{\Sigma\cup\{v\},n}\to C_{\Sigma\cup\{v\},n}$ equals $u_v'B_v$ functorality yields

\[
B_vK_n = u_v'B_vK_n = (\hh_d(\pi_v^\dagger)\circ \hh_d(\pi_v))(K_n) = \hh_d(\pi_v^\dagger)(\hh_d(\pi_{v})(K_n)) = 0
\]

for all $n$.  Now for each open ideal $\fa\subseteq S_\infty$, we get the exact sequence

\[
K_n/\fa\to \hh_d(C_{\Sigma\cup\{v\},n})/\fa\xrightarrow{\hh_d(\pi_v)} \hh_d(C_{\Sigma,n})/\fa \to 0
\]

for each $n$. Now by the construction of $M_{\Sigma,\infty}$ for infinitely many $n$ we have isomorphisms $M_{\Sigma\cup\{v\},\infty}/\fa\cong \hh_d(C_{\Sigma\cup\{v\},n})/\fa$ and $M_{\Sigma,\infty}/\fa\cong \hh_d(C_{\Sigma,n})/\fa$ identifying the map $\hh_d(\pi_v)$ with $\pi_v\colon M_{\Sigma\cup\{v\},\infty}/\fa\to M_{\Sigma,\infty}/\fa$. Thus for any such $\fa$ we get an exact sequence

\[
0\to \mck_\fa\to M_{\Sigma\cup\{v\},\infty}/\fa\xrightarrow{\pi_v} M_{\Sigma,\infty}/\fa\to 0,
\]

where $\mck_\fa$ is a quotient of $K_n$ for infinitely many $n$. In particular, $B_v$ also vanishes on $\mck_\fa$.

Now for $\fb\subseteq\fa$, by comparing the sequences for $\fa$ and $\fb$, we get that $\mck_\fb/\fa$ surjects onto $\mck_\fa$, and so $\{\mck_\fa\}_\fa$ is an inverse system, fitting into an exact sequence

\[
0\to \{\mck_\fa\}_\fa\to \{M_{\Sigma\cup\{v\},\infty}/\fa\}_{\fa}\to \{M_{\Sigma,\infty}/\fa\}_{\fa}\to 0.
\]

Since all of the above modules are finite (since they are finitely generated over the finite ring $S_\infty/\fa$) and inverse limits are exact on the category of inverse systems of finite groups, this gives

\[
0\to \invlim_\fa \mck_\fa\to M_{\Sigma\cup\{v\},\infty}\xrightarrow{\pi_v}M_{\Sigma,\infty}\to 0
\]

Since $B_v$ vanishes on each $\mck_\fa$, this means that it vanishes on $\mck\colonequals \invlim_\fa \mck_\fa$. As $B_v\not\in\fp =\Ker \lambda$ by the choice of $\lambda$, that means that $\mck_\fp = 0$, and so $\pi_v$ is an isomorphism after localizing at $\fp$, as desired.

For any $\Sigma\subseteq T$ and $v\in T\sm\Sigma$, as $\pi_v\circ\pi_v^\vee = u_vB_v$ we get that the composition

\begin{align*}
&\xrightarrow{\pi_v}F_{R_{T,\infty}}^{c}(M_{\Sigma\cup\{v\},\infty}) \\
&\cong F_{R_{T,\infty}}^{c}(M_{\Sigma\cup\{v\},\infty}^\vee)\\
&\xrightarrow{\pi_v^\vee}F_{R_{T,\infty}}^{c}(M_{\Sigma,\infty}^\vee) \\
&\cong F_{R_{T,\infty}}^{c}(M_{\Sigma,\infty})
\end{align*}

is  multiplication by $\lambda(u_vB_v)$ and so as $F_{R_{T,\infty}}^{c}(M_{\Sigma,\infty})\cong \mco^\mu$, its determinant is $\lambda(u_v)^\mu\lambda(B_v)^\mu$.  As $u_v$ is a unit,  Proposition <ref> yields

\begin{align*}
\length_\mco \Psi_{R_{\Sigma\cup\{v\},\infty}}(M_{\Sigma\cup\{v\},\infty})
&= \length_\mco \Psi_{R_{\Sigma\cup\{v\},\infty}}(M_{\Sigma,\infty})+\nu_\mco(\lambda(u_v)^\mu\lambda(B_v)^\mu)\\
&= \length_\mco \Psi_{R_{\Sigma,\infty}}(M_{\Sigma,\infty})+\mu\cdot\nu_\mco(\lambda(B_v)).
\end{align*}

Since $R_{\es,\infty}$ is formally smooth and hence regular, we get that

\[
\Phi_{R_{\es,\infty}} = \Psi_{R_{\es,\infty}}(M_{\es,\infty}) = 0\,.
\]

It now follows by induction that

\[
\length_\mco \Psi_{R_{\Sigma,\infty}}(M_{\Sigma,\infty}) = \mu\sum_{v\in\Sigma}\nu_\mco(\lambda(B_v))
\]

for all $v\in\Sigma$.

On the other hand, by the work of Section <ref> and Proposition <ref>, one gets that $R_{\Sigma,\infty}$ is a power series ring over $\displaystyle\widehat{\bigotimes_{\substack{{v\in\Sigma},\\\ell\nmid(q_v+1)}}}R^\square_v
\widehat{\otimes}
\widehat{\bigotimes_{\substack{{v\in\Sigma},\\\ell|(q_v +1)}}}R_v^{{\rm uni}(\epsilon_v)}$. By Proposition <ref> it is thus a power series ring over

\[
\widehat{\bigotimes_{v\in\Sigma}}\mco\pos{A_v,B_v}/(A_vB_v)
\]

An easy computation now gives that

\[
\Phi_{R_{\Sigma,\infty}}\cong \prod_{v\in \Sigma}\left(\mco/\lambda(B_v)\mco\right)
\]

and so

\[
\length_\mco \Phi_{R_{\Sigma,\infty}} = \sum_{v\in\Sigma}\nu_\mco(\lambda(B_v)).
\]

Hence $\delta_{R_{\Sigma,\infty}}(M_{\Sigma,\infty}) = 0$ for all $\Sigma$.

As each $R_{\Sigma,\infty}$ is a complete intersection (and hence Gorenstein), Theorem <ref> now follows from Theorem <ref>.

§ ACKNOWLEDGEMENTS

This work is partly supported by National Science Foundation grant DMS-200985 (SBI), and  by a Simons Fellowship (CBK). It was written while the third author (JM) was at the Max Planck Institute for Mathematics in Bonn, and he thanks them for their support. We are grateful to Gebhard Böckle for detailed comments on an earlier version of this manuscript. We would  also like to thank Patrick Allen and Jack Thorne for helpful correspondence.

§ GLOSSARY

$\Art$     category of Artinian $\mco$-algebras, ssec:global def

$c$    the height of $\fp_A$, also known as codimension, ch:congruence-module

$\ecoh^i_A(M)$     the torsion-free quotient of $\Ext^i_A(\mco,M)$, pg:ecoh

$\cmod A(M)$    the congruence module attached to an $A$-module $M$, pg:cmod

$\CNLO$     category of complete local noetherian $\mco$-algebras, ssec:global def

$\acat$     category of pairs $(A,\lambda)$ with $\lambda\colon A\to\mco$ a surjective map in $\CNLO$ such that $A$ is regular at $\Ker(\lambda)$, pg:acat

$\acat(c)$     pairs $(A,\lambda)$ in $\acat$ with $\height \Ker(\lambda)=c$, pg:acat

$\con A$     the torsion part of the cotangent module of $\lambda\colon A\to \mco$, eq:conormal

$\delta_A(M)$     the Wiles defect of an $A$-module $M$, eq:defect

$\depth_AM$     the depth of an $A$-module $M$, se:depth

$\dcat A$    the derived category of $\rmod A$, pg:ecoh

$\dbcat A$    the bounded derived category of $\rmod A$, pg:ecoh

$\rdcat {\Lambda}R$     a category of $\Lambda$-complexes with derived $R$-action, ch:derived-action

$\mcd$     deformation conditions, ssec:global def

$\varepsilon_\ell$    the cyclotomic character, se:Galois

$\grade(I,M)$    the length of the longest $M$-regular sequence in $I$, se:depth

$\lambda_A(M)$    the map $M\to M\otimes_A\mco$, pg:cmod

$\rmod A$    the category of finitely generated $A$-modules, pg:ecoh

$I_{F_v}$    the inertia subgroup of prime $v$, ssec:local def

$P_{F_v}$    the wild inertia subgroup of a prime $v$, ssec:local def

$\Nm(v)$     norm of a prime $v$ in a number field, ssec:local def

$N(\rhobar)$     Artin conductor of $\rhobar$, R=T theorem

$\vf(v)$     lift of the Frobenius, ssec:local def

$\sigma_v$     a lift of the topological generator of $I_{F_v}/P_{F_v}$, ssec:local def

$\mco$     a discrete valuation ring, typically complete, se:congruence module

$\PatchSys$    a category of patching systems, ch:pasy

$\eta_M$     torsion-free quotient of a derived trace map, sse:defect

$\fp^{(2)}$    the second symbolic power of a prime ideal $\fp$, pg:symbolic

$\tors(U)$     the torsion submodule of an $\mco$-module $U$, ch:tors-remark

$\tfree U$     the torsion-free quotient of an $\mco$-module $U$, ch:tors-remark

$\omega_A$    the dualizing complex of $A$, suitably normalized, sse:dualizing

$\omega_A(M)$    the dual with respect of $\omega_A$ of a complex $M$, sse:dualizing

${\perfs C}^{\dagger}$    the dual of a patching system $\perfs C$, ch:patch-duality

$M^\vee$     the highest degree homology module of $\omega_A(M)$, eq:dual-cm

$M[I]$    the submodule of $M$ annihilated by the ideal $I$, se:intro

$[-]$    the suspension functor in any triangulated category, pg:ecoh

$\Sigma$     level raising primes, ssec:global def

$Q$     sets of  Taylor–Wiles primes, ssec:global def

$R_\Sigma$     global deformation ring with ramification at  places in $S$ and $\Sigma$, ssec:global def

$R_v^\square$     framed deformation ring at $v$, ssec:local def

$R^{\fl}_v$      finite flat deformation ring at $v|\ell$, ssec:local def

$R_{\loc,\Sigma}$     completed tensor product of local deformation rings, R_loc

$R_{\infty,\Sigma}$     power series ring over $R_{\loc,\Sigma}$, prop: TW primes

$\tau_M(R) $    the trace map on an $R$-module $M$, le:summands

$Y_K$     congruence manifold of level $K$, sse:manifolds

$C_K$     complex of singular chains on $Y_K$, sse:manifolds

$[K_2\alpha K_1]$     double coset operator, sse:double coset

$T_v,U_v,\langle d\rangle_v$     Hecke operators, sse:Hecke

$K_0(\mcn), K_1(\mcn), K_\Delta(\mcn)$     congruence subgroups of level $\mcn t^2$, sse:K_0(N)

$Y_0(\mcn),C_0(\mcn)$     congruence manifolds and chain complexes at level $K_0(\mcn)$, sse:K_0(N)

$Y_{0,\Delta}(\mcn,Q),C_{0,\Delta}(\mcn,Q)$     congruence manifolds and chain complexes at level $K_0(\mcn)\cap K_\Delta(Q)$, sse:K_0(N)

$\TT^S(K)$     Hecke algebra at level $K$, sse:Hecke

$\rhobar_\fm$     residual Galois representation corresponding to $\fm\subseteq \TT^S(K)$, rhobar conj

$\pi_{K,v}$     level lowering map, ssec: level lowering

$\pi_v$     localized level lowering map, sse:Sigma

$\TT_\Sigma,\TT_{\Sigma,Q}$     localizations of Hecke algebras, sse:Sigma

$K_\Sigma,K_{\Sigma,Q}$     shorthands for $K_0(\mcn_\Sigma)$ and $K_0(\mcn_\Sigma)\cap K_\Delta(Q)$, sse:Sigma

$\fullT^S(K_\Sigma),\fullT^S(K_{\Sigma,Q})$     full Hecke algebras, sse:Sigma

$C_{\Sigma},C_{\Sigma,Q}$     localizations of $C_{K_\Sigma}$ and $C_{K_{\Sigma,Q}}$, sse:Sigma