Material for Mathlib #
Source: MichaelStollBayreuth/EllipticCurves at commit 3f8c39c0fc4c0fd0a40e693aa2a9bbda08d9ee1f.
Exact-pin changes are documented in PORTING.md.
This file collects the general-purpose results developed for EllipticCurves.WeakMordellWeil
that have nothing to do with elliptic curves and look like candidates for Mathlib.
MonoidHom.ofMapMulMulEqOne: build aMonoidHomfromf 1 = 1anda * b * c = 1 → f a * f b * f c = 1.Valuation.map_eval_eq_of_one_ltandValuation.le_one_of_root_monic: dominance of the leading term of a monic polynomial with integral coefficients, and integrality of its roots.Valuation.eq_one_of_mul_eq_one: a factor of a unit is a unit, provided both factors are integral.IsDedekindDomain.HeightOneSpectrum.finite_setOf_valuation_ne_one,.below(the prime lying below a prime of an integral extension),.primesAboveand its finiteness.primesAbove_finite,IsDedekindDomain.selmerGroupAbove,.valuationOfNeZero_eq_iff,.dvd_toAdd_valuationOfNeZeroand.valuationOfNeZeroMod_mk_eq_one_iff, which turns the Selmer condition into a divisibility of valuations;Set.integer_monoandSet.unit_mono, monotonicity of theS-integers andS-units inS. (Mathlib.RingTheory.DedekindDomain.SelmerGrouphas aTODOabout theMultiplicative/Additivedefeq abuse invaluationOfNeZeroModand provides no API for it.)Units.modPow, the group ofn-th power classes of units, whichMathlib.RingTheory.DedekindDomain.SelmerGrouphas only as a local notation, together withmap,congrandpiEquiv.- Division with remainder by a monic polynomial:
Polynomial.Monic.divByMonic_mul_add,.modByMonic_mul_add,modByMonic_mem_degreeLT,divByMonic_mem_degreeLT. isIntegralClosure_int_integralClosure,NumberField.finite_classGroup_integralClosureandNumberField.fg_units_integralClosure: the class number theorem and the finite generation of the unit group for the integral closure of𝓞 Kin a finite extension of a number fieldK;NumberField.subsingleton_classGroup_integralClosureandNumberField.finrank_additive_units_integralClosuretransport triviality of the class group and the unit rank from𝓞 L.AdjoinRoot.discr_powerBasis_eq_discr,NumberField.exists_eq_discr_mul_sq,RingOfIntegers.isPrincipalIdealRing_of_finrank_eq_three_of_abs_discr_leandRingOfIntegers.finrank_additive_units_of_discr_neg/_pos: the discriminant of the power basis ofK[X]/(f)isf.discr; the field discriminant is any integral power-basis discriminant divided by a square; a cubic field with|discr| ≤ 49has trivial class group (Minkowski bound), and the sign of its discriminant determines the unit rank (Dirichlet).AdjoinRoot.norm_mk_eq_resultant: for monicg, the norm ofAdjoinRoot.mk g pis the resultant ofgandp. This linksPolynomial.resultanttoAlgebra.norm.AdjoinRoot.equivPiFactors: for nonzero squarefreef,K[X]/(f)is the product of the fieldsK[X]/(p)over the monic irreducible factorspoff, and the inducedAdjoinRoot.modPowEquivPiFactorsonn-th power classes of units.Polynomial.discr_X_sub_C_mul: splitting off a linear factor multiplies the discriminant by the square of the evaluation,((X - C x) * g).discr = g.discr * g.eval x ^ 2.Matrix.det_blockDiagonal',LinearMap.det_pi',Algebra.norm_prod,Algebra.norm_pi: determinants and norms on (dependent) products decompose as products; together withAdjoinRoot.norm_eq_prod_norm_projFactor, the norm onK[X]/(f)as the product of the norms on the field factors.- General helpers extracted from the rank example:
Squarefree.map(transport along aMulEquiv),Polynomial.Monic.irreducible_map_fraction_map_of_irreducible_map(irreducibility over the fraction field via reduction modulo a prime),Polynomial.Factors.coe_eq,AdjoinRoot.isIntegralElem_root_of_map,AdjoinRoot.finrank_eq_natDegree, and theIsPrincipalIdealRing (𝓞 ℚ)instance.
A map f between groups with f 1 = 1 that sends triples with product 1 to triples
with product 1 is a homomorphism. Useful when a map is naturally defined via a symmetric
ternary relation, like collinearity on a cubic curve.
Equations
- MonoidHom.ofMapMulMulEqOne hf₁ hf = MonoidHom.ofMapMulInv f ⋯
Instances For
A map f between additive groups with f 0 = 0 that sends triples with
sum 0 to triples with sum 0 is a homomorphism. Useful when a map is naturally defined via
a symmetric ternary relation, like collinearity on a cubic curve.
Equations
Instances For
A multiplicative equivalence preserves squarefreeness.
Algebraic closedness transfers along a ring isomorphism. This is
IsAlgClosed.of_ringEquiv without its restriction of both fields to a common universe
(needed e.g. to transfer IsAlgClosed ℂ to a completion of a number field F : Type* at a
complex place).
The group of n-th power classes of units of α. This is the group underlying the
Selmer groups of Mathlib.RingTheory.DedekindDomain.SelmerGroup, where it only exists
as a local notation.
Equations
- Units.modPow α n = (αˣ ⧸ (powMonoidHom n).range)
Instances For
The class of a unit is trivial in Units.modPow α 2 exactly when the unit is a square
in α.
If every unit of α is an n-th power, then the group of n-th power classes of units
is trivial.
Over an algebraically closed field, the group of n-th power classes of units is trivial
(for n ≠ 0).
A monoid homomorphism α →* β induces a homomorphism on n-th power classes of units.
Equations
- Units.modPow.map φ n = QuotientGroup.map (powMonoidHom n).range (powMonoidHom n).range (Units.map φ) ⋯
Instances For
A multiplicative equivalence α ≃* β induces one on n-th power classes of units.
Equations
Instances For
The group of n-th power classes of units of a domain that is integral over an algebraically
closed field is trivial (for n ≠ 0) — the algebra map is then bijective, so this extends
Units.modPow.subsingleton_of_isAlgClosed; e.g., it applies to the residue fields L[X]/(p) of
an étale algebra over an algebraically closed field.
The map on n-th power classes of units induced by a bijective homomorphism is
bijective.
Taking n-th power classes of units commutes with products.
Equations
- Units.modPow.piEquiv α n = (QuotientGroup.congrRangePowMonoidHom MulEquiv.piUnits n).trans (QuotientGroup.mulEquivPiModRangePowMonoidHom (fun (i : ι) => (α i)ˣ) n)
Instances For
An ideal contraction is nonzero as soon as its further contraction along an injective ring homomorphism is nonzero.
A "diagonal" family of vectors — supported at the family index with nonzero value there — is linearly independent.
The determinant of a block diagonal matrix with (possibly) non-uniform block sizes is the
product of the determinants of the blocks. Dependent version of Matrix.det_blockDiagonal.
The determinant of a component-wise endomorphism of a finite product of finite free modules
is the product of the determinants of the components. Dependent version of LinearMap.det_pi.
If p is monic with coefficients that are integral for the valuation ν and 1 < ν t,
then the value of p at t is dominated by the leading term: ν (p.eval t) = ν t ^ p.natDegree.
In particular, p.eval t ≠ 0.
A root of a monic polynomial of positive degree with coefficients that are integral for the
valuation ν is itself integral. (This is a concrete form of the fact that valuation rings are
integrally closed.)
A nonzero element of the fraction field of a Dedekind domain has trivial valuation at all but finitely many primes.
Ideal-level divisibility characterization of Associates.count: the multiplicity of v in
J is at least k iff v ^ k divides J.
Divisibility characterization of Associates.count for a height one prime: the v-adic
valuation of x is at least k iff x ∈ v ^ k.
The Multiplicative ℤ-valued valuation of a unit is determined by the ℤᵐ⁰-valued one.
If the valuation of a unit u is the n-th power of the valuation of a unit z, then the
v-adic order of u is divisible by n.
The class of a unit u in Units.modPow K n has trivial image under the v-adic valuation
mod n exactly when the v-adic valuation of u is divisible by n.
If a power of the prime v is generated by π, then π is a w-adic unit at every prime
w ≠ v.
The valuation of an element of R not lying in v ^ 2 is at least exp (-1): it can
vanish at v at most to first order.
In a principal ideal domain, a squarefree element lies in no square of a maximal ideal.
The primes of B lying above a set S of primes of R.
Equations
- IsDedekindDomain.HeightOneSpectrum.primesAbove R B S = {w : IsDedekindDomain.HeightOneSpectrum B | ∃ v ∈ S, v.asIdeal = Ideal.under R w.asIdeal}
Instances For
The prime of R lying below a prime w of an integral extension B.
Equations
- IsDedekindDomain.HeightOneSpectrum.below R B w = { asIdeal := Ideal.under R w.asIdeal, isPrime := ⋯, ne_bot := ⋯ }
Instances For
Only finitely many primes of B lie above a finite set of primes of R: each fiber
injects into Ideal.primesOver, which is finite for a Dedekind extension.
The S-Selmer group of L, where B is a Dedekind domain with fraction field L and S
is a set of primes of R: the classes of Lˣ modulo n-th powers whose valuation is divisible
by n at every prime of B not lying above S.
Equations
Instances For
The maximal ideal is the only height-one prime of a discrete valuation ring.
The height-one prime of B obtained by contracting a height-one prime along a ring
homomorphism ψ : B →+* C, given that the contraction is nonzero.
Equations
- IsDedekindDomain.HeightOneSpectrum.comapOfNeBot ψ w hne = { asIdeal := Ideal.comap ψ w.asIdeal, isPrime := ⋯, ne_bot := hne }
Instances For
The w-adic valuation of φ u is the valuation of u at the contracted prime, raised
to a fixed positive power (the ramification index), for an embedding φ of fraction fields
compatible with an embedding ψ of Dedekind domains.
Divisibility of adic valuations transports along compatible embeddings: if the valuation
of u at the contracted prime is divisible by n, so is the w-adic valuation of φ u.
The maximal ideal of the ring of integers of the completion of K at v contracts
to v itself.
The resultant of f with the linear polynomial C x - X is f.eval x.
Note the absence of a sign: C x - X is -(X - C x), and the two signs cancel.
For monic g, the resultant does not depend on the size parameter used for the second
argument, as long as it is at least its degree.
A monic real polynomial that is irreducible of degree 2 is positive definite: being
irreducible of degree > 1 it has no real root, and its leading coefficient is 1 > 0.
The norm on AdjoinRoot g is the resultant #
Write m = g.natDegree and n = p.natDegree. The Sylvester map
S : R[X]_m × R[X]_n →ₗ R[X]_(m+n), (u, v) ↦ g * v + p * u, has the Sylvester matrix as its
matrix, so det S = resultant g p m n.
Taking p = 1 gives a map Ψ : (u, v) ↦ g * v + u, which is a linear equivalence when g is
monic (its inverse is q ↦ (q %ₘ g, q /ₘ g)), and det Ψ = resultant g 1 m n = 1.
Now S = Ψ ∘ₗ B where B := Ψ⁻¹ ∘ₗ S is the endomorphism
(u, v) ↦ ((p * u) %ₘ g, v + (p * u) /ₘ g) of R[X]_m × R[X]_n, by modByMonic_add_div.
In the block decomposition the matrix of B is lower triangular with diagonal blocks
mulModByMonic hg p and 1, so det B = det (mulModByMonic hg p).
Finally mk g : R[X]_m ≃ₗ AdjoinRoot g conjugates mulModByMonic hg p into multiplication by
mk g p, whose determinant is by definition Algebra.norm R (mk g p).
No signs appear anywhere: B is an endomorphism, so the two blocks are never reordered.
Multiplication by p on R[X]_(g.natDegree), that is, q ↦ (p * q) %ₘ g. This is the
map that mk g : R[X]_(g.natDegree) ≃ₗ AdjoinRoot g turns into multiplication by mk g p.
Equations
- Polynomial.mulModByMonic hg p = { toFun := fun (q : ↥(Polynomial.degreeLT R g.natDegree)) => ⟨p * ↑q %ₘ g, ⋯⟩, map_add' := ⋯, map_smul' := ⋯ }
Instances For
For monic g, the Sylvester map of g and 1, namely (u, v) ↦ g * v + u, is a linear
equivalence R[X]_(g.natDegree) × R[X]_n ≃ₗ R[X]_(g.natDegree + n). Its inverse is
q ↦ (q %ₘ g, q /ₘ g).
Equations
- Polynomial.sylvesterEquivOne hg n = LinearEquiv.ofBijective (g.sylvesterMap 1 ⋯ ⋯) ⋯
Instances For
The inverse of Ψ is division with remainder by g.
The block-triangular endomorphism B = Ψ⁻¹ ∘ₗ S of R[X]_(g.natDegree) × R[X]_n.
Equations
- Polynomial.sylvesterBlock hg p hp = ↑(Polynomial.sylvesterEquivOne hg n).symm ∘ₗ g.sylvesterMap p ⋯ hp
Instances For
The first coordinate of B (u, v) is (p * u) %ₘ g.
The second coordinate of B (u, v) is v + (p * u) /ₘ g.
The determinant of the block-triangular map B is the determinant of its upper-left block.
To show that a monic polynomial over an integrally closed domain is irreducible over its fraction field, it suffices to exhibit an irreducible image under some ring homomorphism to a domain, e.g. reduction modulo a prime.
mk g is a linear equivalence from the polynomials of degree < g.natDegree onto
AdjoinRoot g, for g monic.
Equations
Instances For
For a monic irreducible quadratic q : ℝ[X], the field ℝ[X]/(q) is ℂ: it is a degree-2
(hence not ℝ) algebraic extension of ℝ, and every such extension is ℝ or ℂ.
The norm of mk g p is the determinant of multiplication by p on R[X]_(g.natDegree),
because degreeLTEquiv hg conjugates the latter into multiplication by mk g p.
The norm of AdjoinRoot.mk g p over the base ring, for g monic, is the resultant of g
and p. Equivalently, it is the product of the values of p at the roots of g.
The root of h = g.map φ in S[X]/(h), for g monic over R, is integral over R
(along the composite of φ with the canonical map).
Evaluation of AdjoinRoot.map on the class of a polynomial (the companion of Mathlib's
AdjoinRoot.map_of and AdjoinRoot.map_root).
The base-change map K[X]/(p) →+* K_v[X]/(q) of AdjoinRoots at a completion is
compatible with the algebra maps from the underlying Dedekind domain R and from the ring of
integers of the completion.
The norm on a product algebra #
The R-norm on a product algebra is the product of the norms.
The R-norm on a finite product of R-algebras is the product of the norms.
Decomposition of K[X]/(f) into a product of fields #
For a nonzero squarefree f over a field K, the étale algebra AdjoinRoot f is the product
of the fields AdjoinRoot p, where p runs over the distinct irreducible factors of f.
This is what lets one talk about the primes, and hence the Selmer group, of AdjoinRoot f:
they are those of the factors.
If moreover f is separable, each factor is separable, so each AdjoinRoot p is a finite
separable extension of K and its integral closure over a Dedekind domain is again Dedekind.
The distinct monic irreducible factors of f, as an index type.
Note that this is not defined via normalizedFactors (which would require DecidableEq K);
membership in normalizedFactors f is characterized by Factors.mem_normalizedFactors_iff.
Instances For
If f itself is monic and irreducible, then its only factor is f.
A monic irreducible polynomial has itself as its only monic irreducible factor.
Instances For
Membership in normalizedFactors (with its normalization from DecidableEq K) is
equivalent to being a monic irreducible factor.
The monic linear factors of f correspond to the roots of f.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The degrees of the distinct monic irreducible factors of f ≠ 0 sum to at most the
degree of f (with equality iff f is squarefree, up to normalization).
An irreducible factor of the image of f under a field embedding divides the image of
one of the irreducible factors of f.
The dimension of K[X]/(f) over K is the degree of f.
The discriminant of the power basis of K[X]/(f), for f monic irreducible with
derivative of the generic degree, is the discriminant of the polynomial f.
If f is separable, then each field factor of K[X]/(f) is a separable extension of K.
This is what IsIntegralClosure.isDedekindDomain needs.
Chinese Remainder Theorem for AdjoinRoot: for f nonzero and squarefree,
K[X]/(f) is the product of the fields K[X]/(p) over the monic irreducible factors p
of f.
Equations
Instances For
The projection of K[X]/(f) onto the field factor K[X]/(p).
Equations
- AdjoinRoot.projFactor hf hsq p = (Pi.evalRingHom (fun (i : f.Factors) => AdjoinRoot ↑i) p).comp (AdjoinRoot.equivPiFactors hf hsq).toRingEquiv.toRingHom
Instances For
The n-th power classes of units of K[X]/(f) are the product of those of its
field factors.
Equations
- AdjoinRoot.modPowEquivPiFactors hf hsq n = (Units.modPow.congr (AdjoinRoot.equivPiFactors hf hsq).toMulEquiv n).trans (Units.modPow.piEquiv (fun (p : f.Factors) => AdjoinRoot ↑p) n)
Instances For
On the class of a unit, modPowEquivPiFactors is componentwise projection to the factors.
On the class of a unit, modPowEquivPiFactors is componentwise projection to the factors
(Units.map version of modPowEquivPiFactors_unit).
The class of a unit of K[X]/(f) is trivial exactly when its components at all field
factors are trivial.
The norm of an element of K[X]/(f) is the product of the norms of its components in the
field factors.
The norm of the component at the factor p of the class of C x - X is p.eval x.
Rings of integers in finite extensions of number fields #
The integral closure of 𝓞 K in a finite extension L of a number field K is (isomorphic to)
the ring of integers of L; consequently the class number theorem and (the finite-generation
part of) Dirichlet's unit theorem apply to it.
The class number theorem for the integral closure of 𝓞 K in a finite extension L
of the number field K: its class group is finite.
Dirichlet's unit theorem (finite generation) for the integral closure of 𝓞 K in a
finite extension L of the number field K: its unit group is finitely generated.
If the ring of integers of L is a principal ideal domain, then the integral closure of
𝓞 K in L (being isomorphic to 𝓞 L) has trivial class group.
The unit group of the integral closure of 𝓞 K in a finite extension L has the same
rank as that of 𝓞 L (they are isomorphic).
Discriminants, class numbers, and unit ranks of cubic fields #
The discriminant of a number field is the discriminant of any power basis with integral
generator divided by a square; consequently a cubic field whose power-basis discriminant is
at most 49 in absolute value has trivial class group (by the Minkowski bound), and the sign
of the power-basis discriminant determines the signature and hence, by Dirichlet's unit
theorem, the unit rank (1 if negative, 2 if positive).
The discriminant of any power basis of a number field K over ℚ with integral
generator (expressed via an integer d mapping to it) is the field discriminant times a
square. In particular, discr K divides d and has the same sign.
A cubic number field with negative discriminant has unit rank 1: its signature is
(1, 1), so Dirichlet's unit theorem gives rank 1 + 1 - 1 = 1.
A cubic number field with positive discriminant has unit rank 2: it is totally real,
so Dirichlet's unit theorem gives rank 3 - 1 = 2.
A cubic number field with |discr K| ≤ 49 has a principal ring of integers: its Minkowski
bound is less than 2 for either signature.