Revision history [back]

This is a known issue, see for example trac ticket 6862.

What you can do is to use the assume function, as in the following:

sage: t1,t2,t4 = var("t1 t2 t4")
sage: assume(t2,'complex')
sage: t2.conjugate().simplify()
conjugate(t2)
sage: t2.real().simplify()
realpart(t2)
sage: t2.imag().simplify()
imagpart(t2)


This is a known issue, see for example trac ticket 6862, and ask question 2287.

What you can do is to use the assume function, as in the following:

sage: t1,t2,t4 = var("t1 t2 t4")
sage: assume(t2,'complex')
sage: t2.conjugate().simplify()
conjugate(t2)
sage: t2.real().simplify()
realpart(t2)
sage: t2.imag().simplify()
imagpart(t2)