FLINT3.7.0-dev

ca_ext_cmp_repr

Synopsis#include <flint/ca_ext.h>
int ca_ext_cmp_repr(const ca_ext_t x, const ca_ext_t y, ca_ctx_t ctx)source

Compares x and y in a total structural order, returning -1, 0 or

  1. The result says nothing about the values of the numbers.

Algebraic numbers come first, ordered by degree, then by the coefficients of the minimal polynomial (by absolute value from the leading coefficient down, then by sign), then by real and imaginary parts. Function values follow, ordered by depth, then by head, then by number of arguments, then by the arguments with ca_cmp_repr. Ordering by depth makes x precede f(x); the fields sort their generators by decreasing order, so that a lexicographic monomial order eliminates the more complex generators first (see Formal fields and the ideal of relations).

Cite this page

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