Definition. The matching relation for regular expressions [017D]
The matching relation u\mathrel {\textsf {matches}}R is given by an inductive definition over \Sigma ^\star \times \mathsf {Regexp}_{\Sigma }.
\begin {gathered} \displaystyle \frac {\displaystyle }{\displaystyle \quad {\mathopen {}\left ({a},{\texttt {Sym}_{a}}\right )\mathclose {}} \quad } \quad \displaystyle \frac {\displaystyle }{\displaystyle \quad {\mathopen {}\left ({\epsilon },{\texttt {Null}}\right )\mathclose {}} \quad } \\[10pt] \displaystyle \frac {\displaystyle {\mathopen {}\left ({u},{R}\right )\mathclose {}} }{\displaystyle \quad {\mathopen {}\left ({u},{\texttt {Union}{\mathopen {}\left (R,S\right )\mathclose {}}}\right )\mathclose {}} \quad } \qquad \displaystyle \frac {\displaystyle {\mathopen {}\left ({u},{S}\right )\mathclose {}} }{\displaystyle \quad {\mathopen {}\left ({u},{\texttt {Union}{\mathopen {}\left (R,S\right )\mathclose {}}}\right )\mathclose {}} \quad } \\[10pt] \displaystyle \frac {\displaystyle {\mathopen {}\left ({v},{R}\right )\mathclose {}} \quad {\mathopen {}\left ({w},{S}\right )\mathclose {}} }{\displaystyle \quad {\mathopen {}\left ({vw},{\texttt {Concat}{\mathopen {}\left (R,S\right )\mathclose {}}}\right )\mathclose {}} \quad } \\[10pt] \displaystyle \frac {\displaystyle }{\displaystyle \quad {\mathopen {}\left ({\epsilon },{\texttt {Star}{\mathopen {}\left (R\right )\mathclose {}}}\right )\mathclose {}} \quad } \qquad \displaystyle \frac {\displaystyle {\mathopen {}\left ({u},{R}\right )\mathclose {}} \quad {\mathopen {}\left ({v},{\texttt {Star}{\mathopen {}\left (R\right )\mathclose {}}}\right )\mathclose {}} }{\displaystyle \quad {\mathopen {}\left ({uv},{\texttt {Star}{\mathopen {}\left (R\right )\mathclose {}}}\right )\mathclose {}} \quad } \end {gathered}We will write \mathcal {L}{\mathopen {}\left (R\right )\mathclose {}} for the formal language matching or “recognised” by the regular expression R:
\mathcal {L}{\mathopen {}\left (R\right )\mathclose {}} = {\mathopen {}\left \{ u:\Sigma ^\star \mid u\mathrel {\textsf {matches}}R \right \}\mathclose {}}