Improve as_relational for Integers and Naturals #21285
Open
Description
Integers.as_relational(x)
gives the following output:
>>> Integers.as_relational(x) # and similar for Naturals and Naturals0
(-oo < x) & (x < oo) & Eq(floor(x), x)
But it should be:
>>> Integers.as_relational(x) # and similar for Naturals and Naturals0
(-oo < x) & (x < oo) & Eq(Mod(x, 1), 0)
Same for the Naturals
.
Because floor
is defined on complex numbers and the relationals required input to be real.
Originally posted by @smichr in #21259 (comment)