Note that

4.is_square?

and

a=4
a.is_square?

give different documentation strings. I don't know where the first is 
coming from. That looks like a strange glitch. It gives the documentation 
of the function is_square, which is not what the method on integers is.
On Thursday, 9 October 2025 at 09:39:57 UTC-7 [email protected] wrote:

> Thanks for that lesson in the English language, John.  I obviously needed 
> it :-}
>
> As for #2, that’s something I did not know!
>
> Justin
>
> On Oct 9, 2025, at 01:54 , John Cremona <[email protected]> wrote:
>
> As for #1, 4 is certainly a square, and is also not square-free (begin 
> divisible by a square >1) so I don't see any problem.
>
> For #2, K is a real quadratic field, and the conjugate method is *not* 
> Galois conjugation, but complex conjugation (with respect to either of the 
> embeddings of K into CC); for that, use v.galois_conjugate().
>
> John Cremona
> On Thursday, 9 October 2025 at 00:17:54 UTC+1 [email protected] wrote:
>
>> Using sage 9.7 and 10.3 (on an oldish iMac), I ran into some puzzling 
>> results, of which the following are minimal examples:
>>
>> #1:
>> sage: 4.is_square()
>> True
>> sage: 4.is_squarefree()
>> False
>>
>> #2:
>> sage: f=x^2-3
>> sage: K.<a>=NumberField(f)
>> sage: OK=K.maximal_order()
>> sage: v=OK.random_element()
>> sage: v
>> 2*a + 1
>> sage: v==v.conjugate()
>> True
>>
>> #1 I don’t get (and it seems to contradict the “?” doc); while #2 may be 
>> a misunderstanding on my part.
>>
>> Thoughts?  Pointers?
>>
>> Thanks, for any help.
>>
>> Justin
>>
>> --
>> Justin C. Walker, Curmudgeon at Large
>> Institute for the Absorption of Federal Funds
>> -----------
>> I want to die, peacefully in my sleep, like my grandfather;
>> not screaming in terror, like his passengers.
>>
>>
>>
>>
>>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To view this discussion visit 
> https://groups.google.com/d/msgid/sage-support/a67a94d8-8e79-4cc4-8974-1c3b6a0c9c22n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/sage-support/a67a94d8-8e79-4cc4-8974-1c3b6a0c9c22n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
> --
> Justin C. Walker, Curmudgeon at Large
> Director
> Institute for the Enhancement of the Director's income
> -----------
> Question 43:
> What if the hokey pokey
> really *is* what it’s all about?
> --
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/sage-support/840532f1-83d6-48f1-bd02-2201f8b667fcn%40googlegroups.com.

Reply via email to