Solution (source code)

= Solution

The fibers must retain their base labels. In particular, a literal untagged union of fibers in $E$ is not sufficient when $f$ is not <injective>. Use the <pullback vector bundle>
$$
f^*E=\{(p,e)\in N\times E:f(p)=\pi(e)\},\qquad \pi_f(p,e)=p.
$$
This makes precise the indexed-union notation in the PDF. For a <vector bundle trivialization> $\Phi_U(e)=(\pi(e),v)$, define
$$
\Psi_U:\pi_f^{-1}(f^{-1}U)\longrightarrow f^{-1}U\times\mathbb R^r,
\qquad(p,e)\longmapsto(p,v).
$$
It is a fiberwise <linear isomorphism>, with inverse $(p,v)\mapsto(p,\Phi_U^{-1}(f(p),v))$. The transition functions are $g_{VU}\circ f$, hence smooth. They satisfy the same cocycle identities as those of $E$ and give a smooth total space of <manifold dimension> $\dim N+r$.

One may also see that this is an <embedded submanifold> of $N\times E$: in a bundle chart the constraint is the graph of the smooth map $f$ in the base coordinates, leaving the $r$ fiber coordinates free. Thus the chart construction agrees with its natural subspace smooth structure. No immersion or surjectivity hypothesis on $f$ is required. Therefore
$$
\boxed{f^*E\longrightarrow N\text{ is a rank-}r\text{ vector bundle}.}
$$