Define moving average process $y_t := 0.5 x_t + 0.5 x_{t-1}$ where $x_t := e^{i2 \pi t}$. Its frequency response is then:
$$H(f) = 0.5 + 0.5 e^{-i2\pi f}$$
Recall that the frequency response in polar notation is:
$$H(f) = G(f)e^{i \theta}$$
where $G(f)$ is the gain function. We then have that:
$$ H(f) = 0.5 \big( e^{-i \pi f} + e^{i \pi f} \big)e^{-i \pi f}$$.
QUESTION: Can someone please explain why the last step is true? An explanation with some detail is much appreciated (I am new to signal analysis).