Introduction

Given a ring R such that there is a greatest-common-divisor algorithm for polynomials over R, Magma allows the construction of a rational function field K in any number of indeterminates over R. Such function fields are objects of type FldFunRat with elements of type FldFunRatElt. The elements of K are fractions whose numerators and denominators lie in the corresponding polynomial ring over R. As for polynomial rings, the different univariate and multivariate cases are distinguished, since the fractions just use the different representations given by the different cases of polynomial rings.

A fraction f lying in a function field K is always reduced; this means that the numerator and denominator of f are coprime and the denominator of f is normalized (monic over fields and positive over Z). Note that R itself need not be a field. Thus it is possible, for example, to create the rational function field K = Z(t) which is mathematically equal to Q(t) of course, but will be represented slightly differently. A fraction in Q(t) will have a monic denominator (and the coefficients of both the numerator and denominator may be non-integral), while a fraction in Z(t) will have a positive denominator (and the coefficients of both the numerator and denominator will be integral). Thus the fractions (3t + 2)/(4t - 2) ∈Z(t) and ((3/4)t + 1/2)/(t - 1/2) ∈Q(t) are equal and are both reduced in their respective fields. It is generally much better to use the domain of integers instead of the field of fractions for the coefficient ring R (so it is better to use Z(t) instead of Q(t)) since arithmetic is much faster, but the use of a field of fractions for the coefficient ring may be more desirable for output purposes.

V2.28, 13 July 2023