\section{A compatible system of minimal ramification}\label{sec:lift} Throughout Part~II, $p\ge17$ is a prime with $p\equiv1\pmod3$, $(a,b,c)$ is a solution of $x^3+y^3=z^p$ in coprime nonzero integers, $u$, $w$, $s_0$ are as in \cref{sec:frey}, and $\rho$, $\rhob$ are the Frey representation and its reduction (\cref{def:frey}). We replace $\rho$, which is ramified at the primes of $c$, by a lift of $\rhob$ that is unramified outside $3p$ and belongs to a compatible system \cite{CEG22}. In Part~II, representations over finite fields and over $\ell$-adic fields are considered over an algebraic closure where convenient, and \emph{irreducible} means absolutely irreducible. \subsection{Properties of the Frey representation}\label{sec:F} Put \[ \kappa\eqdef\kappa_u^{-\ninf}, \] \looseness=-1 a character of $G_K$ with values in $\mu_3\subset\OO^\times$. We shall use the following six properties of~$\rho$. \begin{enumerate}[(F1)] \item $\rhob$ is unramified outside $\{\p,v,\bar v\}$ (\cref{prop:local}~(b)). \item $\rho|_{G_{K_v}}$ and $\rho|_{G_{K_{\bar v}}}$ are crystalline with Hodge--Tate weights $\{0,1,2\}$ (\cref{prop:local}~(f)). \item $\rho|_{I_\p}$ is $\kappa|_{I_\p}$ times a unipotent representation (\cref{prop:local}~(d)). Moreover $\kappa^\cc=\kappa^{-1}$ (\cref{sec:conventions}), and $\kappa|_{G_{K_\p}}$ is trivial if $u\equiv\pm1\pmod 9$ and has conductor $\p^2$ otherwise (\cref{lem:cubic-local}). \item $\rho^\cc\isom\rho^\vee\otimes\varepsilon_p^{-2}$ (\cref{prop:local}~(c)). \item $\rho$ is unramified at $\lp$ and $\lpb$, and for $\q\in\{\lp,\lpb\}$ the eigenvalues of $\rho(\Frob_\q)$ are the products of $\xi_\q=\kappa(\Frob_\q)\in\mu_3$ with the roots of $P_\q$, where $(P_\lp,P_\lpb)$ is $(P^+,P^-)$ or $(P^-,P^+)$ (\cref{prop:local}~(e), \cref{prop:frob7}). \item $\rhob$ is absolutely irreducible (\cref{thm:irreducible}). \end{enumerate} We say that we are in the \emph{unramified case} if $\kappa$ is unramified at $\p$ (that is, $u\equiv\pm1\pmod 9$), and in the \emph{ramified case} otherwise. By \cref{rem:normalisation} this is independent of the choice of $u$. The image of $\rho$ is compact, so $\rho$ is defined over a finite extension of $\Q_p$ and stabilizes a lattice. By (F6) the lattice is unique up to homothety and its reduction is $\rhob$. We therefore regard $\rho$ as a homomorphism $G_K\to\GL_3(\overline\Z_p)$, where $\overline\Z_p$ is the ring of integers of $\overline\Q_p$, with reduction $\rhob\colon G_K\to\GL_3(\Fbar_p)$. Since $\rho|_{I_\p}\otimes\kappa^{-1}$ is unipotent, every constituent of $(\rhob\otimes\bar\kappa^{-1})|_{I_\p}$ is trivial, and therefore \begin{equation}\label{eq:F3bar} \rhob|_{I_\p}\ \text{is}\ \bar\kappa|_{I_\p}\ \text{times a unipotent representation.} \end{equation} \subsection{Polarizations}\label{sec:polar} Let $\dK\colon G_\Q\to\{\pm1\}$ be the quadratic character of $K/\Q$. Let $\ell$ be a prime and let $A$ be $\overline\Q_\ell$, $\Fbar_\ell$, or the ring of integers of a finite extension of $\Q_\ell$. A continuous action of $G_K$ on $A^3$ is called \emph{polarized} (with multiplier $\varepsilon_\ell^{-2}\dK$) if there is a perfect symmetric $A$-bilinear pairing $\Psi$ on $A^3$ such that \begin{equation}\label{eq:pairing} \Psi\big(\sigma x,(\tilde\cc\sigma\tilde\cc)y\big)=\varepsilon_\ell(\sigma)^{-2}\,\Psi(x,y)\qquad(\sigma\in G_K,\ x,y\in A^3). \end{equation} This is the notion of a polarized and odd pair of \cite[\S1.5.1]{CEG22} and \cite[\S2.1]{BLGGT14}, for the field $K$, the representation of $G_K$ on $A^3$ and the character $\varepsilon_\ell^{-2}\dK$ of $G_\Q$: taking $\tilde\cc$ as the element of $G_\Q\smallsetminus G_K$ fixed in \cite[\S1.5.1]{CEG22} (denoted $\gamma_0$ there), the two conditions there are \eqref{eq:pairing} and $\Psi(y,x)=-(\varepsilon_\ell^{-2}\dK)(\tilde\cc)\Psi(x,y)=\Psi(x,y)$, and oddness is $(\varepsilon_\ell^{-2}\dK)(\tilde\cc)=-1$. Let $\Gthree$ be the group scheme of Clozel, Harris and Taylor \cite[\S2.1]{CHT08}: the semidirect product of $\Gthree^0=\GL_3\times\GL_1$ by a group $\{1,\jmath\}$ of order two, with $\jmath(g,t)\jmath^{-1}=(t\cdot{}^tg^{-1},t)$, and let $\mult\colon\Gthree\to\GL_1$ be the character with $\mult(g,t)=t$ and $\mult(\jmath)=-1$. By \cite[Lemma~2.1.1]{CHT08}, a polarized action of $G_K$ on $A^3$ together with a pairing $\Psi$ is the same as a continuous homomorphism $G_\Q\to\Gthree(A)$ that maps $G_K$ to $\Gthree^0(A)$ by $\sigma\mapsto(\sigma|_{A^3},\varepsilon_\ell(\sigma)^{-2})$, induces an isomorphism of $G_\Q/G_K$ with $\Gthree/\Gthree^0$, and has \emph{multiplier} $\varepsilon_\ell^{-2}\dK$, where the multiplier of a homomorphism to $\Gthree$ is its composite with $\mult$. It is called a \emph{prolongation}. Changing $\Psi$ by a scalar conjugates it by an element of $\{1\}\times\GL_1(A)$ \cite[\S1.5.1]{CEG22}. \needspace{4\baselineskip}\begin{lemma}\label{lem:polarized} There is a perfect symmetric $\overline\Z_p$-bilinear pairing $\Psi_\rho$ on $\overline\Z_p^3$ satisfying \eqref{eq:pairing} for $\rho$ (with $\ell=p$); it is unique up to a unit. In particular $\rho$ and $\rhob$ are polarized, and the prolongation of $\rho$ defined by $\Psi_\rho$ lifts the prolongation of $\rhob$ defined by the reduction of $\Psi_\rho$. \end{lemma} \begin{proof} By (F4) there is a nondegenerate $\overline\Q_p$-bilinear pairing $\Psi_\rho$ with \eqref{eq:pairing}: an isomorphism $\rho^\cc\to\rho^\vee\otimes\varepsilon_p^{-2}$ sends $y$ to the linear form $\Psi_\rho(\,\cdot\,,y)$. This isomorphism maps the lattice $\overline\Z_p^3$ onto a stable lattice of the dual, which by (F6) is a multiple of the dual lattice, and after scaling $\Psi_\rho$ is perfect on $\overline\Z_p^3$. By Schur's lemma it is unique up to a scalar. The pairing $(x,y)\mapsto\Psi_\rho(y,x)$ also satisfies \eqref{eq:pairing}: replacing $\sigma$ by $\tilde\cc\sigma\tilde\cc$ in \eqref{eq:pairing} and using $\tilde\cc^2=1$ and $\varepsilon_p(\tilde\cc\sigma\tilde\cc)=\varepsilon_p(\sigma)$ gives $\Psi_\rho((\tilde\cc\sigma\tilde\cc)y,\sigma x)=\varepsilon_p(\sigma)^{-2}\Psi_\rho(y,x)$. So $\Psi_\rho(y,x)=\pm\Psi_\rho(x,y)$, and the sign is $+$ because a nondegenerate alternating form does not exist in odd dimension. (This is the argument of the proof of \cite[Lemma~1.5.3]{CEG22}.) \end{proof} \subsection{The residual representation is reasonable} Calegari, Emerton and Gee call a representation $G_K\to\GL_3(\Fbar_p)$ \emph{reasonable} if it is polarizable and odd, its restriction to $G_{K(\zeta_p)}$ is irreducible, $\zeta_p\notin K$, and $p>2(3+1)=8$ \cite[Definition~2.1.6]{CEG22}. \begin{proposition}\label{prop:reasonable} The representation $\rhob$ is reasonable. \end{proposition} \begin{proof} It is polarized by \cref{lem:polarized}; $p\ge17$; and $\zeta_p\notin K$. It remains to prove that $\rhob|_{G_{K(\zeta_p)}}$ is irreducible. The extension $K(\zeta_p)/K$ is cyclic of degree $p-1$, since $K\cap\Q(\zeta_p)=\Q$. Suppose that $\rhob|_{G_{K(\zeta_p)}}$ is reducible. By Clifford's theorem it is a direct sum of irreducible representations that are conjugate under $G_K$; each occurs with multiplicity one, because the quotient $G_K/G_{K(\zeta_p)}$ is cyclic (a constituent extends to its stabilizer). As the dimension is $3$, there are three distinct conjugate characters, and $\rhob$ is induced from a character of the subgroup of index $3$ containing $G_{K(\zeta_p)}$, that is, of $G_{K'}$ with $K'$ the cubic subfield of $K(\zeta_p)/K$. Hence $\rhob\isom\rhob\otimes\eta$ for a character $\eta$ of order $3$ of $\Gal(K'/K)$. The extension $K'/K$ is totally ramified at $v$, so $\eta|_{I_v}=\epsb^{\pm(p-1)/3}|_{I_v}$. For $d\ge1$ let $\bar\varepsilon_{p,d}\colon I_v\to\Fbar_p^\times$ be a fundamental character of level $d$; so $\bar\varepsilon_{p,1}=\epsb|_{I_v}$, and $\bar\varepsilon_{p,d}^{(p^d-1)/(p-1)}=\bar\varepsilon_{p,1}$. By (F2) and Fontaine--Laffaille theory \cite[Th\'eor\`eme~5.3]{FontaineLaffaille} ($K_v=\Q_p$, weights $\{0,1,2\}$, $p>3$), the semisimplification of $\rhob|_{I_v}$ is, up to replacing every character by its inverse, one of \begin{enumerate}[(i)] \item $1\oplus\bar\varepsilon_{p,1}\oplus\bar\varepsilon_{p,1}^2$; \item $\bar\varepsilon_{p,1}^{k_1}\oplus\bar\varepsilon_{p,2}^{k_2+pk_3}\oplus\bar\varepsilon_{p,2}^{k_3+pk_2}$ with $\{k_1,k_2,k_3\}=\{0,1,2\}$; \item $\bar\varepsilon_{p,3}^{x}\oplus\bar\varepsilon_{p,3}^{px}\oplus\bar\varepsilon_{p,3}^{p^2x}$ with $x=k_1+k_2p+k_3p^2$ and $\{k_1,k_2,k_3\}=\{0,1,2\}$. \end{enumerate} This multiset of characters is stable under multiplication by $\eta|_{I_v}$, which has order $3$. In case (i), $\eta\cdot1\in\{1,\bar\varepsilon_{p,1},\bar\varepsilon_{p,1}^2\}$ forces $(p-1)/3\equiv0,\pm1$ or $\pm2\pmod{p-1}$, which is false for $p\ge13$. In case (ii), $\bar\varepsilon_{p,2}^{k_2+pk_3}$ is not a power of $\bar\varepsilon_{p,1}$, because $k_2+pk_3\equiv k_2-k_3\not\equiv0\pmod{p+1}$; so $\bar\varepsilon_{p,1}^{k_1}$ is the only character of level $1$ in the multiset, and $\eta\bar\varepsilon_{p,1}^{k_1}=\bar\varepsilon_{p,1}^{k_1}$, which is false. In case (iii), $\eta=\bar\varepsilon_{p,3}^{\pm(p^3-1)/3}$ on $I_v$ permutes the three characters cyclically, so $(p-1)x$ or $(p^2-1)x$ is congruent to $\pm(p^3-1)/3$ modulo $p^3-1$. Put $D=p^2+p+1$. The first congruence says $x\equiv\pm D/3\pmod D$. The second says $(p+1)x\equiv\pm D/3\pmod D$; since $(p+1)(-p)\equiv1\pmod D$ and $p\cdot D/3\equiv D/3\pmod D$ (as $3\mid p-1$), it also gives $x\equiv\pm D/3\pmod D$. But $x\equiv(k_1-k_3)+(k_2-k_3)p\pmod D$, a nonzero integer of absolute value at most $2p+2