[proofplan]
We prove the statement by applying the semistable modularity theorem proved by Wiles and completed with Taylor-Wiles patching. The input is a semistable elliptic curve $E/\mathbb Q$; the theorem applies precisely to such curves and returns a weight-$2$ cuspidal newform of level equal to the conductor of $E$ whose compatible Galois representations agree with those attached to $E$. Equality of the associated Galois representations gives equality of Euler factors at all primes and hence equality of $L$-functions, which is the modularity of $E$.
[/proofplan]
[step:Attach the conductor and Galois representations to the semistable elliptic curve]
Let $E$ be a semistable elliptic curve over $\mathbb Q$. Let $N_E \in \mathbb N$ denote the conductor of $E$. For each prime number $\ell$, let
\begin{align*}
\rho_{E,\ell}: \operatorname{Gal}(\overline{\mathbb Q}/\mathbb Q) &\to GL_2(\mathbb Q_\ell)
\end{align*}
be the $\ell$-adic Galois representation on the rational Tate module defined by
\begin{align*}
V_\ell(E) := T_\ell(E) \otimes_{\mathbb Z_\ell} \mathbb Q_\ell.
\end{align*}
Since $E$ is semistable, its reduction at every prime is either good or multiplicative; this is exactly the local hypothesis required in Wiles's semistable modularity theorem.
[guided]
We begin with the objects to which the modularity theorem applies. The curve $E$ is an elliptic curve over $\mathbb Q$, and semistability means that at each prime of $\mathbb Z$ the reduction is either good or multiplicative. Let $N_E \in \mathbb N$ denote the conductor of $E$, which records the bad reduction primes with the conductor exponents determined by the local Galois action.
For each prime number $\ell$, the Tate module $T_\ell(E)$ is a free $\mathbb Z_\ell$-module of rank $2$. Define its rationalization by
\begin{align*}
V_\ell(E) := T_\ell(E) \otimes_{\mathbb Z_\ell} \mathbb Q_\ell.
\end{align*}
This is a $2$-dimensional $\mathbb Q_\ell$-[vector space](/page/Vector%20Space). The absolute [Galois group](/page/Galois%20Group) acts on torsion points of $E$, so it acts on $T_\ell(E)$ and therefore on $V_\ell(E)$. This gives the representation
\begin{align*}
\rho_{E,\ell}: \operatorname{Gal}(\overline{\mathbb Q}/\mathbb Q) &\to GL_2(\mathbb Q_\ell).
\end{align*}
The hypothesis that $E$ is semistable is not cosmetic: it is the local condition under which Wiles's modularity lifting theorem was proved. Thus the theorem's hypotheses are exactly matched by the curve presently under consideration.
[/guided]
[/step]
[step:Apply Wiles's semistable modularity theorem to obtain a rational weight-$2$ newform]
We use the following precise form of Wiles's semistable modularity theorem, completed by the Taylor-Wiles method: if $A$ is a semistable elliptic curve over $\mathbb Q$ with conductor $N_A$, then there exists a normalized cuspidal newform of weight $2$, level $N_A$, and rational Fourier coefficients whose compatible Galois representations agree with those attached to $A$. Applying this theorem to the semistable elliptic curve $E/\mathbb Q$, there exists a normalized newform
\begin{align*}
f: \mathfrak H &\to \mathbb C
\end{align*}
with $f \in S_2(\Gamma_0(N_E))$, where $\mathfrak H := \{z \in \mathbb C : \operatorname{Im}(z) > 0\}$ denotes the complex upper half-plane. Write its Fourier expansion as
\begin{align*}
f(z) = \sum_{n=1}^{\infty} a_n(f) q^n, \qquad q := e^{2\pi i z},
\end{align*}
with $a_1(f)=1$ and $a_n(f) \in \mathbb Q$ for every $n \in \mathbb N$. For each prime number $\ell$, let
\begin{align*}
\rho_{f,\ell}: \operatorname{Gal}(\overline{\mathbb Q}/\mathbb Q) &\to GL_2(\mathbb Q_\ell)
\end{align*}
be the $\ell$-adic Galois representation attached to the rational newform $f$. The theorem gives an isomorphism $\rho_{f,\ell}^{\mathrm{ss}} \cong \rho_{E,\ell}^{\mathrm{ss}}$ for every prime number $\ell$.
[guided]
We now use the central external input, and we state the version being used with the data needed later. Wiles's semistable modularity theorem, completed by the Taylor-Wiles method, says that if $A$ is a semistable elliptic curve over $\mathbb Q$ with conductor $N_A$, then $A$ is associated to a normalized cuspidal newform of weight $2$, level $N_A$, and rational Fourier coefficients. It also supplies equality, after semisimplification, between the compatible $\ell$-adic Galois representations attached to the curve and those attached to the newform.
The hypotheses are verified as follows. The curve $E$ is an elliptic curve over $\mathbb Q$ by hypothesis. It is semistable by hypothesis. Its conductor $N_E$ has been defined in the preceding step. Therefore Wiles's theorem applies to $E$ and gives a normalized newform
\begin{align*}
f: \mathfrak H &\to \mathbb C
\end{align*}
with $f \in S_2(\Gamma_0(N_E))$, where $\mathfrak H := \{z \in \mathbb C : \operatorname{Im}(z) > 0\}$. Write the Fourier expansion of $f$ as
\begin{align*}
f(z) = \sum_{n=1}^{\infty} a_n(f) q^n, \qquad q := e^{2\pi i z}.
\end{align*}
Normalization means $a_1(f)=1$, and the rationality conclusion in the cited theorem gives $a_n(f) \in \mathbb Q$ for every $n \in \mathbb N$. Because the Fourier coefficients are rational, the coefficient field of $f$ is $\mathbb Q$, so for each prime number $\ell$ the Galois representation attached to $f$ may be written as
\begin{align*}
\rho_{f,\ell}: \operatorname{Gal}(\overline{\mathbb Q}/\mathbb Q) &\to GL_2(\mathbb Q_\ell).
\end{align*}
The theorem supplies the compatibility between $f$ and $E$: for every prime number $\ell$, the semisimplified representation $\rho_{f,\ell}^{\mathrm{ss}}$ is isomorphic to $\rho_{E,\ell}^{\mathrm{ss}}$. This representation-theoretic compatibility is the mechanism that turns the modular form into equality of arithmetic data for the elliptic curve.
[/guided]
[/step]
[step:Compare Euler factors to identify the $L$-function of $E$ with the $L$-function of the newform]
Let $L(E,s)$ denote the Hasse-Weil $L$-function of $E$, and let $L(f,s)$ denote the Hecke $L$-function of the normalized newform $f$. For a prime $p \nmid N_E$, choose a prime number $\ell \neq p$. Both $\rho_{E,\ell}$ and $\rho_{f,\ell}$ are unramified at $p$, and the isomorphism $\rho_{f,\ell}^{\mathrm{ss}} \cong \rho_{E,\ell}^{\mathrm{ss}}$ identifies their characteristic polynomials of geometric Frobenius at $p$. Thus
\begin{align*}
a_p(f) = a_p(E) := p + 1 - \#E(\mathbb F_p),
\end{align*}
and the good Euler factors of $L(E,s)$ and $L(f,s)$ agree. If $p \mid N_E$, then semistability means that $E$ has multiplicative reduction at $p$, and the local Euler factor of $E$ has the form $(1-a_p(E)p^{-s})^{-1}$ with $a_p(E) \in \{1,-1\}$. The local-global compatibility part of the cited modularity theorem identifies the local Weil-Deligne representation of $\rho_{f,\ell}$ at $p$ with that of $\rho_{E,\ell}$; equivalently, the $U_p$ eigenvalue of $f$ is $a_p(f)=a_p(E)$, so the bad Euler factors also agree. Therefore
\begin{align*}
L(E,s) = L(f,s).
\end{align*}
[guided]
The newform obtained from Wiles's theorem proves modularity only after we identify its arithmetic data with that of $E$. Let $L(E,s)$ be the Hasse-Weil $L$-function of the elliptic curve, and let $L(f,s)$ be the Hecke $L$-function of the normalized newform $f$.
Fix a prime number $p \nmid N_E$, and choose an auxiliary prime number $\ell \neq p$. Both the representation $\rho_{E,\ell}$ attached to $E$ and the representation $\rho_{f,\ell}$ attached to $f$ are unramified at $p$. The isomorphism $\rho_{f,\ell}^{\mathrm{ss}} \cong \rho_{E,\ell}^{\mathrm{ss}}$ identifies their characteristic polynomials of geometric Frobenius at $p$. For $E$, this polynomial has trace
\begin{align*}
a_p(E) := p + 1 - \#E(\mathbb F_p),
\end{align*}
and determines the good Euler factor of $L(E,s)$. For $f$, the corresponding polynomial has trace $a_p(f)$ and determines the good Euler factor of $L(f,s)$. Therefore $a_p(f)=a_p(E)$ and the local Euler factors agree for every prime $p \nmid N_E$.
Now let $p \mid N_E$. Since $E$ is semistable, its reduction at $p$ is multiplicative, so the local Euler factor of $E$ is $(1-a_p(E)p^{-s})^{-1}$ with $a_p(E)=1$ in the split multiplicative case and $a_p(E)=-1$ in the nonsplit multiplicative case. The local-global compatibility part of Wiles's theorem identifies the local Weil-Deligne representation attached to $\rho_{f,\ell}$ at $p$ with the local Weil-Deligne representation attached to $\rho_{E,\ell}$ at $p$. This compatibility is exactly the assertion that the $U_p$ eigenvalue of the newform equals the semistable local trace of the curve, namely $a_p(f)=a_p(E)$. Hence the bad Euler factors agree as well.
Because the Euler products are determined by their local factors, the equality of local factors at every prime gives
\begin{align*}
L(E,s) = L(f,s).
\end{align*}
This is the analytic form of modularity required in the statement, and the equalities $a_p(f)=a_p(E)$ also show explicitly why the Hecke eigenvalues appearing in the comparison are rational integers at good primes and signs at semistable bad primes.
[/guided]
[/step]
[step:Conclude that the semistable elliptic curve is modular]
The preceding steps produce a normalized newform $f \in S_2(\Gamma_0(N_E))$ of weight $2$, level $N_E$, and rational Fourier coefficients satisfying $L(E,s)=L(f,s)$. This is precisely the modularity of the semistable elliptic curve $E$ over $\mathbb Q$. Since $E$ was arbitrary, every semistable elliptic curve over $\mathbb Q$ is modular.
[/step]