Ask Your Question

How can I compute a fixed field over the p-adics

asked 2021-01-18 16:41:46 +0100

Rotdat gravatar image

updated 2021-01-18 16:45:29 +0100

slelievre gravatar image

I have problems to implement the following set up:

I want to have a field $K = \mathbb{Q}_3$ and an extension $L = \mathbb{Q}_3(\alpha)$ over $K$ where $f:=\min_K(\alpha) = x^4 - 3x^2 + 18$. This extension has degree $4$ and ramification index $2$. Furthermore, let $F/K$ be the unique unramified extension of $K$ of degree $4$ which is generated by a primitive $5$-th root of unity $\zeta_5$.

Then one can show that $\varphi: \alpha \mapsto \frac{(2 \alpha^2 - 3)\sqrt{-\frac{2}{7}}}{\alpha},$ $\zeta_5 \mapsto \zeta_5^3$ is an element of the Galois group of $LF/K$. Now let $L' = (LF)^{\langle \varphi \rangle}$. This must be a quadratic and totally ramified extension of $K$. There are only two possibilities for that: $K(\sqrt{3})$ or $K(\sqrt{-3})$.

Question: How to determine whether $L' = K(\sqrt{3})$ or $L' = K(\sqrt{-3})$ (or equivalently, $\varphi(\sqrt{3}) = \sqrt{3}$ or $\varphi(\sqrt{-3}) = \sqrt{-3}$)?

Since I only have only superficial knowledge about Sage, I was not even able to set up the easy things like the field $L$ properly. When I use

K = Qp(3)
R.<x> = ZZ[]
f = x^4 - 3*x^2 + 18
L.<alpha> = K.extension(f)

I get an error that my polynomial $f$ must be either unramified or Eisenstein (which of course does not exist since $L/K$ is neither unramified nor totally ramified). Furthermore, I have no idea how to approach with my problem with Sage otherwise. And since computation by hand is pretty hard in this case (I already tried!), it would be nice to solve with problem here, so I can use it for similar computations in the future.

Could you please help me with this problem?

edit retag flag offensive close merge delete


Welcome to Ask Sage! Thank you for your question!

slelievre gravatar imageslelievre ( 2021-01-18 16:43:21 +0100 )edit

2 Answers

Sort by » oldest newest most voted

answered 2021-01-22 00:14:55 +0100

saraedum gravatar image

updated 2021-01-22 00:17:19 +0100

SageMath does not yet support general extensions of p-adics yet unfortunately, it's something that we're actively working on, e.g., at If you want to get involved a bit, please join us at

There's a package that builds on SageMath to provide some Henselizations here that might work for such problems since it can compute in towers of fields and provides valuations. I am not sure how well that package currently works, but please let us know in the above zulip chat if you find it useful or have suggestions. Anyway, the following works on this binder with this package installed…

from henselization import *

K = QQ.henselization(3)
R.<x> = K[]
F.<ξ> = K.extension(x^4 + x^3 + x^2 + x + 1)
# Extension defined by ξ^4 + ξ^3 + ξ^2 + ξ + 1 of Henselization of Rational Field with respect to 3-adic valuation

R.<x> = F[]
f = x^4 - 3*x^2 + 18
LF.<α> = F.extension(f.factor()[0][0])
# Extension defined by α^2 + O(x^(3/4))*α + 3*ξ^3 + 3*ξ^2 + O(x^(3/4)) of Extension defined by ξ^4 + ξ^3 + ξ^2 + ξ + 1 of Henselization of Rational Field with respect to 3-adic valuation

R.<x> = LF[]
# We need to pass to approximations so we can perform arithmetic.
# Unfortunately, we cannot say ξ = ξ.approximation(20) directly. :(
ξ = -(x^4 + x^3 + x^2 + x + 1).factor()[0][0][0].approximation(20)
α = -(x^4 - 3*x^2 + 18).factor()[0][0][0].approximation(20)
basis = [ξ^i*α^j for i in range(4) for j in range(2)]

R.<x> = LF[]
# Note that if you change the first 0 to a 1, you get a different result.
sqrt27 = -((x^2 + 2/7).factor()[0][0][0].approximation(20))

