# conjugate of scalar field

I'm new to SageMath.

I was wondering how to form the conjugate of a complex scalar function
on a Lorentzian manifold. This is useful for calculating Newman Penrose
spin coefficients. According to the SageMath documentation, one can
apply standard math functions (eg `abs()`

) but as far as I can see there is
no conjugate, real or imaginary part capability for scalar fields.
For example trying `conjugate(f)`

leads to:

```
TypeError: cannot coerce arguments: no canonical
coercion from Algebra of differentiable scalar fields on
the 4-dimensional Lorentzian manifold M to Symbolic Ring
```

On the other hand using SageManifolds to differentiate `abs(f(t))`

where `f(t)`

is a scalar function leads to:

```
dabs(f) = 1/2*(conjugate(d(f)/dt)*f(t) + conjugate(f(t))*d(f)/dt)/abs(f(t)) dt
```

I'm not sure if this is a misunderstanding on my part or a missing feature.

Thank you eric_g much appreciated.