---
abstract: 'Let $F$ be a totally real field in which $p$ is unramified. Let ${\overline{r}}: G_F {\rightarrow}{\mathrm{GL}}_2(\overline{{\mathbb{F}}}_p)$ be a modular Galois representation which satisfies the Taylor–Wiles hypotheses and is generic at a place $v$ above $p$. Let ${\mathfrak{m}}$ be the corresponding Hecke eigensystem. Then the ${\mathfrak{m}}$-torsion in the mod $p$ cohomology of Shimura curves with full congruence level at $v$ coincides with the ${\mathrm{GL}}_2(k_v)$-representation $D_0({\overline{r}}|_{G_{F_v}})$ constructed by Breuil and Paškūnas. In particular, it depends only on the local representation ${\overline{r}}|_{G_{F_v}}$, and its Jordan–Hölder factors appear with multiplicity one. This builds on and extends work of the author with Morra and Schraen and independently of Hu–Wang, which proved these results when ${\overline{r}}|_{G_{F_v}}$ was additionally assumed to be tamely ramified. The main new tool is a method for computing Taylor–Wiles patched modules of integral projective envelopes using multitype tamely potentially Barsotti–Tate deformation rings and their intersection theory.'
author:
- Daniel Le
bibliography:
- 'multonewild.bib'
title: Multiplicity one for wildly ramified representations
---

Introduction
============

Let $F/{\mathbb{Q}}$ be a totally real field which is unramified at a rational prime $p$. Let ${\mathbb{F}}$ be a finite extension of ${\mathbb{F}}_p$. Suppose that ${\overline{r}}: G_F {\rightarrow}{\mathrm{GL}}_2({\mathbb{F}})$ is a Galois representation occuring in the ${\mathbb{F}}$-cohomology of a Shimura curve $X_{/F}$ with corresponding Hecke eigensystem ${\mathfrak{m}}$ (see §\[sec:main\]). Suppose that the corresponding quaternion algebra splits at $p$. Let $v$ is a place of $F$ dividing $p$, let $K^v$ be a compact open subgroup of $(D\otimes_F {\mathbb{A}}_F^{\infty,v})^\times$ and $K_v(n)$ the $n$-th principal congruence subgroup at $v$. One expects that the analogues of the mod $p$ local Langlands correspondence for ${\mathrm{GL}}_2({\mathbb{Q}}_p)$ and mod $p$ local-global compatibility for ${\mathrm{GL}}_2({\mathbb{Q}})$ describe the ${\mathrm{GL}}_2(F_v)$-representation $$\pi' = {\mathrm{Hom}}_{G_F}({\overline{r}},\varinjlim_n H^1(X(K^vK_v(n)),{\mathbb{F}})[{\mathfrak{m}}_{{\overline{r}}}])$$ in the completed cohomology of $X$, at least up to multiplicities, in terms of ${\overline{\rho}}{\stackrel{\textrm{\tiny{def}}}{=}}{\overline{r}}|_{G_{F_v}}$. In fact, we study a related representation $\pi = (M^{\mathrm{min}})^*$ (see §\[sec:main\]), which is minimal with respect to multiplicities. These analogues are unknown at present, although [@breuil; @EGS] show that if ${\overline{r}}$ satisfies the usual Taylor–Wiles hypotheses and ${\overline{\rho}}$ is generic, then $\pi$ contains one of infinitely many ${\mathrm{GL}}_2(F_v)$-representations constructed by [@BP]. The idea, as explained in [@breuil], behind the constructions in [@BP] is that if one can show that the restriction of $\pi$ to the maximal compact subgroup ${\mathrm{GL}}_2({\mathcal{O}}_{F_v})$ satisfies certain multiplicity one properties, then $\pi$ must contain a Diamond diagram of the form $D({\overline{\rho}},\iota)$. These multiplicity one properties, which one might view as minimalist conjectures, were established in [@EGS].

That the family of representations containing a diagram $D({\overline{\rho}},\iota)$ is infinite is unfortunate and warrants the further investigation of $\pi$. One part of a Diamond diagram $D({\overline{\rho}},\iota)$ is a ${\mathrm{GL}}_2(k_v)$-representation denoted $D_0({\overline{\rho}})$, which is a subrepresentation of $\pi|_{{\mathrm{GL}}_2({\mathcal{O}}_{F_v})}$ (see [@breuil Proposition 9.3]), and thus a subrepresentation of the invariants of $\pi$ under the first principal congruence subgroup $K_v(1)$ of ${\mathrm{GL}}_2({\mathcal{O}}_{F_v})$. Our main result is the following.

\[intro:mainthm\] If ${\overline{r}}$ satisfies the Taylor–Wiles hypotheses and ${\overline{\rho}}$ is generic $($see Definition \[def:gen\]$)$, then the ${\mathrm{GL}}_2(k_v)$-representation $\pi^{K_v(1)}$ is isomorphic to $D_0({\overline{\rho}})$. In particular, it only depends on ${\overline{\rho}}$ and is multiplicity free.

One can view this result as showing that $\pi$ satisfies a minimality property. A similar result has been announced by Hu–Wang.

The main tool in the proof of Theorem \[intro:mainthm\] is the Taylor–Wiles patching method. Diamond and Fujiwara [@D; @F] discovered that the Cohen–Macaulay property of patched modules could be combined with local algebra results of Auslander, Buchsbaum, and Serre to rederive and generalize mod $p$ multiplicity one results of Mazur for modular forms with level away from $p$. [@EGS] proved similar results for modular forms with level at $p$ by introducing two gluing methods to calculate patched modules from smaller ones to which the Diamond–Fujiwara trick applied. The first method is a version of Nakayama’s lemma and uses the submodule structure of mod $p$ reductions of Deligne–Lusztig representations. The second method combines the submodule structure above with the intersection theory of special fibers of tamely potentially Barsotti–Tate deformation rings.

When ${\overline{\rho}}$ is tamely ramified, [@HW; @LMS] show that the patched modules of projective envelopes of irreducible ${\mathbb{F}}[{\mathrm{GL}}_2(k_v)]$-modules are cyclic modules by describing the submodule structure of these projective envelopes and using the Nakayama method of [@EGS] (cf.  Proposition \[prop:oldcyc\]). However, the gluing methods of [@EGS] are insufficient when ${\overline{\rho}}$ is wildly ramified. Indeed, these methods only glue together characteristic $p$ patched modules, but there is more than one isomorphism class of ${\mathbb{F}}[{\mathrm{GL}}_2(k_v)]$-modules satisfying the multiplicity one properties for $\pi^{K_v(1)}$ established by [@EGS] when ${\overline{\rho}}$ is wildly ramified.

We introduce a variant of the intersection theory method of [@EGS], which uses the intersection theory of integral tamely potentially Barsotti–Tate deformation rings. Let $W({\mathbb{F}})$ denote the Witt vectors of ${\mathbb{F}}$. The first step (Proposition \[prop:oldcyc\]) is to show that the methods of [@EGS] still apply to certain quotients of generic $W({\mathbb{F}})[{\mathrm{GL}}_2(k_v)]$-projective envelopes (which are projective envelopes in the abelian category of $W({\mathbb{F}})[{\mathrm{GL}}_2(k_v)]$-modules generated by lattices in some fixed set of Deligne–Lusztig representations). If such a quotient is not irreducible rationally, then it can be written as a submodule of the direct sum of two smaller quotients with $p$-torsion cokernel (see Proposition \[prop:exseq\]). This reflects a kind of transversality: while these subcategories do not give a direct product decomposition of the category of $W({\mathbb{F}})[{\mathrm{GL}}_2(k_v)]$-modules, if two subquotients of lattices in two distinct Deligne–Lusztig representations are isomorphic, they must be $p$-torsion. By exactness of patching and this exact sequence, it turns out that the patched modules of $W({\mathbb{F}})[{\mathrm{GL}}_2(k_v)]$-projective envelopes are then determined by the patched modules of these quotients (this depends crucially on the fact that all such patched modules turn out to be cyclic). It remains to actually compute these patched modules using intersection theory in a multitype Barsotti–Tate framed deformation space, which we define to be the Zariski closure in the unrestricted framed deformation space of ${\overline{\rho}}$ of potentially Barsotti–Tate Galois representations with tame inertial type in some fixed set. That the resulting patched module is cyclic comes from the fact that the multitype Barsotti–Tate deformation rings exhibit a similar kind of transversality: two lattices in potentially Barsotti–Tate Galois representations of two distinct generic tame inertial types can be congruent modulo $p$, but never modulo $p^2$.

We now give a brief overview of the following sections. In §2, we generalize some of the results of [@LMS] and prove the key result (Proposition \[prop:exseq\]) gluing integral projective envelopes from their quotients. In §3, we define and calculate multitype Barsotti–Tate deformation rings—this is the other key technical input. To compare Kisin modules for varying tame types, it is much more convenient to choose eigenbases for Kisin modules which are not always gauge bases in the sense of [@EGS §7.3]. This requires generalizing [@LLLM Theorem 4.1]. In §4, we calculate the abstract patched modules of projective envelopes using the Nakayama method and our integral intersection theory method. In §5, we apply the results of §4 to the cohomology of Shimura curves using the Taylor–Wiles method.

Acknowledgments
---------------

Lemma \[lemma:ca\] originally appeared in [@LLM], and we thank Bao Le Hung and Stefano Morra for allowing us to reproduce it here. The idea to use multitype Barsotti–Tate deformation rings grew out of the joint work ([@LLM]). We thank Bao Le Hung and Stefano Morra for this collaboration and other useful discussions on Kisin modules and étale $\varphi$-modules. The author was supported by the Simons Foundation under an AMS-Simons travel grant, by the National Science Foundation under the Mathematical Sciences Postdoctoral Research Fellowship No.  1703182, and by the Centre International de Rencontres Mathématiques under the Research in Pairs program No.  1877. We thank CIRM for providing hospitality and excellent working conditions while part of this work was carried out.

