Proof (regular language iff accepted by automaton)

We use the equivalence of deterministic and nondeterministic automata.

Language accepted by a deterministic automaton is regular

Let $D = (Σ, Q, δ, q_0, F)$ be a deterministic automaton. Define a regular grammar $$G = (Σ, Q, P, q_0)$$ with $$ \begin{align*} P = \sb{p \to aq}{δ(p, a) = q} \cup \sb{p \to a}{δ(p,a)\in F}. \end{align*} $$

$\mathcal{L}(D) \subseteq \mathcal{L}(G)$

Suppose $w = a_0 a_1 \ldots a_n \in \mathcal{L}(D)$. This means the state sequence $q_{i+1} = δ(q_i, a_i)$ ends with $q_{n+1}\in F$. Thus $q_i \to a_i q_{i+1}\in P$ for $i=0,1,\ldots,n-1$ and $q_{n} \to a_n \in F$. Thus $$ \begin{align*} q_0 \xrightarrow{G}_1 a_0 q_1 \xrightarrow{G}_1 a_0 a_1 q_2 \xrightarrow{G}_1 \ldots \xrightarrow{G}_1 a_0a_1 \ldots a_{n-1}q_n \xrightarrow{G}_1 a_0 a_1 \ldots a_{n-1} a_n = w \end{align*} $$ is a $G$-derivation.

$\mathcal{L}(G) \subseteq \mathcal{L}(D)$

Suppose $w = a_0 a_1 \ldots a_n \in \mathcal{L}(G)$. Since $G$ is regular, the derivation of $q_0 \xrightarrow{G} w$ is of the form $$ \begin{align*} q_0 \xrightarrow{G}_1 a_0 q_1 \xrightarrow{G}_1 a_0 a_1 q_2 \xrightarrow{G}_1 \ldots \xrightarrow{G}_1 a_0a_1 \ldots a_{n-1}q_n \xrightarrow{G}_1 a_0 a_1 \ldots a_{n-1} a_n = w \end{align*} $$ Then $q_i \to a_i q_{i+1}\in P$ and $q_n \to a_n$, which means $δ(q_i, a_i) = q_{i+1}$ and $δ(q_n, a_n) \in F$ so $\hat δ(q_0, w) = δ(q_n, a_n) \in F$.

Every regular language is accepted by a nondeterministic automaton

Let $G = (Σ, V, P, S)$ be a regular grammar. Let $H \not\in Σ \cup V$ be a new state, and define a nondeterministic automaton $$ \begin{align*} N = (Σ, V\cup \set{H}, δ, S, \set{H}) \end{align*} $$ where $$ \begin{align*} δ(A, a) = \begin{cases} \sb{B\in V}{A \to aB\in P} &\text{if } A \to a\not\in P, \\ \sb{B\in V}{A \to aB\in P} \cup \set{H} &\text{if } A \to a\in P. \end{cases} \end{align*} $$

$\mathcal{L}(G) \subseteq \mathcal{L}(N)$

Suppose $w=a_0 a_1 \ldots a_n \in \mathcal{L}(G)$. We know there is a $G$-derivation $$ \begin{align*} S = A_0 \xrightarrow{G}_1 a_0 A_1 \xrightarrow{G}_1 a_0 a_1 A_2 \xrightarrow{G}_1 \ldots \xrightarrow{G}_1 a_0a_1 \ldots a_{n-1} A_n \xrightarrow{G}_1 a_0a_1\ldots a_{n-1}a_n = w, \end{align*} $$ with production rules $A_i \to a_i A_{i+1}$ and $A_n \to a_n$ in $P$. By induction, $A_{i+1} \in \hat δ(S, a_0 \ldots a_{i})$, so $H \in \hat δ(S, w)$.

$\mathcal{L}(N) \subseteq \mathcal{L}(G)$

Suppose $w = a_0 a_1 \ldots a_n\in \mathcal{L}(N)$. There exists a path of states $S = q_0, q_1, \ldots, q_n, q_{n+1} = H$ such that $q_{i+1} \in δ(q_i, a_i)$. Since $δ(H, a) = \emptyset$ for any $a\in Σ$, we must have $q_0, q_1, \ldots, q_n\in V$, and so $q_{i+1} \in δ(q_i, a_i)$ is witnessed by a rule $q_i \to a_i q_{i+1}$. Moreover $q_{n+1}=H$ means $q_n \to a_n \in P$. Thus $$ \begin{align*} q_0 = S \xrightarrow{G}_1 a_0 q_1 \xrightarrow{G}_1 a_0 a_1 q_2 \xrightarrow{G}_1 \ldots \xrightarrow{G}_1 a_0 a_1 \ldots a_{n-1} q_n \xrightarrow{G}_1 a_0 a_1 \ldots a_{n-1} a_n = w \end{align*} $$ is a $G$-derivation.