is_square in p-adics

asked 2012-12-23 10:24:53 +0100

pkoprowski gravatar image

I need to find whether a given (often somewhat complicated) dyadic field contains $i$. I tried to use is_square method, but I'm getting error reports.

Consider the following (very simplified) example:

Q2 = Qp(2); Q2(-1).is_square()

As far as good - the answer is False as expected. So try a simple extension:

F.<a> = Qq(2^3); F(-1).is_square()

And... I'm getting an error message:

AttributeError: 'sage.rings.padics.padic_ZZ_pX_CR_element.pAdicZZpXCRElement' object has no attribute 'residue'

Is this a Sage bug or I'm doing something wrong?

edit retag flag offensive close merge delete