ecpp_class_poly_genus
#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)sourceSets F to the factor of the Hilbert class polynomial H_D modulo n (the modulus of ctx) that corresponds to the principal genus. Here D = p_1^* \cdots p_g^* with the p_i^* given in pstar (the signed odd primes p^* = (-1)^{(p-1)/2} p dividing D and, for even D, the factor q_0 \in \{-4, 8, -8\}), and sqrts[i] is a square root of pstar[i] modulo n, which must exist. Over the genus field K(\sqrt{p_1^*}, \ldots, \sqrt{p_g^*}), H_D factors into 2^{g-1} conjugate factors of degree h(D)/2^{g-1}, whose coefficients are identified numerically from the values of j at the reduced forms grouped by genus; F is the image of one of them modulo n, so that finding a root costs a fraction 2^{-(g-1)} of a root of H_D. Returns 1 on success and 0 if g < 2 or the coefficients could not be identified. Requires D fundamental.
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-10-20).
@misc{flint-doc-ecpp-ecpp-class-poly-genus,
author = {{The FLINT team}},
title = {{ecpp\_class\_poly\_genus (ecpp.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/ecpp/ecpp_class_poly_genus.html},
note = {Generated 2026-10-20}
}