-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to convert an univariate polynomial to a multivariate polynomial? #1503
Comments
Figured it out: julia> using AbstractAlgebra
julia> xyz_ring, (x, y, z) = QQ["x", "y", "z"]
(Multivariate polynomial ring in 3 variables over rationals, AbstractAlgebra.Generic.MPoly{Rational{BigInt}}[x, y, z])
julia> _, z_ = polynomial_ring(xyz_ring, :z)
(Univariate polynomial ring in z over multivariate polynomial ring, z)
julia> (x*z_)(z)
x*z
julia> typeof(ans)
AbstractAlgebra.Generic.MPoly{Rational{BigInt}} Maybe there should be an example like this in the docs? |
Where would you put in the docs? |
I am not sure what your problem is, exactly. You got exactly what you asked for. Perhaps your problem is that you have a tower of ring extensions and would like to collapse it, i.e. you want the ring homomorphism Example (in Oscar):
|
Basically the opposite of #220. I've got a univariate polynomial over a multivariate polynomial ring, and I'd like to convert it into a multivariate polynomial ring with one more variable. How to do this? The use case is that
minpoly
andcharpoly
return univariate polynomials, but I want a multivariate polynomial.Example, in case it's not clear what I'm talking about:
So
x*z
is actually a univariate polynomial, according to AA's type system, and my question is how to convert it into a multivariate polynomial?The text was updated successfully, but these errors were encountered: