---
title: "Subfields"
canonical: "https://docs.magma-maths.org/v2.30-1/GlobalFields/AlgebraicFunctionFields/subfields.html"
source: "https://docs.magma-maths.org/v2.30-1/GlobalFields/AlgebraicFunctionFields/subfields.md"
part: "Global Fields"
chapter: "Algebraic Function Fields"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "Global Fields", "source": "https://docs.magma-maths.org/v2.30-1/GlobalFields/index-global-fields.md"}
  - {"title": "Algebraic Function Fields", "source": "https://docs.magma-maths.org/v2.30-1/GlobalFields/AlgebraicFunctionFields/index-algebraic-function-fields.md"}
prev: {"title": "Galois Groups", "source": "https://docs.magma-maths.org/v2.30-1/GlobalFields/AlgebraicFunctionFields/galois.md"}
next: {"title": "Automorphism Group", "source": "https://docs.magma-maths.org/v2.30-1/GlobalFields/AlgebraicFunctionFields/automorphism-group.md"}
intrinsics:
  - {"name": "Subfields", "signature": "Subfields(F): FldFun -> SeqEnum[FldFun]"}
examples:
  - "ex-aeb7db"
---

# Subfields

For finite extensions $L$ of $\Q(t)$, $\F_q(t)$ or extensions $K$ of $\F_q(t)$ Magma can compute all fields between $L$ and $\Q(t)$, $\F_q(t)$, or $K$. It should be noted that the computation of subfields does not depend on the Galois groups. The implementation over $\Q(t)$ uses the algorithm of Klüners [[Klu02](https://docs.magma-maths.org/v2.30-1/references.md#cite-kl4)]. The implementation over $\F_q(t)$ and extensions thereof follows the newer ideas of Klüners and van Hoeij [[vHKN11](https://docs.magma-maths.org/v2.30-1/references.md#cite-vanhoeijklueners)].

<a id="function-subfields-fldfun"></a>
## `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$.

<a id="example-ex-aeb7db"></a>
## `Example: Subfields of a Function Field (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>
]
```
