proof.tex
changeset 21 4e5092ab450a
parent 20 32af6d4de262
child 34 eeff9953a1c1
equal deleted inserted replaced
20:32af6d4de262 21:4e5092ab450a
   125 \end{center}
   125 \end{center}
   126 
   126 
   127 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))$,
   127 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))$,
   128 because $L(r_1 + r_2) = L(r_1) \cup L(r_2)$. And we are done with the fourth case.
   128 because $L(r_1 + r_2) = L(r_1) \cup L(r_2)$. And we are done with the fourth case.
   129  
   129  
   130 \item Fifth Case:
   130 \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:
       
   131 
       
   132 \begin{center}
       
   133 \begin{tabular}{ll}
       
   134 $P(r_1)$: & $L(der\,c\,r_1) = Der\,c\,(L(r_1))$ (I)\\
       
   135 $P(r_2)$: & $L(der\,c\,r_2) = Der\,c\,(L(r_2))$ (II)
       
   136 \end{tabular}
       
   137 \end{center}
       
   138 
       
   139 Let us first consider the case where $nullable(r_1)$ holds. Then 
       
   140 
       
   141 \[
       
   142 der\,c\,(r_1 \cdot r_2) = ((der\,c\,r_1) \cdot r_2) + (der\,c\,r_2).
       
   143 \]
       
   144 
       
   145 The corresponding language of the right-hand side is 
       
   146 
       
   147 \[
       
   148 (L(der\,c\,r_1) \,@\, L(r_2)) \cup L(der\,c\,r_2).
       
   149 \]
       
   150 
       
   151 By the induction hypotheses (I) and (II), this is equal to
       
   152 
       
   153 \[
       
   154 (Der\,c\,(L(r_1)) \,@\, L(r_2)) \cup (Der\,c\,(L(r_2)).\;\;(**)
       
   155 \]
       
   156 
       
   157 We also know that $L(r_1 \cdot r_2) = L(r_1) \,@\,L(r_2)$.  We have to know what
       
   158 $Der\,c\,(L(r_1) \,@\,L(r_2))$ is.
       
   159 
       
   160 Let us analyse what
       
   161 $Der\,c\,(A \,@\, B)$ is for arbitrary sets of strings $A$ and $B$. If $A$ does \emph{not}
       
   162 contain the empty string, then every string in $A\,@\,B$ is of the form $s_1 \,@\, s_2$ where
       
   163 $s_1 \in A$ and $s_2 \in B$. So if $s_1$ starts with $c$ then we just have to remove it. Consequently,
       
   164 $Der\,c\,(A \,@\, B) = (Der\,c\,(A)) \,@\, B$. This case does not apply here though, because we already 
       
   165 proved that if $r_1$ is nullable, then $L(r_1)$ contains the empty string. In this case, every string
       
   166 in  $A\,@\,B$ is either of the form $s_1 \,@\, s_2$, with $s_1 \in A$ and $s_2 \in B$, or
       
   167 $s_3$ with $s_3 \in B$. This means $Der\,c\,(A \,@\, B) = ((Der\,c\,(A)) \,@\, B) \cup Der\,c\,B$.
       
   168 But this proves that (**) is $Der\,c\,(L(r_1) \,@\, L(r_2))$.
       
   169 
       
   170 Similarly in the case where $r_1$ is \emph{not} nullable.
   131 
   171 
   132 \item Sixth Case:
   172 \item Sixth Case:
   133 \end{itemize}
   173 \end{itemize}
   134 
   174 
   135 \end{document}
   175 \end{document}