coexistence of two real_part functions
In Sage 8.8, this code:
assume(x, 'complex')
print real_part(x)
print real_part(x).simplify()
prints:
real_part(x)
realpart(x)
This does not change any computation (Sage can prove both are equal), but is annoying, since the second one cannot be copy-pasted back into the code. The problem is even more visible when %display latex
is enabled.
Is this a bug? Is there a workaround that makes it possible to display beautiful real parts after a simplification?
It seems to me that this is bug. Indeed, if you call
real_part??
, you will see that this function is defined in<SAGE>/local/lib/python3.7/site-packages/sage/functions/other.py
, where<Sage>
is the directory of installation. By reading the code there, you will see a line definingreal = real_part = Function_real_part()
, which indicates these three functions are the same. There is norealpart
there. Moreover, callingrealpart??
producesObject
realpartnot found.
, which indicates that function is not defined.