I think you have more chances if you work in QQ['a']['t1,t2']. In any case, 
it seems that it is better to convert to your ring using 
P(f.polynomial(QQ)) than performing substitutions.

sage: K=QQ['a']['t1,t2']                  
sage: K1=SR['t1,t2']                      
sage: f=SR(K.random_element(100,500)).expand()
sage: %time g=K(f.polynomial(QQ))          
CPU times: user 0.06 s, sys: 0.00 s, total: 0.06 s
Wall time: 0.06 s
sage: %time g=K1(f.polynomial(QQ))
CPU times: user 0.11 s, sys: 0.00 s, total: 0.11 s
Wall time: 0.11 s
sage: t1,t2=K1.gens()             
sage: %time g=f.polynomial(QQ)(t1=t1,t2=t2)
CPU times: user 2.52 s, sys: 0.02 s, total: 2.53 s
Wall time: 2.51 s


-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to