Let $L$ be a regular language, and $Pre(L)$ be the set of all words that are prefix of some word in $L$. Prove that $Pre(L)$ is regular.
My proof:
Let $M = (\Sigma, Q, \delta, q_0, F)$ be an automata such that $\mathcal{L}(M) = L$ and $Q' = \{ q \in Q \ | \ (\exists q_f, w \ | \ q_f \in F \ \wedge \ w \in \Sigma^{*}: [q, w] \mapsto^{*} [q_f, \lambda] ) \}$, that is, $Q'$ is the set of all states that have a path to a final state of $M$.
Hence, $M' = (\Sigma, Q', \delta, q_0, Q')$ is an automata such that $\mathcal{L}(M') = Pre(L)$. QED.
Is the last step right or should I now proof that the semantic of $M'$ is in fact $Pre(L)$?