FLINT3.7.0-dev

ecpp_class_poly_genus

Synopsis#include <flint/ecpp.h>
int ecpp_class_poly_genus(fmpz_mod_poly_t F, slong D, const slong * pstar, slong g, const fmpz * sqrts, const fmpz_mod_ctx_t ctx)source

Sets F to the factor of the Hilbert class polynomial HDH_D modulo nn (the modulus of ctx) that corresponds to the principal genus. Here D=p1∗⋯pg∗D = p_1^* \cdots p_g^* with the pi∗p_i^* given in pstar (the signed odd primes p∗=(−1)(p−1)/2pp^* = (-1)^{(p-1)/2} p dividing DD and, for even DD, the factor q0∈{−4,8,−8}q_0 \in \{-4, 8, -8\}), and sqrts[i] is a square root of pstar[i] modulo nn, which must exist. Over the genus field K(p1∗,…,pg∗)K(\sqrt{p_1^*}, \ldots, \sqrt{p_g^*}), HDH_D factors into 2g−12^{g-1} conjugate factors of degree h(D)/2g−1h(D)/2^{g-1}, whose coefficients are identified numerically from the values of jj at the reduced forms grouped by genus; F is the image of one of them modulo nn, so that finding a root costs a fraction 2−(g−1)2^{-(g-1)} of a root of HDH_D. Returns 1 on success and 0 if g<2g < 2 or the coefficients could not be identified. Requires DD fundamental.

Cite this page

The FLINT team, “ecpp_class_poly_genus (ecpp.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/ecpp/ecpp_class_poly_genus.html (generated 2026-11-02).