Hello,

I am looking for a nicer way to cast a univariate poly to a multivariate 
ring with the different base fields.
Basically base fields are both GF(2^3) but with different generators. I 
want generator of the first to be mapped to the generator of the second.

sage: f
x^6 + a*x^5 + (a + 1)*x^4 + (a^2 + a + 1)*x^3 + (a^2 + 1)*x^2 + (a + 1)*x + 
a^2 + a + 1
sage: f.parent()
Univariate Polynomial Ring in x over Finite Field in a of size 2^3
sage: R
Multivariate Polynomial Ring in l0, l1, l2, f0, f1, f2, f3, f4, f5, f6, f7, 
b0, b1, b2, b3, x, y over Finite Field in h of size 2^3


First one has a generator a, the second has the generator h.
My current solution is very unsagey.

f = sage_eval(str(f), locals={'x':x,'a':h})
x^6 + (h)*x^5 + (h + 1)*x^4 + (h^2 + h + 1)*x^3 + (h^2 + 1)*x^2 + (h + 1)*x 
+ (h^2 + h + 1)

Best,
evrim.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to