You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The implementation of the global is_squarefree method eventually uses return all(r[1] == 1 for r in factor(n)). A more mathematically sensible definition is that x is squarefree if and only if it is not divisible by the square of any non-unit. For fields, this means that 0 is not squarefree and everything else is squarefree.
Of course, this can be confusing for beginners who now have to deal with (4/1).is_squarefree() returning True.
The implementation of the global
is_squarefree
method eventually usesreturn all(r[1] == 1 for r in factor(n))
. A more mathematically sensible definition is thatx
is squarefree if and only if it is not divisible by the square of any non-unit. For fields, this means that0
is not squarefree and everything else is squarefree.Of course, this can be confusing for beginners who now have to deal with
(4/1).is_squarefree()
returningTrue
.See also #23510.
CC: @saraedum @xcaruso @kedlaya @sagetrac-alina
Component: basic arithmetic
Issue created by migration from https://trac.sagemath.org/ticket/23577
The text was updated successfully, but these errors were encountered: