author | Christian Urban <christian dot urban at kcl dot ac dot uk> |
Mon, 07 Mar 2016 18:56:41 +0000 | |
changeset 121 | 4c85af262ee7 |
parent 75 | f95a405c3180 |
permissions | -rw-r--r-- |
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} |
72
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
4 |
\usepackage{stmaryrd} |
55
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
5 |
|
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
6 |
\begin{document} |
71
2d30c74ba67f
added a section about a nullable proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
7 |
%%%\linenumbers |
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
|
8 |
|
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 |
\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
|
10 |
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
|
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 |
\[ |
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 |
\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
|
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 |
|
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 |
\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
|
17 |
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
|
18 |
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
|
19 |
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
|
20 |
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
|
21 |
|
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{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
|
23 |
\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
|
24 |
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
|
25 |
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
|
26 |
\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
|
27 |
\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
|
28 |
|
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 |
\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
|
30 |
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
|
31 |
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
|
32 |
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
|
33 |
|
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 |
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
|
35 |
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
|
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 |
\[ |
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 |
\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
|
39 |
\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
|
40 |
\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
|
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 |
|
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 |
\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
|
44 |
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
|
45 |
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
|
46 |
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
|
47 |
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
|
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 |
\[ |
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{(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
|
51 |
\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
|
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 |
|
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 |
\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
|
55 |
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
|
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 |
\[ |
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 |
(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
|
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 |
|
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 |
\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
|
62 |
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
|
63 |
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
|
64 |
|
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
|
65 |
\[ |
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{(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
|
67 |
\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
|
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 |
|
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 |
\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
|
71 |
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
|
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 |
\[ |
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 |
|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
|
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 |
|
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 |
\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
|
78 |
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
|
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 |
\[ |
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 |
\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
|
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 |
|
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 |
\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
|
85 |
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
|
86 |
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
|
87 |
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
|
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 |
\[ |
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 |
\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
|
91 |
\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
|
92 |
\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
|
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 |
|
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 |
\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
|
96 |
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
|
97 |
(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
|
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 |
\[ |
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 |
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
|
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 |
|
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 |
\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
|
104 |
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
|
105 |
$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
|
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 |
\[ |
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 |
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
|
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 |
|
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 |
\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
|
112 |
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
|
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 |
\[ |
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 |
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
|
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 |
|
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 |
\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
|
119 |
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
|
120 |
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
|
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 |
|
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 |
\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
|
124 |
|
2cdbab037861
added a preliminary part describing the main theorem
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
59
diff
changeset
|
125 |
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
|
126 |
|
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
127 |
\begin{center} |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
128 |
\begin{tabular}{lll} |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
129 |
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
|
130 |
& (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
|
131 |
& (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
|
132 |
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
|
133 |
\end{tabular} |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
134 |
\end{center} |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
135 |
|
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
136 |
\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
|
137 |
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
|
138 |
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
|
139 |
$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
|
140 |
\bigskip |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
141 |
|
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
142 |
\noindent |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
143 |
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
|
144 |
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
|
145 |
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
|
146 |
|
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
147 |
\begin{center} |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
148 |
$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
|
149 |
\end{center} |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
150 |
|
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
151 |
\noindent |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
152 |
or without the parentheses |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
153 |
|
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
154 |
\begin{center} |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
155 |
$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
|
156 |
\end{center} |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
157 |
|
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
158 |
\noindent |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
159 |
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
|
160 |
|
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
161 |
\begin{center} |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
162 |
\begin{tabular}{ll} |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
163 |
(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
|
164 |
(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
|
165 |
(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
|
166 |
(d) & $nullable(r_1)$ |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
167 |
\end{tabular} |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
168 |
\end{center} |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
169 |
|
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
170 |
\noindent |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
171 |
The induction hypotheses are |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
172 |
|
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
173 |
\begin{center} |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
174 |
\begin{tabular}{ll} |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
175 |
(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
|
176 |
\;\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
|
177 |
\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
|
178 |
& $\hfill\longrightarrow |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
179 |
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
|
180 |
(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
|
181 |
\;\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
|
182 |
\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
|
183 |
& $\hfill\longrightarrow |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
184 |
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
|
185 |
\end{tabular} |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
186 |
\end{center} |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
187 |
|
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
188 |
\noindent |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
189 |
The goal is |
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 |
\[ |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
192 |
(goal)\qquad |
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_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
|
194 |
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
|
195 |
\] |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
196 |
|
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
197 |
\noindent |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
198 |
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
|
199 |
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
|
200 |
|
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
201 |
\begin{center} |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
202 |
\begin{tabular}{ll} |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
203 |
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
|
204 |
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
|
205 |
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
|
206 |
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
|
207 |
\end{tabular} |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
208 |
\end{center} |
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 |
|
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
211 |
\noindent |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
212 |
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
|
213 |
|
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
214 |
|
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
215 |
\subsubsection*{Case LR} |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
216 |
|
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
217 |
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
|
218 |
|
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
219 |
\begin{center} |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
220 |
\begin{tabular}{c} |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
221 |
$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
|
222 |
\hline |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
223 |
$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
|
224 |
\end{tabular} |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
225 |
\end{center} |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
226 |
|
57
7093e600ec2c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
55
diff
changeset
|
227 |
\noindent |
7093e600ec2c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
55
diff
changeset
|
228 |
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
|
229 |
|
7093e600ec2c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
55
diff
changeset
|
230 |
\[ |
7093e600ec2c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
55
diff
changeset
|
231 |
(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
|
232 |
\] |
7093e600ec2c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
55
diff
changeset
|
233 |
|
7093e600ec2c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
55
diff
changeset
|
234 |
\noindent |
7093e600ec2c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
55
diff
changeset
|
235 |
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
|
236 |
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
|
237 |
gives us |
7093e600ec2c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
55
diff
changeset
|
238 |
|
7093e600ec2c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
55
diff
changeset
|
239 |
\begin{center} |
7093e600ec2c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
55
diff
changeset
|
240 |
\begin{tabular}{ll} |
7093e600ec2c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
55
diff
changeset
|
241 |
(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
|
242 |
(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
|
243 |
\end{tabular} |
7093e600ec2c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
55
diff
changeset
|
244 |
\end{center} |
7093e600ec2c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
55
diff
changeset
|
245 |
|
7093e600ec2c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
55
diff
changeset
|
246 |
\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
|
247 |
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
|
248 |
\_ : \_\,$. This gives us two new assumptions |
7093e600ec2c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
55
diff
changeset
|
249 |
|
7093e600ec2c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
55
diff
changeset
|
250 |
\begin{center} |
7093e600ec2c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
55
diff
changeset
|
251 |
\begin{tabular}{ll} |
7093e600ec2c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
55
diff
changeset
|
252 |
(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
|
253 |
(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
|
254 |
\end{tabular} |
7093e600ec2c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
55
diff
changeset
|
255 |
\end{center} |
7093e600ec2c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
55
diff
changeset
|
256 |
|
7093e600ec2c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
55
diff
changeset
|
257 |
\noindent |
7093e600ec2c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
55
diff
changeset
|
258 |
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
|
259 |
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
|
260 |
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
|
261 |
|
7093e600ec2c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
55
diff
changeset
|
262 |
\begin{center} |
7093e600ec2c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
55
diff
changeset
|
263 |
\begin{tabular}{ll} |
7093e600ec2c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
55
diff
changeset
|
264 |
(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
|
265 |
& $\vdash u_2 : r_2$\\ |
7093e600ec2c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
55
diff
changeset
|
266 |
\end{tabular} |
7093e600ec2c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
55
diff
changeset
|
267 |
\end{center} |
7093e600ec2c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
55
diff
changeset
|
268 |
|
7093e600ec2c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
55
diff
changeset
|
269 |
\noindent |
7093e600ec2c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
55
diff
changeset
|
270 |
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
|
271 |
|
7093e600ec2c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
55
diff
changeset
|
272 |
\[ |
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\;(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
|
274 |
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
|
275 |
\] |
7093e600ec2c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
55
diff
changeset
|
276 |
|
7093e600ec2c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
55
diff
changeset
|
277 |
\noindent |
7093e600ec2c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
55
diff
changeset
|
278 |
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
|
279 |
|
7093e600ec2c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
55
diff
changeset
|
280 |
\[ |
7093e600ec2c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
55
diff
changeset
|
281 |
(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
|
282 |
(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
|
283 |
\] |
7093e600ec2c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
55
diff
changeset
|
284 |
|
7093e600ec2c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
55
diff
changeset
|
285 |
\noindent |
58
1769b702d4dc
updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
57
diff
changeset
|
286 |
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
|
287 |
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
|
288 |
|
1769b702d4dc
updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
57
diff
changeset
|
289 |
\begin{center} |
1769b702d4dc
updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
57
diff
changeset
|
290 |
\begin{tabular}{cc} |
1769b702d4dc
updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
57
diff
changeset
|
291 |
\begin{tabular}{c} |
1769b702d4dc
updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
57
diff
changeset
|
292 |
$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
|
293 |
\hline |
1769b702d4dc
updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
57
diff
changeset
|
294 |
$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
|
295 |
\end{tabular} & |
1769b702d4dc
updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
57
diff
changeset
|
296 |
\begin{tabular}{c} |
1769b702d4dc
updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
57
diff
changeset
|
297 |
$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
|
298 |
\hline |
1769b702d4dc
updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
57
diff
changeset
|
299 |
$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
|
300 |
\end{tabular} |
1769b702d4dc
updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
57
diff
changeset
|
301 |
\end{tabular} |
1769b702d4dc
updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
57
diff
changeset
|
302 |
\end{center} |
1769b702d4dc
updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
57
diff
changeset
|
303 |
|
1769b702d4dc
updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
57
diff
changeset
|
304 |
\noindent |
1769b702d4dc
updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
57
diff
changeset
|
305 |
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
|
306 |
|
1769b702d4dc
updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
57
diff
changeset
|
307 |
\[ |
1769b702d4dc
updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
57
diff
changeset
|
308 |
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
|
309 |
\] |
1769b702d4dc
updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
57
diff
changeset
|
310 |
|
1769b702d4dc
updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
57
diff
changeset
|
311 |
\noindent |
1769b702d4dc
updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
57
diff
changeset
|
312 |
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
|
313 |
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
|
314 |
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
|
315 |
that |
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 |
\[ |
1769b702d4dc
updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
57
diff
changeset
|
318 |
|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
|
319 |
\] |
1769b702d4dc
updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
57
diff
changeset
|
320 |
|
1769b702d4dc
updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
57
diff
changeset
|
321 |
\noindent |
1769b702d4dc
updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
57
diff
changeset
|
322 |
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
|
323 |
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
|
324 |
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
|
325 |
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
|
326 |
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
|
327 |
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
|
328 |
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
|
329 |
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
|
330 |
contradiction. |
1769b702d4dc
updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
57
diff
changeset
|
331 |
|
1769b702d4dc
updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
57
diff
changeset
|
332 |
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
|
333 |
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
|
334 |
|
1769b702d4dc
updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
57
diff
changeset
|
335 |
\[ |
1769b702d4dc
updated more
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
57
diff
changeset
|
336 |
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
|
337 |
\] |
57
7093e600ec2c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
55
diff
changeset
|
338 |
|
7093e600ec2c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
55
diff
changeset
|
339 |
|
55
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
340 |
\subsubsection*{Case RL} |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
341 |
|
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
342 |
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
|
343 |
|
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
344 |
\begin{center} |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
345 |
\begin{tabular}{c} |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
346 |
$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
|
347 |
\hline |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
348 |
$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
|
349 |
\end{tabular} |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
350 |
\end{center} |
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
351 |
|
71
2d30c74ba67f
added a section about a nullable proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
352 |
\subsection*{Test Proof} |
2d30c74ba67f
added a section about a nullable proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
353 |
|
2d30c74ba67f
added a section about a nullable proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
354 |
We want to prove that |
2d30c74ba67f
added a section about a nullable proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
355 |
|
2d30c74ba67f
added a section about a nullable proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
356 |
\[ |
2d30c74ba67f
added a section about a nullable proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
357 |
nullable(r) \;\text{implies}\; POSIX (mkeps\; r)\; r |
2d30c74ba67f
added a section about a nullable proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
358 |
\] |
2d30c74ba67f
added a section about a nullable proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
359 |
|
2d30c74ba67f
added a section about a nullable proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
360 |
\noindent |
2d30c74ba67f
added a section about a nullable proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
361 |
We prove this by induction on $r$. There are 5 subcases, and |
2d30c74ba67f
added a section about a nullable proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
362 |
only the $r_1 + r_2$-case is interesting. In this case we know the |
2d30c74ba67f
added a section about a nullable proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
363 |
induction hypotheses are |
2d30c74ba67f
added a section about a nullable proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
364 |
|
2d30c74ba67f
added a section about a nullable proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
365 |
\begin{center} |
2d30c74ba67f
added a section about a nullable proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
366 |
\begin{tabular}{ll} |
2d30c74ba67f
added a section about a nullable proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
367 |
(IMP1) & $nullable(r_1) \;\text{implies}\; |
2d30c74ba67f
added a section about a nullable proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
368 |
POSIX (mkeps\; r_1)\; r_1$ \\ |
2d30c74ba67f
added a section about a nullable proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
369 |
(IMP2) & $nullable(r_2) \;\text{implies}\; |
2d30c74ba67f
added a section about a nullable proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
370 |
POSIX (mkeps\; r_2)\; r_2$ |
2d30c74ba67f
added a section about a nullable proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
371 |
\end{tabular} |
2d30c74ba67f
added a section about a nullable proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
372 |
\end{center} |
2d30c74ba67f
added a section about a nullable proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
373 |
|
2d30c74ba67f
added a section about a nullable proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
374 |
\noindent and know that $nullable(r_1 + r_2)$ holds. From this |
2d30c74ba67f
added a section about a nullable proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
375 |
we know that either $nullable(r_1)$ holds or $nullable(r_2)$. |
2d30c74ba67f
added a section about a nullable proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
376 |
Let us consider the first case where we know $nullable(r_1)$. |
2d30c74ba67f
added a section about a nullable proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
377 |
|
2d30c74ba67f
added a section about a nullable proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
378 |
|
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
60
diff
changeset
|
379 |
\subsection*{Problems in the paper proof} |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
60
diff
changeset
|
380 |
|
72
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
381 |
I cannot verify\ldots |
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
382 |
|
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
383 |
|
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
384 |
|
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
385 |
\newpage |
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
386 |
\section*{Isabelle Cheat-Sheet} |
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
387 |
|
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
388 |
\begin{itemize} |
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
389 |
\item The main notion in Isabelle is a \emph{theorem}. |
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
390 |
Definitions, inductive predicates and recursive |
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
391 |
functions all have underlying theorems. If a definition |
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
392 |
is called \texttt{foo}, then the theorem will be called |
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
393 |
\texttt{foo\_def}. Take a recursive function, say |
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
394 |
\texttt{bar}, it will have a theorem that is called |
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
395 |
\texttt{bar.simps} and will be added to the simplifier. |
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
396 |
That means the simplifier will automatically |
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
397 |
Inductive predicates called \texttt{baz} will be called |
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
398 |
\texttt{baz.intros}. For inductive predicates, there are |
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
399 |
also theorems \texttt{baz.induct} and |
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
400 |
\texttt{baz.cases}. |
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
401 |
|
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
402 |
\item A \emph{goal-state} consists of one or more subgoals. If |
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
403 |
there are \texttt{No more subgoals!} then the theorem is |
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
404 |
proved. Each subgoal is of the form |
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
405 |
|
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
406 |
\[ |
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
407 |
\llbracket \ldots{}premises\ldots \rrbracket \Longrightarrow |
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
408 |
conclusion |
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
409 |
\] |
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
410 |
|
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
411 |
\noindent |
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
412 |
where $premises$ and $conclusion$ are formulas of type |
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
413 |
\texttt{bool}. |
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
414 |
|
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
415 |
\item There are three low-level methods for applying one or |
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
416 |
more theorem to a subgoal, called \texttt{rule}, |
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
417 |
\texttt{drule} and \texttt{erule}. The first applies a |
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
418 |
theorem to a conclusion of a goal. For example |
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
419 |
|
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
420 |
\[\texttt{apply}(\texttt{rule}\;thm) |
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
421 |
\] |
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
422 |
|
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
423 |
If the conclusion is of the form $\_ \wedge \_$, |
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
424 |
$\_ \longrightarrow \_$ and $\forall\,x. \_$ the |
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
425 |
$thm$ is called |
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
426 |
|
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
427 |
\begin{center} |
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
428 |
\begin{tabular}{lcl} |
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
429 |
$\_ \wedge \_$ & $\Rightarrow$ & $conjI$\\ |
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
430 |
$\_ \longrightarrow \_$ & $\Rightarrow$ & $impI$\\ |
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
431 |
$\forall\,x.\_$ & $\Rightarrow$ & $allI$ |
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
432 |
\end{tabular} |
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
433 |
\end{center} |
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
434 |
|
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
435 |
Many of such rule are called intro-rules and end with |
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
436 |
an ``$I$'', or in case of inductive predicates $\_.intros$. |
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
437 |
|
75
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
438 |
|
72
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
439 |
\end{itemize} |
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
440 |
|
55
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
441 |
|
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
442 |
\end{document} |