Class Polynomials

Class polynomials are invariants of elliptic curves with complex multiplication by an imaginary quadratic order of discriminant D. As such the Hilbert class polynomials can be interpreted as defining a subscheme or divisor on the modular curve X(1) isomorphic to P1, while the Weber variants define a subscheme of a modular curve of higher level.

HilbertClassPolynomial(D) : RngIntElt -> RngUPolElt
Given a negative discriminant D, returns the Hilbert class polynomial, defined as the minimal polynomial of j(τ), where Z[τ] is an imaginary quadratic order of discriminant D.
WeberClassPolynomial(D) : RngIntElt -> RngUPolElt, FldFunRatUElt
Given a negative discriminant D not congruent to 5 modulo 8, returns the Weber class polynomial, defined as the minimal polynomial of f(τ), where Z[τ] is an imaginary quadratic order of discriminant D and f is a particular normalized Weber function generating the same class field as j(τ). The particular f(τ) used depends on whether D is odd ( ≡ 1 mod 8) or even, in which case it also depends on D/4 mod 8, as well as whether 3 divides D or not. A root f(τ) of the Weber class polynomial is an algebraic integer (a unit in most cases and always a unit outside of 2) generating the ring class field related to the corresponding root j(τ) of the Hilbert class polynomial by an expression j(τ) = F(f(τ)). Here F is a rational function of the form A(Bxr + C)3/xr with r|24 and A,B,C rational integers which are positive or negative powers of 2. The function F is also returned. For example, if D ≡ 1 mod 8 then

j(τ) = ((f(τ)24 - 16)3 /f(τ)24),

where (GCD)(D, 3) = 1, and

j(τ) = ((f(τ)8 - 16)3 /f(τ)8),

if 3 divides D and f(τ) is a unit.

In fact, f(τ) can only be a non-unit when 4|D and D/4 ≡ 0, 4 or 5 mod 8. For further details, consult Yui and Zagier [YZ97] for the case of odd D and Schertz [Sch76] for the case of even D.

WeberToHilbertClassPolynomial(f,D) : RngUPolElt, RngIntElt -> RngUPolElt
    Al: MonStgElt                       Default: "Roots"
Given a negative discriminant D, and the corresponding Weber class polynomial f, returns the Hilbert class polynomial for D. The default algorithm, as specified by the Al parameter, is to compute complex approximations to the roots of the latter polynomial from approximations to the roots of the Weber polynomial and the rational function F linking the two. The other method is algebraic and uses resultants and the function F which was discussed in the description of the intrinsic WeberClassPolynomial.

Example CrvMod_Standard class polynomials (H137E5)

Class polynomials are typically used for constructing elliptic curves with a known endomorphism ring or known number of points over some finite field. The Weber (and other) variants of the class polynomials were introduced as a means of obtaining class invariants -- defining the j-invariant of curves with given CM discriminant -- with much smaller coefficients. In this example we give the classical example of D = - 71, where the
> HilbertClassPolynomial(-71);
x^7 + 313645809715*x^6 - 3091990138604570*x^5 + 98394038810047812049302*x^4
- 823534263439730779968091389*x^3 + 5138800366453976780323726329446*x^2 -
425319473946139603274605151187659*x + 737707086760731113357714241006081263
> WeberClassPolynomial(-71);
x^7 + x^6 - x^5 - x^4 - x^3 + x^2 + 2*x - 1
As indicated by the constant term -1, the roots of the WeberClassPolynomial are units in a particular ring class order.
V2.28, 13 July 2023