This is really cool and seems to be exactly what I need. Thank you
very much!
Cheers,
Johan


On Apr 5, 3:19 pm, luisfe <lftab...@yahoo.es> wrote:
> On Apr 5, 2:10 pm, "Johan S. R. Nielsen" <santaph...@gmail.com> wrote:
>
> > Oops, continuing:
>
> > more precisely, we wish to find a q in Q[Y1, Y2] such that q(f1, f2) =
> > g. In this case, we have
> > q(Y1, Y2) = Y1^2 + Y1*Y2 - Y2
> > as a solution, as
> > f1^2 + f1*f2 - f2 = g
>
> This is an elimination problem. Note that it is not enough that g
> belongs to the ideal to be able to write it in the desired form. You
> instead want to check if g belongs to the ring Q[f1,f2] that is a
> different problem.
>
> I can think of the following:
>
> First you add new variables for your polynomials f1,f2 and g, call
> them y1,y2,z and a polynomial ring with a block elimination term
> order.
>
> sage: K=PolynomialRing(QQ, 'x,z,y1,y2',order=TermOrder('degrevlex',
> 2)+TermOrder('degrevlex',2))
> sage: K.inject_variables()
> Defining x, z, y1, y2
>
> In this ring, x and z are greater than y1,y2 now construct the ideal
> defining your polynomials
>
> I=Ideal(x^2+1-y1, x+3-y2, x^4+x^3+4*x^2+x+3-z)
>
> If we eliminate x from this ideal we will get the ideal of algebraic
> dependence on f1,f2,g
>
> sage: J=I.elimination_ideal([x])
> sage: J
> Ideal (y2^2 - y1 - 6*y2 + 10, z - y1^2 - y1*y2 + y1) of Multivariate
> Polynomial Ring in x, z, y1, y2 over Rational Field
>
> If I am not making any mistake, the reduction of z under this ideal
> with this term ordering should give the desired polynomial.
>
> sage: J.reduce(z)
> y1^2 + y1*y2 - 4*y1 + 3

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to