thys/notes.tex
author Christian Urban <christian dot urban at kcl dot ac dot uk>
Fri, 30 Jan 2015 13:19:15 +0000
changeset 59 434ba43d0430
parent 58 1769b702d4dc
child 60 2cdbab037861
permissions -rw-r--r--
added line numbers
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
55
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     1
\documentclass[11pt]{article}
59
434ba43d0430 added line numbers
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 58
diff changeset
     2
\usepackage[left]{lineno}
55
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     3
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     4
\begin{document}
59
434ba43d0430 added line numbers
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 58
diff changeset
     5
\linenumbers
55
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     6
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     7
\noindent
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     8
A lemma which might be true, but can also be false, is as follows:
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     9
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    10
\begin{center}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    11
\begin{tabular}{lll}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    12
If   & (1) & $v_1 \succ_{der\;c\;r} v_2$,\\
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    13
     & (2) & $\vdash v_1 : der\;c\;r$, and\\ 
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    14
     & (3) & $\vdash v_2 : der\;c\;r$ holds,\\
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    15
then &     & $inj\;r\;c\;v_1 \succ_r inj\;r\;c\;v_2$ also holds.  
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    16
\end{tabular}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    17
\end{center}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    18
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    19
\noindent It essentially states that if one value $v_1$ is 
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    20
bigger than $v_2$ then this ordering is preserved under 
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    21
injections. This is proved by induction (on the definition of 
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    22
$der$\ldots this is very similar to an induction on $r$).
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    23
\bigskip
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    24
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    25
\noindent
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    26
The case that is still unproved is the sequence case where we 
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    27
assume $r = r_1\cdot r_2$ and also $r_1$ being nullable.
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    28
The derivative $der\;c\;r$ is then
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    29
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    30
\begin{center}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    31
$der\;c\;r = ((der\;c\;r_1) \cdot r_2) + (der\;c\;r_2)$
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    32
\end{center}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    33
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    34
\noindent 
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    35
or without the parentheses
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    36
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    37
\begin{center}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    38
$der\;c\;r = (der\;c\;r_1) \cdot r_2 + der\;c\;r_2$
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    39
\end{center}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    40
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    41
\noindent 
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    42
In this case the assumptions are
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    43
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    44
\begin{center}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    45
\begin{tabular}{ll}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    46
(a) & $v_1 \succ_{(der\;c\;r_1) \cdot r_2 + der\;c\;r_2} v_2$\\
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    47
(b) & $\vdash v_1 : (der\;c\;r_1) \cdot r_2 + der\;c\;r_2$\\
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    48
(c) & $\vdash v_2 : (der\;c\;r_1) \cdot r_2 + der\;c\;r_2$\\
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    49
(d) & $nullable(r_1)$
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    50
\end{tabular}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    51
\end{center}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    52
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    53
\noindent 
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    54
The induction hypotheses are
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    55
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    56
\begin{center}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    57
\begin{tabular}{ll}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    58
(IH1) & $\forall v_1 v_2.\;v_1 \succ_{der\;c\;r_1} v_2
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    59
\;\wedge\; \vdash v_1 : der\;c\;r_1 \;\wedge\; 
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    60
\vdash v_2 : der\;c\;r_1\qquad$\\
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    61
      & $\hfill\longrightarrow
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    62
         inj\;r_1\;c\;v_1 \succ{r_1} \;inj\;r_1\;c\;v_2$\smallskip\\
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    63
(IH2) & $\forall v_1 v_2.\;v_1 \succ_{der\;c\;r_2} v_2
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    64
\;\wedge\; \vdash v_2 : der\;c\;r_2 \;\wedge\; 
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    65
\vdash v_2 : der\;c\;r_2\qquad$\\
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    66
      & $\hfill\longrightarrow
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    67
         inj\;r_2\;c\;v_1 \succ{r_2} \;inj\;r_2\;c\;v_2$\\
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    68
\end{tabular}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    69
\end{center}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    70
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    71
\noindent 
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    72
The goal is
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    73
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    74
\[
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    75
(goal)\qquad
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    76
inj\; (r_1 \cdot r_2)\;c\;v_1 \succ_{r_1 \cdot r_2} 
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    77
inj\; (r_1 \cdot r_2)\;c\;v_2
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    78
\]
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    79
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    80
\noindent 
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    81
If we analyse how (a) could have arisen (that is make a case
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    82
distinction), then we will find four cases:
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    83
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    84
\begin{center}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    85
\begin{tabular}{ll}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    86
LL & $v_1 = Left(w_1)$, $v_2 = Left(w_2)$\\
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    87
LR & $v_1 = Left(w_1)$, $v_2 = Right(w_2)$\\
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    88
RL & $v_1 = Right(w_1)$, $v_2 = Left(w_2)$\\
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    89
RR & $v_1 = Right(w_1)$, $v_2 = Right(w_2)$\\
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    90
\end{tabular}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    91
\end{center}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    92
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    93
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    94
\noindent 
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    95
We have to establish our goal in all four cases. 
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    96
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    97
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    98
\subsubsection*{Case LR}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    99
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   100
The corresponding rule (instantiated) is:
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   101
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   102
\begin{center}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   103
\begin{tabular}{c}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   104
$len\,|w_1| \geq len\,|w_2|$\\
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   105
\hline
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   106
$Left(w_1) \succ_{(der\;c\;r_1) \cdot r_2 + der\;c\;r_2} Right(w_2)$
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   107
\end{tabular}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   108
\end{center}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   109
57
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   110
\noindent 
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   111
This means we can also assume in this case
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   112
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   113
\[
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   114
(e)\quad len\,|w_1| \geq len\,|w_2|
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   115
\] 
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   116
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   117
\noindent 
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   118
which is the premise of the rule above.
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   119
Instantiating $v_1$ and $v_2$ in the assumptions (b) and (c)
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   120
gives us
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   121
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   122
\begin{center}
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   123
\begin{tabular}{ll}
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   124
(b*) & $\vdash Left(w_1) : (der\;c\;r_1) \cdot r_2 + der\;c\;r_2$\\
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   125
(c*) & $\vdash Right(w_2) : (der\;c\;r_1) \cdot r_2 + der\;c\;r_2$\\
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   126
\end{tabular}
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   127
\end{center}
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   128
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   129
\noindent Since these are assumptions, we can further analyse
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   130
how they could have arisen according to the rules of $\vdash
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   131
\_ : \_\,$. This gives us two new assumptions
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   132
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   133
\begin{center}
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   134
\begin{tabular}{ll}
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   135
(b**) & $\vdash w_1 : (der\;c\;r_1) \cdot r_2$\\
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   136
(c**) & $\vdash w_2 : der\;c\;r_2$\\
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   137
\end{tabular}
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   138
\end{center}
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   139
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   140
\noindent 
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   141
Looking at (b**) we can further analyse how this
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   142
judgement could have arisen. This tells us that $w_1$
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   143
must have been a sequence, say $u_1\cdot u_2$, with
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   144
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   145
\begin{center}
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   146
\begin{tabular}{ll}
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   147
(b***) & $\vdash u_1 : der\;c\;r_1$\\
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   148
       & $\vdash u_2 : r_2$\\
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   149
\end{tabular}
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   150
\end{center}
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   151
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   152
\noindent 
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   153
Instantiating the goal means we need to prove
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   154
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   155
\[
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   156
inj\; (r_1 \cdot r_2)\;c\;(Left(u_1\cdot u_2)) \succ_{r_1 \cdot r_2} 
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   157
inj\; (r_1 \cdot r_2)\;c\;(Right(w_2))
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   158
\]
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   159
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   160
\noindent 
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   161
We can simplify this according to the rules of $inj$:
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   162
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   163
\[
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   164
(inj\; r_1\;c\;u_1)\cdot u_2 \succ_{r_1 \cdot r_2} 
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   165
(mkeps\;r_1) \cdot (inj\; r_2\;c\;w_2)
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   166
\]
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   167
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   168
\noindent
58
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   169
This is what we need to prove. There are only two rules that
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   170
can be used to prove this judgement:
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   171
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   172
\begin{center}
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   173
\begin{tabular}{cc}
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   174
\begin{tabular}{c}
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   175
$v_1 = v_1'$\qquad $v_2 \succ_{r_2} v_2'$\\
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   176
\hline
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   177
$v_1\cdot v_2 \succ_{r_1\cdot r_2} v_1'\cdot v_2'$
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   178
\end{tabular} &
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   179
\begin{tabular}{c}
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   180
$v_1 \succ_{r_1} v_1'$\\
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   181
\hline
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   182
$v_1\cdot v_2 \succ_{r_1\cdot r_2} v_1'\cdot v_2'$
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   183
\end{tabular}
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   184
\end{tabular}
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   185
\end{center}
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   186
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   187
\noindent 
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   188
Using the left rule would mean we need to show that
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   189
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   190
\[
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   191
inj\; r_1\;c\;u_1 = mkeps\;r_1
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   192
\]
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   193
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   194
\noindent 
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   195
but this can never be the case.\footnote{Actually Isabelle
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   196
found this out after analysing its argument. ;o)} Lets assume
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   197
it would be true, then also if we flat each side, it must hold
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   198
that
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   199
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   200
\[
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   201
|inj\; r_1\;c\;u_1| = |mkeps\;r_1|
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   202
\]
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   203
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   204
\noindent 
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   205
But this leads to a contradiction, because the right-hand side
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   206
will be equal to the empty list, or empty string. This is 
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   207
because we assumed $nullable(r_1)$ and there is a lemma
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   208
called \texttt{mkeps\_flat} which shows this. On the other
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   209
side we know by assumption (b***) and lemma \texttt{v4} that 
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   210
the other side needs to be a string starting with $c$ (since
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   211
we inject $c$ into $u_1$). The empty string can never be equal 
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   212
to something starting with $c$\ldots therefore there is a 
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   213
contradiction.
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   214
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   215
That means we can only use the rule on the right-hand side to 
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   216
prove our goal. This implies we need to prove
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   217
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   218
\[
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   219
inj\; r_1\;c\;u_1 \succ_{r_1} mkeps\;r_1
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   220
\]
57
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   221
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   222
55
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   223
\subsubsection*{Case RL}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   224
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   225
The corresponding rule (instantiated) is:
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   226
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   227
\begin{center}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   228
\begin{tabular}{c}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   229
$len\,|w_1| > len\,|w_2|$\\
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   230
\hline
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   231
$Right(w_1) \succ_{(der\;c\;r_1) \cdot r_2 + der\;c\;r_2} Left(w_2)$
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   232
\end{tabular}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   233
\end{center}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   234
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   235
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   236
\end{document}