Ask Your Question

Revision history [back]

This is definitely a bug, thanks for reporting! As you can see in the source code:

sage: QQbar.__contains__??

the test:

 `elif EQ:`

which corresponds to:

sage: bool(I == QQbar(I))

leads to:

TypeError: unsupported operand parent(s) for +: 'Number Field in I with defining polynomial x^2 + 1' and 'Algebraic Field'

which is catched to return False.

I have opened trac ticket 24209 for this.

This is definitely a bug, thanks for reporting! As you can see in the source code:

sage: QQbar.__contains__??

the test:

 `elif EQ:`
elif EQ:

which corresponds to:

sage: bool(I == QQbar(I))

leads to:

TypeError: unsupported operand parent(s) for +: 'Number Field in I with defining polynomial x^2 + 1' and 'Algebraic Field'

which is catched to return False.

I have opened trac ticket 24209 for this.