On Sun, Dec 6, 2009 at 11:43 PM, Simon King <[email protected]> wrote: > Hi! > > I have a question on the coercion model. Assume that we have two > rings R1,R2, so that there is no coercion from R1 to R2 and no > coercion from R2 to R1. The classical example is R1=QQ and R2=ZZ['t']. > > Now let p1,p2 be an element of R1,R2, respectively. I want to multiply > them, the result living in a ring that has coercion maps from both R1 > and R2 (in the classical example, it is QQ['t']).
If you want this, it's not the _r_action_ and _l_action_ that does this. What allows Sage to find the new parent is the following: sage: QQ.construction() (FractionField, Integer Ring) sage: ZZ['t'].construction() (Poly[t], Integer Ring) Sage sees that each can be obtained from the Integer Ring. So, Sage first applies FractionField to IntegerRing to get QQ and then applies Poly[t] to get QQ['t']. --Mike -- To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
