Skip to content

Convert from multivariate polynomial to univariate #3772

Answered by joschmitt
adhalanay asked this question in Q&A
Discussion options

You must be logged in to vote

You can 'evaluate' the multivariate polynomial at the new variables:

julia> R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"]);

julia> R0, (u, v) = polynomial_ring(QQ, ["u", "v"]);

julia> R1, w = polynomial_ring(R0, "w");

julia> f = x*y*z # This lives in R
x*y*z

julia> f(u, v, w) # This now lives in R1
u*v*w

In the same way, you can build the natural homomorphism from R to R1:

julia> phi = hom(R, R1, [u, v, w])
Ring homomorphism
  from multivariate polynomial ring in 3 variables over QQ
  to univariate polynomial ring in w over R0
defined by
  x -> u
  y -> v
  z -> w

julia> phi(f)
u*v*w

I cannot reproduce the error you describe. Can you share the complete code?

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@adhalanay
Comment options

Answer selected by adhalanay
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants