Regular expressions (Definition): The regular expressions over a set I are defined recursively by:
The symbol \(\emptyset \) is a regular expression.
The symbol \({\bf{\lambda }}\)is a regular expression.
The symbol xis a regular expression whenever\({\bf{x}} \in {\bf{I}}\).
The symbols \(\left( {{\bf{AB}}} \right){\bf{,}}\left( {{\bf{A}} \cup {\bf{B}}} \right){\bf{,}}\) and \({\bf{A*}}\) are regular expressions whenever A and B are regular expressions.
The sets represented by regular expressions are called regular sets.
A rule of regular expression represents a set:
\(\emptyset \) represents the empty set, that is, the set with no strings;
\({\bf{\lambda }}\) represents the set\(\left\{ {\bf{\lambda }} \right\}\), which is the set containing the empty string;
xrepresents the set \(\left\{ {\bf{x}} \right\}\) containing the string with one symbol x;
(AB) represents the concatenation of the sets represented by Aand by B;
\(\left( {{\bf{A}} \cup {\bf{B}}} \right)\)represents the union of the sets represented by Aand by B;
\({\bf{A*}}\) represents the Kleene closure of the sets represented by A.
Structural Induction:A proof by structural induction consists of two parts. These parts are
Basis step: Show that the result holds for all elements specified in the basis step of the recursive definition to be in the set.
Recursive step: Show that if the statement is true for each of the elements used to construct new elements in the recursive step of the definition, the result holds for these new elements.