slides/slides11.tex
author Christian Urban <urbanc@in.tum.de>
Sat, 15 Oct 2016 14:27:01 +0100
changeset 451 4a5876f321ae
parent 389 71c405056d3a
child 458 896a5f91838d
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
388
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     1
\documentclass[dvipsnames,14pt,t]{beamer}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     2
\usepackage{../slides}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     3
\usepackage{../langs}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     4
\usepackage{../data}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     5
\usepackage{../graphics}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     6
\usepackage{soul}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     7
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     8
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     9
% beamer stuff
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    10
\renewcommand{\slidecaption}{AFL, King's College London}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    11
\newcommand{\bl}[1]{\textcolor{blue}{#1}}       
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    12
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    13
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    14
\begin{document}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    15
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    16
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    17
\begin{frame}[t]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    18
\frametitle{%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    19
  \begin{tabular}{@ {}c@ {}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    20
  \\[-3mm]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    21
  \LARGE Automata and \\[-2mm] 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    22
  \LARGE Formal Languages\\[3mm] 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    23
  \end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    24
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    25
  \normalsize
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    26
  \begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    27
  \begin{tabular}{ll}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    28
  Email:  & christian.urban at kcl.ac.uk\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    29
  Office: & S1.27 (1st floor Strand Building)\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    30
  Slides: & KEATS (also home work is there)\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    31
  \end{tabular}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    32
  \end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    33
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    34
\end{frame}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    35
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    36
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    37
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    38
\begin{frame}[t]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    39
\frametitle{2nd CW}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    40
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    41
Remember we showed that\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    42
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    43
\begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    44
\bl{$der\;c\;(r^+) = (der\;c\;r)\cdot r^*$}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    45
\end{center}\bigskip\pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    46
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    47
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    48
Does the same hold for \bl{$r^{\{n\}}$} with \bl{$n > 0$}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    49
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    50
\begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    51
\bl{$der\;c\;(r^{\{n\}}) = (der\;c\;r)\cdot r^{\{n-1\}}$} ?
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    52
\end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    53
\end{frame}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    54
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    55
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    56
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    57
\begin{frame}[t]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    58
\frametitle{2nd CW}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    59
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    60
\begin{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    61
\item \bl{$der$}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    62
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    63
\begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    64
\bl{$der\;c\;(r^{\{n\}}) \dn 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    65
\begin{cases}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    66
\varnothing & \text{\textcolor{black}{if}}\; n = 0\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    67
der\;c\;(r\cdot r^{\{n-1\}}) & \text{\textcolor{black}{o'wise}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    68
\end{cases}$} 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    69
\end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    70
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    71
\item \bl{$mkeps$}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    72
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    73
\begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    74
\bl{$mkeps(r^{\{n\}}) \dn
389
71c405056d3a updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 388
diff changeset
    75
[\underbrace{mkeps(r),\ldots,mkeps(r)}_{n\;times}]$} 
388
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    76
\end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    77
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    78
\item \bl{$inj$}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    79
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    80
\begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    81
\begin{tabular}{l@{\hspace{1mm}}c@{\hspace{1mm}}l}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    82
\bl{$inj\;r^{\{n\}}\;c\;(v_1, [vs])$}     & \bl{$\dn$} &
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    83
\bl{$[inj\;r\;c\;v_1::vs]$}\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    84
\bl{$inj\;r^{\{n\}}\;c\;Left(v_1, [vs])$} & \bl{$\dn$} &
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    85
\bl{$[inj\;r\;c\;v_1::vs]$}\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    86
\bl{$inj\;r^{\{n\}}\;c\;Right([v::vs])$}  & \bl{$\dn$} &
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    87
\bl{$[mkeps(r)::inj\;r\;c\;v::vs]$}\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    88
\end{tabular}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    89
\end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    90
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    91
\end{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    92
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    93
\end{frame}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    94
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    95
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    96
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    97
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    98
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    99
\begin{frame}[c]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   100
\frametitle{Compilers in Boeings 777}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   101
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   102
They want to achieve triple redundancy in hardware
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   103
faults.\bigskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   104
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   105
They compile 1 Ada program to
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   106
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   107
\begin{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   108
\item Intel 80486
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   109
\item Motorola 68040 (old Macintosh's)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   110
\item AMD 29050 (RISC chips used often in laser printers)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   111
\end{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   112
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   113
\end{frame}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   114
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   115
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   116
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   117
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   118
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   119
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   120
\begin{frame}[t]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   121
\frametitle{Proofs about Rexps}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   122
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   123
Remember their inductive definition:
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   124
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   125
  \begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   126
  \begin{tabular}{@ {}rrl}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   127
  \bl{$r$} & \bl{$::=$}  & \bl{$\varnothing$}\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   128
         & \bl{$\mid$} & \bl{$\epsilon$}     \\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   129
         & \bl{$\mid$} & \bl{$c$}            \\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   130
         & \bl{$\mid$} & \bl{$r_1 \cdot r_2$}\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   131
         & \bl{$\mid$} & \bl{$r_1 + r_2$}    \\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   132
         & \bl{$\mid$} & \bl{$r^*$}          \\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   133
  \end{tabular}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   134
  \end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   135
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   136
If we want to prove something, say a property \bl{$P(r)$}, for all regular expressions \bl{$r$} then \ldots
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   137
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   138
\end{frame}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   139
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   140
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   141
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   142
\begin{frame}[c]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   143
\frametitle{Proofs about Rexp (2)}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   144
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   145
\begin{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   146
\item \bl{$P$} holds for \bl{$\varnothing$}, \bl{$\epsilon$} and \bl{c}\bigskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   147
\item \bl{$P$} holds for \bl{$r_1 + r_2$} under the assumption that \bl{$P$} already
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   148
holds for \bl{$r_1$} and \bl{$r_2$}.\bigskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   149
\item \bl{$P$} holds for \bl{$r_1 \cdot r_2$} under the assumption that \bl{$P$} already
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   150
holds for \bl{$r_1$} and \bl{$r_2$}.\bigskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   151
\item \bl{$P$} holds for \bl{$r^*$} under the assumption that \bl{$P$} already
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   152
holds for \bl{$r$}.
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   153
\end{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   154
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   155
\end{frame}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   156
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   157
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   158
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   159
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   160
\begin{frame}[c]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   161
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   162
\bl{\begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   163
\begin{tabular}{@ {}l@ {\hspace{2mm}}c@ {\hspace{2mm}}l@ {}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   164
$zeroable(\varnothing)$      & $\dn$ & \textit{true}\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   165
$zeroable(\epsilon)$         & $\dn$ &  \textit{false}\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   166
$zeroable (c)$               & $\dn$ &  \textit{false}\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   167
$zeroable (r_1 + r_2)$       & $\dn$ &  $zeroable(r_1) \wedge zeroable(r_2)$ \\ 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   168
$zeroable (r_1 \cdot r_2)$   & $\dn$ &  $zeroable(r_1) \vee zeroable(r_2)$ \\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   169
$zeroable (r^*)$             & $\dn$ & \textit{false}\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   170
\end{tabular}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   171
\end{center}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   172
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   173
\begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   174
\bl{$zeroable(r)$} if and only if \bl{$L(r) = \{\}$}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   175
\end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   176
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   177
\end{frame}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   178
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   179
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   180
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   181
\begin{frame}[c]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   182
\frametitle{Correctness of the Matcher}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   183
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   184
\begin{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   185
\item We want to prove\medskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   186
\begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   187
\bl{$matches\;r\;s$} if and only if \bl{$s\in L(r)$}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   188
\end{center}\bigskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   189
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   190
where \bl{$matches\;r\;s \dn nullable(ders\;s\;r)$}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   191
\bigskip\pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   192
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   193
\item We can do this, if we know\medskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   194
\begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   195
\bl{$L(der\;c\;r) = Der\;c\;(L(r))$}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   196
\end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   197
\end{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   198
\end{frame}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   199
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   200
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   201
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   202
\begin{frame}[c]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   203
\frametitle{Induction over Strings}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   204
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   205
\begin{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   206
\item case \bl{$[]$}:\bigskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   207
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   208
We need to prove 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   209
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   210
\begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   211
  \bl{$\forall r.\;\;nullable(ders\;[]\;r) \;\Leftrightarrow\; [] \in L(r)$}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   212
\end{center}\bigskip  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   213
  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   214
\begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   215
  \bl{$nullable(ders\;[]\;r) \;\dn\; nullable\;r \;\Leftrightarrow\ldots$}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   216
\end{center} 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   217
\end{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   218
\end{frame}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   219
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   220
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   221
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   222
\begin{frame}[c]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   223
\frametitle{Induction over Strings}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   224
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   225
\begin{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   226
\item case \bl{$c::s$}\bigskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   227
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   228
We need to prove 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   229
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   230
\begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   231
  \bl{$\forall r.\;\;nullable(ders\;(c::s)\;r) \;\Leftrightarrow\; (c::s) \in L(r)$}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   232
\end{center} 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   233
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   234
We have by IH
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   235
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   236
\begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   237
  \bl{$\forall r.\;\;nullable(ders\;s\;r) \;\Leftrightarrow\; s \in L(r)$}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   238
\end{center}\bigskip 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   239
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   240
\begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   241
\bl{$ders\;(c::s)\;r \dn ders\;s\;(der\;c\;r)$}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   242
\end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   243
\end{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   244
\end{frame}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   245
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   246
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   247
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   248
\begin{frame}[c]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   249
\frametitle{Induction over Regexps}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   250
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   251
\begin{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   252
\item The proof hinges on the fact that we can prove\bigskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   253
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   254
\begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   255
  \Large\bl{$L(der\;c\;r) = Der\;c\;(L(r))$}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   256
\end{center} 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   257
\end{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   258
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   259
\end{frame}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   260
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   261
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   262
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   263
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   264
\begin{frame}[c]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   265
\frametitle{Some Lemmas}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   266
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   267
\begin{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   268
\item \bl{$Der\;c\;(A\cup B) = 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   269
(Der\;c\;A)\cup(Der\;c\;B)$}\bigskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   270
\item If \bl{$[] \in A$} then
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   271
\begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   272
\bl{$Der\;c\;(A\,@\,B) = (Der\;c\;A)\,@\,B \;\cup\; (Der\;c\;B)$}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   273
\end{center}\bigskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   274
\item If \bl{$[] \not\in A$} then
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   275
\begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   276
\bl{$Der\;c\;(A\,@\,B) = (Der\;c\;A)\,@\,B$}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   277
\end{center}\bigskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   278
\item \bl{$Der\;c\;(A^*) = (Der\;c\;A)\,@\,A^*$}\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   279
\small\mbox{}\hfill (interesting case)\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   280
\end{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   281
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   282
\end{frame}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   283
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   284
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   285
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   286
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   287
\begin{frame}[c]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   288
\frametitle{Why?}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   289
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   290
Why does \bl{$Der\;c\;(A^*) = (Der\;c\;A)\,@\,A^*$} hold?
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   291
\bigskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   292
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   293
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   294
\begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   295
\begin{tabular}{lcl}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   296
\bl{$Der\;c\;(A^*)$} & \bl{$=$} &  \bl{$Der\;c\;(A^* - \{[]\})$}\medskip\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   297
& \bl{$=$} & \bl{$Der\;c\;((A - \{[]\})\,@\,A^*)$}\medskip\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   298
& \bl{$=$} & \bl{$(Der\;c\;(A - \{[]\}))\,@\,A^*$}\medskip\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   299
& \bl{$=$} & \bl{$(Der\;c\;A)\,@\,A^*$}\medskip\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   300
\end{tabular}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   301
\end{center}\bigskip\bigskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   302
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   303
\small
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   304
using the facts \bl{$Der\;c\;A = Der\;c\;(A - \{[]\})$} and\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   305
\mbox{}\hfill\bl{$(A - \{[]\}) \,@\, A^* = A^* - \{[]\}$}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   306
\end{frame}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   307
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   308
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   309
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   310
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   311
\end{document}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   312
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   313
%%% Local Variables:  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   314
%%% mode: latex
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   315
%%% TeX-master: t
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   316
%%% End: 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   317