Proving that Pre(L) is regular using automatas: Should I prove that Pre(L) is the semantic of the new automata?

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)$$?

• It will help if you prove $\mathcal{L}(M') = Pre(L)$. In other words: $\mathcal{L}(M') \subseteq Pre(L)$ and $Pre(L) \subseteq \mathcal{L}(M')$ – Shreesh Jun 12 '18 at 8:47