Convert Laurent polynomial to polynomial? #3156
Answered
by
fieker
oskarhenriksson
asked this question in
Q&A
Replies: 2 comments
-
On Mon, Jan 08, 2024 at 04:21:34AM -0800, Oskar Henriksson wrote:
Suppose that I have a Laurent polynomial $f\in k[x^\pm]=R$ where all exponents happen to be nonnegative, say
```
R, t = LaurentPolynomialRing(QQ, "t")
f = 5*t^3 - 7*t + 1
````
and that I want to view it as a polynomial in the subring of regular polynomials, $S=k[x]$. Is there a nice way to do this in Oscar?
Naively, I would have hoped that this would work:
```
S, t = polynomial_ring(QQ,["t"])
phi = hom(S,R,[t])
g = preimage(phi, f)
````
but `R` doesn't seem to have the correct datatype for it to be possible to set up algebra homomorphisms like this.
(_Sidenote:_ Part of the reason I want to do this is because I want to be able to find the roots of $f$ with the `roots` command. If there is a smooth way to do this without passing via $k[t]$, that would also be of interest!)
In your case, for a quick answer:
f.poly
is what you want - provided f.mindeg is, as here, 0.
We need to provide a better interface for that
…
--
Reply to this email directly or view it on GitHub:
#3156
You are receiving this because you are subscribed to this thread.
Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
oskarhenriksson
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Suppose that I have a Laurent polynomial$f\in k[x^\pm]$ where all exponents happen to be nonnegative, say
and that I want to view it as a polynomial$g\in k[x]$ . Is there a nice way to do this in Oscar?
Naively, I would have hoped to be able to form the inclusion$\varphi\colon k[x]\hookrightarrow k[x^\pm]$ and use the
preimage
command, like this:but
R
doesn't seem to have the correct datatype for it to be possible to set up algebra homomorphisms like this.(Sidenote: Part of the reason I want to do this is because I want to be able to find the roots of$f$ with the $k[t]$ , that would also be of interest!)
roots
command. If there is a smooth way to do this without passing viaBeta Was this translation helpful? Give feedback.
All reactions