\section{The local loss above \texorpdfstring{$\ell$}{l}}\label{sec:local-loss} The cocycles produced by Ribet's method satisfy the linear relations among the $u_x(g)-1$, but at the places above $\ell$ they need not be reductions of crystalline cocycles. This section bounds, for all summands and all places above $\ell$ together, the distance of these cocycles from the crystalline condition by the explicit \emph{local defect bound} $r'\,\mathrm{loc}_\ell$ (\cref{thm:local-loss}). By Tate duality the distance is the \emph{defect} of the Tate dual of a summand: the length of its crystalline cocycles modulo those whose cup products with the crystalline cocycles of all lattices of a class are coboundaries. The defect is bounded through an exponent $\ell^k$ that makes the cup products vanish, which \cref{sec:crystalline} computes on Kummer charts. \subsection{Classes of local lattices and the defect}\label{ss:local-classes} Let $\Gamma\to G_\ell=\Gal(\bar\Q_\ell/\Q_\ell)$ have open image, $O$ the integers of a finite extension of $\Q_\ell$, and $B_{\max}$ the crystalline period ring. For a filter $F$ on $\Gamma$, polynomial conditions $K(s)$ on inertia elements and finite sets $U(\gamma)$ of integers for the embeddings $\gamma\colon O\to\C_\ell$, the class $\mathrm{InClass}(F,K,U)$ consists of the $\Gamma$-lattices $Y$ over $O$ such that $B_{\max}\otimes Y$ is spanned by the periods fixed near $1$ and along $F$, the Hodge--Tate jumps at each $\gamma$ lie in $U(\gamma)$, and every polynomial $Q$ with $K(s)(Q)$ kills $s$ on the periods. A map $\Gamma\to(O/\ell^m)^d$ \emph{comes from the class} if it is $t\circ a$ for a crystalline cocycle $a$ of a lattice $Y$ of the class and an equivariant $t$. The \emph{defect} $\mathrm{def}(\mathcal Q,L)$ is the length of the crystalline cocycles of $L$ modulo those orthogonal under cup product to all lattices of the class $\mathcal Q$, for every pairing into $\Z/\ell^k(1)$; $L$ \emph{has cup exponent $k$} for $\mathcal Q$ if $\ell^k$ carries the crystalline cocycles of $L$ into this orthogonal. The \emph{crystalline loss} of $(h,b,\ell)$ is the $\ell$-adic valuation of $(2b)!\cdot\Pi^{h^3}$, with $\Pi$ the product of the integers in $(b-30h^3,b+30h^3]$, and $\mathrm{defect}_\ell=10^6\frac mk\bigl(b\,v_\ell(M)+\text{crystalline loss}(\mathrm r^8,b,\ell)\bigr)$. \lean{New.Selmer.cmSign, New.Selmer.complexEmbeddingOf, New.Selmer.IsMainSummandWeights, New.Selmer.lt_natAbs_of_abs_add_liftWeight_le, New.Selmer.crystallineLoss, New.Selmer.defectBound, New.Selmer.fixes_emb_of_fixes_rootsOfUnity, New.Selmer.map_sqrtNegDInE_eq_cmSign_mul, New.Selmer.map_zeta_eq_zpow_cmSign, New.Selmer.placeClass_eq_cmSign_mul_pow, New.Selmer.notMem_bPlaces_of_short_arc, New.Selmer.cmSign_eq_of_mem_bPlaces, New.Selmer.ribetCocyclesIn, New.Selmer.ribetCocycles, New.Selmer.mem_ribetCocycles, New.Selmer.ribetCocycles.exists_graph_subrepresentation, New.Selmer.SummandCoordIndex, New.Selmer.summandRep, New.Selmer.localChart, New.Selmer.coefficientEmbedding, New.Selmer.crysCocyclesAt, New.Selmer.crysRelations, New.Selmer.crystallineColength, New.Selmer.obeying_crysRelations, New.Selmer.coefficientEmbedding_surjective, New.Selmer.tateTwist_smul, New.Selmer.IsCompletionGroup.complexEmbeddingOf_eq_iff, New.Selmer.IsCompletionGroup.index_eq_card_range, New.Selmer.eq_of_complexEmbeddingOf_localChart_eq, New.Selmer.sum_complexEmbeddingOf_le} \lean{New.Selmer.ComesFromClass, New.Selmer.ker_compLeft_mkQ_eq_pPowMultiples, New.Selmer.exists_crysCocycles_pow_smul_eq_coboundary, New.Selmer.relLength_le_of_comesFromClass, New.Selmer.comesFromClass_of_mem_ribetCocycles, New.Selmer.relLength_ribetCocycles_le} Throughout, $\iota\colon\C\simeq\bar\Q_\ell$ is fixed, $G_\ell=\Gal(\bar\Q_\ell/\Q_\ell)$, and for an embedding $e\colon E\to\bar\Q_\ell$ and $g\in G_\ell$ the complex embedding $\iota^{-1}\circ g^{-1}\circ e$ of $E$ is written $\sigma_g$; $\epsilon_\sigma=\pm1$ is the sign of $\sigma$ for the CM type. The \emph{b-places} are the places of $E$ of weight $b$ (\cref{def:data}(D3)); they have class $-1$ modulo $q_0$ and are sparse. A \emph{Ribet cocycle} of $\rho$ with values in a module $B$ is a cocycle obeying the linear relations among the families $(u_x(g)-1)_x$; the \emph{crystalline relations} of a lattice $u$ are the linear relations that hold on its crystalline cocycles at the places above $\ell$, extended by zero to the global Galois group. \begin{lemma}[Signs and spacing of b-places]\label{lem:b-places} \begin{enumerate}[label=\textup{(\alph*)}] \item The field $E$ lies in the cyclotomic field of order $q_1d$; hence an element of $G_\ell$ that fixes the roots of unity of that order fixes every $e(E)$. A complex embedding $\sigma$ sends $\sqrt{-d}$ to $\epsilon_\sigma$ times the chosen root, and the embedding of the CM type at the place of $\sigma$ sends $\zeta$ to $\sigma(\zeta)^{\epsilon_\sigma}$. \item If $g'g^{-1}$ raises $e(\zeta)^{\ell^a}$ to the power $\ell^n$, the ratio of the places of $\sigma_g$ and $\sigma_{g'}$ in $\Phi\cong(\Z/q_1)^\times$ reduces, modulo every divisor $m$ of $q_1$ prime to $\ell^a$, to $\epsilon_{\sigma_g}\epsilon_{\sigma_{g'}}\ell^n$. \item (Short arcs.) If $\ell\le k\mathrm t$, $0B$. A main summand jump is low, $\abs u\ge\Delta/4=h_\Delta/2$, or within $\mathrm t$ of $\mp w_i$ with $w_i\ge h_\Delta\ge3\mathrm t$. \end{proof} \begin{proposition}[Tate duality]\label{prop:tate-dual-bound} Let $\Gamma\to G_\ell$ be an open embedding and $L=O^d$ a lattice of the class. \begin{enumerate}[label=\textup{(\alph*)}] \item (Artin--Rees.) For finitely many representations $u_x$ and a noetherian $O$, a cocycle with values in $(O/a)^d$ that obeys every linear relation among the families $(u_x(g)-1)_x$ comes from an equivariant map on a subrepresentation containing the families $(u_x(g)-1)_x$ and all multiples of a power of $a$. \item A module of maps $\Gamma\to L/\ell^m$ coming from the class has length, modulo the reductions of the crystalline cocycles of $L$, at most the defect of the Tate dual $L^\vee(1)$. \item If the lattices of all $u_x\circ\eta$ and of $\rho\circ\eta$ lie in the class, Ribet's cocycles of $\rho$ modulo $\ell^m$, modulo those whose restriction obeys the crystalline relations of $L$, have length at most the defect of $L^\vee(1)$. \end{enumerate} \end{proposition} \begin{proof} (a) Let $I$ be the $O$-span of the families $(u_x(g)-1)_x$ in the families of matrices. By the Artin--Rees lemma for the ideal $(a)$, for some $k$ the elements of $I$ divisible by $a^{k}$ lie in $aI$. Define $C\colon I\to(O/a)^d$ by $C(\sum_g\theta_g(u_x(g)-1)_x)=\sum_g\theta_gc(g)$, well defined because $c$ obeys the linear relations; it vanishes on $aI$, as $a$ kills the values. Let $Y$ be the image of the map $(\theta,v)\mapsto(\sum\theta_g(u_x(g)-1)+a^{k+1}v,\,C(\theta))$; it is the graph of the map $I+a^{k+1}M\to(O/a)^d$ extending $C$ by zero on $a^{k+1}M$, well defined by the choice of $k$ ($L\theta=a^{k+1}v'$ forces $L\theta\in aI$, so $C(\theta)=0$). It is stable under $g$, acting by left multiplication with $(u_x(g))_x$ and by $\rho(g)$: on the generators this is the cocycle rule $c(gh)=c(g)+gc(h)$ and $u(g)(u(h)-1)=(u(gh)-1)-(u(g)-1)$. Its points are determined by their first component, and it contains $((u_x(g)-1)_x+a^kv,c(g))$. (b) Let $N$ be the module, $A$ the reductions of the crystalline cocycles of $L$ and $H$ the crystalline cocycles of $L^\vee(1)$ orthogonal to the class. \emph{Pairings.} The evaluation pairing of $L^\vee(1)$ with $L$ gives a perfect pairing into $\Z_\ell(1)$, and modulo $\ell^m$ the reduction $\tau\colon L\to L/\ell^m$ is onto, equivariant and has kernel $\ell^mL$; $L/\ell^m$ is a discrete module, since a crystalline cocycle of a lattice of the class is continuous. \emph{Members of $N$ are orthogonal to $H$.} Let $t\circ a\in N$ with $a$ a crystalline cocycle of $Y$ in the class. Lift $t$ to a linear $q\colon Y\to L$, equivariant modulo $\ell^m$; then $g\,q-q=\ell^m\delta_g$ with linear $\delta_g\colon Y\to L$, and the forms $y\otimes\varphi\mapsto\varphi(\delta_gy)$ give a crystalline cocycle of the Tate dual of $Y\otimes L^\vee(1)$, crystalline cocycles being saturated. Hence the pairing $(y,\varphi)\mapsto\varphi(q(y))$ modulo $\ell^m$ is one of the pairings tested in the definition of orthogonality, and the cup product of $q\circ a$ and $z\in H$ under it is that of $a$ and $z$, a coboundary. \emph{Local duality.} By the inequality of local duality for crystalline cocycles (\cref{thm:B-padic}(b)), the index of $N\cap A$ in $N$ divides the index of $H$ in the crystalline cocycles $Z$ of $L^\vee(1)$, as $N$ and $A$ are orthogonal to $H$ and $A$ is the exact annihilator of $Z$ modulo $\ell^m$. A relative index is the cardinality of the quotient, so the lengths compare. (c) By (a), applied to the $u_x\circ\eta$ and $\rho\circ\eta$, the restriction along $\eta$ of a Ribet cocycle $w$ comes from the class: $Y$ is a subrepresentation of the families of matrices times the values, which contains the family $(\ell^m)^k\cdot1$ (as $u_x(1)=1$), and the second component is an equivariant map carrying the crystalline cocycle $g\mapsto((u_x(\eta g)-1)_x,w(\eta g))$ of $Y$ to $w\circ\eta$; $Y$ lies in the class, being a sublattice of a sum of lattices of the class, and crystalline cocycles are saturated. Hence the module of restrictions lies in $N$ of (b), and a Ribet cocycle whose restriction is in $A$ obeys the crystalline relations of $L$; apply (b). \end{proof} \subsection{The defect of a crystalline lattice}\label{ss:defect-crystalline} The \emph{size conditions} on $(Q,m,h,G,b,\delta,\eta,W)$ are $Q>0$, $99(Q^2+(W+1)Q+Q+W+m)\le h$, $99h^3\le G$, $99(Gh^3+G)\le b$, $2\log(4b)G+\delta+n$ divides no integer in $(b-c,b+c]$ and $\delta+n2b/\ell-1$. (b) The factor $\Pi^{h^3}$ then has valuation at least $h^3$. (c) $\log\ell\ge\log2>1/2$, so $\lfloor\log_\ell H\rfloor\le2\log(4b)G+\delta+n$, so it is not within $n$ of $0$ or $\pm(G+\delta)$; near $\pm(b+\delta)$ it would lie in $(b-c,b+c]$, as $\delta+nQ$, thickness and sign are read off the letter, so the collected sets lie in the low window and opposite far windows, the low window widened to $[-2G,2G]$ if $\ell\le Q$ (it contains $[-\eta,\eta]$ and the far windows of thin letters, as $\eta\le G$ and $\delta+W\le G$). \emph{An exponent suffices.} If some power $\ell^{10^4Kx}$ with $x\le m$ carries the crystalline cocycles into the orthogonal of the class, then by (b) the normalised defect is at most $[G_\ell:\Gamma]\cdot2\cdot10^4Kx\operatorname{rk}L\le[G_\ell:\Gamma]y$. \emph{Small primes} $\ell\le Q$: the thick letters are sparse with gaps measured up to $J=\lfloor\log_\ell h^3\rfloor$, so \cref{thm:cup-exponents}(c) applies with the low window $[-2G,2G]$; its conditions follow from the size conditions and $2(b+\delta)Q$, $\lambda\ge h^3$: the chart is unramified and $\ell\ge7$, and \cref{thm:cup-exponents}(b) applies, as $2b<\ell(\lambda+1)$ and $2\lambda<(K+1)Q$ give the size conditions $bk\mathrm t$, and at b-places otherwise; the chart is unramified with $\ell\ge7$, or $\ell\le k\mathrm t$ and the signs at b-places are constant; and for $\ell\le k\mathrm t$ no three b-letters follow one another at distances at most $\log_\ell h_\Delta^3$. \end{enumerate} \end{lemma} \begin{proof} (a) A root of $y^{\ell^a-1}=1$ is a Teichm\"uller lift in the unramified ring of degree $a\le r$, so its minimal polynomial over $\Z_\ell$ is monic of degree at most $r$; take the product over the multiset. Each root is killed by $X^{\ell^a-1}-1$, which divides $X^e-1$. (b) A lattice is conjugate over $\bar\Q_\ell$ to $R$ by an equivariant injective map, which passes admissibility (the periods fixed near $1$ and along the filter span), the Hodge--Tate jumps (unchanged by extension of scalars) and the killing polynomials from $R$ to the lattice. At a place off $S$ and $\ell M$, $R$ is good and $\ell$ is a unit there, so it is trivial on inertia. (c) Comparisons of sizes (\cref{rem:magnitudes}): the tame exponent is polynomial in $\mathrm r$, while $\mathrm{defect}_\ell/x\ge10^6\frac mk\,b\,v_\ell(M)/\mathrm t$ with $v_\ell(M)\ge1$ and $b\ge x^{999}$. For the second, $\lfloor2\lambda/(k\mathrm t)\rfloor\le2\lambda/(kx)$ and $\lfloor\rho m/(kx)\rfloor\le\rho m/(kx)$, so the left side is at most $3\cdot10^5\rho m\lambda/(kx)\le\rho\,\mathrm{defect}_\ell/x$. (d) The size conditions are comparisons of logarithmic scales (\cref{prop:sizes}). A jump of the main summand is low or within $\mathrm t$ of $\mp w_i=\mp(S+2\mathrm t)$, $S$ the window start, so it lies in $[-\eta,\eta]\cup-\epsilon[S,S+4\mathrm t]$, and $-u-1$ in the opposite window. The low dual jumps $-a-1\in[-h^2-1,h^2+1]$ are at most as many as the $a$ with $\abs a\le2h^2$, hence at most $\lfloor rm/k\rfloor$ (\cref{def:main-summand}), and the negative ones are at most $-h/2$ by \cref{lem:b-places}(e). For a character, $-c-1\in[-\mathrm t,0]\subseteq[-h^2-1,0]$. (e) If $\ell\nmid q_1d$, inertia fixes $E$, the chart is unramified, and a letter $g(\zeta)$, $\zeta$ a primitive $(\ell^f-1)$-th root of unity, determines the embedding $\sigma_g$: $gg'^{-1}$ fixes the constants and the image $-\ell$ of the variable of the chart, hence lies in the image of $\Gamma$; take $T$ and $s$ to read off the b-place and the sign. Otherwise $\ell\le k\mathrm t$ (the conductor being small against $k\mathrm t$), the signs at b-places are constant by \cref{lem:b-places}(d), and the letters of b-places are sparse by \cref{lem:b-places}(c): if $g_1(\zeta)=g_0(\zeta)^{\ell^a}$ and $g_2(\zeta)=g_0(\zeta)^{\ell^{a+b}}$ with $1\le a,b\le\lfloor\log_\ell h_\Delta^3\rfloor$, then $g_2g_0^{-1}$ and $g_2g_1^{-1}$ raise the prime-to-$\ell$ part of $\zeta$ to the powers $\ell^{a+b}$ and $\ell^b$, with $a+b