# Write φ in terms of the basis given by ξ and α.
φα = (2*α^2 - 3)* sqrt27 / α
φξ = ξ^3
image = [φξ^i*φα^j for i in range(4) for j in range(2)]

# We write sqrt(3) in terms of that basis
sqrt3 = -(x^2 - 3).factor()[0][0][0].approximation(20)
A = matrix([b._vector_(base=K) for b in basis])
coefficients = A.transpose().solve_right(sqrt3._vector_(base=K))

# Map sqrt(3) through φ
φsqrt3 = sum([b * c for (b, c) in zip(image, coefficients)])
(φsqrt3 - sqrt3).valuation() # big number

# We write sqrt(-3) in terms of that basis
sqrt_3 = -(x^2 + 3).factor()[0][0][0].approximation(20)
A = matrix([b._vector_(base=K) for b in basis])
coefficients = A.transpose().solve_right(sqrt3._vector_(base=K))

φsqrt_3 = sum([b * c for (b, c) in zip(image, coefficients)])
(φsqrt_3 - sqrt_3).valuation() # small number

So, the answer is $\sqrt{3}$ since $\varphi(\sqrt{3}) - \sqrt{3}$ has "infinite" valuation but $\varphi(\sqrt{-3}) - \sqrt{-3}$ has valuation 1/2 or so. However, this depends on the choice of $\sqrt{\frac{-2}{7}}$. Choosing the other root, gives $\sqrt{-3}$.

edit flag offensive delete link more

answered 2021-01-22 23:47:31 +0100

caruso gravatar image

updated 2021-01-23 09:50:49 +0100

It's also possible to do the calculation in plain SageMath but we need to help it because creating arbitrary extensions of p-adic fields is currently not implemented.

First, we can create the field $F$:

sage: F.<t> = Qq(3^8)
sage: F
3-adic Unramified Extension Field in a
defined by x^8 + 2*x^5 + x^4 + 2*x^2 + 2*x + 2

Then we create $LF$. For this, we need to find an uniformizer. For this, we factor the polynomial $f(x) = x^4 - 3x^2 + 18$ over $F$.

Unfortunately, factorization is also not implemented. So we do it by hand as follows:

sage: S.<x> = F[]
sage: f = x^4 - 3*x^2 + 18
sage: g = x^2 - x + 2   # f(x) = 9 * g(x^2/3)
sage: b, c = g.roots(multiplicities=False)
sage: f0 = x^2 - 3*b
sage: f % f0

Now we can build the extension:

sage: LF.<alpha> = F.extension(f0)
sage: LF
3-adic Eisenstein Extension Field in alpha
defined by x^2 + 4236577851*a^7 + 26772/7805*a^6
- 117429/7789*a^5 - 175194/1681*a^4 - 111303/22931*a^3
+ 5787134532*a^2 + 8260845189*a + 109059/13295 over its base field
sage: f(alpha)

In order to define $\varphi$, we first define the automorphism of $F$; it is actually just the Frobenius:

sage: Frob = F.frobenius_endomorphism()
sage: zeta5 = F.primitive_root_of_unity(5)
sage: Frob(zeta5) == zeta5^3

As noticed by saraedum, there are two possibilities for $\varphi$ depending on the choice of the square root of $-\frac 2 7$.

sage: beta = (2*alpha^2 - 3) * sqrt(F(-2/7)) / alpha
sage: phi1 = LF.hom([beta], base_map=Frob)
sage: phi2 = LF.hom([-beta], base_map=Frob)

Finally, we can check whether $\varphi_1$ (resp. $\varphi_2$) fixes $\sqrt 3$ or $\sqrt{-3}$:

sage: sqrt3 = sqrt(LF(3))
sage: phi1(sqrt3) == sqrt3
sage: phi2(sqrt3) == sqrt3

sage: sqrtm3 = sqrt(LF(-3))
sage: phi1(sqrtm3) == sqrtm3
sage: phi2(sqrtm3) == sqrtm3
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2021-01-18 16:41:46 +0100

Seen: 251 times

Last updated: Jan 23 '21