[sage-devel] Re: Weird type for a determinant

2008-02-11 Thread John Cremona
Thanks very much, Craig -- you are 100% right in your diagnosis! Obviously I really meant to extend the base_ring ZZ and not the parent. Thanks too for your hints on search_src(), which I have been using a lot, but your examples are still useful! John On 11/02/2008, Nick Alexander <[EMAIL PROTE

[sage-devel] Re: Weird type for a determinant

2008-02-10 Thread Nick Alexander
> (*) Have you used search_src before? It's one of my favorite utilities > for tracking things down, especially since I did a search_src?? ... My > issue was that I had to search a few times, because if the function is > cdef'd, or cpdef'd, there might be a return value, etc. However, > looking at

[sage-devel] Re: Weird type for a determinant

2008-02-10 Thread Craig Citro
Hi John, > sage: x=PolynomialRing(ZZ,'x').gen() > sage: f=x^2+1 > sage: R=f.parent().extension(f) This is actually where the issue is: I think you want f.base_ring().extension(f). At least, that's what would get you ZZ[i], which is what you are expecting below. Indeed: sage: f.parent() Univari