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.
Construct a local field F as an extension of the local field L by the polynomial f over L.
> 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.
> 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)
Construct the local field F as a subfield of the local field L containing the elements ai of L or the elements of the sequence S.
> 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)