Sympy: Assuming infinity ... Real vs. Complex

Created on 30 Oct 2020  路  4Comments  路  Source: sympy/sympy

Hi,

Is it possible to distinguish between real and complex infinity using assumptions?

For example:

Symbol("real_infinite", real=True, infinite=True)
Symbol("complex_infinite", complex=True, infinite=True)

, both result in InconsistentAssumptions exceptions?

Thank you.

assumptions

All 4 comments

real and complex both mean finite numbers. For real infinities, use extended_real (or extended_positive and so on). I think we decided to defer adding extended_complex until it was clear whether or not we needed it (see discussions at https://github.com/sympy/sympy/issues/17224 and some of the related PRs).

However, if you just want something that is complex and not finite, I believe infinite=True itself implies that it is a "complex infinity", so you can just use Symbol('complex_infinite', infinite=True).

I think infinite=True is close as you can get with the current predicates. The precise meaning of infinite=True is not really spelled out though and it is consistent with oo and -oo even though those are not the same as zoo.

I'm not even sure if the exact meaning of complex infinities is spelled out. SymPy is apparently able to represent directional infinities like oo*I or exp(I*pi/3)*oo, but it isn't clear if these are meaningful or if they are only supported by accident (e.g., oo + oo*I is allowed, but is probably meaningless).

Thank you for the clarification.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JanVanDieBos picture JanVanDieBos  路  3Comments

yidingjiang picture yidingjiang  路  3Comments

siefkenj picture siefkenj  路  5Comments

JohnStone2017 picture JohnStone2017  路  6Comments

ivanistheone picture ivanistheone  路  6Comments