We defined the connectedness dimension of a complete local Noetherian ring $R$ as the minimum dimension $c(R)$ of $W \subseteq \operatorname{Spec} R$ such that $\operatorname{Spec} R - W$ is disconnected. This is also the minimum of $\dim(C_1 \cap C_2)$ such that $C_1, C_2$ are unions of irreducible components of $\operatorname{Spec} R$ with $C_1 \cup C_2 = \operatorname{Spec} R$. For $I \subseteq R$ and $M$ an $R$-module, we looked at $$ H_I^i(M) = \varinjlim_n \operatorname{Ext}_ R^i(R/I^n, M). $$
Proposition 1. If $R$ is a domain and $J_1, J_2 \subseteq R$ satisfies $\dim R/J_1, \dim R/J_2 \gt \dim R/(J_1+J_2)$ then $V(J_1 \cap J_2)$ cannot be cut out by less than $\dim R - \dim R/(J_1+J_2) - 1$ elements of $R$.
Proof.
We will induct on $d = \dim R/(J_1+J_2)$. When $d = 0$, we have $\sqrt{J_1+J_2} = \mathfrak{m}$ and so there is the long exact sequence $$ \dotsb \to H_{J_1 \cap J_2}^{\dim R-1}(R) \to H_\mathfrak{m}^{\dim R}(R) = H_{J_1+J_2}^{\dim R}(R) \to H_{J_1}^{\dim R}(R) \oplus H_{J_2}^{\dim R}(R) \to \dotsb. $$ The right term is zero (by Hartshorne–Lichtenbaum) and the middle term is nonzero. So $H_{J_1 \cap J_2}^{\dim R-1}(R) \neq 0$, and this means that it cannot be cut out by less than $\dim R - 1$ equations.
In the case $d \gt 0$, let $\mathfrak{p}_ 1, \dotsc, \mathfrak{p}_ n$ be the minimal primes containing $J_1+J_2$. We see that $\mathfrak{m} \subsetneq \bigcup_i \mathfrak{p}_ i$, and so there exists $a \in \mathfrak{m} - \cup_i \mathfrak{p}_ i$. Now if we take $J_i^\prime = (J_i, a)$ then $\dim R / (J_1^\prime+J_2^\prime) = \dim R/(J_1+J_2) - 1$, and $\dim R/J_i^\prime \ge \dim R/J_i - 1$. So $V(J_1^\prime \cap J_2^\prime)$ cannot be cut out by fewer then $\dim R - \dim R/(J_1+J_2)$ elements, and so $V(J_1 \cap J_2)$ cannot be cut out by fewer than $\dim R - \dim R/(J_1+J_2) - 1$ elements.
Corollary 2. If $R$ is a complete Noetherian local domain and $f_1, \dotsc, f_m \in R$ then $c(R/(f_1, \dotsc, f_m)) \ge \dim R - m - 1$.
Proof.
If $V(f_1, \dotsc, f_m)$ is irreducible then $c \ge \dim R - m$ and so this is clear. If not, we should be able to find $C_1, C_2 \subseteq V(f_1, \dotsc, V_m)$ unions of components such that $C_1 \cup C_2 = V(f_1, \dotsc, V_m)$ and they have no irreducible components in common. Now we can apply this fact above.
The Skinner–Wiles argument
Let us go back to the situation where $F/\mathbb{Q}$ is totally real of even degree, where $\ell$ splits completely. We have some residual Galois representation $\bar{r} \colon G_F \to \mathrm{GL}_ 2(\mathbb{F})$ that is modular, absolutely irreducible, with $\det \bar{r} = \bar{\epsilon}_ \ell^{-1}$. But the case of interest now is when $$ \bar{r} = \operatorname{Ind}_ {G_E}^{G_F} \bar{\chi} $$ where $F(\zeta_\ell) \supseteq E \supseteq F$ with $E/F$ quadratic.
By base change we can arrange $\bar{r}$ to be only ramify above $\ell$. We had a finite set of places $R$ of $F$ with $q_v \equiv 1 \pmod{\ell}$ and $\bar{r} \vert_{G_{F_v}} = 1$ for $v \in R$, and then we were interested in lifts of $\bar{r}$ which is unramified away from $\ell$ and $R$, with $\det = \epsilon_\ell^{-1}$ satisfying $\tr r(\sigma) = 2$ for $\sigma \in I_{F_v}$ and $v \in R$. We had a universal such lift $$ r^\mathrm{univ} \colon G_F \to \mathrm{GL}_ 2(R_\emptyset^\mathrm{univ}) $$ and defined a Hecke algebra $\mathbb{T}_ \emptyset$ acting on completed cohomology which gave us $R_\emptyset^\mathrm{univ} \to \mathbb{T}_ \emptyset$. We showed that this has nilpotent kernel, except in this case we want to put ourselves in.
Definition 3. We say that a prime $\mathfrak{p} \in \operatorname{Spec} R_\emptyset^\mathrm{univ}$ is pro-modular if it is in the image of $\operatorname{Spec} \mathbb{T}_ \emptyset$.
Theorem 4. Suppose $\mathfrak{p} \in \operatorname{Spec} R_\emptyset^\mathrm{univ}$ is pro-modular and $\dim R_\emptyset^\mathrm{univ} / \mathfrak{p} \ge [F:\mathbb{Q}] + 3 \lvert R \rvert + 2$ then any prime contained in $\mathfrak{p}$ is pro-modular.
Assuming this, we can deduce the following.
Theorem 5. If $[F:\mathbb{Q}] \ge 4 \lvert R \rvert + 2$ then every prime of $\operatorname{Spec} R_\emptyset^\mathrm{univ}$ is pro-modular.
Proof.
We can show that $\dim \mathbb{T}_ \emptyset^\mathrm{univ} \ge 1 + 2[F:\mathbb{Q}]$ and so $R_\emptyset^\mathrm{univ}$ has some pro-modular prime of dimension $1 + 2[F:\mathbb{Q}] \ge [F:\mathbb{Q}] + 3\lvert R \rvert + 2$. This means that $\operatorname{Spec} R_\emptyset^\mathrm{univ}$ has some pro-modular irreducible component by the theorem.
Let $C_1$ be the union of pro-modular irreducible components and let $C_2$ be the union of non-pro-modular irreducible components of $\operatorname{Spec} R_\emptyset^\mathrm{univ}$. If both $C_1$ and $C_2$ are nonempty, $$ \dim (C_1 \cap C_2) \lt [F:\mathbb{Q}] + 3 \lvert R \rvert + 2 $$ by the theorem. On the other hand, we have a map $$ \tilde{R}_ \emptyset^\mathrm{univ} \twoheadrightarrow R_\emptyset^\mathrm{univ} $$ that forgets about this condition that $\tr r(\sigma) = 2$ for $\sigma \in I_{F_v}$ and $v \in R$. This is cutting out by $\lvert R \rvert$ equations. We also had $$ \tilde{R}_ \emptyset^\mathrm{univ} = \mathcal{O}[[x_1, \dotsc, x_{h_1}]] / (f_1, \dotsc, f_{h_2}), \quad h_i = \dim H^i(G_{F, R \cup \lbrace v \mid \ell \rbrace}, \mathrm{ad}^0 \bar{r}). $$ This shows that $$ c(R_\emptyset^\mathrm{univ}) \ge 1 + h_1 - h_2 - \lvert R \rvert - 1 = h_0 + \sum_{v \mid \infty} (3-1) - \lvert R \rvert = 2 [F:\mathbb{Q}] - \lvert R \rvert. $$ By assumption, $[F:\mathbb{Q}] \ge 4\lvert R \rvert + 2$, and then $c(R_\emptyset^\mathrm{univ}) \gt \dim(C_1 \cap C_2)$ gives contradiction.
But in some sense this is condition $[F:\mathbb{Q}] \ge 4\lvert R \rvert + 2$ is harmless because we can do base change. Choose $f$ such that $[F:\mathbb{Q}] f \gt 4 \lvert R \rvert$. We can look for $F^\prime/F$ a soluble Galois extension such that
- $\ell$ splits completely in $F^\prime$,
- $v$ is unramified in $F^\prime$ with residue degree $f$,
- $F^\prime$ is linearly disjoint form $\bar{F}^{\ker \bar{r}}$,
- $[F^\prime:F]$ sufficiently large.
Then we can apply this theorem to $F^\prime$ and see that $\operatorname{Spec} R_{\emptyset,F^\prime}^\mathrm{univ} = \operatorname{Spec} \mathbb{T}_{\emptyset,F^\prime}$. Using this argument, we can get modularity of Galois representations $r$ for $F$ as well.
Remark 6. It seems really important that we are working with $R_\emptyset^\mathrm{univ}$ and not the de Rham version. If not, the dimension doesn’t grow as we go to larger fields.
The dihedral locus
We now want to prove the theorem. Consider $$ R_E^\mathrm{dih} = R_\emptyset^\mathrm{univ} / \langle \tr r^\mathrm{univ}(\sigma) = 0 \text{ for } \sigma \in G_F - G_E \rangle. $$ In other words, $\mathfrak{p} \subseteq R_\emptyset^\mathrm{univ}$ is prime then $r^\mathrm{univ} \otimes k(\mathfrak{p})$ is induced from $G_E$ if and only if $\mathfrak{p} \in \operatorname{Spec} R_E^\mathrm{dih}$.
Lemma 7. We have $\dim R_E^\mathrm{dih} / \lambda \le [F:\mathbb{Q}]$.
Proof.
For $\mathfrak{q}$ a prime of $R_E^\mathrm{dih}/\lambda$, we have $r^\mathrm{univ} \otimes k(\mathfrak{q}) = \operatorname{Ind}_ {G_E}^{G_F}(\chi)$. By definition we have $\bar{r} = \operatorname{Ind}_ {G_E}^{G_F}(\bar{\chi})$. Fix $\sigma \in G_F - G_E$. Because $\bar{r}$ has to be absolutely irreducible, there exists a $\tau \in G_E$ such that $\bar{\chi}(\sigma \tau \sigma^{-1}) \neq \bar{\chi}(\tau)$. So we can choose a basis of $R_E^\mathrm{dih} / \mathfrak{q}$ such that $$ (r^\mathrm{univ} \bmod{\mathfrak{q}})(\tau) = \begin{pmatrix} \chi(\tau) & 0 \br 0 & \chi(\sigma \tau \sigma^{1}) \end{pmatrix}. $$ Since these two are different modulo $\mathfrak{m}$, we have $$ (r^\mathrm{univ} \bmod{\mathfrak{q}})(\tau^\prime) = \begin{pmatrix} \chi(\tau^\prime) & 0 \br 0 & \chi(\sigma \tau^\prime \sigma^{1}) \end{pmatrix}. $$ for all $\tau^\prime \in G_E$. So we just have to look at the deformation ring of the character (with $\chi \chi^\sigma = \epsilon_\ell^{-1}$ because we are fixing the determinant), and this has dimension $[E:\mathbb{Q}]/2 = [F:\mathbb{Q}]$.