thys/notes.tex
author Christian Urban <christian dot urban at kcl dot ac dot uk>
Sat, 31 Jan 2015 18:21:03 +0000
changeset 60 2cdbab037861
parent 59 434ba43d0430
child 62 a6bb0152ccc2
permissions -rw-r--r--
added a preliminary part describing the main theorem
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}
60
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
     3
\usepackage{amsmath}
55
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     4
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     5
\begin{document}
60
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
     6
%%\linenumbers
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
     7
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
     8
\noindent 
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
     9
We already proved that
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    10
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    11
\[
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    12
\text{If}\;nullable(r)\;\text{then}\;POSIX\;(mkeps\; r)\;r
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    13
\]
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    14
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    15
\noindent 
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    16
holds. This is essentially the ``base case'' for the
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    17
correctness proof of the algorithm. For the ``induction
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    18
case'' we need the following main theorem, which we are 
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    19
currently after:
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    20
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    21
\begin{center}
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    22
\begin{tabular}{lll}
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    23
If & (*) & $POSIX\;v\;(der\;c\;r)$ and $\vdash v : der\;c\;r$\\
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    24
then & & $POSIX\;(inj\;r\;c\;v)\;r$
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    25
\end{tabular}
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    26
\end{center}
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    27
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    28
\noindent 
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    29
That means a POSIX value $v$ is still $POSIX$ after injection.
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    30
I am not sure whether this theorem is actually true in this
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    31
full generality. Maybe it requires some restrictions.
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    32
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    33
If we unfold the $POSIX$ definition in the then-part, we 
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    34
arrive at
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    35
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    36
\[
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    37
\forall v'.\;
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    38
\text{if}\;\vdash v' : r\; \text{and} \;|inj\;r\;c\;v| = |v'|\;
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    39
\text{then}\; |inj\;r\;c\;v| \succ_r v' 
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    40
\]
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    41
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    42
\noindent 
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    43
which is what we need to prove assuming the if-part (*) in the
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    44
theorem above. Since this is a universally quantified formula,
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    45
we just need to fix a $v'$. We can then prove the implication
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    46
by assuming
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    47
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    48
\[
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    49
\text{(a)}\;\;\vdash v' : r\;\; \text{and} \;\;
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    50
\text{(b)}\;\;inj\;r\;c\;v = |v'|
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    51
\]
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    52
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    53
\noindent 
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    54
and our goal is
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    55
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    56
\[
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    57
(goal)\;\;inj\;r\;c\;v \succ_r v'
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    58
\]
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    59
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    60
\noindent 
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    61
There are already two lemmas proved that can transform 
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    62
the assumptions (a) and (b) into
55
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    63
60
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    64
\[
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    65
\text{(a*)}\;\;\vdash proj\;r\;c\;v' : der\;c\;r\;\; \text{and} \;\;
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    66
\text{(b*)}\;\;c\,\#\,|v| = |v'|
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    67
\]
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    68
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    69
\noindent 
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    70
Another lemma shows that
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    71
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    72
\[
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    73
|v'| = c\,\#\,|proj\;r\;c\;v|
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    74
\]
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    75
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    76
\noindent 
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    77
Using (b*) we can therefore infer 
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    78
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    79
\[
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    80
\text{(b**)}\;\;|v| = |proj\;r\;c\;v|
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    81
\]
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    82
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    83
\noindent 
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    84
The main idea of the proof is now a simple instantiation
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    85
of the assumption $POSIX\;v\;(der\;c\;r)$. If we unfold 
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    86
the $POSIX$ definition, we get
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    87
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    88
\[
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    89
\forall v'.\;
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    90
\text{if}\;\vdash v' : der\;c\;r\; \text{and} \;|v| = |v'|\;
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    91
\text{then}\; v \succ_{der\;c\;r}\; v' 
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    92
\]
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    93
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    94
\noindent 
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    95
We can instantiate this $v'$ with $proj\;r\;c\;v'$ and can use 
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    96
(a*) and (b**) in order to infer
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    97
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    98
\[
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
    99
v \succ_{der\;c\;r}\; proj\;r\;c\;v'
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
   100
\]
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
   101
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
   102
\noindent 
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
   103
The point of the side-lemma below is that we can ``add'' an
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
   104
$inj$ to both sides to obtain
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
   105
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
   106
