hws/proof.tex
author Christian Urban <christian.urban@kcl.ac.uk>
Fri, 29 Nov 2024 18:59:32 +0000
changeset 976 e9eac62928f5
parent 953 5e070fb0332a
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
20
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
\documentclass{article}
402
55f097ab96c9 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 388
diff changeset
     2
\usepackage{../style}
20
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     3
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
\begin{document}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     5
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
\section*{Proof}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     7
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
Recall the definitions for regular expressions and the language associated with a regular expression:
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     9
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    10
\begin{center}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    11
\begin{tabular}{c}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    12
\begin{tabular}[t]{rcl}
402
55f097ab96c9 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 388
diff changeset
    13
  $r$ & $::=$  & $\ZERO$  \\
55f097ab96c9 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 388
diff changeset
    14
         & $\mid$ & $\ONE$       \\
20
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    15
         & $\mid$ & $c$                         \\
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    16
         & $\mid$ & $r_1 \cdot r_2$ \\
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    17
         & $\mid$ & $r_1 + r_2$  \\
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    18
         & $\mid$ & $r^*$                 \\
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    19
  \end{tabular}\hspace{10mm}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    20
\begin{tabular}[t]{r@{\hspace{1mm}}c@{\hspace{1mm}}l}
402
55f097ab96c9 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 388
diff changeset
    21
$L(\ZERO)$ & $\dn$ & $\varnothing$ \\
55f097ab96c9 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 388
diff changeset
    22
$L(\ONE)$       & $\dn$ & $\{\texttt{""}\}$       \\
20
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    23
$L(c)$                   & $\dn$ & $\{\texttt{"}c\texttt{"}\}$                         \\
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    24
$L(r_1 \cdot r_2)$   & $\dn$ & $L(r_1) \,@\, L(r_2)$ \\
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    25
$L(r_1 + r_2)$         & $\dn$ & $L(r_1) \cup L(r_2)$  \\
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    26
 $L(r^*)$        & $\dn$ & $\bigcup_{n\ge 0} L(r)^n$                 \\
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    27
  \end{tabular}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    28
\end{tabular}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    29
\end{center}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    30
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    31
\noindent
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    32
We also defined the notion of a derivative of a regular expression (the derivative with respect to a character):
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    33
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    34
\begin{center}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    35
\begin{tabular}{lcl}
402
55f097ab96c9 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 388
diff changeset
    36
  $der\, c\, (\ZERO)$    & $\dn$ & $\ZERO$  \\
55f097ab96c9 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 388
diff changeset
    37
  $der\, c\, (\ONE)$          & $\dn$ & $\ZERO$ \\
55f097ab96c9 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 388
diff changeset
    38
  $der\, c\, (d)$                      & $\dn$ & if $c = d$ then $\ONE$ else $\ZERO$\\
20
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    39
  $der\, c\, (r_1 + r_2)$        & $\dn$ & $(der\, c\, r_1) + (der\, c\, r_2)$ \\
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    40
  $der\, c\, (r_1 \cdot r_2)$ & $\dn$  & if $nullable(r_1)$\\
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    41
       & & then $((der\, c\, r_1) \cdot r_2) + (der\, c\, r_2)$\\ 
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    42
       & & else $(der\, c\, r_1) \cdot r_2$\\
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    43
  $der\, c\, (r^*)$                   & $\dn$ & $(der\, c\, r) \cdot (r^*)$\\
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    44
  \end{tabular}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    45
\end{center}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    46
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    47
\noindent
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    48
With our definition of regular expressions comes an induction principle. Given a property $P$ over 
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    49
regular expressions. We can establish that $\forall r.\; P(r)$ holds, provided we can show the following:
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    50
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    51
\begin{enumerate}
402
55f097ab96c9 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 388
diff changeset
    52
\item $P(\ZERO)$, $P(\ONE)$ and $P(c)$ all hold,
20
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    53
\item $P(r_1 + r_2)$ holds under the induction hypotheses that 
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    54
$P(r_1)$ and $P(r_2)$ hold,
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    55
\item $P(r_1 \cdot r_2)$ holds under the induction hypotheses that 
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    56
$P(r_1)$ and $P(r_2)$ hold, and
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    57
\item $P(r^*)$ holds under the induction hypothesis that $P(r)$ holds.
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    58
\end{enumerate}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    59
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    60
\noindent
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    61
Let us try out an induction proof. Recall the definition
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    62
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    63
\begin{center}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    64
$Der\, c\, A \dn \{ s\;\mid\; c\!::\!s \in A\}$
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    65
\end{center}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    66
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    67
\noindent
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    68
whereby $A$ is a set of strings. We like to prove
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    69
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    70
\begin{center}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    71
\begin{tabular}{l}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    72
$P(r) \dn $ \hspace{4mm} $L(der\,c\,r) = Der\,c\,(L(r))$
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    73
\end{tabular}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    74
\end{center}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    75
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    76
\noindent
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    77
by induction over the regular expression $r$.
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    78
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    79
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    80
\newpage
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    81
\noindent
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    82
{\bf Proof}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    83
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    84
\noindent
402
55f097ab96c9 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 388
diff changeset
    85
According to 1.~above we need to prove $P(\ZERO)$, $P(\ONE)$ and $P(d)$. Lets do this in turn.
20
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    86
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    87
\begin{itemize}
402
55f097ab96c9 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 388
diff changeset
    88
\item First Case: $P(\ZERO)$ is $L(der\,c\,\ZERO) = Der\,c\,(L(\ZERO))$ (a). We have $der\,c\,\ZERO = \ZERO$ 
953
5e070fb0332a updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 402
diff changeset
    89
and $L(\ZERO) = \emptyset$. We also have $Der\,c\,L(\ZERO) = L(\ZERO$). Hence we have $\emptyset = \emptyset$ in (a). 
20
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    90
402
55f097ab96c9 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 388
diff changeset
    91
\item Second  Case: $P(\ONE)$ is $L(der\,c\,\ONE) = Der\,c\,(L(\ONE))$ (b). We have $der\,c\,\ONE = \ZERO$,
953
5e070fb0332a updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 402
diff changeset
    92
$L(\ZERO) = \ZERO$ and $L(\ONE) = \{\texttt{""}\}$. We also have $Der\,c\,\{\texttt{""}\} = \emptyset$. Hence we have 
5e070fb0332a updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 402
diff changeset
    93
$\emptyset = \emptyset$ in (b). 
20
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    94
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    95
\item Third  Case: $P(d)$ is $L(der\,c\,d) = Der\,c\,(L(d))$ (c). We need to treat the cases $d = c$ and $d \not= c$. 
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    96
402
55f097ab96c9 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 388
diff changeset
    97
$d = c$: We have $der\,c\,c = \ONE$ and $L(\ONE) = \{\texttt{""}\}$. 
20
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    98
We also have $L(c) = \{\texttt{"}c\texttt{"}\}$ and $Der\,c\,\{\texttt{"}c\texttt{"}\} = \{\texttt{""}\}$. Hence we have 
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    99
$\{\texttt{""}\} = \{\texttt{""}\}$ in (c). 
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   100
402
55f097ab96c9 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 388
diff changeset
   101
$d \not=c$: We have $der\,c\,d = \ZERO$.
953
5e070fb0332a updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 402
diff changeset
   102
We also have $Der\,c\,\{\texttt{"}d\texttt{"}\} = \emptyset$. Hence we have 
5e070fb0332a updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 402
diff changeset
   103
$\emptyset = \emptyset$  in (c). 
34
Christian Urban <urbanc@in.tum.de>
parents: 21
diff changeset
   104
\end{itemize}
20
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   105
34
Christian Urban <urbanc@in.tum.de>
parents: 21
diff changeset
   106
\noindent
Christian Urban <urbanc@in.tum.de>
parents: 21
diff changeset
   107
These were the easy base cases. Now come the inductive cases.
Christian Urban <urbanc@in.tum.de>
parents: 21
diff changeset
   108
Christian Urban <urbanc@in.tum.de>
parents: 21
diff changeset
   109
\begin{itemize}
20
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   110
\item Fourth Case: $P(r_1 + r_2)$ is $L(der\,c\,(r_1 + r_2)) = Der\,c\,(L(r_1 + r_2))$ (d). This is what we have to show.
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   111
We can assume already:
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   112
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   113
\begin{center}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   114
\begin{tabular}{ll}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   115
$P(r_1)$: & $L(der\,c\,r_1) = Der\,c\,(L(r_1))$ (I)\\
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   116
$P(r_2)$: & $L(der\,c\,r_2) = Der\,c\,(L(r_2))$ (II)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   117
\end{tabular}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   118
\end{center}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   119
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   120
We have that $der\,c\,(r_1 + r_2) = (der\,c\,r_1) + (der\,c\,r_2)$ and also $L((der\,c\,r_1) + (der\,c\,r_2)) = L(der\,c\,r_1) \cup L(der\,c\,r_2)$.
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   121
By (I) and (II) we know that the left-hand side is $Der\,c\,(L(r_1)) \cup Der\,c\,(L(r_2))$.  You need to ponder a bit, but you should see
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   122
that 
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   123
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   124
\begin{center}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   125
$Der\,c(A \cup B) = (Der\,c\,A) \cup (Der\,c\,B)$
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   126
\end{center}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   127
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   128
holds for every set of strings $A$ and $B$. That means the right-hand side of (d) is also $Der\,c\,(L(r_1)) \cup Der\,c\,(L(r_2))$,
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   129
because $L(r_1 + r_2) = L(r_1) \cup L(r_2)$. And we are done with the fourth case.
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   130
 
21
4e5092ab450a one more case
Christian Urban <urbanc@in.tum.de>
parents: 20
diff changeset
   131
\item Fifth Case: $P(r_1 \cdot r_2)$ is $L(der\,c\,(r_1 \cdot r_2)) = Der\,c\,(L(r_1 \cdot r_2))$ (e). We can assume already:
4e5092ab450a one more case
Christian Urban <urbanc@in.tum.de>
parents: 20
diff changeset
   132
4e5092ab450a one more case
Christian Urban <urbanc@in.tum.de>
parents: 20
diff changeset
   133
\begin{center}
4e5092ab450a one more case
Christian Urban <urbanc@in.tum.de>
parents: 20
diff changeset
   134
\begin{tabular}{ll}
4e5092ab450a one more case
Christian Urban <urbanc@in.tum.de>
parents: 20
diff changeset
   135
$P(r_1)$: & $L(der\,c\,r_1) = Der\,c\,(L(r_1))$ (I)\\
4e5092ab450a one more case
Christian Urban <urbanc@in.tum.de>
parents: 20
diff changeset
   136
$P(r_2)$: & $L(der\,c\,r_2) = Der\,c\,(L(r_2))$ (II)
4e5092ab450a one more case
Christian Urban <urbanc@in.tum.de>
parents: 20
diff changeset
   137
\end{tabular}
4e5092ab450a one more case
Christian Urban <urbanc@in.tum.de>
parents: 20
diff changeset
   138
\end{center}
4e5092ab450a one more case
Christian Urban <urbanc@in.tum.de>
parents: 20
diff changeset
   139
4e5092ab450a one more case
Christian Urban <urbanc@in.tum.de>
parents: 20
diff changeset
   140
Let us first consider the case where $nullable(r_1)$ holds. Then 
4e5092ab450a one more case
Christian Urban <urbanc@in.tum.de>
parents: 20
diff changeset
   141
4e5092ab450a one more case
Christian Urban <urbanc@in.tum.de>
parents: 20
diff changeset
   142
\[
4e5092ab450a one more case
Christian Urban <urbanc@in.tum.de>
parents: 20
diff changeset
   143
der\,c\,(r_1 \cdot r_2) = ((der\,c\,r_1) \cdot r_2) + (der\,c\,r_2).
4e5092ab450a one more case
Christian Urban <urbanc@in.tum.de>
parents: 20
diff changeset
   144
\]
4e5092ab450a one more case
Christian Urban <urbanc@in.tum.de>
parents: 20
diff changeset
   145
4e5092ab450a one more case
Christian Urban <urbanc@in.tum.de>
parents: 20
diff changeset
   146
