On Wednesday, August 5, 2020 at 6:28:42 AM UTC-5, Santanu wrote: > > Dear all, > Consider ideal I=<x0*x1+x2> over the binary field GF(2). > Then (x2).reduce(I) gives x2. I want it to be x0*x1. > In fact , I want this kind of reduction always should give quadratic > polynomial > (I know that this is possible for my problems). >
Dear Santanu Aside from Nils' answer, you may want to read up on Sage's term orderings: rings.polynomial.term_order? It's possible that you want a local term ordering. Unlike global term orderings, in a local ordering 1>t for any monomial t. TO = TermOrder("negdegrevlex",3) R = PolynomialRing(GF(2),'x',3,order=TO) R.inject_variables() >>>> Defining x0, x1, x2 I = R.ideal([x0*x1+x2]) x2.reduce(I) >>>> x0*x1 Another possibility is a weighted (global) term ordering. For example, if I set the weight vector to (1,2,4), then x2>x0*x1, but I can still have x0^4>x2. TO = TermOrder('wdegrevlex',(1,2,4)) R = PolynomialRing(GF(2),'x',3,order=TO) R.inject_variables() >>>> Defining x0, x1, x2 I = R.ideal([x0*x1+x2]) x2.reduce(I) >>>> x0*x1 -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/a95c5757-2e54-4620-99b4-a91a73618939o%40googlegroups.com.