\[
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
   107
inj\;r\;c\;v \succ_r\; inj\;r\;c\;(proj\;r\;c\;v')
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
   108
\]
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
   109
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
   110
\noindent Finally there is already a lemma proved that shows
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
   111
that an injection and projection is the identity, meaning
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
   112
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
   113
\[
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
   114
inj\;r\;c\;(proj\;r\;c\;v') = v'
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
   115
\]
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
   116
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
   117
\noindent 
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
   118
With this we have shown our goal (pending a proof of the side-lemma 
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
   119
next).
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
   120
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
   121
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
   122
\subsection*{Side-Lemma}
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
   123
2cdbab037861 added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 59
diff changeset
   124
A side-lemma needed for the theorem above which might be true, but can also be false, is as follows:
55
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   125
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   126
\begin{center}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   127
\begin{tabular}{lll}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   128
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
   129
     & (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
   130
     & (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
   131
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
   132
\end{tabular}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   133
\end{center}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   134
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   135
\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
   136
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
   137
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
   138
$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
   139
\bigskip
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   140
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   141
\noindent
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   142
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
   143
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
   144
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
   145
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   146
\begin{center}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   147
$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
   148
\end{center}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   149
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   150
\noindent 
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   151
or without the parentheses
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   152
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   153
\begin{center}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   154
$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
   155
\end{center}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   156
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   157
\noindent 
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   158
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
   159
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   160
\begin{center}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   161
\begin{tabular}{ll}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   162
(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
   163
(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
   164
(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
   165
(d) & $nullable(r_1)$
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   166
\end{tabular}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   167
\end{center}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   168
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   169
\noindent 
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   170
The induction hypotheses are
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   171
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   172
\begin{center}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   173
\begin{tabular}{ll}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   174
(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
   175
\;\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
   176
\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
   177
      & $\hfill\longrightarrow
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   178
         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
   179
(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
   180
\;\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
   181
\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
   182
      & $\hfill\longrightarrow
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   183
         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
   184
\end{tabular}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   185
\end{center}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   186
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   187
\noindent 
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   188
The goal is
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   189
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   190
\[
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   191
(goal)\qquad
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   192
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
   193
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
   194
\]
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   195
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   196
\noindent 
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   197
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
   198
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
   199
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   200
\begin{center}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   201
\begin{tabular}{ll}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   202
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
   203
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
   204
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
   205
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
   206
\end{tabular}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   207
\end{center}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   208
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   209
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   210
\noindent 
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   211
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
   212
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   213
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   214
\subsubsection*{Case LR}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   215
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   216
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
   217
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   218
\begin{center}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   219
\begin{tabular}{c}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   220
$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
   221
\hline
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   222
$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
   223
\end{tabular}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   224
\end{center}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   225
57
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   226
\noindent 
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   227
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
   228
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   229
\[
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   230
(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
   231
\] 
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   232
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   233
\noindent 
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   234
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
   235
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
   236
gives us
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   237
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   238
\begin{center}
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   239
\begin{tabular}{ll}
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   240
(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
   241
(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
   242
\end{tabular}
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   243
\end{center}
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   244
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   245
\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
   246
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
   247
\_ : \_\,$. This gives us two new assumptions
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   248
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   249
\begin{center}
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   250
\begin{tabular}{ll}
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   251
(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
   252
(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
   253
\end{tabular}
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   254
\end{center}
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   255
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   256
\noindent 
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   257
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
   258
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
   259
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
   260
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   261
\begin{center}
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   262
\begin{tabular}{ll}
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   263
(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
   264
       & $\vdash u_2 : r_2$\\
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   265
\end{tabular}
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   266
\end{center}
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   267
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   268
\noindent 
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   269
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
   270
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   271
\[
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   272
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
   273
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
   274
\]
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   275
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   276
\noindent 
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   277
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
   278
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   279
\[
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   280
(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
   281
(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
   282
\]
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   283
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   284
\noindent
58
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   285
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
   286
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
   287
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   288
\begin{center}
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   289
\begin{tabular}{cc}
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   290
\begin{tabular}{c}
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   291
$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
   292
\hline
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   293
$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
   294
\end{tabular} &
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   295
\begin{tabular}{c}
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   296
$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
   297
\hline
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   298
$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
   299
\end{tabular}
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   300
\end{tabular}
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   301
\end{center}
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   302
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   303
\noindent 
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   304
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
   305
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   306
\[
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   307
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
   308
\]
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   309
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   310
\noindent 
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   311
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
   312
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
   313
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
   314
that
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   315
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   316
\[
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   317
|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
   318
\]
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   319
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   320
\noindent 
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   321
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
   322
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
   323
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
   324
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
   325
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
   326
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
   327
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
   328
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
   329
contradiction.
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   330
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   331
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
   332
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
   333
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   334
\[
1769b702d4dc updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 57
diff changeset
   335
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
   336
\]
57
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   337
7093e600ec2c updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 55
diff changeset
   338
55
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   339
\subsubsection*{Case RL}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   340
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   341
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
   342
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   343
\begin{center}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   344
\begin{tabular}{c}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   345
$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
   346
\hline
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   347
$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
   348
\end{tabular}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   349
\end{center}
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   350
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   351
c33cfa1e813a added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   352
\end{document}