Gain function calculation (frequency response)
One way to see the equivalence is to first factor out the $0.5$ in your initial transfer function, i.e. 

$$
H(f) = 0.5(1 + e^{-i2\pi f}).
$$

Then you can rewrite the $1$ and $e^{-i2\pi f}$ as follows:

$$
H(f) = 0.5(e^{i\pi f}e^{-i\pi f} + e^{-i\pi f}e^{-i\pi f}) = 0.5(e^{i\pi f} + e^{-i\pi f})e^{-i\pi f}.
$$

Your result then follows as a trivial transform.