# Subfields

For finite extensions $L$ of ${\mathbb{Q}}(t)$, ${\mathbb{F}}_q(t)$ or extensions $K$ of ${\mathbb{F}}_q(t)$ Magma can compute all fields between $L$ and ${\mathbb{Q}}(t)$, ${\mathbb{F}}_q(t)$ or $K$. It should be noted that the computation of subfields does not depend on the Galois groups. The implementation over ${\mathbb{Q}}(t)$ uses the algorithm of Klüners [[Klüners, 2002](../../references.md#cite-kl4)]. The implementation over ${\mathbb{F}}_q(t)$ and extensions thereof follows the newer ideas of Klüners and van Hoeij [[van Hoeij *et al.*, 2011](../../references.md#cite-vanhoeijklueners)].

## `Subfields(F): FldFun -> SeqEnum[FldFun]`

All algebraic function fields $G$ with $k(x) \subset G \subseteq F$ or $K \subset G \subseteq F$ where $K$ is an extension of ${\mathbb{F}}_q(x)$ and the coefficient field of $F$.

## `Example: Subfields (ex-aeb7db)`

A subfield computation is shown below.

```magma
> k<x>:= FunctionField(Rationals());
> R<y>:= PolynomialRing(k);
> f:= y^14 - 3234*y^12 + (8*x + 123480)*y^11 + (-696*x - 1152480)*y^10 +
> (27672*x - 43563744)*y^9 + (-663544*x + 1795525424)*y^8 + (10660416*x -
>  33905500608)*y^7 + (-120467088*x + 409661347536)*y^6 + (976911040*x -
>  3428257977088)*y^5 + (-5684130144*x + 20264929189344)*y^4 + (23251514496*x -
>  83582683562112)*y^3 + (-63672983360*x + 229899367865216)*y^2 +
>  (105037027200*x - 380160309247488)*y - 79060128000*x + 286518963720192;
> F:= FunctionField(f);
> Subfields(F);
[
    <Algebraic function field defined over Univariate rational function field
    over Rational Field
    Variables: x by
    y^14 - 3234*y^12 + (8*x + 123480)*y^11 + (-696*x - 1152480)*y^10 + (27672*x
        - 43563744)*y^9 + (-663544*x + 1795525424)*y^8 + (10660416*x -
        33905500608)*y^7 + (-120467088*x + 409661347536)*y^6 + (976911040*x -
        3428257977088)*y^5 + (-5684130144*x + 20264929189344)*y^4 +
        (23251514496*x - 83582683562112)*y^3 + (-63672983360*x +
        229899367865216)*y^2 + (105037027200*x - 380160309247488)*y -
        79060128000*x + 286518963720192, Mapping from: FldFun: F to FldFun: F>,
    <Algebraic function field defined over Univariate rational function field
    over Rational Field
    Variables: x by
    y^7 + 294*y^6 - 107016*y^5 + (2744*x + 576240)*y^4 + (-806736*x +
        2469418896)*y^3 + (88740960*x - 312072913824)*y^2 + (-4329483200*x +
        15606890921216)*y + 79060128000*x - 286518963720192, Mapping from:
    Algebraic function field defined over Univariate rational function field
    over Rational Field
    Variables: x by
    y^7 + 294*y^6 - 107016*y^5 + (2744*x + 576240)*y^4 + (-806736*x +
        2469418896)*y^3 + (88740960*x - 312072913824)*y^2 + (-4329483200*x +
        15606890921216)*y + 79060128000*x - 286518963720192 to FldFun: F>
]

```
