---
title: "Constructions"
canonical: "https://docs.magma-maths.org/v2.30-1/LocalFields/GeneralPAdicExtensions/construction.html"
source: "https://docs.magma-maths.org/v2.30-1/LocalFields/GeneralPAdicExtensions/construction.md"
part: "Local Fields"
chapter: "General $p$-Adic Extensions"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "Local Fields", "source": "https://docs.magma-maths.org/v2.30-1/LocalFields/index-local-fields.md"}
  - {"title": "General $p$-Adic Extensions", "source": "https://docs.magma-maths.org/v2.30-1/LocalFields/GeneralPAdicExtensions/index-general-padic-extensions.md"}
prev: {"title": "Introduction", "source": "https://docs.magma-maths.org/v2.30-1/LocalFields/GeneralPAdicExtensions/introduction.md"}
next: {"title": "Operations with Fields", "source": "https://docs.magma-maths.org/v2.30-1/LocalFields/GeneralPAdicExtensions/operations.md"}
intrinsics:
  - {"name": "LocalField", "signature": "LocalField(L, f): FldPad, RngUPolElt -> RngLocA"}
  - {"name": "LocalField", "signature": "LocalField(L, f): RngLocA, RngUPolElt -> RngLocA"}
  - {"name": "sub", "signature": "sub< L | a₁, ..., aₙ >: RngLocA, RngLocAElt, ..., RngLocAElt -> RngLocA"}
  - {"name": "sub", "signature": "sub< L | S>: RngLocA, SeqEnum -> RngLocA"}
examples:
  - "ex-827f9a"
  - "ex-0823ac"
---

# Constructions

The main construction is to extend a local field (of either type) by adjoining the root of a univariate polynomial. Another construction is of the subfield generated by given elements.

<a id="function-localfield-fldpad-rngupolelt"></a>
## `LocalField(L, f): FldPad, RngUPolElt -> RngLocA`

<a id="function-localfield-rngloca-rngupolelt"></a>
## `LocalField(L, f): RngLocA, RngUPolElt -> RngLocA`

Construct a local field $F$ as an extension of the local field $L$ by the polynomial $f$ over $L$.

<a id="example-ex-827f9a"></a>
## `Example: One-Step Extension from a Two-Step Field (ex-827f9a)`

We can use the $2$ step local fields to help us find an irreducible polynomial over a $p$-adic field which can be used to extend that $p$-adic field in $1$ step.

```magma
> P<x> := PolynomialRing(Integers());
> Zp := pAdicRing(7, 50);
> U := UnramifiedExtension(Zp, x^2 + 6*x + 3);
> R := TotallyRamifiedExtension(U, x^3 + 7*x^2 + 7*x + 7);
> L<a> := LocalField(pAdicField(7, 50), MinimalPolynomial(R.1 + U.1, Zp));
> L;
Extension of 7-adic field mod 7^50 by x^6 + (32 + O(7^50))*x^5 + (390 +
    O(7^50))*x^4 + (2284 + O(7^50))*x^3 + (6588 + O(7^50))*x^2 + (8744 +
    O(7^50))*x + 5452 + O(7^50)
```

We can also use any irreducible polynomial we can find to define a $1$ step extension.

```magma
> LocalField(pAdicField(7, 50), x^6 - 49*x^2 + 686);
Extension of 7-adic field mod 7^50 by x^6 + O(7^50)*x^5 + O(7^50)*x^4 +
    O(7^50)*x^3 - (7^2 + O(7^52))*x^2 + O(7^50)*x + 2*7^3 + O(7^53)
```

<a id="constructor-constructor-sub-rngloca-rnglocaelt-rnglocaelt-rngloca"></a>
## `sub< L | a₁, ..., aₙ >: RngLocA, RngLocAElt, ..., RngLocAElt -> RngLocA`

<a id="constructor-constructor-sub-rngloca-seqenum-rngloca"></a>
## `sub< L | S>: RngLocA, SeqEnum -> RngLocA`

Construct the local field $F$ as a subfield of the local field $L$ containing the elements $a_i$ of $L$ or the elements of the sequence $S$.

<a id="example-ex-0823ac"></a>
## `Example: Subfield Generated by an Element (ex-0823ac)`

```magma
> Qp := pAdicField(5, 20);
> P<x> := PolynomialRing(Qp);
> L<a> := LocalField(Qp, x^4 + 4*x^2 + 2);
> P<x> := PolynomialRing(L);
> LL<aa> := LocalField(L, x^4 + 4*L.1);
> r := (10236563738184*a^3 - 331496727861*a^2 + 10714284669258*a +
> 8590525712453*5)*aa^2
> -12574685904653*a^3 + 19786544763736*a^2 + 4956446023134*a + 37611818678747;
> S, m := sub< LL | r >;
> S;
Extension of Extension of 5-adic field mod 5^20 by x^4 + O(5^20)*x^3 + (4 +
    O(5^20))*x^2 + (4 + O(5^20))*x + 2 + O(5^20) by (O(5^20)*a^3 + O(5^20)*a^2 +
    O(5^20)*a + (1 + O(5^20)))*x^2 + (O(5^20)*a^3 + O(5^20)*a^2 + O(5^20)*a +
    O(5^20))*x + O(5^20)*a^3 + O(5^20)*a^2 + (4 + O(5^20))*a + O(5^20)
> m(S.1);
(O(5^20)*a^3 + O(5^20)*a^2 + O(5^20)*a + O(5^20))*aa^3 + (O(5^20)*a^3 +
    O(5^20)*a^2 + O(5^20)*a + (1 + O(5^20)))*aa^2 + (O(5^20)*a^3 + O(5^20)*a^2 +
    O(5^20)*a + O(5^20))*aa + O(5^20)*a^3 + O(5^20)*a^2 + O(5^20)*a + O(5^20)
```
