On Wednesday, May 13, 2015 at 10:33:23 AM UTC-7, N. Du Hamel wrote:
>
> I do something like that for the substitution, where eq is my equation in 
> terms of e_i and g_j :
> eq = 
> eq.subs_expr({e1^2:-G2.resultant(G3),e2^2:-G1.resultant(G3),e3^2:-G1.resultant(G2)})
> eq = 
> eq.subs_expr({e1^3:e1*(-G2.resultant(G3)),e2^3:e2*(-G1.resultant(G3)),e3^3:e3*(-G1.resultant(G2))})
> eq = 
> eq.subs_expr({e1^4:(-G2.resultant(G3))^2,e2^4:(-G1.resultant(G3))^2,e3^4:(-G1.resultant(G2))^2})
>
Well, you could generate the list of substitutions programmatically:

r23= G2.resultant(G3)
eq = eq.subs({e1^i: e1^(i % 2)*(-r23)^(i//2) for i in [1..4]})

etc.

A more general approach would be to construct the appropriate polynomial 
ring (with an elimination order for e1,e2,e3) and make the ideal generated 
by your relations:

e1^2= ... (etc)

and then reduce your expression eq with respect to that ideal. For more 
complicated sets of relations, this is a good approach, but in your case 
the substitution method is basically equivalent.

-- 
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 [email protected].
To post to this group, send email to [email protected].
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