Initial Topology with respect to Mapping equals Set of Preimages

Theorem
Let $X$ be a set.

Let $\left({Y, \tau_Y}\right)$ be a topological space.

Let $f: X \to Y$ be a mapping.

Let $\tau_X$ be the initial topology on $X$ with respect to $f$.

Then:
 * $\tau_X = \left\{{f^{-1} \left({U}\right): U \in \tau_Y}\right\}$