Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

is_square in p-adics

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?