The corresponding language of the right-hand side is 
4e5092ab450a one more case
Christian Urban <urbanc@in.tum.de>
parents: 20
diff changeset
   147
4e5092ab450a one more case
Christian Urban <urbanc@in.tum.de>
parents: 20
diff changeset
   148
\[
4e5092ab450a one more case
Christian Urban <urbanc@in.tum.de>
parents: 20
diff changeset
   149
(L(der\,c\,r_1) \,@\, L(r_2)) \cup L(der\,c\,r_2).
4e5092ab450a one more case
Christian Urban <urbanc@in.tum.de>
parents: 20
diff changeset
   150
\]
4e5092ab450a one more case
Christian Urban <urbanc@in.tum.de>
parents: 20
diff changeset
   151
4e5092ab450a one more case
Christian Urban <urbanc@in.tum.de>
parents: 20
diff changeset
   152
By the induction hypotheses (I) and (II), this is equal to
4e5092ab450a one more case
Christian Urban <urbanc@in.tum.de>
parents: 20
diff changeset
   153
4e5092ab450a one more case
Christian Urban <urbanc@in.tum.de>
parents: 20
diff changeset
   154
\[
4e5092ab450a one more case
Christian Urban <urbanc@in.tum.de>
parents: 20
diff changeset
   155
(Der\,c\,(L(r_1)) \,@\, L(r_2)) \cup (Der\,c\,(L(r_2)).\;\;(**)
4e5092ab450a one more case
Christian Urban <urbanc@in.tum.de>
parents: 20
diff changeset
   156
\]
4e5092ab450a one more case
Christian Urban <urbanc@in.tum.de>
parents: 20
diff changeset
   157
4e5092ab450a one more case
Christian Urban <urbanc@in.tum.de>
parents: 20
diff changeset
   158
We also know that $L(r_1 \cdot r_2) = L(r_1) \,@\,L(r_2)$.  We have to know what
4e5092ab450a one more case
Christian Urban <urbanc@in.tum.de>
parents: 20
diff changeset
   159
$Der\,c\,(L(r_1) \,@\,L(r_2))$ is.
4e5092ab450a one more case
Christian Urban <urbanc@in.tum.de>
parents: 20
diff changeset
   160
4e5092ab450a one more case
Christian Urban <urbanc@in.tum.de>
parents: 20
diff changeset
   161
Let us analyse what
4e5092ab450a one more case
Christian Urban <urbanc@in.tum.de>
parents: 20
diff changeset
   162
$Der\,c\,(A \,@\, B)$ is for arbitrary sets of strings $A$ and $B$. If $A$ does \emph{not}
4e5092ab450a one more case
Christian Urban <urbanc@in.tum.de>
parents: 20
diff changeset
   163
contain the empty string, then every string in $A\,@\,B$ is of the form $s_1 \,@\, s_2$ where
4e5092ab450a one more case
Christian Urban <urbanc@in.tum.de>
parents: 20
diff changeset
   164
$s_1 \in A$ and $s_2 \in B$. So if $s_1$ starts with $c$ then we just have to remove it. Consequently,
4e5092ab450a one more case
Christian Urban <urbanc@in.tum.de>
parents: 20
diff changeset
   165
$Der\,c\,(A \,@\, B) = (Der\,c\,(A)) \,@\, B$. This case does not apply here though, because we already 
4e5092ab450a one more case
Christian Urban <urbanc@in.tum.de>
parents: 20
diff changeset
   166
proved that if $r_1$ is nullable, then $L(r_1)$ contains the empty string. In this case, every string
4e5092ab450a one more case
Christian Urban <urbanc@in.tum.de>
parents: 20
diff changeset
   167
in  $A\,@\,B$ is either of the form $s_1 \,@\, s_2$, with $s_1 \in A$ and $s_2 \in B$, or
4e5092ab450a one more case
Christian Urban <urbanc@in.tum.de>
parents: 20
diff changeset
   168
$s_3$ with $s_3 \in B$. This means $Der\,c\,(A \,@\, B) = ((Der\,c\,(A)) \,@\, B) \cup Der\,c\,B$.
4e5092ab450a one more case
Christian Urban <urbanc@in.tum.de>
parents: 20
diff changeset
   169
But this proves that (**) is $Der\,c\,(L(r_1) \,@\, L(r_2))$.
4e5092ab450a one more case
Christian Urban <urbanc@in.tum.de>
parents: 20
diff changeset
   170
4e5092ab450a one more case
Christian Urban <urbanc@in.tum.de>
parents: 20
diff changeset
   171
Similarly in the case where $r_1$ is \emph{not} nullable.
20
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   172
34
Christian Urban <urbanc@in.tum.de>
parents: 21
diff changeset
   173
\item Sixth Case: $P(r^*)$ is $L(der\,c\,(r^*)) = Der\,c\,L(r^*)$. We can assume already:
Christian Urban <urbanc@in.tum.de>
parents: 21
diff changeset
   174
Christian Urban <urbanc@in.tum.de>
parents: 21
diff changeset
   175
\begin{center}
Christian Urban <urbanc@in.tum.de>
parents: 21
diff changeset
   176
\begin{tabular}{ll}
Christian Urban <urbanc@in.tum.de>
parents: 21
diff changeset
   177
$P(r)$: & $L(der\,c\,r) = Der\,c\,(L(r))$ (I)
Christian Urban <urbanc@in.tum.de>
parents: 21
diff changeset
   178
\end{tabular}
Christian Urban <urbanc@in.tum.de>
parents: 21
diff changeset
   179
\end{center}
Christian Urban <urbanc@in.tum.de>
parents: 21
diff changeset
   180
Christian Urban <urbanc@in.tum.de>
parents: 21
diff changeset
   181
We have $der\,c\,(r^*) = der\,c\,r\cdot r^*$. Which means $L(der\,c\,(r^*)) = L(der\,c\,r\cdot r^*)$ and
Christian Urban <urbanc@in.tum.de>
parents: 21
diff changeset
   182
further $L(der\,c\,r) \,@\, L(r^*)$. By induction hypothesis (I) we know that is equal to 
Christian Urban <urbanc@in.tum.de>
parents: 21
diff changeset
   183
$(Der\,c\,L(r)) \,@\, L(r^*)$. (*)
Christian Urban <urbanc@in.tum.de>
parents: 21
diff changeset
   184
20
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   185
\end{itemize}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   186
34
Christian Urban <urbanc@in.tum.de>
parents: 21
diff changeset
   187
Let us now analyse $Der\,c\,L(r^*)$, which is equal to $Der\,c\,((L(r))^*)$. Now $(L(r))^*$ is defined
388
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 102
diff changeset
   188
as $\bigcup_{n \ge 0} L(r)^n$. We can write this as $L(r)^0 \cup \bigcup_{n \ge 1} L(r)^n$, where we just 
34
Christian Urban <urbanc@in.tum.de>
parents: 21
diff changeset
   189
separated the first union and then let the ``big-union'' start from $1$. Form this we can already infer
Christian Urban <urbanc@in.tum.de>
parents: 21
diff changeset
   190
Christian Urban <urbanc@in.tum.de>
parents: 21
diff changeset
   191
\begin{center}
388
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 102
diff changeset
   192
$Der\,c\,(L(r^*)) = Der\,c\,(L(r)^0 \cup \bigcup_{n \ge 1} L(r)^n) = (Der\,c\,L(r)^0) \cup Der\,c\,(\bigcup_{n \ge 1} L(r)^n)$
34
Christian Urban <urbanc@in.tum.de>
parents: 21
diff changeset
   193
\end{center}
Christian Urban <urbanc@in.tum.de>
parents: 21
diff changeset
   194
953
5e070fb0332a updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 402
diff changeset
   195
The first union ``disappears'' since $Der\,c\,(L(r)^0) = \emptyset$.
34
Christian Urban <urbanc@in.tum.de>
parents: 21
diff changeset
   196
Christian Urban <urbanc@in.tum.de>
parents: 21
diff changeset
   197
20
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   198
\end{document}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   199
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   200
%%% Local Variables: 
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   201
%%% mode: latex
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   202
%%% TeX-master: t
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   203
%%% End: