ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 19 Jun 2020 15:13:10 +0200find characteristic polynomial in a tower of extensions over Qphttps://ask.sagemath.org/question/52087/find-characteristic-polynomial-in-a-tower-of-extensions-over-qp/We have a tower of extensions W/T/U where U is an unramified extension of $Q_p$, T is given by an eisenstein polynomial $f\in U[x]$ and W is given by an eisenstein polynomial $g\in T[x]$. Hence T is an $deg(g)deg(f)-$dimensional $U-$vector space with basis consisting of products $\alpha^i \beta^j$ such that $0\leq i < deg(f), 0\leq j < deg(g)$, where $\alpha$ is a root of $f$ and $\beta$ is a root of $g$.
Let $\gamma \in W$ be arbitrary. The goal is to compute the matrix of multiplication by $\gamma$ wrt the above $U-$basis. The issue is that the field $W$ cannot be created as an extension of $T$ in Sage, it seems that at the moment you cannot create an extension given by an eisenstein polynomial if T is already an eisenstein extension.
Example of how it does not work:
sage: U = Qq(2^2,names="u")<br>
sage: R.<x> = U[]<br>
sage: f = x^2 - U.uniformizer()<br>
sage: T = U.extension(f,names="alpha")<br>
sage: S.<x> = T[]<br>
sage: g = x^2-T.uniformizer()<br>
sage: W = T.extension(g,names="beta")<br>
TypeError: Unable to coerce -alpha to a rational<br>
We can create W as a quotient ring T[x]/(g), but I don't know how to get coefficients of $\gamma$ w.r.t. the power basis $1,\bar{x},\bar{x}^2,\dots,\bar{x}^{deg(g)-1}$.
sage: U = Qq(2^2,names="u")<br>
sage: R.<x> = U[]<br>
sage: f = x^2 - U.uniformizer()<br>
sage: T = U.extension(f,names="alpha")<br>
sage: S.<x> = T[]<br>
sage: g = x^2-T.uniformizer()<br>
**sage: W = S.quotient_ring(g)<br>
sage: V, map_to_W, map_from_W, = W.free_module()<br>**
NotImplementedError:<br>
If the above were possible, we could simply map $\gamma$ to the free module, then find coefficients wrt the power basis. Then we could do the same thing for each coefficient with W replaced by T to get the U-coefficients.
Fri, 19 Jun 2020 12:03:12 +0200https://ask.sagemath.org/question/52087/find-characteristic-polynomial-in-a-tower-of-extensions-over-qp/Answer by wltn for <p>We have a tower of extensions W/T/U where U is an unramified extension of $Q_p$, T is given by an eisenstein polynomial $f\in U[x]$ and W is given by an eisenstein polynomial $g\in T[x]$. Hence T is an $deg(g)deg(f)-$dimensional $U-$vector space with basis consisting of products $\alpha^i \beta^j$ such that $0\leq i < deg(f), 0\leq j < deg(g)$, where $\alpha$ is a root of $f$ and $\beta$ is a root of $g$.</p>
<p>Let $\gamma \in W$ be arbitrary. The goal is to compute the matrix of multiplication by $\gamma$ wrt the above $U-$basis. The issue is that the field $W$ cannot be created as an extension of $T$ in Sage, it seems that at the moment you cannot create an extension given by an eisenstein polynomial if T is already an eisenstein extension.</p>
<p>Example of how it does not work:</p>
<p>sage: U = Qq(2^2,names="u")<br>
sage: R.<x> = U[]<br>
sage: f = x^2 - U.uniformizer()<br>
sage: T = U.extension(f,names="alpha")<br>
sage: S.<x> = T[]<br>
sage: g = x^2-T.uniformizer()<br>
sage: W = T.extension(g,names="beta")<br>
TypeError: Unable to coerce -alpha to a rational<br></p>
<p>We can create W as a quotient ring T[x]/(g), but I don't know how to get coefficients of $\gamma$ w.r.t. the power basis $1,\bar{x},\bar{x}^2,\dots,\bar{x}^{deg(g)-1}$.</p>
<p>sage: U = Qq(2^2,names="u")<br>
sage: R.<x> = U[]<br>
sage: f = x^2 - U.uniformizer()<br>
sage: T = U.extension(f,names="alpha")<br>
sage: S.<x> = T[]<br>
sage: g = x^2-T.uniformizer()<br>
<strong>sage: W = S.quotient_ring(g)<br>
sage: V, map_to_W, map_from_W, = W.free_module()<br></strong>
NotImplementedError:<br></p>
<p>If the above were possible, we could simply map $\gamma$ to the free module, then find coefficients wrt the power basis. Then we could do the same thing for each coefficient with W replaced by T to get the U-coefficients.</p>
https://ask.sagemath.org/question/52087/find-characteristic-polynomial-in-a-tower-of-extensions-over-qp/?answer=52092#post-id-52092So far, I managed to get around this by lifting $\gamma$ to $T[x]$ and taking the coefficients w.r.t the basis $1,x,x^2,\dots $. Since the lift is the unique polynomial of degree less than deg(g), the coefficients
are the ones I am looking for?
sage: gamma = W.an_element()<br>
sage: coeffs = gamma.lift().coefficients(sparse=False)<br>
and then padding coeffs with deg(g) - len(coeffs) zeroes.Fri, 19 Jun 2020 15:13:10 +0200https://ask.sagemath.org/question/52087/find-characteristic-polynomial-in-a-tower-of-extensions-over-qp/?answer=52092#post-id-52092