\subsection{Class field theory in the form used}\label{ss:B-classfield} Let $K$ be a number field with absolute Galois group $\Gamma$ inside the fixed algebraic closure $\Omega$ of $\Q$. Only the finite ideles enter; there is no Weil group. The global Artin map sends the finite ideles of $K$ to the topological abelianisation of $\Gamma$, as the product of the local symbols. \lean{New.artin_reciprocity, New.exists_comp_artinMap, New.IsLocalGalois.classOfInvariant_bijective, New.second_inequality, New.chebotarev, New.exists_kummer_chars} \begin{theorem}[Class field theory]\label{thm:B-classfield} \begin{enumerate}[label=\textup{(\alph*)}] \item (Local invariant.) For a henselian local field $k$ of characteristic $0$ the invariant map $\Q/\Z\to H^2(\Gamma_k,\bar k^\times)$ is bijective. \item (Reciprocity.) If the symbol of $\xi$ at $x$ dies on an open subgroup containing the complex conjugations, then the character $\xi$ kills the Artin symbol of $x\in K^\times$. \item (Existence.) For totally complex $K$, a continuous homomorphism from the finite ideles to a $T_1$ group that is trivial on $K^\times$ factors continuously through the Artin map. \item (Chebotarev, existence form.) Frobenius elements at primes of degree one outside a finite set are dense in $\Gamma$. \end{enumerate} \end{theorem} \begin{proof}[Sources] This is local and global class field theory \cite{Serre1997,Milne2006}, proved in the Lean development in the cases used. The local invariant comes from the unramified extension and the inflation of Brauer classes; the second inequality comes from the densities of primes of degree one given by the non-vanishing of Hecke $L$-functions at $s=1$; Chebotarev is reduced to a cyclic extension by Deuring's argument and follows from the second inequality; the existence theorem uses Kummer theory when $K$ contains the $n$th roots of unity, and a cyclic step inside $K(\mu_n)$ with the norm otherwise. \end{proof} \subsection{Galois representations attached to forms on definite unitary groups}\label{ss:B-galois} Let $\ell$ be a prime and $\iota\colon\C\simeq\bar\Q_\ell$. Let $f$ be an eigenform of weight $\kappa$ on the definite unitary group of rank $n\ge1$ of a CM field $E$ with Weil data, with Hecke polynomials $P_w$. A continuous $r\colon\Gal(\Omega/E)\to\GL_n(\bar\Q_\ell)$ with nondegenerate trace form is \emph{attached} to $P$ if, for every $\varepsilon>0$, $\det(X-r(s))$ is coefficientwise within $\varepsilon$ of $\iota(P_w)$ for most Frobenius elements $s$. \lean{New.GaloisRep.Attached, New.GaloisRep.SphericalCompat, New.GaloisRep.Attached.tendsto_charpoly_coeff, New.GaloisRep.Attached.trace_eq, New.GaloisRep.Attached.exists_det_eq_avatar} \begin{theorem}[Attached representations]\label{thm:B-galois} \begin{enumerate}[label=\textup{(\alph*)}] \item (Existence.) An attached representation exists, and its traces are determined by $P$. If $f$ has maximal level at $w$, every attached representation is unramified or crystalline above $w$ with the Hodge--Tate jumps of $\kappa$, and for split $w$ the Hecke polynomial kills geometric Frobenius. In rank one an attached representation is the $\ell$-adic avatar of an algebraic Hecke character. \item (Iwahori eigenvectors.) Let $w$ be split and $f$ a pro-$p$ Iwahori eigenvector with character $\xi=(\xi_i)$, the norms of the $\xi_i$ at a uniformiser non-increasing. Then $r$ is of finite type at the places above $w$, has the jumps of $\kappa$, and $\prod_i(X-\iota\xi_i(x))$ kills every element $s$ of the decomposition group whose inverse is the $q^k$th power on the residue field, $x$ of order $k$ with Artin symbol the class of $s$. \item (Labels.) The same holds when $f$ has a product label at $w$, and then a polynomial built from the tame characters of the label kills each element of inertia. \end{enumerate} \end{theorem} \lean{New.GaloisRep.sphericalCompat_std, New.GaloisRep.Attached.local_global_of_eigencharacter, New.GaloisRep.Attached.isLabelledAt, New.exists_rep_of_trace_identities, New.GaloisRep.exists_continuous_isTraceNondeg_of_tendsto_trace, New.Variety.exists_model, New.Variety.Model.exists_galois_rep, New.Variety.exists_isCoefficientSystem, New.Variety.ellAdicCohom.congruence_relation, New.Variety.ellAdicCohom.galoisAction_eq_one_of_inertia, New.Variety.ellAdicCohom.isCrystalline_and_linearFrob_rel, New.Variety.exists_hasHodgeTateWeight, New.Variety.finite_and_primitive_comparison, New.Variety.finite_padic_cohomology, New.GaloisRep.local_clauses_of_trace_limit} \begin{proof}[Sources] In the literature these are base change to $\GL_n$ \cite{HarrisLabesse2004}, the Galois representations of the cohomology of unitary Shimura varieties with local--global compatibility \cite{HarrisTaylor2001,Shin2011,ChenevierHarris2013,BLGGT2014} and the local Langlands correspondence. The local polynomials kill but need not be characteristic, and no Weil--Deligne representation is built. The Lean development proves them along the following route. Integral Kuga--Sato models of signature $(1,n-1)$ with level covers carry the congruence relation at good split places \cite{Kottwitz1992,HarrisTaylor2001}; the Eichler--Shimura argument \cite{Deligne1971} turns it into a relation between Frobenius and Hecke operators on $\ell$-adic cohomology, and smooth proper reduction makes inertia act as the identity. The primitive comparison theorem \cite{Scholze2013} shows the cohomology above $\ell$ is crystalline with the Frobenius relation, and Hodge classes give the jumps. For odd $n$ and forms with a cuspidal type, the eigenvalues occur in cohomology, and killing polynomials cut out a representation of rank $n$. All forms are reached by $\ell$-adic limits: congruences changing the weight, pseudocharacters (a limit of traces of continuous representations is a trace, \cite{Taylor1991,Rouquier1996}) and the passage of local conditions to limits. Fields with Weil data are reached by quadratic steps and base change in prime degree, and even rank by two theta lifts to rank $2n+1$ along different characters, cancelling the extra characters. \end{proof} \subsection{Selmer counts and local duality}\label{ss:B-greenberg-wiles} Let $K$ be totally complex and $M$ a finite module killed by $\ell^r$, unramified outside a finite set $S$, with local conditions at $S$ containing the coboundaries. \emph{Relations} at split primes are families of additive maps $n_i$ on $M$ with $\sum_in_i(x(\gamma_i))=0$ for all Selmer cocycles $x$, $\gamma_i$ elements at auxiliary split primes; they take the place of the dual Selmer group. \lean{New.selmerZ1.card_mul_pow_le, New.selmerZ1.exists_splitPlaces_frob_mem_coset, New.selmerZ1.card_relations_ge, New.card_mul_card_le_of_orthogonal, New.card_mul_card_le_of_le_pairingAnnihilator, New.DiscreteModule.local_duality_card_dvd} \begin{theorem}[Greenberg--Wiles count and local duality]\label{thm:B-greenberg-wiles} \begin{enumerate}[label=\textup{(\alph*)}] \item (Count.) If some element is central modulo an open normal subgroup $U$, fixes the roots of unity of $\ell$-power order and fixes no nonzero vector, the number of relations at the primes split for $U$ is bounded below by the number of Selmer cocycles divided by the local terms. \item (Local duality, inequality.) Let $k$ be local with valuation ring $O$, $\#(O/l)=l^d$, and $M$ killed by a power of $l$. If groups of cocycles $X\subseteq Z^1(\Hom(M,\Omega^\times))$ and $W\subseteq Z^1(M)$ are orthogonal under cup product and $\Gamma_k$ acts by elements of $l$-power order, then $\#X\cdot\#W\le\#M^{2+d}$; for general $M$ the corresponding divisibility holds by descent from an open subgroup of index prime to $\#M$. \end{enumerate} \end{theorem} \begin{proof}[Sources] (a) is the inequality underlying the Greenberg--Wiles formula \cite{Greenberg1989,Wiles1990} (only inequalities for cocycles are proved; there is no perfect pairing and no dual Selmer group). It is proved by counting trivialised cocycles with the equivariant $S$-unit theorem and power residue reciprocity at split primes. (b) is the inequality half of local Tate duality in degree one \cite[II \S5]{Serre1997}, \cite[I.2]{Milne2006}, proved by Kummer theory and d\'evissage; perfectness and the Euler characteristic formula are not used. \end{proof} A \emph{relation setting} over a number field $K$ is a finite discrete Galois module $M$, unramified outside a finite set $S$ of primes, on which complex conjugations act as the identity, with a chosen place above each prime, local conditions at $S$ on the decomposition groups that contain the coboundaries, and an open normal subgroup $U$ that fixes $M$ and the $m$-th roots of unity. A \emph{relation off $T$} is a continuous $U$-equivariant map $y$ from $U$ to $M^*=\Hom(M,\Q/\Z)$, with the transformation law of the restriction of a dual cocycle, unramified outside $T$, such that $\sum_py(\varphi_p)(z(\gamma_p))=0$ for every cocycle $z$ in the local conditions, zero at complex conjugations and ramified only at $S$ and finitely many primes $p$ split for $U$ outside $T$, with Frobenius elements $\varphi_p\in U$ and tame generators $\gamma_p$. Its \emph{reduction} is its image in $M^*/\ell M^*$. \lean{AddMonoidHom.card_eq_card_ker_mul_card_mul_card_range, AddMonoidHom.card_pow_succ_eq_card_mul_card_range_mul_card_ker, New.IsLargeLevel.SplitPlaces.card_trivialisedCocycles_eq_of_isHigmanProjective, New.IsLargeLevel.SplitPlaces.card_trivialised_of_isHigmanProjective, New.IsLargeLevel.SplitPlaces.fixes_sub_of_frobeniiDetectRoots, New.IsLargeLevel.SplitPlaces.hasFewCocycles_of_central, New.IsLargeLevel.SplitPlaces.hasFewCocycles_of_isHigmanProjective, New.IsLargeLevel.exists_act_torsion_eq_nsmul, New.IsLargeLevel.exists_linearMap_factor_of_ker_le, Representation.apply_sum_trace_eq_add} \lean{New.RelationSetting, New.RelationSetting.Avoids, New.RelationSetting.Avoids.coprime, New.RelationSetting.Avoids.inertiaGroup_le, New.RelationSetting.Avoids.notMem, New.RelationSetting.IsRelation, New.RelationSetting.IsRelation.eq_zero_of_notMem, New.RelationSetting.IsRelation.isLocallyConstant, New.RelationSetting.IsRelation.map_conj, New.RelationSetting.IsRelation.map_mul, New.RelationSetting.IsRelation.sum_eq_zero, New.RelationSetting.IsRelation.unramified, New.RelationSetting.allowed, New.RelationSetting.apply_eq_of_mem, New.RelationSetting.apply_eq_zero_of_notMem, New.RelationSetting.avoids_one, New.RelationSetting.coboundary_le, New.RelationSetting.cocycles, New.RelationSetting.cocycles_mono, New.RelationSetting.ctorIdx, New.RelationSetting.cyclotomicCharMod_eq_one, New.RelationSetting.exists_card_cocycles_le, New.RelationSetting.exists_cocycle_three_values, New.RelationSetting.exists_splitPlaces_forall_exists_mem_relations, New.RelationSetting.finite_relations, New.RelationSetting.form_eq_add, New.RelationSetting.form_eq_zero_of_mem_inertiaGroup, New.RelationSetting.form_frobenius_eq, New.RelationSetting.form_one_eq_zero, New.RelationSetting.form_sum_eq_zero, New.RelationSetting.isPlaceOver, New.RelationSetting.isRelation_ite_form, New.RelationSetting.localCocycles, New.RelationSetting.localPrimes, New.RelationSetting.mem_relations, New.RelationSetting.mk.inj, New.RelationSetting.mk.injEq, New.RelationSetting.mk.sizeOf_spec, New.RelationSetting.notMem_of_isComplexConj, New.RelationSetting.nsmul_eq_zero, New.RelationSetting.place, New.RelationSetting.relations, New.RelationSetting.subgroup, New.RelationSetting.unramified, New.RelationSetting.val_one_nsmul, New.RelationSetting.ρ_eq_one_of_isComplexConj, New.SplitPrime, New.SplitPrime.ctorIdx, New.SplitPrime.frob, New.SplitPrime.frob_mem, New.SplitPrime.isFrob, New.SplitPrime.isPlaceOver, New.SplitPrime.isTameGeneratorFor, New.SplitPrime.mk.inj, New.SplitPrime.mk.injEq, New.SplitPrime.mk.sizeOf_spec, New.SplitPrime.place, New.SplitPrime.prime, New.SplitPrime.tameGenerator} \lean{New.DiscreteModule.torsion, New.IsLargeLevel.SplitPlaces.exists_add_two_primes, New.IsLargeLevel.SplitPlaces.le_stabilizer, New.RelationSetting.allowedTorsion, New.RelationSetting.apply_eq_of_mkQ_eq, New.RelationSetting.card_allowedTorsion_le, New.RelationSetting.card_torsionBy_cocycles_le, New.RelationSetting.card_torsionBy_cocycles_mul_pow_le, New.RelationSetting.coprime_index_ker_torsionAction, New.RelationSetting.cyclotomicCharMod_eq_one_of_mem_ker_torsionAction, New.RelationSetting.exists_generator_mod_ker, New.RelationSetting.exists_hasFewCocycles_torsion, New.RelationSetting.exists_pow_le_card_reductions, New.RelationSetting.finite_reductions, New.RelationSetting.le_ker_torsionAction, New.RelationSetting.pow_le_card_reductions_mul, New.RelationSetting.reductions, New.RelationSetting.torsionAction, New.RelationSetting.trivialOn_ker_torsionAction, New.card_torsionBy_le_of_surjective} \lean{New.DiscreteModule.Z1.eq_zero_on_decompGroup, New.IsLargeLevel.SplitPlaces, New.IsLargeLevel.SplitPlaces.FrobeniiDetectRoots, New.IsLargeLevel.SplitPlaces.ctorIdx, New.IsLargeLevel.SplitPlaces.cyclotomicCharMod_eq_one, New.IsLargeLevel.SplitPlaces.decompGroup_le, New.IsLargeLevel.SplitPlaces.dvd_level, New.IsLargeLevel.SplitPlaces.inertiaGroup_le, New.IsLargeLevel.SplitPlaces.isFrob, New.IsLargeLevel.SplitPlaces.isPlaceOver, New.IsLargeLevel.SplitPlaces.level_notMem, New.IsLargeLevel.SplitPlaces.liftToSubgroup, New.IsLargeLevel.SplitPlaces.mem_and_conj_mem, New.IsLargeLevel.SplitPlaces.mem_inertia_iff, New.IsLargeLevel.SplitPlaces.mk.inj, New.IsLargeLevel.SplitPlaces.mk.injEq, New.IsLargeLevel.SplitPlaces.mk.sizeOf_spec, New.IsLargeLevel.SplitPlaces.principal_sup_idelesUnitOff, New.IsLargeLevel.SplitPlaces.v, New.IsLargeLevel.SplitPlaces.v_injective, New.IsLargeLevel.SplitPlaces.valuationSubring, New.IsLargeLevel.SplitPlaces.φ, New.IsLargeLevel.dirichlet_fixedSUnits, New.IsLargeLevel.fixedSUnits, New.IsLargeLevel.fixedSUnitsRep, New.IsLargeLevel.mem_sUnits_iff, New.IsLargeLevel.mem_sUnits_of_nsmul_mem, New.IsLargeLevel.ofBase_mem_sUnits, New.IsLargeLevel.sUnits, New.IsTameGeneratorFor, New.PlaceAboveLevel, New.PlaceAboveLevel.bijective_orbits, New.exists_isTameGeneratorFor, New.exists_surjective_sUnit_to_fixedSUnits, New.finite_cocycles_unramified_outside, New.finrank_prod_int_le_of_surjective, New.linearIndependent_sUnit_log, New.ordRat_inv_smul, New.selmerZ1, New.selmerZ1.finite_unramified_cocycles} \lean{New.natCast_notMem_of_coprime, New.selmerZ1.exists_dvd_coprime_sup_idelesUnitOff_eq_top, New.selmerZ1.exists_fix_roots_of_units, New.selmerZ1.exists_three_values, New.selmerZ1.exists_trivialisation_of_mem, New.selmerZ1.trivialised_mem_selmer} \lean{New.DiscreteModule.HasFewCocycles, New.DiscreteModule.mem_trivialisedCocycles, New.DiscreteModule.trivialisedCocycles, New.DiscreteModule.trivialisedCocycles.card_eq_of_isShortExact, New.DiscreteModule.trivialisedCocycles.corestrict_mem, New.DiscreteModule.trivialisedCocycles.exists_mem_of_orbit_reps, New.DiscreteModule.trivialisedCocycles.hasFewCocycles_of_isShortExact, New.DiscreteModule.trivialisedCocycles.map, New.DiscreteModule.trivialisedCocycles.out_inv_mul_mul_out_mem, New.DiscreteModule.trivialisedCocycles.snd_mem_Z1, New.IsLargeLevel.SplitPlaces.PowerResidueSymbols, New.IsLargeLevel.SplitPlaces.PowerResidueSymbols.exists_mem_trivialisedCocycles, New.IsLargeLevel.SplitPlaces.PowerResidueSymbols.rootPowHom_apply, New.IsLargeLevel.SplitPlaces.PowerResidueSymbols.snd_eq_zero_of_forall_snd_eq_zero, New.IsLargeLevel.SplitPlaces.PowerResidueSymbols.sum_smul_eq_zero, New.IsLargeLevel.SplitPlaces.apply_inertia_eq_zero, New.IsLargeLevel.SplitPlaces.exists_powerResidueSymbols, New.IsLargeLevel.SplitPlaces.power_residue_reciprocity, New.IsTameGeneratorFor.exists_apply_eq_nsmul, New.IsTameGeneratorFor.kummer_apply_conj, New.eq_one_or_isComplexConj, New.exists_kummer_root, New.kummer_eq_zero_of_mem_inertiaGroup} \begin{theorem}[Relations modulo $\ell$]\label{thm:B-relations-mod-l} Let $\ell\mid m$, let $M[\ell]$ have order $\ell$, let $\kappa$ be a continuous character with values in $1+4\Z_\ell$ whose kernel lies in $U\cup Uc^{-1}$ for a complex conjugation $c$, and let the local condition at $v\in S$ be the vanishing on the decomposition group if $v\nmid\ell$, and on its part in $\ker\kappa$ if $v\mid\ell$. If $K$ has at least four infinite places, then for some finite $T\supseteq S$ the reductions of the relations off $T$ form a group of order at least $\ell^{k+1}$, $k$ the number of primes of $S$ not above $\ell$. \end{theorem} \begin{proof}[Sources] This is a weak form of the Greenberg--Wiles formula \cite{Greenberg1989,Wiles1990}, in which only four infinite places are used; the Lean development proves it by counting. \emph{Split primes.} By Chebotarev's theorem and the equivariant $S$-unit theorem there are finitely many primes, split for $U$ and prime to the level, whose Frobenius elements detect the roots of units: every $m$-th root of a unit of the field of $U$ that they fix is fixed by $U$. Every family of characters of $M$ that kills the families of the values $z(\gamma_i)$ of the cocycles at their tame generators comes from a relation off a suitable $T$ (\cref{thm:B-greenberg-wiles}(a), by counting trivialised cocycles and power residue reciprocity at split primes). \emph{Many reductions.} A character of $M[\ell]^\iota$ that kills the $\ell$-torsion of the group $B$ of the families of values extends to a character of $M^\iota$ killing $B$, so it comes from a relation, whose reduction determines it; hence $\#M[\ell]^{\#\iota}$ is at most the number of reductions times the number $t$ of cocycles killed by $\ell$. \emph{Few cocycles.} A cocycle killed by $\ell$ has values in $M[\ell]$; adding two split primes with Frobenius elements in prescribed cosets makes the cocycles of $M[\ell]$, trivialised above the level, infinity and the inertia at the other primes, at most $\ell^{\#\iota+3}$ in number (the kernel of the action on $M[\ell]$ and $\mu_\ell$ has index prime to $\ell$, which gives Higman's criterion); a local cocycle vanishing on $\ker\kappa$ is determined by one value, as the image of $\kappa$ is procyclic, so the local terms cost at most $\ell$ above $\ell$ and $1$ elsewhere, and four infinite places and the $k$ primes off $\ell$ each save one factor $\ell$. Hence $t\,\ell^{k+1}\le\ell^{\#\iota}$, and the two inequalities give the claim. \end{proof} \subsection{Crystalline cocycles and odd classes}\label{ss:B-padic} Let $T$ be a free $\Z_p$-module of rank $d$ with an action of a group $\Gamma$ mapping with open image of index $n$ to $\Gal(\bar\Q_p/\Q_p)$, and let $B_{\max}$ be Colmez' period ring \cite{Colmez1998}. The \emph{crystalline cocycles} $Z_f(T)$ are the maps $\Gamma\to T$ that become coboundaries over $B_{\max}$; $T$ is potentially crystalline if the periods fixed near $1$ span $B_{\max}\otimes T$. \lean{New.Period.IsPotentiallyCrystalline.exists_hodge_basis, New.Period.isAdmissible_extensionRep, New.Period.IsPotentiallyCrystalline.exists_coboundary_eq_smul, New.Period.exists_uniform_trace_sum_eq_jump, New.Lift.InClass, New.Lift.Pairing, New.Lift.cupOrthogonal, New.Lift.dualDefect} \begin{theorem}[Crystalline cocycles]\label{thm:B-padic} \begin{enumerate}[label=\textup{(\alph*)}] \item (Rank.) For potentially crystalline $T$, $Z_f(T)$ is finitely generated of rank $d+n\cdot\#\{\text{negative Hodge--Tate jumps}\}$; with positive jumps it is torsion modulo coboundaries. \item (Duality.) For a potentially crystalline lattice $L$ and its Tate dual $L'$ the sizes of $Z_f(L)$ and $Z_f(L')$ modulo $\ell^m$ satisfy the index relation of local duality, and the cocycles of $L/\ell^m$ orthogonal to a subgroup of $Z_f(L')$ are bounded by a divisibility of indices. \item (Odd classes.) For a CM field $E\subseteq\Q(\mu_N)$ and $t\ge0$ there is an integer $0N+e+3$, $v_\ell(X)+1$ elements detect such a class. \end{enumerate} \end{theorem} \lean{New.IsFrob.sub_nsmul_mem_principalUnits, New.OddPart.IsKolyvaginSystem, New.OddPart.IsKolyvaginSystem.apply_eq_zero, New.OddPart.IsKolyvaginSystem.exists_mem_inertiaGroup_eq, New.OddPart.IsKolyvaginSystem.mem_vanishingCocycles, New.OddPart.commutatorLog, New.OddPart.cyclotomicPowDirichlet_smul, New.OddPart.cyclotomicPowDirichlet_smul_derivativeSum, New.OddPart.derivativeSum, New.OddPart.derivativeSum_congr, New.OddPart.derivativeSum_empty, New.OddPart.derivativeSum_eq_of_prime, New.OddPart.derivativeSum_insert, New.OddPart.derivative_sub_frob_mem_principalUnits, New.OddPart.eq_of_mem_principalUnits, New.OddPart.exists_cyclotomicPowDirichlet_smul_derivativeSum, New.OddPart.exists_inertia_cyclotomicChar_eq, New.OddPart.exists_inertia_smul_add_ofZMod, New.OddPart.exists_isKolyvaginSystem, New.OddPart.exists_monoidHom_units_zmod_eq_ofAdd_one, New.OddPart.exponent_eq_of_inertia, New.OddPart.galUnitsRep_conj_of_nsmul_eq_zero, New.OddPart.isLocallyConstant_commutatorLog, New.OddPart.mem_cycloGalGroup_of_mem_inertiaGroup, New.OddPart.nsmul_exponent_eq_sub, New.OddPart.rootPowHom_commutatorLog, New.OddPart.shift_indep_of_distribution, New.OddPart.sub_one_smul_sum_eq_zero, New.OddPart.telescoping_mem_principalUnits} \lean{New.OddPart.classNumber_mul_index_idelesPowAt_le, New.OddPart.exists_detecting_points_cocycles, New.OddPart.exists_detecting_points_mem_ker, New.OddPart.length_shaOdd_le_addVal_pow, New.OddPart.length_shaOdd_le_of_le_sq, New.OddPart.length_shaOdd_le_of_sq_lt, New.OddPart.nsmul_shaOdd_eq_zero_of_isStickelbergerBound, New.exists_character_components, New.length_shaOdd_zero_le_addVal_classNumber, New.ncard_placesDividing_le_finrank} \lean{New.OddPart.IsTrivialAbove, New.OddPart.apply_eq_zero_of_mem_inertiaGroup, New.OddPart.artin_reciprocity_of_mem_component, New.OddPart.cyclotomicPowDirichlet_smul_eq_self, New.OddPart.exists_detecting_points_component, New.OddPart.exists_finset_forall_exists_isFrob, New.OddPart.exists_inertia_cyclotomicPowDirichlet_eq, New.OddPart.exists_isFrob_forall_isTrivialAbove, New.OddPart.exists_isFrob_notMem, New.OddPart.exists_modEq_one_coprime_isUnit_pow_sub_one, New.OddPart.exists_modEq_one_forall_isUnit_pow_sub_one, New.OddPart.exists_ne_zero_forall_isTrivialAbove, New.OddPart.exists_place_above, New.OddPart.finite_component, New.OddPart.finite_vanishingCocycles, New.OddPart.finite_vanishingCocycles_inertiaOff_empty, New.OddPart.isUnit_natCast_of_not_dvd, New.OddPart.isUnit_natCast_of_pow_factorization_succ_dvd, New.OddPart.isUnit_totient_mul, New.OddPart.mem_cycloGalGroup_and_valuation_eq_one, New.OddPart.mem_vanishingCocycles_of_mem_insert, New.OddPart.not_cycloGalGroup_le_openCocycleKer, New.OddPart.not_cycloGalGroup_le_openCocycleKer_of_ne_zero, New.OddPart.nsmul_component_eq_zero, New.OddPart.openCocycleKer, New.OddPart.reciprocity_mod_ell, New.OddPart.sum_floorDiff_dvd, New.OddPart.sum_range_eq_sum_units_add} \lean{New.OddPart.IsJacobiFamily, New.OddPart.IsJacobiFamily.galUnitsRep_apply, New.OddPart.IsJacobiFamily.isOfFinAddOrder_sum_sub, New.OddPart.IsJacobiFamily.norm_eq_one, New.OddPart.IsJacobiFamily.ordRat_eq, New.OddPart.IsJacobiFamily.sub_mem_principalUnits, New.OddPart.IsJacobiFamily.valuation_eq_one, New.OddPart.exists_addChar_isPrimitive_and_mulChar_isPrimitive, New.OddPart.exists_apply_eq_and_nsmul_eq_zero_of_injective, New.OddPart.exists_galUnitsRep_gaussSum_eq, New.OddPart.exists_isJacobiFamily, New.OddPart.floorDiff, New.OddPart.gaussSum_add_sub_gaussSum_mem_centrePrime_of_nsmul_eq_zero, New.OddPart.gaussSum_dvd_natCast_of_isPrimitive, New.OddPart.isOfFinAddOrder_distribution, New.OddPart.isOfFinOrder_of_norm_eq_one, New.OddPart.mk_centrePrime_eq_one_of_pow_eq_one, New.OddPart.stickelberger, New.OddPart.sum_floorDiff, New.OddPart.valuation_gaussSum_eq_one_of_valuation_eq_one} \lean{Nat.ModEq.coprime_of_modEq_one, New.OddPart.IsStickelbergerBound, New.OddPart.IsStickelbergerBound.exists_modEq_one_coprime_dvd, New.OddPart.IsStickelbergerBound.exists_natCast_dvd_sub_mul_sum, New.OddPart.LFunction_neg_nat_eq_zero_iff, New.OddPart.abs_bernoulliFun_lt, New.OddPart.det_ne_zero_of_forall_sum_mul_ne_zero, New.OddPart.exists_intCast_eq_factorial_mul_bernoulli, New.OddPart.exists_isStickelbergerBound, New.OddPart.exists_map_eq_bernoulli_sub_comp, New.OddPart.exists_modEq_one_coprime_dvd_of_prime, New.OddPart.exists_sq_dvd_factorial_mul_sum_pow_sub, New.OddPart.mulVec_mulChar_eq_sum_smul, New.OddPart.mul_sub_one_mul_le_two_pow_of_le, New.OddPart.sum_mul_bernoulli_eq_neg_mul_LFunction, New.OddPart.sum_mul_bernoulli_ne_zero, New.OddPart.sum_range_mul_eq_sum_sum, New.OddPart.voronoi_congruence, New.OddPart.voronoi_congruence_bernoulli} \begin{proof}[Sources] For large $\ell$ a bound of this kind follows from the main conjecture of Mazur and Wiles \cite{Wiles1990}; the Lean development proves only an explicit upper bound at finite level, after Greither's method. (a) It is a cocycle analogue, with a crude bound, of the class field theory bound for the number of generators of the Galois group of the maximal pro-$\ell$ extension unramified outside $\ell$. Put $M=N\ell^2$ and $K=\Q(\mu_M)\supseteq E$. The points are representatives of the cosets of $\Gal(\Omega/K)$ in $\Gal(\Omega/E)$ and points detecting the homomorphisms on $\Gal(\Omega/K)$ unramified off $\ell$ (generators of a ray class group of $K$, of number at most a power of $M$). If $Mz=0$, then $\Gal(\Omega/K)$ acts as the identity on the values of $z$, so $z$ is a homomorphism there and the second set detects it; that $Mz=0$ follows by induction on the power of $\ell$ killing $z$, as $\ell\mid M$. Writing each point as an element of the kernel of the cyclotomic character times a limit of powers of $g_0$ and keeping the first factor gives $s$, the cocycle being also required to vanish at $g_0$. (b) Voronoi's congruence gives a bounded divisibility of twisted Stickelberger sums by $X$; Jacobi-type sums give units with prescribed valuations at a place above a split prime; Kolyvagin's derivative construction turns them into cocycles with prescribed values on inertia and Frobenius; and the reciprocity law, read on each component, shows that $4X^2$ kills the component, an analogue of Stickelberger's theorem, and that for large $\ell$ the stated number of elements detects a cocycle. For $e=0$ the class number serves (\cref{thm:B-padic}(c)). \end{proof}