FLINT3.7.0-dev

qqbar_express_in_field

Synopsis#include <flint/qqbar.h>
int qqbar_express_in_field(fmpq_poly_t res, const qqbar_t alpha, const qqbar_t x, slong max_bits, int flags, slong prec)source

Tries to express x in the number field \mathbb{Q}(\alpha): on success, returns 1 and sets res to a polynomial f of degree less than \deg \alpha with f(\alpha) = x. The identity is verified exactly, so success is proved. Failure does not prove that x \notin \mathbb{Q}(\alpha).

A relation between 1, \alpha, \ldots, \alpha^{d-1} and x is searched with LLL at working precision prec; if x \in \mathbb{Q}(\alpha), a large enough precision always finds it. A rational x is handled directly. The parameters max_bits and flags are currently ignored. A single search is done; call the function repeatedly with increasing prec if needed.

Cite this page

The FLINT team, “qqbar_express_in_field (qqbar.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/qqbar/qqbar_express_in_field.html (generated 2026-10-20).