Dear Supporters,

I have a variety X in K[x_1,...,x^8] and I want to pass some
hyperplanes through it and get the new equation of intersection. I
used the "reduce" function of ideals and it works for me very well as
follows:

sage: k = GF(2);
sage: R.<w> = k['w'];
sage: K.<t> = GF(2^4, name='t', modulus = w^4 + w^3 + w^2 + w + 1);
sage: WeilResPolyRing = MPolynomialRing(K, 8, x);
sage: x =  WeilResPolyRing.gens();

sage: X = x[0]*t + x[1]*t^2;
sage: MyHyperplane = x[0] + x[1];
sage: J = ideal(MyHyperplane)
sage: CinW = J.reduce(X)
sage: print CinW
(t^2 + t)*x1

However, for a strange but valid reason (I need to change the basis of
finite field extension and sage just let me to do that in this way) I
should define the polynomial ring K[x_1,...,x^8] in another way which
is basically I first construct GF(2)[x_1,...,x_8] and then I add t to
it such that t^4 + t^3 + t^2 + t + 1 = 0. Obviously this new
construction is mathematically isomorphism to the previous one,
however this time "reduce" function fails for some reason. Could you
please tell me what is wrong here (the second part of both codes are
identical and they differ just in the ring construction part):

sage: k = GF(2);
sage: WRBasePolyRing = MPolynomialRing(k, 8, x); x =
WRBasePolyRing.gens()
sage: S = WRBasePolyRing['w']; w = S.gen()
sage: WRPolyRing = S.quotient(w^4 + w^3 + w^2 + w + 1, 't'); t =
WRPolyRing.gen()

sage: X = x[0]*t + x[1]*t^2;
sage: MyHyperplane = x[0] + x[1];
sage: J = ideal(MyHyperplane)
sage: CinW = J.reduce(X)
sage: print CinW
Traceback (most recent call last):
...
TypeError: cannot coerce nonconstant polynomial

Thank you very much in Advance!

Bests,
Ahmad
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to