Lemma. Soundness of the subset construction [00OD]
- February 9, 2024
- Jon Sterling, with contributions from Frank Stajano, Andrew Pitts
Let M be an NFA\varepsilon ; then \mathcal {L}{\mathopen {}\left (\mathcal {P}{\mathopen {}\left (M\right )\mathclose {}}\right )\mathclose {}}\subseteq \mathcal {L}{\mathopen {}\left (M\right )\mathclose {}}.
Proof.
- February 9, 2024
- Jon Sterling
We must show that any string u\in \mathcal {L}{\mathopen {}\left (\mathcal {P}{\mathopen {}\left (M\right )\mathclose {}}\right )\mathclose {}} lies in \mathcal {L}{\mathopen {}\left (M\right )\mathclose {}}.
Case. Empty string
- February 9, 2024
- Jon Sterling
If u=\epsilon , then by definition we have s_{\mathcal {P}{\mathopen {}\left (M\right )\mathclose {}}}\in F_{\mathcal {P}{\mathopen {}\left (M\right )\mathclose {}}} and so by definition, there exists q\in s_{\mathcal {P}{\mathopen {}\left (M\right )\mathclose {}}} such that q\in F_{M}. By definition of s_{\mathcal {P}{\mathopen {}\left (M\right )\mathclose {}}}, we therefore have s\mathrel {\xRightarrow {\epsilon }}q; because q\in F_{M}, we have \epsilon \in \mathcal {L}{\mathopen {}\left (M\right )\mathclose {}}.
Case. Non-empty string
- February 9, 2024
- Jon Sterling
Suppose on the other hand that u=a_1\cdots a_n, and so we therefore have transitions s_{\mathcal {P}{\mathopen {}\left (M\right )\mathclose {}}}\mathrel {\xrightarrow {a_1}}S_1\mathrel {\xrightarrow {\ldots }}S_{n-1}\mathrel {\xrightarrow {a_n}}S_n with S_n\in F_{\mathcal {P}{\mathopen {}\left (M\right )\mathclose {}}}, and so there exists some q_n\in S_n\cap F_{M}. Define S_0 = s_{\mathcal {P}{\mathopen {}\left (M\right )\mathclose {}}}.
By definition of \mathcal {P}{\mathopen {}\left (M\right )\mathclose {}}, from the transition S_{n-1}\mathrel {\xrightarrow {a_n}}S_n we may find some q_{n-1}\in S_{n-1} such that q_{n-1}\mathrel {\xRightarrow {a_n}}q_n. Iterating this process, we may find states q_i\in S_{i} such that we have a sequence of transitions q_{i-1}\mathrel {\xRightarrow {a_i}}q_i in M; thus we have a sequence of transitions q_0\mathrel {\xRightarrow {u}}q_n. Because q_0\in S_0=s_{\mathcal {P}{\mathopen {}\left (M\right )\mathclose {}}}, we have s_{M}\mathrel {\xRightarrow {\epsilon }}q_0 and thus s_{M}\mathrel {\xRightarrow {\epsilon }}q_0\mathrel {\xRightarrow {u}}q_n and therefore s_{M}\mathrel {\xRightarrow {u}} q_n. Because q_n\in F_{M}, we are done.