Unfortunately, functions created with Function
ignore assumptions. You'll need to create a function by subclassing Function
, like
In [12]: class f(Function):
....: is_real=True
....:
In [13]: f(x)
Out[13]: f(x)
In [14]: f(x).conjugate()
Out[14]: f(x)