Notation {#subsec:not}
--------

If $F$ is any field, we write $\overline{F}$ for a separable closure of $F$ and $G_F:= \mathrm{Gal}(\overline{F}/F)$ for the absolute Galois group of $F$.

Let $f\in {\mathbb{N}}$ and $q = p^f$. Let ${\mathcal{O}}_K$ be the Witt vectors $W({\mathbb{F}}_q)$ of ${\mathbb{F}}_q$. Let $K = {\mathcal{O}}_K[p^{-1}]$ be the unramified extension of ${\mathbb{Q}}_p$ of degree $f$. Let $E$ be an extension of $K$ with ring of integers ${\mathcal{O}}$, uniformizer $\varpi$, and residue field ${\mathbb{F}}$. This induces embeddings ${\mathcal{O}}_K{\hookrightarrow}{\mathcal{O}}$ and $\iota_0: {\mathbb{F}}_q {\hookrightarrow}{\mathbb{F}}$. For $i\in {\mathbb{Z}}/f$, let $\iota_i = \iota_0\circ \varphi^i$ be the $i$-th Frobenius twist of $\iota_0$. We fix an embedding ${\mathbb{F}}{\hookrightarrow}\overline{{\mathbb{F}}}_q$. We will denote by $(\cdot)^*$ the ${\mathbb{F}}$-linear dual.

Let $G$ (resp. $G^{\mathrm{der}}$) be the algebraic group ${\mathrm{Res}}_{{\mathbb{F}}_q/{\mathbb{F}}_p} {\mathrm{GL}}_2$ (resp. ${\mathrm{Res}}_{{\mathbb{F}}_q/{\mathbb{F}}_p} {\mathrm{SL}}_2$), and let $T\subset G$ (resp. $T^{\mathrm{der}} \subset G^{\mathrm{der}}$) be the diagonal torus. Let $X^*(T)$ (resp. $X^*(T^{\mathrm{der}})$) denote the group of characters of $T$ (resp.  $T^{\mathrm{der}}$). By the embeddings $\iota_i$, this group is identified with $X^*(T \times_{{\mathbb{F}}_p} {\mathbb{F}}) \cong X^*(\prod_{i\in {\mathbb{Z}}/f} \mathbb{G}_m^2)$, which is identified with $({\mathbb{Z}}^2)^{{\mathbb{Z}}/f}$ in the usual way. For a character $\mu\in X^*(T)$, we write $\mu_i$ as the $i$-th factor of $\mu$ so that $\mu = \sum_{i\in {\mathbb{Z}}/f} \mu_i$.

Let $\eta^{(i)} \in X^*(T)$ (resp.  $\alpha^{(i)} \in X^*(T)$) be the dominant fundamental character (resp.  the positive root) represented by $(1,0)$ (resp.  $(1,-1)$) in the $i$-th factor and $0$ elsewhere. Let $\eta = \sum_{i\in {\mathbb{Z}}/f} \eta^{(i)}$. Let $\omega^{(i)}$ be the restriction of $\eta^{(i)}$ to $T^{\mathrm{der}}$.

Let $W$ be the Weyl group of $G$ and $G^{\mathrm{der}}$, which is similarly identified with $S_2^{{\mathbb{Z}}/f}$. Here, $S_2$ denotes the permutation group on two elements. We denote the trivial element of $S_2$ by ${\mathrm{id}}$. Then $W$ acts naturally on $X^*(T)$ and $X^*(T^{\mathrm{der}})$. Let $F$ be the $p$-power Frobenius morphism which acts naturally on $X^*(T)$ and $W$.

For a dominant character $\mu\in X^*(T)$ we write $V(\mu)$ for the Weyl module defined in [@JantzenBook II.2.13(1)]. It has a unique simple $G$-quotient $L(\mu)$. If $\mu = \sum_i \mu_i$ is $p$-restricted (i.e. $0\leq \langle \mu,\alpha^{(i)}\rangle \leq p$ for all $i$), then $L(\mu) = \otimes_i L(\mu_i)$ by the Steinberg tensor product theorem as in [@Herzig Theorem 3.9]. Let $F(\mu)$ be the restriction of $L(\mu)$ to ${\mathrm{GL}}_2({\mathbb{F}}_q)$, which remains irreducible by [@Herzig A.1.3]. Note that $F(\mu) \cong F(\lambda)$ if and only if $\mu \cong \lambda \mod{(p-\pi)X^0(T)}$, where $X^0(T)$ is the kernel of the restriction map $X^*(T){\rightarrow}X^*(T^{\mathrm{der}})$. Every irreducible ${\mathrm{GL}}_2({\mathbb{F}}_q)$-representation is of this form, and we call such a representation a [*Serre weight*]{}.

Quotients of generic ${\mathrm{GL}}_2({\mathbb{F}}_q)$-projective envelopes {#sec:proj}
===========================================================================

Suppose that $\mu \in X^*(T)$ and that $1\leq \langle \mu-\eta,\alpha^{(i)}\rangle \leq p-1$ for all $i\in {\mathbb{Z}}/f$. Let $\sigma$ be $F(\mu-\eta)$. Let ${\widetilde{R}}_\mu$ (resp.  $R_\mu$) be the projective ${\mathcal{O}}_K[{\mathrm{GL}}_2({\mathbb{F}}_q)]$-envelope (resp.  the projective ${\mathbb{F}}_q[{\mathrm{GL}}_2({\mathbb{F}}_q)]$-envelope) of $\sigma$. Let $S$ be the set $\{\pm\omega^{(i)}\}_i$ and let $I$ be a subset of $S$. Recall from [@LMS Definition 3.5] that we attach to a subset $J \subset S$ a Serre weight $\sigma_J$. Let $R_{\mu,I}$ be the universal object among quotients of $R_\mu$ that do not contain $\sigma_{\{\omega\} }$ as a Jordan–Hölder factor for all $\omega$ in $I$. Recall from [@LMS §3] that there is a filtration $\operatorname{Fil}^{\mathbf{k}}$ on $R_\mu$ which induces a filtration $\operatorname{Fil}^{\mathbf{k}}$ on $R_{\mu,I}$. Let $W_{{\mathbf{k}},I}$ be $\operatorname{gr}^{\mathbf{k}}R_{\mu,I}$.

\[prop:Wk\] We have an isomorphism $W_{{\mathbf{k}},I} \cong \oplus_{J \subset S, {\mathbf{k}}(J) = {\mathbf{k}}, J \cap I = \emptyset} \sigma_J$.

This follows from [@LMS Proposition 3.6 and Theorem 3.14].

If $I$ be a subset of $S$ such that $I \cap \{\pm \omega^{(i)}\}$ has size at most one for all $i$, let $T_{\sigma,I}$ be the set of Deligne–Lusztig representations over $K$ of the form $R_w(\mu-w\eta)$ where $w_i = {\mathrm{id}}$ (resp.  $w_i \neq {\mathrm{id}}$) if $\omega^{(i)} \in I$ (resp.  $-\omega^{(i)} \in I$). Fix an embedding ${\widetilde{R}}_\mu {\hookrightarrow}\oplus_{\sigma(\tau) \in T_{\sigma,\emptyset}} \sigma(\tau)$. Let ${\widetilde{R}}_{\mu,I}$ be the quotient of ${\widetilde{R}}_\mu$ isotypic for the set $T_{\sigma,I}$ (which does not depend on the above embedding). Note that ${\widetilde{R}}_{\mu,\emptyset}$ is equal to ${\widetilde{R}}_\mu$.

\[prop:projred\] The reduction of ${\widetilde{R}}_{\mu,I}$ modulo $p$ is $R_{\mu,I}$.

For each $\omega\in I$, $\sigma_{\{\omega\} } \notin {\mathrm{JH}}({\overline{\sigma}}(\tau))$ for all $\sigma(\tau) \in T_{\sigma,I}$. Thus, there is a canonical quotient map $R_{\mu,I} {\rightarrow}\overline{R}_{\mu,I}$, where $\overline{R}_{\mu,I}$ is the reduction of ${\widetilde{R}}_{\mu,I}$. By Proposition \[prop:Wk\], $R_{\mu,I}$ has length $2^{2f-\#I}$. Since $\overline{R}_{\mu,I}$ is the reduction of a lattice in the direct sum of $2^{f-\#I}$ types, each of whose reduction has length $2^f$ (see [@diamond]), it also has length $2^{2f-\#I}$. Since both objects have the same length, this surjection must be an isomorphism.

Again, let $I\subset S$. Let $W_{{\mathbf{k}},{\mathbf{k}}+1,I}$ be $\operatorname{Fil}^{\mathbf{k}}R_{\mu,I}/(\operatorname{Fil}^{k+2} R_{\mu,I} \cap \operatorname{Fil}^{\mathbf{k}}R_{\mu,I})$. Note that $W_{{\mathbf{k}},{\mathbf{k}}+1,I}$ is multiplicity free since $W_{{\mathbf{k}},{\mathbf{k}}+1,\emptyset}$ (which is $W_{{\mathbf{k}},{\mathbf{k}}+1}$ in [@LMS §3]) is by [@LMS Proposition 3.6 and Lemma 3.7].

\[prop:ext\] Suppose that $J \subset J'$, $\#J'\setminus J = 1$, and $J' \cap I = \emptyset$. Let ${\mathbf{k}}$ and ${\mathbf{k}}'$ be ${\mathbf{k}}(J)$ and ${\mathbf{k}}(J')$, respectively. Then there is a subquotient of $W_{{\mathbf{k}},{\mathbf{k}}+1,I}$ which is the unique up to isomorphism nontrivial extension of $\sigma_J$ by $\sigma_{J'}$.

This follows immediately from Proposition \[prop:Wk\] and [@LMS Proposition 3.8].

\[prop:exseq\] Suppose that the size of $I \cap \{\pm\omega^{(i)}\}$ is at most one for all $i$ and that $I \cap \{\pm\omega^{(j)}\} = \emptyset$ for some $j$. Then there is an exact sequence $$0 {\rightarrow}{\widetilde{R}}_{\mu,I} {\rightarrow}{\widetilde{R}}_{\mu,I\cup \{\omega^{(j)}\} } \oplus {\widetilde{R}}_{\mu,I\cup \{-\omega^{(j)}\} } {\rightarrow}R_{\mu,I\cup \{\pm\omega^{(j)}\} } {\rightarrow}0,$$ where the second (resp.  third) map is the sum (resp.  difference) of the natural projections.

The second map is clearly injective since it is after inverting $p$ and ${\widetilde{R}}_{\mu,I}$ is ${\mathcal{O}}_K$-flat. We claim that the cokernel of this map is $p$-torsion. Let $\sigma_{\{\omega^{(j)}\} } = F(\mu'-\eta)$ and consider a map ${\widetilde{R}}_{\mu'} {\rightarrow}{\widetilde{R}}_{\mu,I}$ such that the composition with the projection ${\widetilde{R}}_{\mu,I} {\twoheadrightarrow}R_{\mu,I} {\twoheadrightarrow}R_{\mu,I}/\operatorname{Fil}^2 R_{\mu,I}$ is nonzero. The composition of ${\widetilde{R}}_{\mu'} {\rightarrow}{\widetilde{R}}_{\mu,I}$ with the natural surjection ${\widetilde{R}}_{\mu,I} {\twoheadrightarrow}{\widetilde{R}}_{\mu,I\cup \{\omega^{(j)}\} }$ is zero since $\sigma_{\{\omega\} }\notin {\mathrm{JH}}(R_{\mu,I\cup \{\omega^{(j)}\} })$. On the other hand, we claim that the image of the composition ${\widetilde{R}}_{\mu'} {\rightarrow}{\widetilde{R}}_{\mu,I}$ with the natural surjection ${\widetilde{R}}_{\mu,I} {\twoheadrightarrow}{\widetilde{R}}_{\mu,I\cup \{-\omega^{(j)}\} }$ contains $p{\widetilde{R}}_{\mu,I\cup \{-\omega^{(j)}\} }$. By symmetry, we would see that the image of ${\widetilde{R}}_{\mu,I} {\rightarrow}{\widetilde{R}}_{\mu,I\cup \{\omega^{(j)}\} } \oplus {\widetilde{R}}_{\mu,I\cup \{-\omega^{(j)}\} }$ contains $p{\widetilde{R}}_{\mu,I\cup \{\omega^{(j)}\} }$, and thus $p{\widetilde{R}}_{\mu,I\cup \{\omega^{(j)}\} } \oplus p{\widetilde{R}}_{\mu,I\cup \{-\omega^{(j)}\} }$. Fix a map ${\widetilde{R}}_\mu{\rightarrow}{\widetilde{R}}_{\mu'}$ such that the composition with the projection to $R_{\mu'}/\operatorname{Fil}^2 R_{\mu'}$ is nonzero. Then we claim that the image, denoted $S$, of the composition of ${\widetilde{R}}_\mu{\rightarrow}{\widetilde{R}}_{\mu'}$ with the above ${\widetilde{R}}_{\mu'} {\rightarrow}{\widetilde{R}}_{\mu,I} {\twoheadrightarrow}{\widetilde{R}}_{\mu,I\cup \{-\omega^{(j)}\} }$ is $p{\widetilde{R}}_{\mu,I\cup \{-\omega^{(j)}\} }$. On the one hand, we see that $S$ is in $p{\widetilde{R}}_{\mu,I\cup \{-\omega^{(j)}\} }$ by reducing modulo $p$ and using Propositions \[prop:projred\] and \[prop:ext\]. On the other hand, the projection of $S$ to $\sigma^\circ(\tau)$ contains $p \sigma^\circ(\tau)$ for any $\sigma(\tau)\in T_{\sigma,I \cup \{-\omega^{(j)}\}}$ by [@EGS Theorem 5.1.1]. Thus, the composition $S \subset p{\widetilde{R}}_{\mu,I\cup \{-\omega^{(j)}\} } {\twoheadrightarrow}p \sigma^\circ(\tau)$ is an isomorphism upon taking cosocles. We see that $S$ must equal $p{\widetilde{R}}_{\mu,I\cup \{-\omega^{(j)}\} }$.

If we let $R$ be the cokernel of the second map, then the exact sequence $$\label{eqn:char0}
0 {\rightarrow}{\widetilde{R}}_{\mu,I} {\rightarrow}{\widetilde{R}}_{\mu,I\cup \{\omega^{(j)}\} } \oplus {\widetilde{R}}_{\mu,I\cup \{-\omega^{(j)}\} } {\rightarrow}R {\rightarrow}0$$ induces an exact sequence $$\label{eqn:charp}
R_{\mu,I} {\rightarrow}R_{\mu,I\cup \{\omega^{(j)}\} } \oplus R_{\mu,I\cup \{-\omega^{(j)}\} } {\rightarrow}R {\rightarrow}0.$$ On cosocles, the second map in (\[eqn:char0\]) is the sum of two isomorphisms. Thus, on cosocles, the third map in (\[eqn:char0\]) is necessarily the sum of two isomorphisms. We conclude that the third map in (\[eqn:char0\]) is the sum of two quotient maps. By definition, the maximal representation which is a quotient of both $R_{\mu,I\cup \{\omega^{(j)}\} }$ and $R_{\mu,I\cup \{-\omega^{(j)}\} }$ is $R_{\mu,I\cup \{\pm\omega^{(j)}\} }$. Thus, there is a surjection $R_{\mu,I\cup \{-\omega^{(j)}\} }{\twoheadrightarrow}R$. On the other hand, it is easy to see that the composition $R_{\mu,I} {\rightarrow}R_{\mu,I\cup \{\omega^{(j)}\} } \oplus R_{\mu,I\cup \{-\omega^{(j)}\} } {\rightarrow}R_{\mu,I\cup \{\pm\omega^{(j)}\} }$ is zero, where the second map is the difference of the natural projections. Thus, there is a surjection $R {\twoheadrightarrow}R_{\mu,I\cup \{\pm\omega^{(j)}\} }$. Since $R$ and $R_{\mu,I\cup \{\pm\omega^{(j)}\} }$ are finite length objects, they must be isomorphic.

Multitype Barsotti–Tate deformation rings {#sec:defring}
=========================================

Some integral $p$-adic Hodge theory {#subsec:hodge}
-----------------------------------

Let $K_\infty$ be the infinite extension $K((-p)^{1/p^\infty})$ of $K$. Let ${\mathcal{O}}_{{\mathcal{E}},K}$ denote the $p$-adic completion of ${\mathcal{O}}_K(\!(v)\!)$, and let ${\mathcal{O}}_{{\mathcal{E}}^{\mathrm{un}},K}$ denote a maximal connected étale extension of ${\mathcal{O}}_{{\mathcal{E}},K}$. Fontaine defined an exact anti-equivalence of tensor categories $$\mathbb{V}^*: \Phi\textrm{-}\mathrm{Mod}^{\operatorname{et}}(R) {\rightarrow}\mathrm{Rep}_{G_{K_{\infty}}}(R)$$ by $\mathbb{V}^*({\mathcal{M}}) = {\mathrm{Hom}}_{\Phi\textrm{-}\mathrm{Mod}}({\mathcal{M}},{\mathcal{O}}_{{\mathcal{E}}^{\mathrm{un}},K})$. Let $I({\overline{\rho}},\mu)$ be a subset of $S = \{\pm \omega^{(i)}\}_i$ with $\#(I({\overline{\rho}},\mu)\cap \{\pm\omega^{(i)}\}) \leq 1$ for all $i$. Let $\alpha$, $\alpha' \in {\mathbb{F}}^\times$ and $a_i \in {\mathbb{F}}$ for $i\in {\mathbb{Z}}/f$ such that $a_i = 0$ if and only if $\omega^{(i)} \in I({\overline{\rho}},\mu)$. Let $\mu\in X^*(T)$ be such that $\mu_i = (c_i,1)$ with $2 < c_i < p-1$. Let ${\mathcal{M}}= \prod_i {\mathbb{F}}((v)){\mathfrak{e}}^i \oplus {\mathbb{F}}((v)){\mathfrak{f}}^i$ be the $\varphi$-module defined by $$\begin{aligned}
-\omega^{(f-i)}\notin I({\overline{\rho}},\mu) : & &
\begin{cases}
\varphi({\mathfrak{e}}^{i-1}) & = v^{c_{f-i}}{\mathfrak{e}}^i+a_{i-1}v^{c_{f-i}}{\mathfrak{f}}^i \\
\varphi({\mathfrak{f}}^{i-1}) & = v{\mathfrak{f}}^i
\end{cases} \\
-\omega^{(f-i)}\in I({\overline{\rho}},\mu) : & &
\begin{cases}
\varphi(\mathfrak{e}^{i-1}) & =v^{c_{f-i}}{\mathfrak{f}}^i  \\
\varphi(\mathfrak{f}^{i-1}) & = v{\mathfrak{e}}^i
\end{cases} \\\end{aligned}$$ for $i \neq 0$ and $$\begin{aligned}
-\omega^{(0)}\notin I({\overline{\rho}},\mu) : & &
\begin{cases}
\varphi({\mathfrak{e}}^{f-1}) & = \alpha v^{c_0}{\mathfrak{e}}^0+\alpha a_{f-1}v^{c_0}{\mathfrak{f}}^0 \\
\varphi({\mathfrak{f}}^{f-1}) & = \alpha' v{\mathfrak{f}}^0
\end{cases} \\
-\omega^{(0)}\in I({\overline{\rho}},\mu) : & &
\begin{cases}
\varphi(\mathfrak{e}^{f-1}) & = \alpha v^{c_0}{\mathfrak{f}}^0  \\
\varphi(\mathfrak{f}^{f-1}) & = \alpha' v{\mathfrak{e}}^0.
\end{cases} \\\end{aligned}$$

To describe tamely potentially Barsotti–Tate deformation rings, we will use the theory of Kisin modules with descent datum. Let $\tau$ be the tame principal series type $\eta_1\oplus \eta_2:I_K {\rightarrow}{\mathrm{GL}}_2({\mathbb{F}}_q)$ where $\eta_k = \omega_f^{-\mathbf{a}_k^{(0)}}$ for $k=1$ and $2$ and $$\mathbf{a}_k^{(j)} = \sum_{i=0}^{f-1} a_{k,-j+i}p^i,$$ where $a_{k,i} \in {\mathbb{Z}}$. We will suppose throughout that $2\leq |a_{1,i}-a_{2,i}| \leq p-3$ for all $i\in {\mathbb{Z}}/f$ and call such a tame principal series type [*generic*]{}. We will say a tame inertial type $\tau'$ is generic if its restriction to the quadratic unramified extension of $K$ is a generic principal series type.

The [*orientation*]{} of $(\mathbf{a}_1,\mathbf{a}_2)$ is the element $s\in W$ such that $\mathbf{a}^{(j)}_{s_j(1)}>\mathbf{a}^{(j)}_{s_j(2)}$. By an abuse of notation, we say that the orientation of $(\mathbf{a}_1,\mathbf{a}_2)$ is an orientation for $\tau$ if $\tau$ can be expressed in terms of $(\mathbf{a}_1,\mathbf{a}_2)$ as above.

Let $R$ be an ${\mathcal{O}}$-algebra. For a principal series type $\tau$, we will consider Kisin modules over $R$ with descent datum of type $\tau$ (see [@LLLM Definition 2.4]). We will say that such a Kisin module ${\mathfrak{M}}_R$ is in $Y^{(0,1),\tau}(R)$ if the cokernels of $\phi_{{\mathfrak{M}}_R}:\varphi^*({\mathfrak{M}}_R) {\rightarrow}{\mathfrak{M}}_R$ and $\phi_{\det {\mathfrak{M}}_R}:\varphi^*(\det {\mathfrak{M}}_R) {\rightarrow}\det {\mathfrak{M}}_R$ are annihilated by $E(u) = u^{q-1}+p$. Let $v$ be $u^{q-1}$.

Let $s$ be an orientation for a generic tame principal series type $\tau$ and ${\mathfrak{M}}_R$ be an element of $Y^{(0,1),\tau}(R)$. Then ${\mathfrak{M}}_R$ can be described by the matrices $\operatorname{Mat}_{\beta}(\phi^{(i)}_{{\mathfrak{M}}_R \otimes_R {\mathbb{F}},s_{i+1}(2)})$ after choosing an eigenbasis $\beta$ (see [@LLLM Definition 2.11]). The following is a generalization of [@LLLM Theorem 4.1] in the case of ${\mathrm{GL}}_2$, where $\beta$ is allowed to have a slightly more general form than a gauge basis.

\[thm:fhdef\] Let $\tau$ be a tame generic principal series type and let $s = (s_i)_i \in W$ be an orientation for $\tau$. Let $R$ be a complete local Noetherian ${\mathcal{O}}$-algebra with residue field ${\mathbb{F}}$. Let ${\mathfrak{M}}_R\in Y^{(0,1),\tau}(R)$ with $\operatorname{Mat}_{\overline{\beta}}(\phi^{(i)}_{{\mathfrak{M}}_R \otimes_R {\mathbb{F}},s_{i+1}(2)})$ given by $$\overline{A}_1 = \begin{pmatrix}
  v &   \\
  a_iv & 1 \\
 \end{pmatrix},
\overline{A}_2 = \begin{pmatrix}
   & 1 \\
  v &  \\
 \end{pmatrix},
\textrm{ or }
\overline{A}_3 = \begin{pmatrix}
   & 1  \\
  v & a_i \\
 \end{pmatrix}$$ for $i\neq 0$ and $\overline{A}_j\begin{pmatrix}
  \alpha &  \\
   & \alpha' \\
 \end{pmatrix}$ for $i=0$, where $\overline{\beta}$ is an eigenbasis for ${\mathfrak{M}}_R \otimes_R {\mathbb{F}}$. Then there is a unique eigenbasis $\beta$ of ${\mathfrak{M}}_R$ up to scaling lifting $\overline{\beta}$ such that $\operatorname{Mat}_\beta(\phi^{(i)}_{{\mathfrak{M}}_R,s_{i+1}(2)})$ is given by $$A_1 = \begin{pmatrix}
  v+p &   \\
  (X_i+[a_i])v & 1 \\
 \end{pmatrix},
A_2 = \begin{pmatrix}
  -Y_i & 1 \\
  v & X_i \\
 \end{pmatrix},
\textrm{ or }
A_3 = \begin{pmatrix}
  -p(X_i+[a_i])^{-1} & 1  \\
  v & X_i+[a_i] \\
 \end{pmatrix},$$ respectively, for $i\neq 0$ and $A_jD(\alpha,\alpha')$ for $i=0$, where $[\cdot]$ denotes the Teichmüller lift, $X_iY_i = p$ for $A_2$, and $D(\alpha,\alpha') = \begin{pmatrix}
  [\alpha]+ X_\alpha&  \\
   & [\alpha']+X_{\alpha'} \\
 \end{pmatrix}$.

The proof is similar to the proof of [@LLLM Theorems 4.1 and 4.16] which prove existence and uniqueness of $\beta$, respectively. We describe some of the key points. We modify [@LLLM Definition 4.2], defining $d_R(P) = \min_k 2v_R(r_k)+k$ if $P = \sum_k r_k v^k \in R[\![v]\!]$. Then the analogue of [@LLLM Proposition 4.3] holds (see [@LLLM Remark 4.4]). The entry in the middle column of [@LLLM Table 5] becomes $$\begin{pmatrix}
  1^* &   \\
  v(\leq 0) & 0^* \\
 \end{pmatrix},
\begin{pmatrix}
  \leq 0 & 0^* \\
  1^* & \leq 0 \\
 \end{pmatrix},
\textrm{ or }
\begin{pmatrix}
  \leq 0 & 0^* \\
  1^* & \leq 0 \\
 \end{pmatrix},$$ respectively, and we modify [@LLLM Definition 4.5] appropriately. The analogues of [@LLLM Proposition 4.6, Lemma 4.10, and Proposition 4.11] hold with the following two caveats.

1.  We define the pivots in the case of $\overline{A}_3$ to be the same as the pivots in the case of $\overline{A}_2$.

2.  The second equation of [@LLLM Lemma 4.10] is changed to $A_{22}^{(i)} = vP_{22} + [a_i] + Q_{22}$ when $\overline{A}^{(i)} = \overline{A}_3$.

Then the analogues of [@LLLM Proposition 4.13 and Lemma 4.14] give the eigenbasis $\beta$. We deduce the forms of $A_i$ from the condition that $v+p$ must divide the determinant. Finally, the analogue of [@LLLM Theorem 4.16] proves the uniqueness of $\beta$ up to scaling.

\[prop:1defring\] Suppose that ${\overline{\rho}}:G_K {\rightarrow}{\mathrm{GL}}_2({\mathbb{F}})$ is a Galois representation such that the restriction ${\overline{\rho}}|_{G_{K_\infty}}$ is isomorphic to $\mathbb{V}^*({\mathcal{M}})$, and that $\tau$ is the tame generic inertial type with $\sigma(\tau) = R_s(\mu-s\eta)$. Let $R$ be the ring ${\mathcal{O}}[\![ (X_i,Y_i)_{i=0}^{f-1}, X_\alpha,X_{\alpha'}]\!]/(f_i)$ where $f_i = X_iY_i-p$ if $-s_i\omega^{(i)} \in I({\overline{\rho}},\mu)$ and $Y_i$ otherwise. Let ${\mathcal{M}}_R = \prod_i R((v)){\mathfrak{e}}^i \oplus R((v)){\mathfrak{f}}^i$ be the $\varphi$-module defined by $$\begin{aligned}
s_{f-i} = {\mathrm{id}}, -\omega^{(f-i)} \notin I({\overline{\rho}},\mu) : & &
\begin{cases}
\varphi({\mathfrak{e}}^{i-1}) & = v^{c_{f-i}-1}(v+p){\mathfrak{e}}^i+(X_{i-1}+[a_{i-1}])v^{c_{f-i}}{\mathfrak{f}}^i \\
\varphi({\mathfrak{f}}^{i-1}) & = v{\mathfrak{f}}^j
\end{cases} \\
s_{f-i} = {\mathrm{id}}, -\omega^{(f-i)}\in I({\overline{\rho}},\mu) : & &
\begin{cases}
\varphi(\mathfrak{e}^{i-1}) & = -Y_{i-1}v^{c_{f-i}-1}\mathfrak{e}^i + v^{c_{f-i}}{\mathfrak{f}}^i \\
\varphi(\mathfrak{f}^{i-1}) & = v{\mathfrak{e}}^i + X_{i-1}v {\mathfrak{f}}^i.
\end{cases} \\
s_{f-i} \neq {\mathrm{id}}, \{\pm\omega^{(f-i)}\}\cap I({\overline{\rho}},\mu) = \emptyset : & &
\begin{cases}
\varphi(\mathfrak{e}^{i-1}) & = v^{c_{f-i}}\mathfrak{e}^i + (X_{i-1}+[a_{i-1}])v^{c_{f-i}}{\mathfrak{f}}^i \\
\varphi(\mathfrak{f}^{i-1}) & = -p(X_{i-1}+[a_{i-1}])^{-1}{\mathfrak{e}}^i+v\mathfrak{f}^i
\end{cases} \\
s_{f-i} \neq {\mathrm{id}}, \omega^{(f-i)}\in I({\overline{\rho}},\mu) : & &
\begin{cases}
\varphi(\mathfrak{e}^{i-1}) & = v^{c_{f-i}}\mathfrak{e}^i + X_{i-1}v^{c_{f-i}}{\mathfrak{f}}^i \\
\varphi(\mathfrak{f}^{i-1}) & = -Y_{i-1}{\mathfrak{e}}^i + v {\mathfrak{f}}^i
\end{cases} \\
s_{f-i} \neq {\mathrm{id}}, -\omega^{(f-i)}\in I({\overline{\rho}},\mu) : & &
\begin{cases}
\varphi(\mathfrak{e}^{i-1}) & = v^{c_{f-i}}{\mathfrak{f}}^i \\
\varphi(\mathfrak{f}^{i-1}) & = (v+p){\mathfrak{e}}^i + X_{i-1}v {\mathfrak{f}}^i,
\end{cases} \\\end{aligned}$$ with the usual modification for $i=0$. Then $\mathbb{V}^*({\mathcal{M}}_R)$ is the restriction to $G_{K_\infty}$ of a versal potentially Barsotti–Tate deformation of ${\overline{\rho}}$ of type $\tau$.

Define $w\in W$ and $s_\tau \in S_2$ to be the unique elements such that $w_0 = {\mathrm{id}}$ and $F^{-1}(w) s w^{-1} = (s_\tau,{\mathrm{id}},\ldots, {\mathrm{id}})$. Then the Deligne–Lusztig representations $R_s(\mu-s\eta)$ and $R_{(s_\tau,{\mathrm{id}},\ldots, {\mathrm{id}})}(F^{-1}(w)\cdot(\mu-s\eta))$ are isomorphic by [@Herzig Lemma 4.2]. Define $s' = (s'_i)_i$ by $s'_i = w_{f-i}$ for $i\in {\mathbb{Z}}/f$. Then one easily checks that $s'$ is an orientation for $F^{-1}(w)\cdot(\mu-s\eta)$. By Theorem \[thm:fhdef\] and the analogue of [@LLLM §5.2 and §6], the Kisin module ${\mathfrak{M}}_R$ (with quadratic unramified descent) of tame inertial type (the quadratic unramified base change of) $\tau(s_\tau,-F^{-1}(w)\cdot(\mu-s\eta))$ defined by $A^{(i-1)} = \operatorname{Mat}_\beta(\phi^{(i-1)}_{{\mathfrak{M}}_R,s_{i}'(2)}) = A_1$ (resp.  $A_2$ and $A_3$) in the first and fifth cases (resp.  in the second and fourth cases and in the third case) has the property that (the quadratic unramified descent of) $T_{dd}^*({\mathfrak{M}}_R)$ is the restriction to $G_{K_\infty}$ of a versal potentially Barsotti–Tate deformation of ${\overline{\rho}}$ of type $\tau$.

Let $L = K((-p)^{\frac{1}{e}})$. We claim that ${\mathfrak{M}}_R \otimes_{{\mathcal{O}}_{{\mathcal{E}},K}} {\mathcal{O}}_{{\mathcal{E}},L} = {\mathcal{M}}_R$. Let $v^\lambda$ denote the torus element obtained by applying the coweight $\lambda$ to $v$. By [@LLLM2 Proposition 3.1.2], we see that a Kisin module (with quadratic unramified descent) of tame inertial type (the quadratic unramified base change of) $\tau$ with $\operatorname{Mat}_\beta(\phi^{(i)}_{{\mathfrak{M}},s_{i+1}'(2)})$ given by $A^{(i)}$ (resp. $A^{(i)}s_0^{-1} D(\alpha,\alpha')s_0$) for $i\neq f-1$ (resp. for $i=f-1$) gives a $\varphi$-module ${\mathcal{M}}= \prod_i {\mathbb{F}}((v)){{\mathfrak{e}}'}^i \oplus {\mathbb{F}}((v)){{\mathfrak{f}}'}^i$ with $\varphi({{\mathfrak{e}}'}^{i-1},{{\mathfrak{f}}'}^{i-1}) = M_{i-1}'({{\mathfrak{e}}'}^i,{{\mathfrak{f}}'}^i)$ where $$\begin{aligned}
M_i' &= s_{i+1}' A^{(i)} v^{(s'_{i+1})^{-1}w_{f-i}(\mu_{f-1-i} - s_{f-1-i}\eta)}(s'_{i+1})^{-1} \\
&= w_{f-1-i}  A^{(i)} v^{w_{f-1-i}^{-1}w_{f-i}(\mu_{f-1-i} - s_{f-1-i}\eta)}w_{f-1-i}^{-1} \\
&= w_{f-1-i}  A^{(i)} v^{s_{f-1-i}^{-1}(\mu_{f-1-i} - s_{f-1-i}\eta)}w_{f-1-i}^{-1}\end{aligned}$$ for $i<f-1$ and $M_{f-1}' = A^{(f-1)}s_0^{-1} D(\alpha,\alpha')s_0s_\tau^{-1}v^{w_1(\mu_0 - s_0\eta)}$. Changing to the bases $({\mathfrak{e}}^i,{\mathfrak{f}}^i) = ({{\mathfrak{e}}'}^i,{{\mathfrak{f}}'}^i)w_{f-1-i}$, we see that ${\mathcal{M}}$ is given by $(M_i)_i$ where $$\begin{aligned}
M_i &= A^{(i)} v^{s_{f-1-i}^{-1}(\mu_{f-1-i} - s_{f-1-i}\eta)}w_{f-1-i}^{-1} w_{f-i} \\
&= A^{(i)} v^{s_{f-1-i}^{-1}(\mu_{f-1-i} - s_{f-1-i}\eta)}s_{f-1-i}^{-1} \\
&= A^{(i)} s_{f-1-i}^{-1} v^{\mu_{f-1-i} - s_{f-1-i}\eta}\end{aligned}$$ for $i < f-1$ and $$\begin{aligned}
M'_{f-1} &= A^{(f-1)}s_0^{-1} D(\alpha,\alpha')s_0s_\tau^{-1}v^{w_1(\mu_0 - s_0\eta)}w_1 D(\alpha,\alpha')\\
&= A^{(f-1)}s_0^{-1} D(\alpha,\alpha')s_0s_\tau^{-1}w_1 v^{\mu_0 - s_0\eta} D(\alpha,\alpha')\\
&= A^{(f-1)}s_0^{-1} v^{\mu_0 - s_0\eta}D(\alpha,\alpha').\end{aligned}$$ The proposition is now deduced from substituting for $A^{(i)}$, $s$, and $\mu$.

Let ${\overline{\rho}}:G_K {\rightarrow}{\mathrm{GL}}_2({\mathbb{F}})$ is a Galois representation. If $\tau$ is an inertial type, let $R^\tau$ parameterize potentially Barsotti–Tate liftings of ${\overline{\rho}}$ of type $\tau$. If $T$ is a set of inertial types for $K$, then we let ${\mathrm{Spec}\ }R^T$ be the Zariski closure of $\cup_{\tau \in T} {\mathrm{Spec}\ }R^\tau[p^{-1}]$ in the universal lifting space ${\mathrm{Spec}\ }R_{{\overline{\rho}}}^\square$ of ${\overline{\rho}}$.

\[thm:defring\] Suppose that ${\overline{\rho}}:G_K {\rightarrow}{\mathrm{GL}}_2({\mathbb{F}})$ is a Galois representation such that the restriction ${\overline{\rho}}|_{G_{K_\infty}}$ is isomorphic to $\mathbb{V}^*({\mathcal{M}})$. There is an isomorphism from $R^{T_{\sigma,\emptyset}}$ to a formal power series ring over ${\mathcal{O}}[\![ (X_i,Y_i)_{i=0}^{f-1}]\!] /(Y_ig_i)_i$, where $g_i = Y_i-p$ $($resp.  $g_i = X_iY_i-p)$ if $I({\overline{\rho}},\mu)\cap \{\pm\omega^{(i)} \} = \emptyset$ $($resp.  $I({\overline{\rho}},\mu)\cap \{\pm\omega^{(i)} \} \neq \emptyset)$ such that if $I \subset S$ with $\# (I \cap \{\pm \omega^{(i)}\})\leq 1$ for all $i$, then $R^{T_{\sigma,I}}$ is the quotient of $R^{T_{\sigma,\emptyset}}$ by the ideal $(f_i(I))_i$ where $$\begin{aligned}
f_i(I) = & &
\begin{cases}
0 &\textrm{ if }\{\pm \omega^{(f-1-i)}\} \cap I = \emptyset \\
X_iY_i-p &\textrm{ if } \{\pm \omega^{(f-1-i)}\} \subset I\cup I({\overline{\rho}},\mu) \\
Y_i &\textrm{ if } \omega^{(f-1-i)} \in I \cap I({\overline{\rho}},\mu) \\
Y_i-p &\textrm{ if } -\omega^{(f-1-i)} \in I \cap I({\overline{\rho}},\mu)
\end{cases}\end{aligned}$$

Since $R^{T_{\sigma,I}}$ is naturally a quotient of $R_{{\overline{\rho}}|_{G_{K_\infty}}}^\square$ by [@EGS Lemma 7.4.3], it suffices to compute the Zariski closure of $\cup_{\tau \in T_{\sigma,I}} {\mathrm{Spec}\ }R^\tau[p^{-1}]$ in ${\mathrm{Spec}\ }R_{{\overline{\rho}}|_{G_{K_\infty}}}^\square$. Let $R$ be the ring ${\mathcal{O}}[\![ (X_i,Y_i)_{i=0}^{f-1}, X_\alpha,X_{\alpha'}]\!] /(Y_ig_i)_i$ and consider the deformation ${\mathcal{M}}_R = \prod_i R((v)){\mathfrak{e}}^i \oplus R((v)){\mathfrak{f}}^i$ of ${\mathcal{M}}$ defined by $$\begin{aligned}
\{\pm\omega^{(f-i)}\}\cap I({\overline{\rho}},\mu) = \emptyset : & &
\begin{cases}
\varphi({\mathfrak{e}}^{i-1}) & = v^{c_{f-i}-1}(v+p-Y_{i-1}){\mathfrak{e}}^i+v^{c_{f-i}}(X_{i-1}+[a_{i-1}]){\mathfrak{f}}^i \\
\varphi({\mathfrak{f}}^{i-1}) & = -Y_{i-1}(X_{i-1}+[a_{i-1}])^{-1}{\mathfrak{e}}^i+v{\mathfrak{f}}^i
\end{cases} \\
\omega^{(f-i)}\in I({\overline{\rho}},\mu) : & &
\begin{cases}
\varphi(\mathfrak{e}^{i-1}) & = v^{c_{f-i}-1}(v+p-X_{i-1}Y_{i-1})\mathfrak{e}^i + X_{i-1}v^{c_{f-i}}{\mathfrak{f}}^i \\
\varphi(\mathfrak{f}^{i-1}) & = -Y_{i-1}{\mathfrak{e}}^i + v\mathfrak{f}^i
\end{cases} \\
-\omega^{(f-i)}\in I({\overline{\rho}},\mu) : & &
\begin{cases}
\varphi(\mathfrak{e}^{i-1}) & = -Y_{i-1}v^{c_{f-i}-1}{\mathfrak{e}}^i + v^{c_{f-i}}\mathfrak{f}^i  \\
\varphi(\mathfrak{f}^{i-1}) & = (v + p-X_{i-1}Y_{i-1}){\mathfrak{e}}^i + X_{i-1} v {\mathfrak{f}}^i.
\end{cases} \\\end{aligned}$$ Define the deformation functor $D^\square$ by $D^\square(A) = \{(f:R{\rightarrow}A,b_A)\}/{\cong}$ for $A$ a complete local Noetherian ${\mathcal{O}}$-algebra, where $b_A$ is a basis for the free rank two $A$-module $\mathbb{V}^*(f^*({\mathcal{M}}_R))$ whose reduction modulo ${\mathfrak{m}}_A$ gives ${\overline{\rho}}$. Then the natural map $D^\square {\rightarrow}{\mathrm{Spf}}R$ is formally smooth. Let $D^\square$ be ${\mathrm{Spf}}R^\square$. One can rescale ${\mathfrak{e}}^0$ and ${\mathfrak{f}}^0$ by units, and rescale the other basis vectors appropriately so that the coefficients in the definition of $\varphi$ which are $1$ remain $1$. This gives a $\widehat{\mathbf{G}}_m^2$-action on $R$ where the diagonal acts trivially, and orbits give isomorphic $\varphi$-modules. We claim that the natural map ${\mathrm{Spf}}R^\square/\widehat{\mathbf{G}}_m^2 {\rightarrow}{\mathrm{Spf}}R_{{\overline{\rho}}|_{G_{K_\infty}}}^\square$ is a closed embedding. It suffices to show injectivity on reduced tangent spaces.

Suppose that $t$ is a tangent reduced vector of ${\mathrm{Spf}}R^\square/\widehat{\mathbf{G}}_m^2$ which maps to zero in ${\mathrm{Spf}}R_{{\overline{\rho}}|_{G_{K_\infty}}}^\square$. By formal smoothness, we can extend this to a map $t: R^\square {\rightarrow}{\mathbb{F}}[\varepsilon]/(\varepsilon^2)$. Let ${\mathcal{M}}_t$ be ${\mathcal{M}}_R \otimes_R {\mathbb{F}}[\varepsilon]/(\varepsilon^2)$ so that ${\mathcal{M}}_t$ and ${\mathcal{M}}$ are isomorphic. Let $M_i$ (resp.  $M_{t,i}$) be the matrices such that $\varphi({\mathfrak{e}}^i\otimes_R {\mathbb{F}},{\mathfrak{f}}^i\otimes_R {\mathbb{F}}) = M_i({\mathfrak{e}}^{i+1}\otimes_R {\mathbb{F}},{\mathfrak{f}}^{i+1}\otimes_R {\mathbb{F}})$ (resp.  $\varphi({\mathfrak{e}}^i\otimes_R {\mathbb{F}}[\varepsilon]/(\varepsilon^2),{\mathfrak{f}}^i\otimes_R {\mathbb{F}}[\varepsilon]/(\varepsilon^2)) = M_{t,i}({\mathfrak{e}}^{i+1}\otimes_R {\mathbb{F}}[\varepsilon]/(\varepsilon^2),{\mathfrak{f}}^{i+1}\otimes_R {\mathbb{F}}[\varepsilon]/(\varepsilon^2))$). Then there are matrices $D_i \in {\mathrm{GL}}_2({\mathbb{F}}(\!(v)\!) )$ such that $$({\mathrm{id}}_3+\varepsilon D_i)M_i \varphi({\mathrm{id}}_3-\varepsilon D_{i-1}) = M_{t,i}$$ for all $i \in {\mathbb{Z}}/f$, where ${\mathrm{id}}_3$ is the $3 \times 3$ identity matrix (we can assume without loss of generality that the terms without $\epsilon$ are ${\mathrm{id}}_3$ by multiplying by their inverses). We first claim that $D_i\in {\mathrm{GL}}_2({\mathbb{F}}[\![v]\!])$ for all $i \in {\mathbb{Z}}/f$. For each $i$, let $k_i \in {\mathbb{Z}}$ be the minimal integer such that $v^{k_i}D_i \in \operatorname{Mat}_3({\mathbb{F}}[\![v]\!])$. Then $v^{c_{f-1-i}+k_i}\varphi({\mathrm{id}}_3-\varepsilon D_{i-1}) = v^{c_{f-1-i}+k_i}M_i^{-1} ({\mathrm{id}}_3-\varepsilon D_i) M_{t,i}\in \operatorname{Mat}_3({\mathbb{F}}[\![v]\!])$, and thus $c_{f-1-i}+k_i\geq pk_{i-1}$. Since $c_{f-1-i} < p-1$, $k_i\geq 2 + p(k_{i-1}-1)$. If $k_{i-1} \geq n\geq 1$, then $k_i\geq n+1$, from which we derive the contradiction that $k_i\geq n$ for every $n\in {\mathbb{N}}$. Hence $k_i \leq 0$ for all $i$.

We next claim that if $\{\pm \omega^{f-1-i}\} \cap I({\overline{\rho}},\mu) = \emptyset$ for some $i\in {\mathbb{Z}}/f$, then $t(Y_i) = 0$. Suppose for the sake of contradiction that $\{\pm \omega^{f-1-i}\} \cap I({\overline{\rho}},\mu) = \emptyset$ and $t(Y_i) \neq 0$. Let $N_i \in \operatorname{Mat}_3({\mathbb{F}}[\![v]\!])$ be such that $\varepsilon N_i = M_{t,i} - M_i$. Then by the formulas for $M_i$ and $M_{t,i}$, the first (resp.  second) entry in the top row of $N_i$ is exactly divisible by $v^{c_{f-1-i}-1}$ (resp.  $v^0$). On the other hand, since $D_i M_i - M_i \varphi(D_{i-1}) = N_i$, the first (resp.  second) entry in the top row of $N_i$ is divisible by $v^{c_{f-1-i}}$ (resp.  $v$), which is a contradiction. Thus $t$ is a reduced tangent vector of $$({\mathrm{Spf}}R^\square/(Y_i:\{\pm \omega^{f-1-i}\} \cap I({\overline{\rho}},\mu) = \emptyset))/\widehat{\mathbf{G}}_m^2.$$

Let $\tau$ be the tame intertial type such that $\sigma(\tau) = R_s(\mu-s\eta)$ where $s\in W$ with $s_i \neq {\mathrm{id}}$ if and only if $\omega^{(i)} \in I({\overline{\rho}},\mu)$. Then the natural map from the quotient of $${\mathrm{Spf}}R^\square/(\varpi,\{Y_i:\{\pm \omega^{f-1-i}\} \cap I({\overline{\rho}},\mu) = \emptyset\},\{X_iY_i:\{\pm \omega^{f-1-i}\} \cap I({\overline{\rho}},\mu) \neq \emptyset\})$$ by $\widehat{\mathbf{G}}_m^2$ to ${\mathrm{Spf}}R^\tau/\varpi$ is formally smooth by Proposition \[prop:1defring\]. In fact, it is an isomorphism since the domain and codomain both have the dimension $3f+1$ over ${\mathcal{O}}$ by [@kisin Theorem 3.3.4]. Since the map $$\begin{aligned}
{\mathrm{Spf}}R^\square/(\varpi,\{Y_i:\{\pm \omega^{f-1-i}\} \cap I({\overline{\rho}},\mu) = \emptyset\},\{X_iY_i:\{\pm \omega^{f-1-i}\} \cap I({\overline{\rho}},\mu) \neq \emptyset\}) \\
{\rightarrow}{\mathrm{Spf}}R^\square/(Y_i:\{\pm \omega^{f-1-i}\} \cap I({\overline{\rho}},\mu) = \emptyset)\end{aligned}$$ is an isomorphism on reduced tangent spaces, $t$ is a reduced tangent vector of ${\mathrm{Spf}}R^\tau$. Since ${\mathrm{Spf}}R^\tau {\rightarrow}{\mathrm{Spf}}R_{{\overline{\rho}}|_{G_{K_\infty}}}^\square$ is injective on reduced tangent spaces, $t$ is zero.

Finally, since $R$ is $p$-flat, it suffices to show that for $s\in W$ and $I = \{s_i\omega^{(i)}\}$, $\mathbb{V}^*({\mathcal{M}}/(f_i(I))_i)$ is the restriction to $G_{K_\infty}$ of a versal potentially Barsotti–Tate deformation of ${\overline{\rho}}$ of type $\tau$ where $\sigma(\tau) = R_s(\mu-s\eta)$. This follows from Proposition \[prop:1defring\].

Modular Serre weights {#subsec:serre}
---------------------

Let ${\overline{\rho}}:G_K {\rightarrow}{\mathrm{GL}}_2({\mathbb{F}})$ be a Galois representation. [@BDJ] attaches to ${\overline{\rho}}$ a set $W({\overline{\rho}})$ of Serre weights (see also [@breuil §4] with the notation $\mathcal{D}({\overline{\rho}})$).

\[def:gen\] We say that ${\overline{\rho}}:G_K {\rightarrow}{\mathrm{GL}}_2({\mathbb{F}})$ is generic if for all $F(\mu-\eta)\in W({\overline{\rho}})$, $1 < \langle \mu-\eta,\alpha^{(i)} \rangle < p-2$ for all $i\in {\mathbb{Z}}/f$.

Note that if ${\overline{\rho}}$ is generic, then it is generic in the sense of [@EGS Definition 2.1.1].

Let ${\overline{\rho}}:G_K {\rightarrow}{\mathrm{GL}}_2({\mathbb{F}})$ be a generic Galois representation with $F(\mu-\eta) \in W({\overline{\rho}})$. Then there is a subset $I'({\overline{\rho}},\mu)$ of $S=\{\pm\omega^{(i)}\}_i$ with $\#(I'({\overline{\rho}},\mu)\cap \{\pm\omega^{(i)}\}) \leq 1$ for all $i$ such that $W({\overline{\rho}}) = \{\sigma_J:J \subset I'({\overline{\rho}},\mu)\}$.

There is a tame inertial type $\tau$ such that $W({\overline{\rho}}^{\mathrm{ss}}) = {\mathrm{JH}}(\overline{\sigma}(\tau))$ by the proof of [@EGS Proposition 3.5.2]. Then $\sigma(\tau)$ is of the form $R_s(\lambda-s\eta)$ with $s_i = {\mathrm{id}}$ for $i\neq 0$. Then by [@EGS Theorem 7.2.1(1)], $W({\overline{\rho}})$ is $\overline{\sigma}_J(\tau)$ where $J_{\min} \subset J \subset J_{\max}$ (using notation therein). The result now follows from [@LMS Proposition 2.4], noting that $\sigma_J(\tau)$ (in the notation of [@EGS §5.1]) is $\sigma_{J'}$ as defined with respect to $\lambda$ in §\[sec:proj\] with $-s_i\omega^{(i)}\in J'$ if and only if $i-1 \in J$.

\[prop:phi\] Let ${\overline{\rho}}:G_K {\rightarrow}{\mathrm{GL}}_2({\mathbb{F}})$ be a generic Galois representation with $F(\mu-\eta) \in W({\overline{\rho}})$ such that for each $i\in {\mathbb{Z}}/f$, $\mu_i = (c_i,1)$. Then there exists an étale $\varphi$-module ${\mathcal{M}}$ as in §\[subsec:hodge\] such that $\mathbb{V}^*({\mathcal{M}}) \cong {\overline{\rho}}$. Moreover, $I({\overline{\rho}},\mu)$ is $I'({\overline{\rho}},\mu)$.

Let $s\in W$ be such that $s_i \neq {\mathrm{id}}$ if and only if $\omega^{(i)} \in I'({\overline{\rho}},\mu)$, and let $\tau$ be the generic tame inertial type such that $\sigma(\tau) = R_s(\mu-s\eta)$. Then $W({\overline{\rho}})$ is a subset of ${\mathrm{JH}}(\overline{\sigma}(\tau))$ (this follows from [@Herzig Theorem 5.1] or the proof of [@LLLM2 Proposition 2.2.7]). Let $s_\tau\in S_2$ and $w\in W$ be as in the proof of Proposition \[prop:1defring\], so that we again have that $R_s(\mu-s\eta)$ is isomorphic to $R_{(s_\tau,{\mathrm{id}},\ldots,{\mathrm{id}})}(F^{-1}(w)\cdot (\mu-s\eta))$. Then ${\overline{\rho}}$ has a potentially Barsotti–Tate lift of type $\tau = \tau(s_\tau,F^{-1}(w)\cdot (\mu-s\eta))$ by [@EGS Theorem 7.2.1(1)]. Thus there exists a Kisin module ${\mathfrak{M}}$ (with quadratic unramified descent data) of type (the quadratic unramified base change of) $\tau$. In the notation of [@EGS], $F^{-1}(w)\cdot (\mu-s\eta) = ({\mathbf{m}},{\mathbf{m}}')$ defines an ordered pair of characters $(\eta,\eta')$ with $\eta = \omega_f^{-\sum_{i=0}^{f-1} m_i p^i}$ and $\eta' = \omega_f^{-\sum_{i=0}^{f-1} m'_i p^i}$ if $s_\tau = {\mathrm{id}}$ and $\eta = \omega_{2f}^{-\sum_{i=0}^{f-1} m_i p^i - p^f\sum_{i=0}^{f-1} m'_i p^i}$ and $\eta' = \eta^{p^f}$ otherwise. If $s' = (s'_i)_i \in W$ is defined by $s'_i = w_{f-i}$, then $s'$ is the orientation of $F^{-1}(w)\cdot (\mu-s\eta)$. Then as in the proof of Proposition \[prop:1defring\], we let $A^{(i-1)}$ be $\operatorname{Mat}_\beta(\phi^{(i-1)}_{{\mathfrak{M}}_R,s_{i}'(2)})$ for an eigenbasis $\beta$, so that if ${\mathcal{M}}= \prod_i {\mathbb{F}}((v)){\mathfrak{e}}^i \oplus {\mathbb{F}}((v)){\mathfrak{f}}^i$ is the $\varphi$-module with $\varphi({{\mathfrak{e}}}^{i-1},{{\mathfrak{f}}}^{i-1}) = M_{i-1}({{\mathfrak{e}}}^i,{{\mathfrak{f}}}^i)$ and $$\label{eqn:phimat}
M_i = A^{(i)}s_{f-1-i}^{-1}v^{\mu_i-s_i\eta^{(i)}},$$ then ${\overline{\rho}}\cong \mathbb{V}^*({\mathcal{M}})$ by a calculation similar to the one in the second paragraph of the proof of Proposition \[prop:1defring\]. There exists an eigenbasis $\beta$, which we now fix, such that for $A^{(i-1)}$ is $\overline{A}_j$ for $1\leq j\leq 3$ as in Theorem \[thm:fhdef\]. This follows from the analogue of [@LLLM Theorem 2.21] and the fact that the matrices of the form $\overline{A}_j$ form a set of representatives for the double coset $I{\widetilde{w}}_jI$ where $I$ is the upper triangular Iwahori subgroup and ${\widetilde{w}}_j$ is $$\begin{pmatrix}
  v &   \\
   & 1 \\
 \end{pmatrix},
\begin{pmatrix}
   & 1  \\
  v &  \\
 \end{pmatrix}, \textrm{ and }
\begin{pmatrix}
  1 &   \\
   & v \\
 \end{pmatrix},$$ for $j=1$, $2$, and $3$, respectively. Moreover, using [@EGS Lemma 7.4.1] and its analogue for cuspidal $\tau$, $A^{(i-1)}$ is $\overline{A}_2$ if and only if $\#(I'({\overline{\rho}},\mu) \cap \{\pm\omega^{(f-i)}\}) = 1$. We claim that for all $i$, $A^{(i-1)}$ is not $\overline{A}_1$. We would then have that $A^{(i-1)}$ is $\overline{A}_2$ if $\#(I'({\overline{\rho}},\mu) \cap \{\pm\omega^{(f-i)}\}) = 1$ and $\overline{A}_3$ otherwise. Both claims would then follow from (\[eqn:phimat\]) and a direct calculation.

That $A^{(i-1)}$ is not $\overline{A}_1$ comes from the fact that $F(\mu-\eta) \in W({\overline{\rho}})$. Again using [@EGS Lemma 7.4.1] and its analogue for cuspidal $\tau$, since $F(\mu-\eta) \in W({\overline{\rho}})$, if $w_{i+1} = {\mathrm{id}}$, then $i-1\notin I_\eta$ in the notation of [@EGS]. Since $s'_{f-1-i} = w_{i+1} = {\mathrm{id}}$, this means that $ A^{(f-1-i)} \neq \overline{A}_1$. Similarly, if $w_{i+1} \neq {\mathrm{id}}$, then $i-1\notin I_{\eta'}$ in the notation of [@EGS]. Since $s'_{f-1-i} = w_{i+1} \neq {\mathrm{id}}$, this also means that $ A^{(f-1-i)} \neq \overline{A}_1$.

Patching functors and multiplicity one
======================================

Let ${\overline{\rho}}:G_K{\rightarrow}{\mathrm{GL}}_2({\mathbb{F}})$ be a generic Galois representation and $\sigma {\stackrel{\textrm{\tiny{def}}}{=}}F(\mu-\eta)$ be a Serre weight in $W({\overline{\rho}})$ ($W({\overline{\rho}})$ is recalled in §\[subsec:serre\]). Define $w\in W$ and $I({\overline{\rho}},\mu) \subset S_w$ as in §\[sec:defring\]. Let $M_\infty(\cdot)$ be a minimal fixed determinant patching functor over ${\mathcal{O}}$ (see [@EGS Definition 6.1.3]). For a ${\mathcal{O}}_K[{\mathrm{GL}}_2({\mathcal{O}}_K)]$-module $N$, we will denote $M_\infty(N\otimes_{{\mathcal{O}}_K} {\mathcal{O}})$ by $M'_\infty(N)$, where tensor product is over the map ${\mathcal{O}}_K{\hookrightarrow}{\mathcal{O}}$ in §\[subsec:not\].

\[lemma:patch2\] The $R_\infty$-module $M'_\infty(R_{\mu}/\operatorname{Fil}^2 R_{\mu})$ is a cyclic.

Let $\tau$ be the tame type such that $\sigma(\tau) = R_w(\mu-w\eta)$. Let $\sigma^\circ(\tau) \subset \sigma(\tau)$ be the unique lattice up to homothety with cosocle isomorphic to $\sigma$ (see [@EGS Lemma 4.1.1]). Let $\overline{\sigma}^\circ(\tau)$ be the reduction of $\sigma^\circ(\tau)$. Then the natural map $R_\mu {\twoheadrightarrow}\overline{\sigma}^\circ(\tau)$ induces a map $R_\mu/\operatorname{Fil}^2 R_\mu {\twoheadrightarrow}\overline{\sigma}^\circ(\tau)/{\mathrm{rad}}^2 \overline{\sigma}^\circ(\tau)$. By [@EGS Theorem 5.1.1] and [@LMS Proposition 3.2], the kernel of this map contains no Jordan–Hölder factors in $W({\overline{\rho}})$. Thus, the induced map $M'_\infty(R_\mu/\operatorname{Fil}^2 R_\mu) {\twoheadrightarrow}M'_\infty(\overline{\sigma}^\circ(\tau)/{\mathrm{rad}}^2 \overline{\sigma}^\circ(\tau))$ is an isomorphism. As $M'_\infty(\overline{\sigma}^\circ(\tau))$ is a cyclic $R_\infty$-module by [@EGS Theorem 10.1.1], so is $M'_\infty(\overline{\sigma}^\circ(\tau)/{\mathrm{rad}}^2 \overline{\sigma}^\circ(\tau))$.

\[lemma:covering\] Suppose that $I \subset S$ such that $\#(I \cap \{\pm \omega^{(i)}\}) + \#(I({\overline{\rho}},\mu) \cap \{\pm \omega^{(i)}\}) = 1$. Let $N$ be a submodule of $\operatorname{Fil}^k R_{\mu,I}/\operatorname{Fil}^{k+2} R_{\mu,I}$ such that the cokernel of the projection of $N$ onto $\operatorname{gr}^k R_{\mu,I}$ contains no Serre weights in $W({\overline{\rho}})$. Then the quotient $(\operatorname{Fil}^k R_{\mu,I}/\operatorname{Fil}^{k+2} R_{\mu,I})/N$ contains no Jordan–Hölder factors in $W({\overline{\rho}})$.

It suffices to show that $\operatorname{gr}^{k+1} R_{\mu,I}/\operatorname{gr}^{k+1} N$ contains no Jordan–Hölder factors in $W({\overline{\rho}})$, since by assumption $\operatorname{gr}^k R_{\mu,I}/\operatorname{gr}^k N$ contains no Jordan–Hölder factors in $W({\overline{\rho}})$. In fact, it suffices to show that $\operatorname{gr}^{k+1} W_{{\mathbf{k}},{\mathbf{k}}+1,I}/(N \cap \operatorname{gr}^{k+1} W_{{\mathbf{k}},{\mathbf{k}}+1,I})$ contains no Jordan–Hölder factors in $W({\overline{\rho}})$ since $\sum_{|{\mathbf{k}}| = k} \operatorname{gr}^{k+1} W_{{\mathbf{k}},{\mathbf{k}}+1,I} = \operatorname{gr}^{k+1} R_{\mu,I}$.

By Proposition \[prop:Wk\], a Jordan–Hölder factor of $\operatorname{gr}^{k+1} W_{{\mathbf{k}},{\mathbf{k}}+1,I}$ has the form $\sigma_{J'}$ where $J' \cap I = \emptyset$ and there is a $j\in {\mathbb{Z}}/f$ such that if ${\mathbf{k}}(J') = {\mathbf{k}}'$ then $k'_i = k_i$ for all $i\neq j$ and $k'_j = k_j+1$. Suppose that $\sigma_{J'}\in W({\overline{\rho}})$. If $k'_j = 2$, then let $J = J' \setminus \{-w_j\omega^{(j)}\}$. Otherwise, $J' \cap \{\pm \omega^{(j)}\} = \{w_j\omega^{(j)}\}$ since we assumed that $\sigma_{J'} \in W({\overline{\rho}})$. In this case, let $J = J' \setminus \{w_j\omega^{(j)}\}$. Then $\sigma_J \in W({\overline{\rho}})$ and is thus a Jordan–Hölder factor of $N \cap W_{{\mathbf{k}},{\mathbf{k}}+1,I}$. By Proposition \[prop:ext\], $\sigma_{J'}$ is a Jordan–Hölder factor of $N$.

The following lemma generalizes [@EGS Lemma 10.1.13], one of the methods used to compute patched modules.

\[lemma:ca\] Let $R$ be a local ring, and $M'' \subset M' \subset M$ be $R$-modules such that $M'/M''$ and $M'$ are minimally generated by the same finite number of elements. Then $M'' \subset \mathfrak{m}M$. If, moreover, $M$ is finitely generated over $R$, then $M/M''$ and $M$ are minimally generated by the same number of elements.

By Nakayama’s lemma, that $M'/M''$ and $M'$ are minimally generated by the same finite number of elements implies that $M'' \subset \mathfrak{m}M'$ and thus $M'' \subset \mathfrak{m}M$. If $M$ is finitely generated, then another application of Nakayama’s lemma implies that $M/M''$ and $M$ are minimally generated by the same number of elements.

The following proposition generalizes the results and methods of [@HW; @LMS] by combining Lemmas \[lemma:patch2\], \[lemma:covering\], and \[lemma:ca\].

\[prop:oldcyc\] Suppose that $I \subset S$ such that $\#(I \cap \{\pm \omega^{(i)}\}) + \#(I({\overline{\rho}},\mu) \cap \{\pm \omega^{(i)}\}) = 1$. Then $M'_\infty({\widetilde{R}}_{\mu,I})$ is a cyclic $R_\infty$-module.

By Nakayama’s lemma, it suffices to show that $M'_\infty(R_{\mu,I})$ is a cyclic $R_\infty$-module. We will show that $M'_\infty(R_{\mu,I}/\operatorname{Fil}^{k+1} R_{\mu,I})$ is a cyclic $R_\infty$-module by induction on $k$. If $k=1$, then the result follows from Lemma \[lemma:patch2\].

Now suppose that $M'_\infty(R_{\mu,I}/\operatorname{Fil}^{k+1} R_{\mu,I})$ is a cyclic $R_\infty$-module. Let $\mathfrak{J}$ be $\{J\subset S:k(J) = k,J \cap I = \emptyset,\sigma_J \in W({\overline{\rho}})\}$. For each $J\in \mathfrak{J}$, let $\overline{V}_{J,I}$ be the image of $\overline{V}_J$ in $R_{\mu,I}/\operatorname{Fil}^{k+2} R_{\mu,I}$ where $\overline{V}_J$ is defined before [@LMS Proposition 3.9]. Note that $M'_\infty(\overline{V}_{J,I})$ is a cyclic $R_\infty$-module by Lemma \[lemma:patch2\]. Let $\overline{V}$ be $\sum_{J\in \mathfrak{J}} \overline{V}_{J,I} \subset \operatorname{Fil}^k R_{\mu,I}/\operatorname{Fil}^{k+2} R_{\mu,I}$. By Lemma \[lemma:covering\], the quotient $(\operatorname{Fil}^k R_{\mu,I}/\operatorname{Fil}^{k+2} R_{\mu,I})/\overline{V}$ does not contain any Jordan–Hölder factors in $W({\overline{\rho}})$. Thus the natural inclusion $M'_\infty(\overline{V}) \subset M'_\infty(\operatorname{Fil}^k R_{\mu,I}/\operatorname{Fil}^{k+2} R_{\mu,I})$ is an equality. In particular, $M'_\infty(\operatorname{Fil}^k R_{\mu,I}/\operatorname{Fil}^{k+2} R_{\mu,I})$ is generated by no more than $\# \mathfrak{J}$ elements. On the other hand, $M'_\infty(\operatorname{gr}^k R_{\mu,I}) \cong \oplus_{J\in \mathfrak{J}} M'_\infty(\sigma_J)$ is generated by (at least) $\#\mathfrak{J}$ elements. By Lemma \[lemma:ca\] with $M = M'_\infty(R_{\mu,I}/\operatorname{Fil}^{k+2} R_{\mu,I})$, $M' = M'_\infty(\operatorname{Fil}^k R_{\mu,I}/\operatorname{Fil}^{k+2} R_{\mu,I})$, and $M'' = \operatorname{gr}^{k+1} R_{\mu,I}$, $M'_\infty(R_{\mu,I}/\operatorname{Fil}^{k+2} R_{\mu,I})$ is a cyclic $R_\infty$-module.

\[prop:supp\] The scheme-theoretic support of $M'_\infty({\widetilde{R}}_{\sigma,I})$ is ${\mathrm{Spec}\ }(R_\infty \widehat{\otimes}_{R_{{\overline{\rho}}}^\square} R^{T_{\sigma,I}})$.

Since $M'_\infty({\widetilde{R}}_{\sigma,I})[p^{-1}]$ is isomorphic to $\oplus_{\sigma(\tau) \in T_{\sigma,I}} M'_\infty(\sigma(\tau))$, the scheme-theoretic support of $M'_\infty({\widetilde{R}}_{\sigma,I})[p^{-1}]$ is $\cup_{\sigma(\tau) \in T_{\sigma,I}} {\mathrm{Spec}\ }(R_\infty \widehat{\otimes}_{R_{{\overline{\rho}}}^\square} R^\tau)[p^{-1}]$ by the proof of [@EGS Theorem 9.1.1]. Since $M'_\infty({\widetilde{R}}_{\sigma,I})$ is ${\mathcal{O}}$-flat by definition of a patching functor, the scheme-theoretic support of $M'_\infty({\widetilde{R}}_{\sigma,I})$ is the Zariski closure of that of $M'_\infty({\widetilde{R}}_{\sigma,I})[p^{-1}]$. The result now follows from the definition of ${\mathrm{Spec}\ }R^{T_{\sigma,I}}$.

In order to weaken the hypotheses on $I$ in Proposition \[prop:oldcyc\], we compute an integral scheme intersection, of which the following lemma is the key example.

\[lemma:glue\] There is an exact sequence $$0 {\rightarrow}{\mathcal{O}}[\![Y]\!]/(Y(Y-p)) {\rightarrow}{\mathcal{O}}[\![Y]\!]/(Y) \oplus {\mathcal{O}}[\![Y]\!]/(Y-p) {\rightarrow}{\mathcal{O}}[\![Y]\!]/(Y,p) {\rightarrow}0,$$ where the second and third maps are the sum and difference, respectively, of the natural projections.

Given a ring $R$ and ideals $I$ and $J\subset R$, the sequence $$0 {\rightarrow}R/ (I \cap J) {\rightarrow}R/I \oplus R/J {\rightarrow}R/(I+J) {\rightarrow}0,$$ where the second and third maps are the sum and difference, respectively, of the natural projections, is exact. The lemma follows from this exact sequence and the relations $(Y) \cap (Y-p) = (Y(Y-p))$ and $(Y)+(Y-p) = (Y,p)$ in ${\mathcal{O}}[\![Y]\!]$.

The following is our main result in the setting of patching functors.

\[thm:multone\] Suppose that $I \subset S$ such that $\#(I \cap \{\pm \omega^{(i)}\}) + \#(I({\overline{\rho}},\mu) \cap \{\pm \omega^{(i)}\}) \leq 1$. Then $M'_\infty({\widetilde{R}}_{\mu,I})$ is a cyclic $R_\infty$-module.

We proceed by induction on $k := f - \#I({\overline{\rho}},\mu) - \#I$. The case $k=0$ follows from Proposition \[prop:oldcyc\]. Suppose that $k>0$ and that $(I\cup I({\overline{\rho}},\mu))\cap \{\pm\omega^{(j)}\} = \emptyset$. Then there is an exact sequence $$0 {\rightarrow}{\widetilde{R}}_{\mu,I} {\rightarrow}{\widetilde{R}}_{\mu,I \cup \{\omega^{(j)}\} } \oplus {\widetilde{R}}_{\mu,I \cup \{-\omega^{(j)}\} } {\rightarrow}R_{\mu,I \cup \{\pm\omega^{(j)}\} } {\rightarrow}0,$$ which induces an exact sequence $$0 {\rightarrow}M'_\infty({\widetilde{R}}_{\mu,I}) {\rightarrow}M'_\infty({\widetilde{R}}_{\mu,I \cup \{\omega^{(j)}\} }) \oplus M'_\infty({\widetilde{R}}_{\mu,I \cup \{-\omega^{(j)}\} }) {\rightarrow}M'_\infty(R_{\mu,I \cup \{\pm\omega^{(j)}\} }) {\rightarrow}0,$$ where the third map is the sum of two surjections by exactness of $M'_\infty(\cdot)$. By the inductive hypothesis and Proposition \[prop:supp\], $M'_\infty({\widetilde{R}}_{\mu,I \cup \{\omega^{(j)}\} })$ and $M'_\infty({\widetilde{R}}_{\mu,I \cup \{-\omega^{(j)}\} })$ are cyclic $R_\infty$-modules with scheme-theoretic support ${\mathrm{Spec}\ }R_\infty \widehat{\otimes}_{R_{{\overline{\rho}}}^\square} R^{T_{\sigma,I \cup \{\omega^{(j)}\} }}$ and ${\mathrm{Spec}\ }R_\infty \widehat{\otimes}_{R_{{\overline{\rho}}}^\square}R^{T_{\sigma,I \cup \{-\omega^{(j)}\} }}$, respectively. The scheme-theoretic support of $M'_\infty(R_{\mu,I \cup \{\pm\omega^{(j)}\} })$ is thus a closed subscheme of the intersections of ${\mathrm{Spec}\ }R_\infty \widehat{\otimes}_{R_{{\overline{\rho}}}^\square} R^{T_{\sigma,I \cup \{\omega^{(j)}\} }}$ and ${\mathrm{Spec}\ }R_\infty \widehat{\otimes}_{R_{{\overline{\rho}}}^\square} R^{T_{\sigma,I \cup \{-\omega^{(j)}\} }}$, which is ${\mathrm{Spec}\ }R_\infty \widehat{\otimes}_{R_{{\overline{\rho}}}^\square} R^{T_{\sigma,I \cup \{\omega^{(j)}\} }}/p$ by Theorem \[thm:defring\] and Proposition \[prop:phi\] (we can assume without loss of generality that $\mu$ has the form in §\[sec:defring\] by twisting). Since $M'_\infty(R_{\mu,I \cup \{\pm\omega^{(j)}\} })$ is a cyclic $R_\infty$-module, there is a surjection $$R_\infty \widehat{\otimes}_{R_{{\overline{\rho}}}^\square} R^{T_{\sigma,I \cup \{\omega^{(j)}\} }}/p {\twoheadrightarrow}M'_\infty(R_{\mu,I \cup \{\pm\omega^{(j)}\} }).$$ Since $\{\pm \omega^{(j)} \} \cap I({\overline{\rho}},\mu) = \emptyset$, from Proposition \[prop:Wk\] we see that $M'_\infty(R_{\mu,I \cup \{\omega^{(j)}\} })$ and $M'_\infty(R_{\mu,I \cup \{\pm\omega^{(j)}\} })$ have the same Hilbert–Samuel multiplicity. Thus, both sides of the map $R_\infty \widehat{\otimes}_{R_{{\overline{\rho}}}^\square} R^{T_{\sigma,I \cup \{\omega^{(j)}\} }}/p {\twoheadrightarrow}M'_\infty(R_{\mu,I \cup \{\pm\omega^{(j)}\} })$ have the same Hilbert–Samuel multiplicity. Since $R^{T_{\sigma,I \cup \{\omega^{(j)}\} }}/p$ contains no embedded primes, this map is an isomorphism (see the argument of [@le Lemma 6.1.1]).

In summary, there is an exact sequence $$0 {\rightarrow}M'_\infty({\widetilde{R}}_{\mu,I}) {\rightarrow}R_\infty \widehat{\otimes}_{R_{{\overline{\rho}}}^\square} R^{T_{\sigma,I \cup \{\omega^{(j)}\} }} \oplus R_\infty \widehat{\otimes}_{R_{{\overline{\rho}}}^\square} R^{T_{\sigma,I \cup \{-\omega^{(j)}\} }} {\rightarrow}R_\infty \widehat{\otimes}_{R_{{\overline{\rho}}}^\square} R^{T_{\sigma,I \cup \{\omega^{(j)}\} }}/p {\rightarrow}0,$$ where the third map is the sum of two surjections. Any lift of a generator under a surjection between two cyclic modules over a local ring is again a generator by Nakayama’s lemma. Hence, we can assume that the third map is the difference of the natural projections. Then by Theorem \[thm:defring\] and Proposition \[prop:phi\], this exact sequence is obtained from taking a completed tensor product with the exact sequence in Lemma \[lemma:glue\]. Hence, we see that $M'_\infty({\widetilde{R}}_{\mu,I}) \cong R_\infty \widehat{\otimes}_{R_{{\overline{\rho}}}^\square} R^{T_{\sigma,I}}$, and in particular that $M'_\infty({\widetilde{R}}_{\mu,I})$ is a cyclic $R_\infty$-module.

Global results {#sec:main}
==============

Let $F$ be a totally real field in which $p$ is unramified. Let $D_{/F}$ be a quaternion algebra which is unramified at all places dividing $p$ and at most one infinite place, and let ${\overline{r}}:G_F {\rightarrow}{\mathrm{GL}}_2({\mathbb{F}})$ be a Galois representation. If $D_{/F}$ is indefinite and $K = \prod_w K_w \subset (D\otimes_F {\mathbb{A}}_F^\infty)^\times$ is an open compact subgroup, then there is a smooth projective curve $X_K$ defined over $F$ and we define $S(K,{\mathbb{F}})$ to be $H^1((X_K)_{/\overline{F}},{\mathbb{F}})$. If $D_{/F}$ is definite, then we let $S(K,{\mathbb{F}})$ be the space of $K$-invariant continuous functions $$f: D^\times\backslash (D\otimes_F \mathbb{A}_F^\infty)^\times {\rightarrow}{\mathbb{F}}.$$ Let $S$ be the union of the set of places in $F$ where ${\overline{r}}$ is ramified, the set of places in $F$ where $D$ is ramified, and the set of places in $F$ dividing $p$. Let $\mathbb{T}^{S,\mathrm{univ}}$ be the commutative polynomial algebra over ${\mathcal{O}}$ generated by the formal variables $T_w$ and $S_w$ for each $w \notin S\cup \{w_1\}$ where $w_1$ is chosen as in [@EGS §6.2]. Then $\mathbb{T}^{S,\mathrm{univ}}$ acts on $S({\mathbb{F}})$ with $T_w$ and $S_w$ acting by the usual double coset action of $$\big[ {\mathrm{GL}}_2({\mathcal{O}}_{F_w}) \begin{pmatrix}
  \varpi_w &   \\
   & 1 \\
 \end{pmatrix}{\mathrm{GL}}_2({\mathcal{O}}_{F_w}) \big]$$ and $$\big[ {\mathrm{GL}}_2({\mathcal{O}}_{F_w}) \begin{pmatrix}
  \varpi_w &   \\
   & \varpi_w \\
 \end{pmatrix}{\mathrm{GL}}_2({\mathcal{O}}_{F_w}) \big],$$ respectively. Let $\mathbb{T}^{S,\mathrm{univ}}{\rightarrow}{\mathbb{F}}$ be the map such that the image of $X^2 - T_w X + (\mathbb{N}w) S_w$ in ${\mathbb{F}}[X]$ is the characteristic polynomial of ${\overline{\rho}}({\mathrm{Frob}}_w)$, and let the kernel be ${\mathfrak{m}}_{{\overline{r}}}$.

For the rest of the section, suppose that

1.  ${\overline{r}}$ is modular, i.e. that there exists $K$ such that $S(K,{\mathbb{F}})_{{\mathfrak{m}}_{{\overline{r}}}}$ is nonzero;

2.  ${\overline{r}}|_{G_{F(\zeta_p)}}$ is absolutely irreducible;

3.  if $p=5$ then the image of ${\overline{r}}(G_{F(\zeta_p)})$ in ${\mathrm{PGL}}_2({\mathbb{F}})$ is not isomorphic to $A_5$;

4.  ${\overline{r}}|_{G_{F_w}}$ is generic (Definition \[def:gen\]) for all places $w|p$; and

5.  ${\overline{r}}|_{G_{F_w}}$ is non-scalar at all finite places where $D$ ramifies.

Let $v|p$ be a place of $F$, and let ${\overline{\rho}}$ be ${\overline{r}}|_{G_{F_v}}$.

We define $S^{\mathrm{min}}$ to be $S(K^v,\otimes_{w\in S,w\neq v} L_w)_{{\mathfrak{m}}'_{{\overline{r}}}}$ as in [@EGS §6.5]. We define $M^{\mathrm{min}}$ to be the linear dual of $S^{\mathrm{min}}$, factoring out the Galois action in the indefinite case (see [@EGS §6.2]).

\[thm:K1multone\] Suppose that ${\overline{r}}:G_F {\rightarrow}{\mathrm{GL}}_2({\mathbb{F}})$ is a Galois representation satisfying $(1)$-$(5)$. If $\sigma \in W({\overline{\rho}})$ and $R_\sigma$ is the ${\mathcal{O}}[{\mathrm{GL}}_2({\mathbb{F}}_q)]$-projective envelope of $\sigma$, then ${\mathrm{Hom}}_{{\mathcal{O}}[{\mathrm{GL}}_2({\mathbb{F}}_q)]}(R_\sigma,(M^{\mathrm{min}})^*)$ is one-dimensional.

Let $\sigma = F(\mu-\eta) \in W({\overline{\rho}})$. Then $R_\sigma$ is $R_\mu \otimes_{{\mathbb{F}}_q} {\mathbb{F}}$. Let $M_\infty$ be the minimal fixed determinant patching functor defined in [@EGS §6.5]. By construction, if ${\mathfrak{m}}_{R_\infty}$ is the maximal ideal of $R_\infty$, then ${\mathrm{Hom}}_{{\mathrm{GL}}_2({\mathbb{F}}_q)}(R_\sigma,(M^{\mathrm{min}})^*)$ is the dual of $M_\infty(R_\sigma)/{\mathfrak{m}}_{R_\infty} = M_\infty'(R_\mu)/{\mathfrak{m}}_{R_\infty}$, which is one dimensional since $M'_\infty(R_\mu)$ is a cyclic $R_\infty$-module by Theorem \[thm:multone\].

Let $M^{\mathrm{min}}(K_v(1))$ denote the coinvariants $(M^{\mathrm{min}})_{K_1}$. Note that $M^{\mathrm{min}}(K_v(1))$ is isomorphic to the dual of $S(K^vK_v(1),\otimes_{w\in S,w\neq v} L_w)_{{\mathfrak{m}}'_{{\overline{r}}}}$, factoring out the Galois action in the indefinite case, by a standard spectral sequence argument using that ${\mathfrak{m}}_{{\overline{r}}}'$ is non-Eisenstein.

\[cor:main\] Suppose that ${\overline{r}}:G_F {\rightarrow}{\mathrm{GL}}_2({\mathbb{F}})$ is a Galois representation satisfying $(1)$-$(5)$. Then the ${\mathrm{GL}}_2({\mathbb{F}}_q)$-representation $(M^{\mathrm{min}}(K_v(1)))^*$ is isomorphic to $D_0({\overline{\rho}})$. In particular, $(M^{\mathrm{min}}(K_v(1)))^*$ depends only on ${\overline{\rho}}$ and is multiplicity free.

There is an injection $D_0({\overline{\rho}}) {\hookrightarrow}(M^{\mathrm{min}}(K_v(1)))^*$ by [@breuil Proposition 9.3]. Fix an ${\mathbb{F}}[{\mathrm{GL}}_2({\mathbb{F}}_q)]$-injective hull $(M^{\mathrm{min}}(K_v(1)))^* {\hookrightarrow}I$. Since $${\mathrm{Hom}}_{{\mathrm{GL}}_2({\mathbb{F}}_q)}(R_\sigma,(M^{\mathrm{min}}(K_v(1)))^*)$$ is one-dimensional for all $\sigma \in W({\overline{\rho}})$ by Theorem \[thm:K1multone\], this injective hull factors through $D_0({\overline{\rho}})$ by [@BP Theorem 1.1(i)]. Since $D_0({\overline{\rho}})$ and $(M^{\mathrm{min}}(K_v(1)))^*$ are finite length ${\mathbb{F}}[{\mathrm{GL}}_2({\mathbb{F}}_q)]$-modules, they must be isomorphic. Finally, note that $D_0({\overline{\rho}})$ is multiplicity free by [@BP Theorem 1.1(ii)].
