gr_ctx_set_is_field
Synopsis
#include <flint/gr.h>Declares whether the ring is a field. For \mathbb{Z}/n\mathbb{Z} this declares whether n is prime: gr_ctx_init_nmod tests primality when asked, while the contexts with large moduli (gr_ctx_init_fmpz_mod, gr_ctx_init_mpn_mod) report T_UNKNOWN until the user declares it, which enables algorithms for fields. For gr_ctx_init_gr_poly_quotient it declares that the modulus is irreducible. The declaration is not checked. Returns GR_UNABLE for rings that do not support it.
Guides#
Cite this page
The FLINT team, “gr_ctx_set_is_field (gr.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/gr/gr_ctx_set_is_field.html (generated 2026-10-20).
@misc{flint-doc-gr-gr-ctx-set-is-field,
author = {{The FLINT team}},
title = {{gr\_ctx\_set\_is\_field (gr.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/gr/gr_ctx_set_is_field.html},
note = {Generated 2026-10-20}
}