On Thursday, September 7, 2017 at 1:16:12 PM UTC-5, David Roe wrote: > > > > On Thu, Sep 7, 2017 at 2:00 PM, Ben Hutz <bn4...@gmail.com <javascript:>> > wrote: > > Once you construct P(0), both a and P(0) are in the same parent, so there > are no coercions involved in the test a==P(0). In your branch, what does > sage: a.parent().coerce_map_from(QQ) > return? >
I get 'None', so apparently I don't have the coercion framework working fully yet. > > >> You'd be surprised at how often in Sage the shorthand of leaving of the >> last coordinate occurs. But, yes, it is just a shorthand and is used in the >> __init__() for point. >> > > I certainly agree that leaving off the last coordinate is convenient and > common. But the difference is between *conversion* (where you specify the > parent explicitly) and *coercion* (which happens implicitly, like in the > equality test you're making above). Are you trying to add coercions, just > for A^1 and P^1? Or something more? > David > > Ah. I see the difference. I don't think it is unreasonable for P(0) == 0 to work in dimension 1 as there is a canonical answer. So I would have to say yes, I'm working on having that coercion work. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.