Corollary. Decidability of regular expression matching [018E]

Let R be a regular expression over an alphabet \Sigma . Then there exists an algorithm to compute whether a given string u:\Sigma ^\star matches R.

There is a subtlety in the argument above: we need the DFA M to have computably decidable equality of states. The way to deal with this is that M has a finite set of states, and so isomorphic to a standard finite set of the form \mathbb {N}_{<n}, which has computably decidable equality. A more important subtlety is that we need it to be computably decidable whether a given state is an accepting state, and we also need the transition function to be computable; any subset of a finite set is going to be decidable for roughly the same reason—ahead of time, we can enumerate it as a list of numbers in \mathbb {N}_{<n}.