author | Christian Urban <christian dot urban at kcl dot ac dot uk> |
Thu, 14 Jan 2016 17:19:40 +0000 | |
changeset 88 | 532bb9df225d |
parent 81 | 7ac7782a7318 |
permissions | -rw-r--r-- |
56
5bc72d6d633d
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
55
diff
changeset
|
1 |
|
11
26b8a5213355
changed theory name
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
10
diff
changeset
|
2 |
theory Re1 |
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3 |
imports "Main" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
4 |
begin |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
5 |
|
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
6 |
|
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
7 |
section {* Sequential Composition of Sets *} |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
8 |
|
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
9 |
definition |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
10 |
Sequ :: "string set \<Rightarrow> string set \<Rightarrow> string set" ("_ ;; _" [100,100] 100) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
11 |
where |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
12 |
"A ;; B = {s1 @ s2 | s1 s2. s1 \<in> A \<and> s2 \<in> B}" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
13 |
|
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
14 |
text {* Two Simple Properties about Sequential Composition *} |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
15 |
|
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
16 |
lemma seq_empty [simp]: |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
17 |
shows "A ;; {[]} = A" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
18 |
and "{[]} ;; A = A" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
19 |
by (simp_all add: Sequ_def) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
20 |
|
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
21 |
lemma seq_null [simp]: |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
22 |
shows "A ;; {} = {}" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
23 |
and "{} ;; A = {}" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
24 |
by (simp_all add: Sequ_def) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
25 |
|
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
26 |
section {* Regular Expressions *} |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
27 |
|
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
28 |
datatype rexp = |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
29 |
NULL |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
30 |
| EMPTY |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
31 |
| CHAR char |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
32 |
| SEQ rexp rexp |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
33 |
| ALT rexp rexp |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
34 |
|
75
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
35 |
fun SEQS :: "rexp \<Rightarrow> rexp list \<Rightarrow> rexp" |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
36 |
where |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
37 |
"SEQS r [] = r" |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
38 |
| "SEQS r (r'#rs) = SEQ r (SEQS r' rs)" |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
39 |
|
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
40 |
section {* Semantics of Regular Expressions *} |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
41 |
|
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
42 |
fun |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
43 |
L :: "rexp \<Rightarrow> string set" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
44 |
where |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
45 |
"L (NULL) = {}" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
46 |
| "L (EMPTY) = {[]}" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
47 |
| "L (CHAR c) = {[c]}" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
48 |
| "L (SEQ r1 r2) = (L r1) ;; (L r2)" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
49 |
| "L (ALT r1 r2) = (L r1) \<union> (L r2)" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
50 |
|
79
ca8f9645db69
added frisch / cardelli paper
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
78
diff
changeset
|
51 |
fun zeroable where |
ca8f9645db69
added frisch / cardelli paper
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
78
diff
changeset
|
52 |
"zeroable NULL = True" |
ca8f9645db69
added frisch / cardelli paper
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
78
diff
changeset
|
53 |
| "zeroable EMPTY = False" |
ca8f9645db69
added frisch / cardelli paper
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
78
diff
changeset
|
54 |
| "zeroable (CHAR c) = False" |
ca8f9645db69
added frisch / cardelli paper
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
78
diff
changeset
|
55 |
| "zeroable (ALT r1 r2) = (zeroable r1 \<and> zeroable r2)" |
ca8f9645db69
added frisch / cardelli paper
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
78
diff
changeset
|
56 |
| "zeroable (SEQ r1 r2) = (zeroable r1 \<or> zeroable r2)" |
ca8f9645db69
added frisch / cardelli paper
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
78
diff
changeset
|
57 |
|
ca8f9645db69
added frisch / cardelli paper
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
78
diff
changeset
|
58 |
lemma L_ALT_cases: |
ca8f9645db69
added frisch / cardelli paper
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
78
diff
changeset
|
59 |
"L (ALT r1 r2) \<noteq> {} \<Longrightarrow> (L r1 \<noteq> {}) \<or> (L r1 = {} \<and> L r2 \<noteq> {})" |
ca8f9645db69
added frisch / cardelli paper
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
78
diff
changeset
|
60 |
by(auto) |
ca8f9645db69
added frisch / cardelli paper
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
78
diff
changeset
|
61 |
|
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
62 |
fun |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
63 |
nullable :: "rexp \<Rightarrow> bool" |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
64 |
where |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
65 |
"nullable (NULL) = False" |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
66 |
| "nullable (EMPTY) = True" |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
67 |
| "nullable (CHAR c) = False" |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
68 |
| "nullable (ALT r1 r2) = (nullable r1 \<or> nullable r2)" |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
69 |
| "nullable (SEQ r1 r2) = (nullable r1 \<and> nullable r2)" |
70 | 70 |
|
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
71 |
lemma nullable_correctness: |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
72 |
shows "nullable r \<longleftrightarrow> [] \<in> (L r)" |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
73 |
apply (induct r) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
74 |
apply(auto simp add: Sequ_def) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
75 |
done |
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
76 |
|
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
77 |
section {* Values *} |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
78 |
|
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
79 |
datatype val = |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
80 |
Void |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
81 |
| Char char |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
82 |
| Seq val val |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
83 |
| Right val |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
84 |
| Left val |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
85 |
|
75
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
86 |
|
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
87 |
fun Seqs :: "val \<Rightarrow> val list \<Rightarrow> val" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
88 |
where |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
89 |
"Seqs v [] = v" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
90 |
| "Seqs v (v'#vs) = Seqs (Seq v v') vs" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
91 |
|
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
92 |
section {* The string behind a value *} |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
93 |
|
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
94 |
fun flat :: "val \<Rightarrow> string" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
95 |
where |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
96 |
"flat(Void) = []" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
97 |
| "flat(Char c) = [c]" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
98 |
| "flat(Left v) = flat(v)" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
99 |
| "flat(Right v) = flat(v)" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
100 |
| "flat(Seq v1 v2) = flat(v1) @ flat(v2)" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
101 |
|
48
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
102 |
fun flats :: "val \<Rightarrow> string list" |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
103 |
where |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
104 |
"flats(Void) = [[]]" |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
105 |
| "flats(Char c) = [[c]]" |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
106 |
| "flats(Left v) = flats(v)" |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
107 |
| "flats(Right v) = flats(v)" |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
108 |
| "flats(Seq v1 v2) = (flats v1) @ (flats v2)" |
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
109 |
|
70 | 110 |
value "flats(Seq(Char c)(Char b))" |
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
111 |
|
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
112 |
section {* Relation between values and regular expressions *} |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
113 |
|
79
ca8f9645db69
added frisch / cardelli paper
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
78
diff
changeset
|
114 |
|
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
115 |
inductive Prfs :: "string \<Rightarrow> val \<Rightarrow> rexp \<Rightarrow> bool" ("\<Turnstile>_ _ : _" [100, 100, 100] 100) |
76
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
116 |
where |
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
117 |
"\<lbrakk>\<Turnstile>s1 v1 : r1; \<Turnstile>s2 v2 : r2\<rbrakk> \<Longrightarrow> \<Turnstile>(s1 @ s2) (Seq v1 v2) : SEQ r1 r2" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
118 |
| "\<Turnstile>s v1 : r1 \<Longrightarrow> \<Turnstile>s (Left v1) : ALT r1 r2" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
119 |
| "\<Turnstile>s v2 : r2 \<Longrightarrow> \<Turnstile>s (Right v2) : ALT r1 r2" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
120 |
| "\<Turnstile>[] Void : EMPTY" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
121 |
| "\<Turnstile>[c] (Char c) : CHAR c" |
76
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
122 |
|
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
123 |
lemma Prfs_flat: |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
124 |
"\<Turnstile>s v : r \<Longrightarrow> flat v = s" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
125 |
apply(induct s v r rule: Prfs.induct) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
126 |
apply(auto) |
76
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
127 |
done |
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
128 |
|
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
129 |
inductive Prfn :: "nat \<Rightarrow> val \<Rightarrow> rexp \<Rightarrow> bool" ("\<TTurnstile>_ _ : _" [100, 100, 100] 100) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
130 |
where |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
131 |
"\<lbrakk>\<TTurnstile>n1 v1 : r1; \<TTurnstile>n2 v2 : r2\<rbrakk> \<Longrightarrow> \<TTurnstile>(n1 + n2) (Seq v1 v2) : SEQ r1 r2" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
132 |
| "\<TTurnstile>n v1 : r1 \<Longrightarrow> \<TTurnstile>n (Left v1) : ALT r1 r2" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
133 |
| "\<TTurnstile>n v2 : r2 \<Longrightarrow> \<TTurnstile>n (Right v2) : ALT r1 r2" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
134 |
| "\<TTurnstile>0 Void : EMPTY" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
135 |
| "\<TTurnstile>1 (Char c) : CHAR c" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
136 |
|
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
137 |
lemma Prfn_flat: |
79
ca8f9645db69
added frisch / cardelli paper
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
78
diff
changeset
|
138 |
"\<TTurnstile>n v : r \<Longrightarrow> length (flat v) = n" |
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
139 |
apply(induct rule: Prfn.induct) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
140 |
apply(auto) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
141 |
done |
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
142 |
|
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
143 |
inductive Prf :: "val \<Rightarrow> rexp \<Rightarrow> bool" ("\<turnstile> _ : _" [100, 100] 100) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
144 |
where |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
145 |
"\<lbrakk>\<turnstile> v1 : r1; \<turnstile> v2 : r2\<rbrakk> \<Longrightarrow> \<turnstile> Seq v1 v2 : SEQ r1 r2" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
146 |
| "\<turnstile> v1 : r1 \<Longrightarrow> \<turnstile> Left v1 : ALT r1 r2" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
147 |
| "\<turnstile> v2 : r2 \<Longrightarrow> \<turnstile> Right v2 : ALT r1 r2" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
148 |
| "\<turnstile> Void : EMPTY" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
149 |
| "\<turnstile> Char c : CHAR c" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
150 |
|
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
151 |
lemma Prf_Prfn: |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
152 |
shows "\<turnstile> v : r \<Longrightarrow> \<TTurnstile>(length (flat v)) v : r" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
153 |
apply(induct v r rule: Prf.induct) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
154 |
apply(auto intro: Prfn.intros) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
155 |
by (metis One_nat_def Prfn.intros(5)) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
156 |
|
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
157 |
lemma Prfn_Prf: |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
158 |
shows "\<TTurnstile>n v : r \<Longrightarrow> \<turnstile> v : r" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
159 |
apply(induct n v r rule: Prfn.induct) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
160 |
apply(auto intro: Prf.intros) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
161 |
done |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
162 |
|
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
163 |
lemma Prf_Prfs: |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
164 |
shows "\<turnstile> v : r \<Longrightarrow> \<Turnstile>(flat v) v : r" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
165 |
apply(induct v r rule: Prf.induct) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
166 |
apply(auto intro: Prfs.intros) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
167 |
done |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
168 |
|
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
169 |
lemma Prfs_Prf: |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
170 |
shows "\<Turnstile>s v : r \<Longrightarrow> \<turnstile> v : r" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
171 |
apply(induct s v r rule: Prfs.induct) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
172 |
apply(auto intro: Prf.intros) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
173 |
done |
75
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
174 |
|
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
175 |
lemma not_nullable_flat: |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
176 |
assumes "\<turnstile> v : r" "\<not>nullable r" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
177 |
shows "flat v \<noteq> []" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
178 |
using assms |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
179 |
apply(induct) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
180 |
apply(auto) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
181 |
done |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
182 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
183 |
|
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
184 |
fun mkeps :: "rexp \<Rightarrow> val" |
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
185 |
where |
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
186 |
"mkeps(EMPTY) = Void" |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
187 |
| "mkeps(SEQ r1 r2) = Seq (mkeps r1) (mkeps r2)" |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
188 |
| "mkeps(ALT r1 r2) = (if nullable(r1) then Left (mkeps r1) else Right (mkeps r2))" |
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
189 |
|
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
190 |
lemma mkeps_nullable: |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
191 |
assumes "nullable(r)" shows "\<turnstile> mkeps r : r" |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
192 |
using assms |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
193 |
apply(induct rule: nullable.induct) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
194 |
apply(auto intro: Prf.intros) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
195 |
done |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
196 |
|
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
197 |
lemma mkeps_nullable_n: |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
198 |
assumes "nullable(r)" shows "\<TTurnstile>0 (mkeps r) : r" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
199 |
using assms |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
200 |
apply(induct rule: nullable.induct) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
201 |
apply(auto intro: Prfn.intros) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
202 |
apply(drule Prfn.intros(1)) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
203 |
apply(assumption) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
204 |
apply(simp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
205 |
done |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
206 |
|
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
207 |
lemma mkeps_nullable_s: |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
208 |
assumes "nullable(r)" shows "\<Turnstile>[] (mkeps r) : r" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
209 |
using assms |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
210 |
apply(induct rule: nullable.induct) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
211 |
apply(auto intro: Prfs.intros) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
212 |
apply(drule Prfs.intros(1)) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
213 |
apply(assumption) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
214 |
apply(simp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
215 |
done |
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
216 |
|
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
217 |
lemma mkeps_flat: |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
218 |
assumes "nullable(r)" shows "flat (mkeps r) = []" |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
219 |
using assms |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
220 |
apply(induct rule: nullable.induct) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
221 |
apply(auto) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
222 |
done |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
223 |
|
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
224 |
text {* |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
225 |
The value mkeps returns is always the correct POSIX |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
226 |
value. |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
227 |
*} |
70 | 228 |
|
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
229 |
lemma Prf_flat_L: |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
230 |
assumes "\<turnstile> v : r" shows "flat v \<in> L r" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
231 |
using assms |
75
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
232 |
apply(induct v r rule: Prf.induct) |
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
233 |
apply(auto simp add: Sequ_def) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
234 |
done |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
235 |
|
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
236 |
lemma L_flat_Prf: |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
237 |
"L(r) = {flat v | v. \<turnstile> v : r}" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
238 |
apply(induct r) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
239 |
apply(auto dest: Prf_flat_L simp add: Sequ_def) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
240 |
apply (metis Prf.intros(4) flat.simps(1)) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
241 |
apply (metis Prf.intros(5) flat.simps(2)) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
242 |
apply (metis Prf.intros(1) flat.simps(5)) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
243 |
apply (metis Prf.intros(2) flat.simps(3)) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
244 |
apply (metis Prf.intros(3) flat.simps(4)) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
245 |
apply(erule Prf.cases) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
246 |
apply(auto) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
247 |
done |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
248 |
|
79
ca8f9645db69
added frisch / cardelli paper
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
78
diff
changeset
|
249 |
|
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
250 |
definition prefix :: "string \<Rightarrow> string \<Rightarrow> bool" ("_ \<sqsubseteq> _" [100, 100] 100) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
251 |
where |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
252 |
"s1 \<sqsubseteq> s2 \<equiv> \<exists>s3. s1 @ s3 = s2" |
48
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
253 |
|
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
254 |
definition sprefix :: "string \<Rightarrow> string \<Rightarrow> bool" ("_ \<sqsubset> _" [100, 100] 100) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
255 |
where |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
256 |
"s1 \<sqsubset> s2 \<equiv> (s1 \<sqsubseteq> s2 \<and> s1 \<noteq> s2)" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
257 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
258 |
lemma length_sprefix: |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
259 |
"s1 \<sqsubset> s2 \<Longrightarrow> length s1 < length s2" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
260 |
unfolding sprefix_def prefix_def |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
261 |
by (auto) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
262 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
263 |
definition Prefixes :: "string \<Rightarrow> string set" where |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
264 |
"Prefixes s \<equiv> {sp. sp \<sqsubseteq> s}" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
265 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
266 |
definition Suffixes :: "string \<Rightarrow> string set" where |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
267 |
"Suffixes s \<equiv> rev ` (Prefixes (rev s))" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
268 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
269 |
lemma Suffixes_in: |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
270 |
"\<exists>s1. s1 @ s2 = s3 \<Longrightarrow> s2 \<in> Suffixes s3" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
271 |
unfolding Suffixes_def Prefixes_def prefix_def image_def |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
272 |
apply(auto) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
273 |
by (metis rev_rev_ident) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
274 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
275 |
lemma Prefixes_Cons: |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
276 |
"Prefixes (c # s) = {[]} \<union> {c # sp | sp. sp \<in> Prefixes s}" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
277 |
unfolding Prefixes_def prefix_def |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
278 |
apply(auto simp add: append_eq_Cons_conv) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
279 |
done |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
280 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
281 |
lemma finite_Prefixes: |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
282 |
"finite (Prefixes s)" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
283 |
apply(induct s) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
284 |
apply(auto simp add: Prefixes_def prefix_def)[1] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
285 |
apply(simp add: Prefixes_Cons) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
286 |
done |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
287 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
288 |
lemma finite_Suffixes: |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
289 |
"finite (Suffixes s)" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
290 |
unfolding Suffixes_def |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
291 |
apply(rule finite_imageI) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
292 |
apply(rule finite_Prefixes) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
293 |
done |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
294 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
295 |
lemma prefix_Cons: |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
296 |
"((c # s1) \<sqsubseteq> (c # s2)) = (s1 \<sqsubseteq> s2)" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
297 |
apply(auto simp add: prefix_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
298 |
done |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
299 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
300 |
lemma prefix_append: |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
301 |
"((s @ s1) \<sqsubseteq> (s @ s2)) = (s1 \<sqsubseteq> s2)" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
302 |
apply(induct s) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
303 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
304 |
apply(simp add: prefix_Cons) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
305 |
done |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
306 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
307 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
308 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
309 |
definition Values :: "rexp \<Rightarrow> string \<Rightarrow> val set" where |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
310 |
"Values r s \<equiv> {v. \<turnstile> v : r \<and> flat v \<sqsubseteq> s}" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
311 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
312 |
definition rest :: "val \<Rightarrow> string \<Rightarrow> string" where |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
313 |
"rest v s \<equiv> drop (length (flat v)) s" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
314 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
315 |
lemma rest_Suffixes: |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
316 |
"rest v s \<in> Suffixes s" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
317 |
unfolding rest_def |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
318 |
by (metis Suffixes_in append_take_drop_id) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
319 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
320 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
321 |
lemma Values_recs: |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
322 |
"Values (NULL) s = {}" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
323 |
"Values (EMPTY) s = {Void}" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
324 |
"Values (CHAR c) s = (if [c] \<sqsubseteq> s then {Char c} else {})" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
325 |
"Values (ALT r1 r2) s = {Left v | v. v \<in> Values r1 s} \<union> {Right v | v. v \<in> Values r2 s}" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
326 |
"Values (SEQ r1 r2) s = {Seq v1 v2 | v1 v2. v1 \<in> Values r1 s \<and> v2 \<in> Values r2 (rest v1 s)}" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
327 |
unfolding Values_def |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
328 |
apply(auto) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
329 |
(*NULL*) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
330 |
apply(erule Prf.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
331 |
apply(simp_all)[5] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
332 |
(*EMPTY*) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
333 |
apply(erule Prf.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
334 |
apply(simp_all)[5] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
335 |
apply(rule Prf.intros) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
336 |
apply (metis append_Nil prefix_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
337 |
(*CHAR*) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
338 |
apply(erule Prf.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
339 |
apply(simp_all)[5] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
340 |
apply(rule Prf.intros) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
341 |
apply(erule Prf.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
342 |
apply(simp_all)[5] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
343 |
(*ALT*) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
344 |
apply(erule Prf.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
345 |
apply(simp_all)[5] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
346 |
apply (metis Prf.intros(2)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
347 |
apply (metis Prf.intros(3)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
348 |
(*SEQ*) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
349 |
apply(erule Prf.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
350 |
apply(simp_all)[5] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
351 |
apply (simp add: append_eq_conv_conj prefix_def rest_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
352 |
apply (metis Prf.intros(1)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
353 |
apply (simp add: append_eq_conv_conj prefix_def rest_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
354 |
done |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
355 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
356 |
lemma Values_finite: |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
357 |
"finite (Values r s)" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
358 |
apply(induct r arbitrary: s) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
359 |
apply(simp_all add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
360 |
thm finite_surj |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
361 |
apply(rule_tac f="\<lambda>(x, y). Seq x y" and |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
362 |
A="{(v1, v2) | v1 v2. v1 \<in> Values r1 s \<and> v2 \<in> Values r2 (rest v1 s)}" in finite_surj) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
363 |
prefer 2 |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
364 |
apply(auto)[1] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
365 |
apply(rule_tac B="\<Union>sp \<in> Suffixes s. {(v1, v2). v1 \<in> Values r1 s \<and> v2 \<in> Values r2 sp}" in finite_subset) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
366 |
apply(auto)[1] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
367 |
apply (metis rest_Suffixes) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
368 |
apply(rule finite_UN_I) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
369 |
apply(rule finite_Suffixes) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
370 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
371 |
done |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
372 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
373 |
section {* Greedy Ordering according to Frisch/Cardelli *} |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
374 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
375 |
inductive GrOrd :: "val \<Rightarrow> val \<Rightarrow> bool" ("_ \<prec> _") |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
376 |
where |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
377 |
"v1 \<prec> v1' \<Longrightarrow> (Seq v1 v2) \<prec> (Seq v1' v2')" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
378 |
| "v2 \<prec> v2' \<Longrightarrow> (Seq v1 v2) \<prec> (Seq v1 v2')" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
379 |
| "v1 \<prec> v2 \<Longrightarrow> (Left v1) \<prec> (Left v2)" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
380 |
| "v1 \<prec> v2 \<Longrightarrow> (Right v1) \<prec> (Right v2)" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
381 |
| "(Right v1) \<prec> (Left v2)" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
382 |
| "(Char c) \<prec> (Char c)" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
383 |
| "(Void) \<prec> (Void)" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
384 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
385 |
lemma Gr_refl: |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
386 |
assumes "\<turnstile> v : r" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
387 |
shows "v \<prec> v" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
388 |
using assms |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
389 |
apply(induct) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
390 |
apply(auto intro: GrOrd.intros) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
391 |
done |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
392 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
393 |
lemma Gr_total: |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
394 |
assumes "\<turnstile> v1 : r" "\<turnstile> v2 : r" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
395 |
shows "v1 \<prec> v2 \<or> v2 \<prec> v1" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
396 |
using assms |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
397 |
apply(induct v1 r arbitrary: v2 rule: Prf.induct) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
398 |
apply(rotate_tac 4) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
399 |
apply(erule Prf.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
400 |
apply(simp_all)[5] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
401 |
apply(clarify) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
402 |
apply (metis GrOrd.intros(1) GrOrd.intros(2)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
403 |
apply(rotate_tac 2) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
404 |
apply(erule Prf.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
405 |
apply(simp_all) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
406 |
apply(clarify) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
407 |
apply (metis GrOrd.intros(3)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
408 |
apply(clarify) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
409 |
apply (metis GrOrd.intros(5)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
410 |
apply(rotate_tac 2) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
411 |
apply(erule Prf.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
412 |
apply(simp_all) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
413 |
apply(clarify) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
414 |
apply (metis GrOrd.intros(5)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
415 |
apply(clarify) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
416 |
apply (metis GrOrd.intros(4)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
417 |
apply(erule Prf.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
418 |
apply(simp_all) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
419 |
apply (metis GrOrd.intros(7)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
420 |
apply(erule Prf.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
421 |
apply(simp_all) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
422 |
apply (metis GrOrd.intros(6)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
423 |
done |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
424 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
425 |
lemma Gr_trans: |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
426 |
assumes "v1 \<prec> v2" "v2 \<prec> v3" "\<turnstile> v1 : r" "\<turnstile> v2 : r" "\<turnstile> v3 : r" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
427 |
shows "v1 \<prec> v3" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
428 |
using assms |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
429 |
apply(induct r arbitrary: v1 v2 v3) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
430 |
apply(erule Prf.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
431 |
apply(simp_all)[5] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
432 |
apply(erule Prf.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
433 |
apply(simp_all)[5] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
434 |
apply(erule Prf.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
435 |
apply(simp_all)[5] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
436 |
apply(erule Prf.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
437 |
apply(simp_all)[5] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
438 |
apply(erule Prf.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
439 |
apply(simp_all)[5] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
440 |
defer |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
441 |
(* ALT case *) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
442 |
apply(erule Prf.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
443 |
apply(simp_all (no_asm_use))[5] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
444 |
apply(erule Prf.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
445 |
apply(simp_all (no_asm_use))[5] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
446 |
apply(erule Prf.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
447 |
apply(simp_all (no_asm_use))[5] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
448 |
apply(clarify) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
449 |
apply(erule GrOrd.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
450 |
apply(simp_all (no_asm_use))[7] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
451 |
apply(erule GrOrd.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
452 |
apply(simp_all (no_asm_use))[7] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
453 |
apply (metis GrOrd.intros(3)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
454 |
apply(clarify) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
455 |
apply(erule GrOrd.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
456 |
apply(simp_all (no_asm_use))[7] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
457 |
apply(erule GrOrd.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
458 |
apply(simp_all (no_asm_use))[7] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
459 |
apply(erule Prf.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
460 |
apply(simp_all (no_asm_use))[5] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
461 |
apply(clarify) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
462 |
apply(erule GrOrd.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
463 |
apply(simp_all (no_asm_use))[7] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
464 |
apply(clarify) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
465 |
apply(erule GrOrd.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
466 |
apply(simp_all (no_asm_use))[7] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
467 |
apply(erule Prf.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
468 |
apply(simp_all (no_asm_use))[5] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
469 |
apply(erule Prf.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
470 |
apply(simp_all (no_asm_use))[5] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
471 |
apply(clarify) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
472 |
apply(erule GrOrd.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
473 |
apply(simp_all (no_asm_use))[7] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
474 |
apply(erule GrOrd.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
475 |
apply(simp_all (no_asm_use))[7] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
476 |
apply (metis GrOrd.intros(5)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
477 |
apply(clarify) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
478 |
apply(erule GrOrd.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
479 |
apply(simp_all (no_asm_use))[7] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
480 |
apply(erule GrOrd.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
481 |
apply(simp_all (no_asm_use))[7] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
482 |
apply(erule Prf.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
483 |
apply(simp_all (no_asm_use))[5] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
484 |
apply(clarify) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
485 |
apply(erule GrOrd.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
486 |
apply(simp_all (no_asm_use))[7] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
487 |
apply(erule GrOrd.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
488 |
apply(simp_all (no_asm_use))[7] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
489 |
apply (metis GrOrd.intros(5)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
490 |
apply(clarify) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
491 |
apply(erule GrOrd.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
492 |
apply(simp_all (no_asm_use))[7] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
493 |
apply(erule GrOrd.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
494 |
apply(simp_all (no_asm_use))[7] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
495 |
apply (metis GrOrd.intros(4)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
496 |
(* seq case *) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
497 |
apply(erule Prf.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
498 |
apply(simp_all (no_asm_use))[5] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
499 |
apply(erule Prf.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
500 |
apply(simp_all (no_asm_use))[5] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
501 |
apply(erule Prf.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
502 |
apply(simp_all (no_asm_use))[5] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
503 |
apply(clarify) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
504 |
apply(erule GrOrd.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
505 |
apply(simp_all (no_asm_use))[7] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
506 |
apply(erule GrOrd.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
507 |
apply(simp_all (no_asm_use))[7] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
508 |
apply(clarify) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
509 |
apply (metis GrOrd.intros(1)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
510 |
apply (metis GrOrd.intros(1)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
511 |
apply(erule GrOrd.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
512 |
apply(simp_all (no_asm_use))[7] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
513 |
apply (metis GrOrd.intros(1)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
514 |
by (metis GrOrd.intros(1) Gr_refl) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
515 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
516 |
definition |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
517 |
GrMaxM :: "val set => val" where |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
518 |
"GrMaxM S == SOME v. v \<in> S \<and> (\<forall>v' \<in> S. v' \<prec> v)" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
519 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
520 |
definition |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
521 |
"GrMax r s \<equiv> GrMaxM {v. \<turnstile> v : r \<and> flat v = s}" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
522 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
523 |
inductive ValOrd3 :: "val \<Rightarrow> val \<Rightarrow> bool" ("_ 3\<succ> _" [100, 100] 100) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
524 |
where |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
525 |
"v2 3\<succ> v2' \<Longrightarrow> (Seq v1 v2) 3\<succ> (Seq v1 v2')" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
526 |
| "v1 3\<succ> v1' \<Longrightarrow> (Seq v1 v2) 3\<succ> (Seq v1' v2')" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
527 |
| "length (flat v1) \<ge> length (flat v2) \<Longrightarrow> (Left v1) 3\<succ> (Right v2)" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
528 |
| "length (flat v2) > length (flat v1) \<Longrightarrow> (Right v2) 3\<succ> (Left v1)" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
529 |
| "v2 3\<succ> v2' \<Longrightarrow> (Right v2) 3\<succ> (Right v2')" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
530 |
| "v1 3\<succ> v1' \<Longrightarrow> (Left v1) 3\<succ> (Left v1')" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
531 |
| "Void 3\<succ> Void" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
532 |
| "(Char c) 3\<succ> (Char c)" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
533 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
534 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
535 |
section {* Sulzmann's Ordering of values *} |
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
536 |
|
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
537 |
inductive ValOrd :: "val \<Rightarrow> rexp \<Rightarrow> val \<Rightarrow> bool" ("_ \<succ>_ _" [100, 100, 100] 100) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
538 |
where |
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
539 |
"v2 \<succ>r2 v2' \<Longrightarrow> (Seq v1 v2) \<succ>(SEQ r1 r2) (Seq v1 v2')" |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
540 |
| "\<lbrakk>v1 \<succ>r1 v1'; v1 \<noteq> v1'\<rbrakk> \<Longrightarrow> (Seq v1 v2) \<succ>(SEQ r1 r2) (Seq v1' v2')" |
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
541 |
| "length (flat v1) \<ge> length (flat v2) \<Longrightarrow> (Left v1) \<succ>(ALT r1 r2) (Right v2)" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
542 |
| "length (flat v2) > length (flat v1) \<Longrightarrow> (Right v2) \<succ>(ALT r1 r2) (Left v1)" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
543 |
| "v2 \<succ>r2 v2' \<Longrightarrow> (Right v2) \<succ>(ALT r1 r2) (Right v2')" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
544 |
| "v1 \<succ>r1 v1' \<Longrightarrow> (Left v1) \<succ>(ALT r1 r2) (Left v1')" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
545 |
| "Void \<succ>EMPTY Void" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
546 |
| "(Char c) \<succ>(CHAR c) (Char c)" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
547 |
|
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
548 |
inductive ValOrdStr :: "string \<Rightarrow> val \<Rightarrow> val \<Rightarrow> bool" ("_ \<turnstile> _ \<succ>_" [100, 100, 100] 100) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
549 |
where |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
550 |
"\<lbrakk>s \<turnstile> v1 \<succ> v1'; rest v1 s \<turnstile> v2 \<succ> v2'\<rbrakk> \<Longrightarrow> s \<turnstile> (Seq v1 v2) \<succ> (Seq v1' v2')" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
551 |
| "\<lbrakk>flat v2 \<sqsubseteq> flat v1; flat v1 \<sqsubseteq> s\<rbrakk> \<Longrightarrow> s \<turnstile> (Left v1) \<succ> (Right v2)" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
552 |
| "\<lbrakk>flat v1 \<sqsubset> flat v2; flat v2 \<sqsubseteq> s\<rbrakk> \<Longrightarrow> s \<turnstile> (Right v2) \<succ> (Left v1)" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
553 |
| "s \<turnstile> v2 \<succ> v2' \<Longrightarrow> s \<turnstile> (Right v2) \<succ> (Right v2')" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
554 |
| "s \<turnstile> v1 \<succ> v1' \<Longrightarrow> s \<turnstile> (Left v1) \<succ> (Left v1')" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
555 |
| "s \<turnstile> Void \<succ> Void" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
556 |
| "(c#s) \<turnstile> (Char c) \<succ> (Char c)" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
557 |
|
76
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
558 |
inductive ValOrd2 :: "val \<Rightarrow> val \<Rightarrow> bool" ("_ 2\<succ> _" [100, 100] 100) |
75
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
559 |
where |
76
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
560 |
"v2 2\<succ> v2' \<Longrightarrow> (Seq v1 v2) 2\<succ> (Seq v1 v2')" |
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
561 |
| "\<lbrakk>v1 2\<succ> v1'; v1 \<noteq> v1'\<rbrakk> \<Longrightarrow> (Seq v1 v2) 2\<succ> (Seq v1' v2')" |
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
562 |
| "length (flat v1) \<ge> length (flat v2) \<Longrightarrow> (Left v1) 2\<succ> (Right v2)" |
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
563 |
| "length (flat v2) > length (flat v1) \<Longrightarrow> (Right v2) 2\<succ> (Left v1)" |
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
564 |
| "v2 2\<succ> v2' \<Longrightarrow> (Right v2) 2\<succ> (Right v2')" |
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
565 |
| "v1 2\<succ> v1' \<Longrightarrow> (Left v1) 2\<succ> (Left v1')" |
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
566 |
| "Void 2\<succ> Void" |
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
567 |
| "(Char c) 2\<succ> (Char c)" |
75
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
568 |
|
76
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
569 |
lemma Ord1: |
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
570 |
"v1 \<succ>r v2 \<Longrightarrow> v1 2\<succ> v2" |
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
571 |
apply(induct rule: ValOrd.induct) |
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
572 |
apply(auto intro: ValOrd2.intros) |
75
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
573 |
done |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
574 |
|
76
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
575 |
lemma Ord2: |
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
576 |
"v1 2\<succ> v2 \<Longrightarrow> \<exists>r. v1 \<succ>r v2" |
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
577 |
apply(induct v1 v2 rule: ValOrd2.induct) |
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
578 |
apply(auto intro: ValOrd.intros) |
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
579 |
done |
75
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
580 |
|
76
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
581 |
lemma Ord3: |
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
582 |
"\<lbrakk>v1 2\<succ> v2; \<turnstile> v1 : r\<rbrakk> \<Longrightarrow> v1 \<succ>r v2" |
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
583 |
apply(induct v1 v2 arbitrary: r rule: ValOrd2.induct) |
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
584 |
apply(auto intro: ValOrd.intros elim: Prf.cases) |
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
585 |
done |
53
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
586 |
|
48
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
587 |
|
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
588 |
lemma ValOrd_refl: |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
589 |
assumes "\<turnstile> v : r" |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
590 |
shows "v \<succ>r v" |
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
591 |
using assms |
48
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
592 |
apply(induct) |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
593 |
apply(auto intro: ValOrd.intros) |
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
594 |
done |
48
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
595 |
|
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
596 |
lemma |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
597 |
"flat Void = []" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
598 |
"flat (Seq Void Void) = []" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
599 |
apply(simp_all) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
600 |
done |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
601 |
|
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
602 |
|
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
603 |
lemma ValOrd_total: |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
604 |
shows "\<lbrakk>\<turnstile> v1 : r; \<turnstile> v2 : r\<rbrakk> \<Longrightarrow> v1 \<succ>r v2 \<or> v2 \<succ>r v1" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
605 |
apply(induct r arbitrary: v1 v2) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
606 |
apply(auto) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
607 |
apply(erule Prf.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
608 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
609 |
apply(erule Prf.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
610 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
611 |
apply(erule Prf.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
612 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
613 |
apply (metis ValOrd.intros(7)) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
614 |
apply(erule Prf.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
615 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
616 |
apply(erule Prf.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
617 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
618 |
apply (metis ValOrd.intros(8)) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
619 |
apply(erule Prf.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
620 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
621 |
apply(erule Prf.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
622 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
623 |
apply(clarify) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
624 |
apply(case_tac "v1a = v1b") |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
625 |
apply(simp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
626 |
apply(rule ValOrd.intros(1)) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
627 |
apply (metis ValOrd.intros(1)) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
628 |
apply(rule ValOrd.intros(2)) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
629 |
apply(auto)[2] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
630 |
apply(erule contrapos_np) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
631 |
apply(rule ValOrd.intros(2)) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
632 |
apply(auto) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
633 |
apply(erule Prf.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
634 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
635 |
apply(erule Prf.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
636 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
637 |
apply (metis Ord1 Ord3 Prf.intros(2) ValOrd2.intros(6)) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
638 |
apply(rule ValOrd.intros) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
639 |
apply(erule contrapos_np) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
640 |
apply(rule ValOrd.intros) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
641 |
apply (metis le_eq_less_or_eq neq_iff) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
642 |
apply(erule Prf.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
643 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
644 |
apply(rule ValOrd.intros) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
645 |
apply(erule contrapos_np) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
646 |
apply(rule ValOrd.intros) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
647 |
apply (metis le_eq_less_or_eq neq_iff) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
648 |
apply(rule ValOrd.intros) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
649 |
apply(erule contrapos_np) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
650 |
apply(rule ValOrd.intros) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
651 |
by metis |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
652 |
|
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
653 |
lemma ValOrd_anti: |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
654 |
shows "\<lbrakk>\<turnstile> v1 : r; \<turnstile> v2 : r; v1 \<succ>r v2; v2 \<succ>r v1\<rbrakk> \<Longrightarrow> v1 = v2" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
655 |
apply(induct r arbitrary: v1 v2) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
656 |
apply(erule Prf.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
657 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
658 |
apply(erule Prf.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
659 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
660 |
apply(erule Prf.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
661 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
662 |
apply(erule Prf.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
663 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
664 |
apply(erule Prf.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
665 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
666 |
apply(erule Prf.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
667 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
668 |
apply(erule Prf.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
669 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
670 |
apply(erule ValOrd.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
671 |
apply(simp_all)[8] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
672 |
apply(erule ValOrd.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
673 |
apply(simp_all)[8] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
674 |
apply(erule ValOrd.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
675 |
apply(simp_all)[8] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
676 |
apply(erule Prf.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
677 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
678 |
apply(erule Prf.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
679 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
680 |
apply(erule ValOrd.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
681 |
apply(simp_all)[8] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
682 |
apply(erule ValOrd.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
683 |
apply(simp_all)[8] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
684 |
apply(erule ValOrd.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
685 |
apply(simp_all)[8] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
686 |
apply(erule ValOrd.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
687 |
apply(simp_all)[8] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
688 |
apply(erule Prf.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
689 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
690 |
apply(erule ValOrd.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
691 |
apply(simp_all)[8] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
692 |
apply(erule ValOrd.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
693 |
apply(simp_all)[8] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
694 |
apply(erule ValOrd.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
695 |
apply(simp_all)[8] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
696 |
apply(erule ValOrd.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
697 |
apply(simp_all)[8] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
698 |
done |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
699 |
|
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
700 |
lemma refl_on_ValOrd: |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
701 |
"refl_on (Values r s) {(v1, v2). v1 \<succ>r v2 \<and> v1 \<in> Values r s \<and> v2 \<in> Values r s}" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
702 |
unfolding refl_on_def |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
703 |
apply(auto) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
704 |
apply(rule ValOrd_refl) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
705 |
apply(simp add: Values_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
706 |
done |
79
ca8f9645db69
added frisch / cardelli paper
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
78
diff
changeset
|
707 |
|
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
708 |
(* |
78
279d0bc48308
updated the Isabelle theories with the totality proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
77
diff
changeset
|
709 |
inductive ValOrd3 :: "val \<Rightarrow> rexp \<Rightarrow> val \<Rightarrow> bool" ("_ 3\<succ>_ _" [100, 100, 100] 100) |
279d0bc48308
updated the Isabelle theories with the totality proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
77
diff
changeset
|
710 |
where |
279d0bc48308
updated the Isabelle theories with the totality proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
77
diff
changeset
|
711 |
"\<lbrakk>v2 3\<succ>r2 v2'; \<turnstile> v1 : r1\<rbrakk> \<Longrightarrow> (Seq v1 v2) 3\<succ>(SEQ r1 r2) (Seq v1 v2')" |
279d0bc48308
updated the Isabelle theories with the totality proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
77
diff
changeset
|
712 |
| "\<lbrakk>v1 3\<succ>r1 v1'; v1 \<noteq> v1'; flat v2 = flat v2'; \<turnstile> v2 : r2; \<turnstile> v2' : r2\<rbrakk> |
279d0bc48308
updated the Isabelle theories with the totality proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
77
diff
changeset
|
713 |
\<Longrightarrow> (Seq v1 v2) 3\<succ>(SEQ r1 r2) (Seq v1' v2')" |
279d0bc48308
updated the Isabelle theories with the totality proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
77
diff
changeset
|
714 |
| "length (flat v1) \<ge> length (flat v2) \<Longrightarrow> (Left v1) 3\<succ>(ALT r1 r2) (Right v2)" |
279d0bc48308
updated the Isabelle theories with the totality proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
77
diff
changeset
|
715 |
| "length (flat v2) > length (flat v1) \<Longrightarrow> (Right v2) 3\<succ>(ALT r1 r2) (Left v1)" |
279d0bc48308
updated the Isabelle theories with the totality proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
77
diff
changeset
|
716 |
| "v2 3\<succ>r2 v2' \<Longrightarrow> (Right v2) 3\<succ>(ALT r1 r2) (Right v2')" |
279d0bc48308
updated the Isabelle theories with the totality proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
77
diff
changeset
|
717 |
| "v1 3\<succ>r1 v1' \<Longrightarrow> (Left v1) 3\<succ>(ALT r1 r2) (Left v1')" |
279d0bc48308
updated the Isabelle theories with the totality proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
77
diff
changeset
|
718 |
| "Void 3\<succ>EMPTY Void" |
279d0bc48308
updated the Isabelle theories with the totality proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
77
diff
changeset
|
719 |
| "(Char c) 3\<succ>(CHAR c) (Char c)" |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
720 |
*) |
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
721 |
|
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
722 |
section {* Posix definition *} |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
723 |
|
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
724 |
definition POSIX :: "val \<Rightarrow> rexp \<Rightarrow> bool" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
725 |
where |
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
726 |
"POSIX v r \<equiv> (\<turnstile> v : r \<and> (\<forall>v'. (\<turnstile> v' : r \<and> flat v = flat v') \<longrightarrow> v \<succ>r v'))" |
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
727 |
|
76
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
728 |
definition POSIX2 :: "val \<Rightarrow> rexp \<Rightarrow> bool" |
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
729 |
where |
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
730 |
"POSIX2 v r \<equiv> (\<turnstile> v : r \<and> (\<forall>v'. (\<turnstile> v' : r \<and> flat v = flat v') \<longrightarrow> v 2\<succ> v'))" |
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
731 |
|
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
732 |
lemma "POSIX v r = POSIX2 v r" |
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
733 |
unfolding POSIX_def POSIX2_def |
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
734 |
apply(auto) |
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
735 |
apply(rule Ord1) |
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
736 |
apply(auto) |
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
737 |
apply(rule Ord3) |
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
738 |
apply(auto) |
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
739 |
done |
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
740 |
|
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
741 |
definition POSIXs :: "val \<Rightarrow> rexp \<Rightarrow> string \<Rightarrow> bool" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
742 |
where |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
743 |
"POSIXs v r s \<equiv> (\<Turnstile>s v : r \<and> (\<forall>v'. (\<Turnstile>s v' : r \<longrightarrow> v 2\<succ> v')))" |
11
26b8a5213355
changed theory name
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
10
diff
changeset
|
744 |
|
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
745 |
definition POSIXn :: "val \<Rightarrow> rexp \<Rightarrow> nat \<Rightarrow> bool" |
11
26b8a5213355
changed theory name
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
10
diff
changeset
|
746 |
where |
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
747 |
"POSIXn v r n \<equiv> (\<TTurnstile>n v : r \<and> (\<forall>v'. (\<TTurnstile>n v' : r \<longrightarrow> v 2\<succ> v')))" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
748 |
|
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
749 |
lemma "POSIXn v r (length (flat v)) \<Longrightarrow> POSIX2 v r" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
750 |
unfolding POSIXn_def POSIX2_def |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
751 |
apply(auto) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
752 |
apply (metis Prfn_Prf) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
753 |
by (metis Prf_Prfn) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
754 |
|
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
755 |
lemma Prfs_POSIX: |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
756 |
"POSIXs v r s \<Longrightarrow> \<Turnstile>s v: r \<and> flat v = s" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
757 |
apply(simp add: POSIXs_def) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
758 |
by (metis Prfs_flat) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
759 |
|
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
760 |
|
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
761 |
lemma "POSIXs v r (flat v) = POSIX2 v r" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
762 |
unfolding POSIXs_def POSIX2_def |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
763 |
apply(auto) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
764 |
apply (metis Prfs_Prf) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
765 |
apply (metis Prf_Prfs) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
766 |
apply (metis Prf_Prfs) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
767 |
by (metis Prfs_Prf Prfs_flat) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
768 |
|
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
769 |
section {* POSIX for some constructors *} |
11
26b8a5213355
changed theory name
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
10
diff
changeset
|
770 |
|
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
771 |
lemma POSIX_SEQ1: |
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
772 |
assumes "POSIX (Seq v1 v2) (SEQ r1 r2)" "\<turnstile> v1 : r1" "\<turnstile> v2 : r2" |
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
773 |
shows "POSIX v1 r1" |
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
774 |
using assms |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
775 |
unfolding POSIX_def |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
776 |
apply(auto) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
777 |
apply(drule_tac x="Seq v' v2" in spec) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
778 |
apply(simp) |
48
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
779 |
apply(erule impE) |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
780 |
apply(rule Prf.intros) |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
781 |
apply(simp) |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
782 |
apply(simp) |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
783 |
apply(erule ValOrd.cases) |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
784 |
apply(simp_all) |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
785 |
apply(clarify) |
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
786 |
by (metis ValOrd_refl) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
787 |
|
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
788 |
lemma POSIXn_SEQ1: |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
789 |
assumes "POSIXn (Seq v1 v2) (SEQ r1 r2) (n1 + n2)" "\<TTurnstile>n1 v1 : r1" "\<TTurnstile>n2 v2 : r2" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
790 |
shows "POSIXn v1 r1 n1" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
791 |
using assms |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
792 |
unfolding POSIXn_def |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
793 |
apply(auto) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
794 |
apply(drule_tac x="Seq v' v2" in spec) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
795 |
apply(erule impE) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
796 |
apply(rule Prfn.intros) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
797 |
apply(simp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
798 |
apply(simp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
799 |
apply(erule ValOrd2.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
800 |
apply(simp_all) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
801 |
apply(clarify) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
802 |
by (metis Ord1 Prfn_Prf ValOrd_refl) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
803 |
|
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
804 |
lemma POSIXs_SEQ1: |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
805 |
assumes "POSIXs (Seq v1 v2) (SEQ r1 r2) (s1 @ s2)" "\<Turnstile>s1 v1 : r1" "\<Turnstile>s2 v2 : r2" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
806 |
shows "POSIXs v1 r1 s1" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
807 |
using assms |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
808 |
unfolding POSIXs_def |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
809 |
apply(auto) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
810 |
apply(drule_tac x="Seq v' v2" in spec) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
811 |
apply(erule impE) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
812 |
apply(rule Prfs.intros) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
813 |
apply(simp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
814 |
apply(simp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
815 |
apply(erule ValOrd2.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
816 |
apply(simp_all) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
817 |
apply(clarify) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
818 |
by (metis Ord1 Prfs_Prf ValOrd_refl) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
819 |
|
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
820 |
lemma POSIX_SEQ2: |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
821 |
assumes "POSIX (Seq v1 v2) (SEQ r1 r2)" "\<turnstile> v1 : r1" "\<turnstile> v2 : r2" |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
822 |
shows "POSIX v2 r2" |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
823 |
using assms |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
824 |
unfolding POSIX_def |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
825 |
apply(auto) |
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
826 |
apply(drule_tac x="Seq v1 v'" in spec) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
827 |
apply(simp) |
48
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
828 |
apply(erule impE) |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
829 |
apply(rule Prf.intros) |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
830 |
apply(simp) |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
831 |
apply(simp) |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
832 |
apply(erule ValOrd.cases) |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
833 |
apply(simp_all) |
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
834 |
done |
12 | 835 |
|
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
836 |
lemma POSIXn_SEQ2: |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
837 |
assumes "POSIXn (Seq v1 v2) (SEQ r1 r2) (n1 + n2)" "\<TTurnstile>n1 v1 : r1" "\<TTurnstile>n2 v2 : r2" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
838 |
shows "POSIXn v2 r2 n2" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
839 |
using assms |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
840 |
unfolding POSIXn_def |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
841 |
apply(auto) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
842 |
apply(drule_tac x="Seq v1 v'" in spec) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
843 |
apply(erule impE) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
844 |
apply(rule Prfn.intros) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
845 |
apply(simp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
846 |
apply(simp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
847 |
apply(erule ValOrd2.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
848 |
apply(simp_all) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
849 |
done |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
850 |
|
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
851 |
lemma POSIXs_SEQ2: |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
852 |
assumes "POSIXs (Seq v1 v2) (SEQ r1 r2) (s1 @ s2)" "\<Turnstile>s1 v1 : r1" "\<Turnstile>s2 v2 : r2" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
853 |
shows "POSIXs v2 r2 s2" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
854 |
using assms |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
855 |
unfolding POSIXs_def |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
856 |
apply(auto) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
857 |
apply(drule_tac x="Seq v1 v'" in spec) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
858 |
apply(erule impE) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
859 |
apply(rule Prfs.intros) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
860 |
apply(simp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
861 |
apply(simp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
862 |
apply(erule ValOrd2.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
863 |
apply(simp_all) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
864 |
done |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
865 |
|
12 | 866 |
lemma POSIX_ALT2: |
867 |
assumes "POSIX (Left v1) (ALT r1 r2)" |
|
868 |
shows "POSIX v1 r1" |
|
869 |
using assms |
|
870 |
unfolding POSIX_def |
|
871 |
apply(auto) |
|
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
872 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
873 |
apply(simp_all)[5] |
12 | 874 |
apply(drule_tac x="Left v'" in spec) |
875 |
apply(simp) |
|
876 |
apply(drule mp) |
|
877 |
apply(rule Prf.intros) |
|
878 |
apply(auto) |
|
879 |
apply(erule ValOrd.cases) |
|
880 |
apply(simp_all) |
|
881 |
done |
|
882 |
||
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
883 |
lemma POSIXn_ALT2: |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
884 |
assumes "POSIXn (Left v1) (ALT r1 r2) n" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
885 |
shows "POSIXn v1 r1 n" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
886 |
using assms |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
887 |
unfolding POSIXn_def |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
888 |
apply(auto) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
889 |
apply(erule Prfn.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
890 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
891 |
apply(drule_tac x="Left v'" in spec) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
892 |
apply(drule mp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
893 |
apply(rule Prfn.intros) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
894 |
apply(auto) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
895 |
apply(erule ValOrd2.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
896 |
apply(simp_all) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
897 |
done |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
898 |
|
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
899 |
lemma POSIXs_ALT2: |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
900 |
assumes "POSIXs (Left v1) (ALT r1 r2) s" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
901 |
shows "POSIXs v1 r1 s" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
902 |
using assms |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
903 |
unfolding POSIXs_def |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
904 |
apply(auto) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
905 |
apply(erule Prfs.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
906 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
907 |
apply(drule_tac x="Left v'" in spec) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
908 |
apply(drule mp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
909 |
apply(rule Prfs.intros) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
910 |
apply(auto) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
911 |
apply(erule ValOrd2.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
912 |
apply(simp_all) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
913 |
done |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
914 |
|
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
915 |
lemma POSIX_ALT1a: |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
916 |
assumes "POSIX (Right v2) (ALT r1 r2)" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
917 |
shows "POSIX v2 r2" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
918 |
using assms |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
919 |
unfolding POSIX_def |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
920 |
apply(auto) |
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
921 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
922 |
apply(simp_all)[5] |
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
923 |
apply(drule_tac x="Right v'" in spec) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
924 |
apply(simp) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
925 |
apply(drule mp) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
926 |
apply(rule Prf.intros) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
927 |
apply(auto) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
928 |
apply(erule ValOrd.cases) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
929 |
apply(simp_all) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
930 |
done |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
931 |
|
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
932 |
lemma POSIXn_ALT1a: |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
933 |
assumes "POSIXn (Right v2) (ALT r1 r2) n" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
934 |
shows "POSIXn v2 r2 n" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
935 |
using assms |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
936 |
unfolding POSIXn_def |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
937 |
apply(auto) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
938 |
apply(erule Prfn.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
939 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
940 |
apply(drule_tac x="Right v'" in spec) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
941 |
apply(drule mp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
942 |
apply(rule Prfn.intros) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
943 |
apply(auto) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
944 |
apply(erule ValOrd2.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
945 |
apply(simp_all) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
946 |
done |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
947 |
|
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
948 |
lemma POSIXs_ALT1a: |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
949 |
assumes "POSIXs (Right v2) (ALT r1 r2) s" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
950 |
shows "POSIXs v2 r2 s" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
951 |
using assms |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
952 |
unfolding POSIXs_def |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
953 |
apply(auto) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
954 |
apply(erule Prfs.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
955 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
956 |
apply(drule_tac x="Right v'" in spec) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
957 |
apply(drule mp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
958 |
apply(rule Prfs.intros) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
959 |
apply(auto) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
960 |
apply(erule ValOrd2.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
961 |
apply(simp_all) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
962 |
done |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
963 |
|
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
964 |
lemma POSIX_ALT1b: |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
965 |
assumes "POSIX (Right v2) (ALT r1 r2)" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
966 |
shows "(\<forall>v'. (\<turnstile> v' : r2 \<and> flat v' = flat v2) \<longrightarrow> v2 \<succ>r2 v')" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
967 |
using assms |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
968 |
apply(drule_tac POSIX_ALT1a) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
969 |
unfolding POSIX_def |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
970 |
apply(auto) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
971 |
done |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
972 |
|
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
973 |
lemma POSIXn_ALT1b: |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
974 |
assumes "POSIXn (Right v2) (ALT r1 r2) n" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
975 |
shows "(\<forall>v'. (\<TTurnstile>n v' : r2 \<longrightarrow> v2 2\<succ> v'))" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
976 |
using assms |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
977 |
apply(drule_tac POSIXn_ALT1a) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
978 |
unfolding POSIXn_def |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
979 |
apply(auto) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
980 |
done |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
981 |
|
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
982 |
lemma POSIXs_ALT1b: |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
983 |
assumes "POSIXs (Right v2) (ALT r1 r2) s" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
984 |
shows "(\<forall>v'. (\<Turnstile>s v' : r2 \<longrightarrow> v2 2\<succ> v'))" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
985 |
using assms |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
986 |
apply(drule_tac POSIXs_ALT1a) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
987 |
unfolding POSIXs_def |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
988 |
apply(auto) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
989 |
done |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
990 |
|
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
991 |
lemma POSIX_ALT_I1: |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
992 |
assumes "POSIX v1 r1" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
993 |
shows "POSIX (Left v1) (ALT r1 r2)" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
994 |
using assms |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
995 |
unfolding POSIX_def |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
996 |
apply(auto) |
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
997 |
apply (metis Prf.intros(2)) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
998 |
apply(rotate_tac 2) |
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
999 |
apply(erule Prf.cases) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1000 |
apply(simp_all)[5] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1001 |
apply(auto) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1002 |
apply(rule ValOrd.intros) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1003 |
apply(auto) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1004 |
apply(rule ValOrd.intros) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1005 |
by simp |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1006 |
|
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1007 |
lemma POSIXn_ALT_I1: |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1008 |
assumes "POSIXn v1 r1 n" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1009 |
shows "POSIXn (Left v1) (ALT r1 r2) n" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1010 |
using assms |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1011 |
unfolding POSIXn_def |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1012 |
apply(auto) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1013 |
apply (metis Prfn.intros(2)) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1014 |
apply(rotate_tac 2) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1015 |
apply(erule Prfn.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1016 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1017 |
apply(auto) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1018 |
apply(rule ValOrd2.intros) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1019 |
apply(auto) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1020 |
apply(rule ValOrd2.intros) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1021 |
by (metis Prfn_flat order_refl) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1022 |
|
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1023 |
lemma POSIXs_ALT_I1: |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1024 |
assumes "POSIXs v1 r1 s" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1025 |
shows "POSIXs (Left v1) (ALT r1 r2) s" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1026 |
using assms |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1027 |
unfolding POSIXs_def |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1028 |
apply(auto) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1029 |
apply (metis Prfs.intros(2)) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1030 |
apply(rotate_tac 2) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1031 |
apply(erule Prfs.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1032 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1033 |
apply(auto) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1034 |
apply(rule ValOrd2.intros) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1035 |
apply(auto) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1036 |
apply(rule ValOrd2.intros) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1037 |
by (metis Prfs_flat order_refl) |
20
c11651bbebf5
some small changes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
12
diff
changeset
|
1038 |
|
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1039 |
lemma POSIX_ALT_I2: |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1040 |
assumes "POSIX v2 r2" "\<forall>v'. \<turnstile> v' : r1 \<longrightarrow> length (flat v2) > length (flat v')" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1041 |
shows "POSIX (Right v2) (ALT r1 r2)" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1042 |
using assms |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1043 |
unfolding POSIX_def |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1044 |
apply(auto) |
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
1045 |
apply (metis Prf.intros) |
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1046 |
apply(rotate_tac 3) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1047 |
apply(erule Prf.cases) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1048 |
apply(simp_all)[5] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1049 |
apply(auto) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1050 |
apply(rule ValOrd.intros) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1051 |
apply metis |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1052 |
done |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1053 |
|
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1054 |
lemma POSIXs_ALT_I2: |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1055 |
assumes "POSIXs v2 r2 s" "\<forall>s' v'. \<Turnstile>s' v' : r1 \<longrightarrow> length s > length s'" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1056 |
shows "POSIXs (Right v2) (ALT r1 r2) s" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1057 |
using assms |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1058 |
unfolding POSIXs_def |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1059 |
apply(auto) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1060 |
apply (metis Prfs.intros) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1061 |
apply(rotate_tac 3) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1062 |
apply(erule Prfs.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1063 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1064 |
apply(auto) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1065 |
apply(rule ValOrd2.intros) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1066 |
apply metis |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1067 |
done |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1068 |
|
73
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1069 |
lemma |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1070 |
"\<lbrakk>POSIX (mkeps r2) r2; nullable r2; \<not> nullable r1\<rbrakk> |
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1071 |
\<Longrightarrow> POSIX (Right (mkeps r2)) (ALT r1 r2)" |
73
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1072 |
apply(auto simp add: POSIX_def) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1073 |
apply(rule Prf.intros(3)) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1074 |
apply(auto) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1075 |
apply(rotate_tac 3) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1076 |
apply(erule Prf.cases) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1077 |
apply(simp_all)[5] |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1078 |
apply(simp add: mkeps_flat) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1079 |
apply(auto)[1] |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1080 |
apply (metis Prf_flat_L nullable_correctness) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1081 |
apply(rule ValOrd.intros) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1082 |
apply(auto) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1083 |
done |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1084 |
|
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1085 |
lemma mkeps_POSIX: |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1086 |
assumes "nullable r" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1087 |
shows "POSIX (mkeps r) r" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1088 |
using assms |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1089 |
apply(induct r) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1090 |
apply(auto)[1] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1091 |
apply(simp add: POSIX_def) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1092 |
apply(auto)[1] |
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
1093 |
apply (metis Prf.intros(4)) |
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1094 |
apply(erule Prf.cases) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1095 |
apply(simp_all)[5] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1096 |
apply (metis ValOrd.intros) |
66
eb97e8361211
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
63
diff
changeset
|
1097 |
apply(simp) |
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1098 |
apply(auto)[1] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1099 |
apply(simp add: POSIX_def) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1100 |
apply(auto)[1] |
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
1101 |
apply (metis mkeps.simps(2) mkeps_nullable nullable.simps(5)) |
20
c11651bbebf5
some small changes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
12
diff
changeset
|
1102 |
apply(rotate_tac 6) |
c11651bbebf5
some small changes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
12
diff
changeset
|
1103 |
apply(erule Prf.cases) |
c11651bbebf5
some small changes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
12
diff
changeset
|
1104 |
apply(simp_all)[5] |
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
1105 |
apply (simp add: mkeps_flat) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
1106 |
apply(case_tac "mkeps r1a = v1") |
20
c11651bbebf5
some small changes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
12
diff
changeset
|
1107 |
apply(simp) |
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
1108 |
apply (metis ValOrd.intros(1)) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
1109 |
apply (rule ValOrd.intros(2)) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
1110 |
apply metis |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
1111 |
apply(simp) |
71
2d30c74ba67f
added a section about a nullable proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
70
diff
changeset
|
1112 |
(* ALT case *) |
72
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
1113 |
thm mkeps.simps |
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
1114 |
apply(simp) |
20
c11651bbebf5
some small changes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
12
diff
changeset
|
1115 |
apply(erule disjE) |
c11651bbebf5
some small changes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
12
diff
changeset
|
1116 |
apply(simp) |
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
1117 |
apply (metis POSIX_ALT_I1) |
71
2d30c74ba67f
added a section about a nullable proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
70
diff
changeset
|
1118 |
(* *) |
2d30c74ba67f
added a section about a nullable proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
70
diff
changeset
|
1119 |
apply(auto)[1] |
2d30c74ba67f
added a section about a nullable proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
70
diff
changeset
|
1120 |
thm POSIX_ALT_I1 |
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
1121 |
apply (metis POSIX_ALT_I1) |
71
2d30c74ba67f
added a section about a nullable proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
70
diff
changeset
|
1122 |
apply(simp (no_asm) add: POSIX_def) |
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
1123 |
apply(auto)[1] |
71
2d30c74ba67f
added a section about a nullable proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
70
diff
changeset
|
1124 |
apply(rule Prf.intros(3)) |
2d30c74ba67f
added a section about a nullable proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
70
diff
changeset
|
1125 |
apply(simp only: POSIX_def) |
2d30c74ba67f
added a section about a nullable proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
70
diff
changeset
|
1126 |
apply(rotate_tac 4) |
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
1127 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
1128 |
apply(simp_all)[5] |
72
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
1129 |
thm mkeps_flat |
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
1130 |
apply(simp add: mkeps_flat) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
1131 |
apply(auto)[1] |
71
2d30c74ba67f
added a section about a nullable proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
70
diff
changeset
|
1132 |
thm Prf_flat_L nullable_correctness |
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
1133 |
apply (metis Prf_flat_L nullable_correctness) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
1134 |
apply(rule ValOrd.intros) |
71
2d30c74ba67f
added a section about a nullable proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
70
diff
changeset
|
1135 |
apply(subst (asm) POSIX_def) |
2d30c74ba67f
added a section about a nullable proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
70
diff
changeset
|
1136 |
apply(clarify) |
2d30c74ba67f
added a section about a nullable proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
70
diff
changeset
|
1137 |
apply(drule_tac x="v2" in spec) |
72
9128b9440e93
updated R1 and notes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
71
diff
changeset
|
1138 |
by simp |
20
c11651bbebf5
some small changes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
12
diff
changeset
|
1139 |
|
c11651bbebf5
some small changes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
12
diff
changeset
|
1140 |
|
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1141 |
section {* Derivatives *} |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1142 |
|
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1143 |
fun |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1144 |
der :: "char \<Rightarrow> rexp \<Rightarrow> rexp" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1145 |
where |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1146 |
"der c (NULL) = NULL" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1147 |
| "der c (EMPTY) = NULL" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1148 |
| "der c (CHAR c') = (if c = c' then EMPTY else NULL)" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1149 |
| "der c (ALT r1 r2) = ALT (der c r1) (der c r2)" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1150 |
| "der c (SEQ r1 r2) = |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1151 |
(if nullable r1 |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1152 |
then ALT (SEQ (der c r1) r2) (der c r2) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1153 |
else SEQ (der c r1) r2)" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1154 |
|
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1155 |
fun |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1156 |
ders :: "string \<Rightarrow> rexp \<Rightarrow> rexp" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1157 |
where |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1158 |
"ders [] r = r" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1159 |
| "ders (c # s) r = ders s (der c r)" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1160 |
|
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1161 |
fun |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1162 |
red :: "char \<Rightarrow> rexp \<Rightarrow> rexp" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1163 |
where |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1164 |
"red c (NULL) = NULL" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1165 |
| "red c (EMPTY) = CHAR c" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1166 |
| "red c (CHAR c') = SEQ (CHAR c) (CHAR c')" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1167 |
| "red c (ALT r1 r2) = ALT (red c r1) (red c r2)" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1168 |
| "red c (SEQ r1 r2) = |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1169 |
(if nullable r1 |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1170 |
then ALT (SEQ (red c r1) r2) (red c r2) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1171 |
else SEQ (red c r1) r2)" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1172 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1173 |
lemma L_der: |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1174 |
shows "L (der c r) = {s. c#s \<in> L r}" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1175 |
apply(induct r) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1176 |
apply(simp_all) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1177 |
apply(simp add: Sequ_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1178 |
apply(auto)[1] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1179 |
apply (metis append_Cons) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1180 |
apply (metis append_Nil nullable_correctness) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1181 |
apply (metis append_eq_Cons_conv) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1182 |
apply (metis append_Cons) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1183 |
apply (metis Cons_eq_append_conv nullable_correctness) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1184 |
apply(auto) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1185 |
done |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1186 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1187 |
lemma L_red: |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1188 |
shows "L (red c r) = {c#s | s. s \<in> L r}" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1189 |
apply(induct r) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1190 |
apply(simp_all) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1191 |
apply(simp add: Sequ_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1192 |
apply(simp add: Sequ_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1193 |
apply(auto)[1] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1194 |
apply (metis append_Nil nullable_correctness) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1195 |
apply (metis append_Cons) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1196 |
apply (metis append_Cons) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1197 |
apply(auto) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1198 |
done |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1199 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1200 |
lemma L_red_der: |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1201 |
"L(red c (der c r)) = {c#s | s. c#s \<in> L r}" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1202 |
apply(simp add: L_red) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1203 |
apply(simp add: L_der) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1204 |
done |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1205 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1206 |
lemma L_der_red: |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1207 |
"L(der c (red c r)) = L r" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1208 |
apply(simp add: L_der) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1209 |
apply(simp add: L_red) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1210 |
done |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1211 |
|
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1212 |
section {* Injection function *} |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1213 |
|
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1214 |
fun injval :: "rexp \<Rightarrow> char \<Rightarrow> val \<Rightarrow> val" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1215 |
where |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1216 |
"injval (EMPTY) c Void = Char c" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1217 |
| "injval (CHAR d) c Void = Char d" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1218 |
| "injval (CHAR d) c (Char c') = Seq (Char d) (Char c')" |
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1219 |
| "injval (ALT r1 r2) c (Left v1) = Left(injval r1 c v1)" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1220 |
| "injval (ALT r1 r2) c (Right v2) = Right(injval r2 c v2)" |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1221 |
| "injval (SEQ r1 r2) c (Char c') = Seq (Char c) (Char c')" |
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1222 |
| "injval (SEQ r1 r2) c (Seq v1 v2) = Seq (injval r1 c v1) v2" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1223 |
| "injval (SEQ r1 r2) c (Left (Seq v1 v2)) = Seq (injval r1 c v1) v2" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1224 |
| "injval (SEQ r1 r2) c (Right v2) = Seq (mkeps r1) (injval r2 c v2)" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1225 |
|
63
498171d2379a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
1226 |
|
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1227 |
section {* Projection function *} |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1228 |
|
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1229 |
fun projval :: "rexp \<Rightarrow> char \<Rightarrow> val \<Rightarrow> val" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1230 |
where |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1231 |
"projval (CHAR d) c _ = Void" |
71
2d30c74ba67f
added a section about a nullable proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
70
diff
changeset
|
1232 |
| "projval (ALT r1 r2) c (Left v1) = Left (projval r1 c v1)" |
2d30c74ba67f
added a section about a nullable proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
70
diff
changeset
|
1233 |
| "projval (ALT r1 r2) c (Right v2) = Right (projval r2 c v2)" |
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1234 |
| "projval (SEQ r1 r2) c (Seq v1 v2) = |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1235 |
(if flat v1 = [] then Right(projval r2 c v2) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1236 |
else if nullable r1 then Left (Seq (projval r1 c v1) v2) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1237 |
else Seq (projval r1 c v1) v2)" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1238 |
|
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1239 |
text {* |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1240 |
Injection value is related to r |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1241 |
*} |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1242 |
|
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1243 |
lemma v3: |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1244 |
assumes "\<turnstile> v : der c r" shows "\<turnstile> (injval r c v) : r" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1245 |
using assms |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1246 |
apply(induct arbitrary: v rule: der.induct) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1247 |
apply(simp) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1248 |
apply(erule Prf.cases) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1249 |
apply(simp_all)[5] |
49
c616ec6b1e3c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
48
diff
changeset
|
1250 |
apply(simp) |
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1251 |
apply(erule Prf.cases) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1252 |
apply(simp_all)[5] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1253 |
apply(case_tac "c = c'") |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1254 |
apply(simp) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1255 |
apply(erule Prf.cases) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1256 |
apply(simp_all)[5] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1257 |
apply (metis Prf.intros(5)) |
49
c616ec6b1e3c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
48
diff
changeset
|
1258 |
apply(simp) |
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1259 |
apply(erule Prf.cases) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1260 |
apply(simp_all)[5] |
49
c616ec6b1e3c
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
48
diff
changeset
|
1261 |
apply(simp) |
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1262 |
apply(erule Prf.cases) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1263 |
apply(simp_all)[5] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1264 |
apply (metis Prf.intros(2)) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1265 |
apply (metis Prf.intros(3)) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1266 |
apply(simp) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1267 |
apply(case_tac "nullable r1") |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1268 |
apply(simp) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1269 |
apply(erule Prf.cases) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1270 |
apply(simp_all)[5] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1271 |
apply(auto)[1] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1272 |
apply(erule Prf.cases) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1273 |
apply(simp_all)[5] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1274 |
apply(auto)[1] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1275 |
apply (metis Prf.intros(1)) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1276 |
apply(auto)[1] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1277 |
apply (metis Prf.intros(1) mkeps_nullable) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1278 |
apply(simp) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1279 |
apply(erule Prf.cases) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1280 |
apply(simp_all)[5] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1281 |
apply(auto)[1] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1282 |
apply(rule Prf.intros) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1283 |
apply(auto)[2] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1284 |
done |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1285 |
|
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1286 |
lemma v3_red: |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1287 |
assumes "\<turnstile> v : r" shows "\<turnstile> (injval (red c r) c v) : (red c r)" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1288 |
using assms |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1289 |
apply(induct c r arbitrary: v rule: red.induct) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1290 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1291 |
apply(erule Prf.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1292 |
apply(simp_all)[5] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1293 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1294 |
apply(erule Prf.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1295 |
apply(simp_all)[5] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1296 |
apply (metis Prf.intros(5)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1297 |
apply(erule Prf.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1298 |
apply(simp_all)[5] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1299 |
apply (metis Prf.intros(1) Prf.intros(5)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1300 |
apply(erule Prf.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1301 |
apply(simp_all)[5] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1302 |
apply (metis Prf.intros(2)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1303 |
apply (metis Prf.intros(3)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1304 |
apply(erule Prf.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1305 |
apply(simp_all)[5] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1306 |
apply(auto) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1307 |
prefer 2 |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1308 |
apply (metis Prf.intros(1)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1309 |
oops |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1310 |
|
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1311 |
lemma v3s: |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1312 |
assumes "\<Turnstile>s v : der c r" shows "\<Turnstile>(c#s) (injval r c v) : r" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1313 |
using assms |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1314 |
apply(induct arbitrary: s v rule: der.induct) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1315 |
apply(simp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1316 |
apply(erule Prfs.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1317 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1318 |
apply(simp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1319 |
apply(erule Prfs.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1320 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1321 |
apply(case_tac "c = c'") |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1322 |
apply(simp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1323 |
apply(erule Prfs.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1324 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1325 |
apply (metis Prfs.intros(5)) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1326 |
apply(simp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1327 |
apply(erule Prfs.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1328 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1329 |
apply(simp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1330 |
apply(erule Prfs.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1331 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1332 |
apply (metis Prfs.intros(2)) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1333 |
apply (metis Prfs.intros(3)) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1334 |
apply(simp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1335 |
apply(case_tac "nullable r1") |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1336 |
apply(simp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1337 |
apply(erule Prfs.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1338 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1339 |
apply(auto)[1] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1340 |
apply(erule Prfs.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1341 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1342 |
apply(auto)[1] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1343 |
apply (metis Prfs.intros(1) append_Cons) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1344 |
apply(auto)[1] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1345 |
apply (metis Prfs.intros(1) append_Nil mkeps_nullable_s) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1346 |
apply(simp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1347 |
apply(erule Prfs.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1348 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1349 |
apply(auto)[1] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1350 |
by (metis Prfs.intros(1) append_Cons) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1351 |
|
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1352 |
lemma v3n: |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1353 |
assumes "\<TTurnstile>n v : der c r" shows "\<TTurnstile>(Suc n) (injval r c v) : r" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1354 |
using assms |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1355 |
apply(induct arbitrary: n v rule: der.induct) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1356 |
apply(simp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1357 |
apply(erule Prfn.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1358 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1359 |
apply(simp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1360 |
apply(erule Prfn.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1361 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1362 |
apply(case_tac "c = c'") |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1363 |
apply(simp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1364 |
apply(erule Prfn.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1365 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1366 |
apply (metis One_nat_def Prfn.intros(5)) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1367 |
apply(simp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1368 |
apply(erule Prfn.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1369 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1370 |
apply(simp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1371 |
apply(erule Prfn.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1372 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1373 |
apply (metis Prfn.intros(2)) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1374 |
apply (metis Prfn.intros(3)) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1375 |
apply(simp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1376 |
apply(case_tac "nullable r1") |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1377 |
apply(simp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1378 |
apply(erule Prfn.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1379 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1380 |
apply(auto)[1] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1381 |
apply(erule Prfn.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1382 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1383 |
apply(auto)[1] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1384 |
apply (metis Prfn.intros(1) add.commute add_Suc_right) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1385 |
apply(auto)[1] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1386 |
apply (metis Prfn.intros(1) mkeps_nullable_n plus_nat.add_0) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1387 |
apply(simp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1388 |
apply(erule Prfn.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1389 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1390 |
apply(auto)[1] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1391 |
by (metis Prfn.intros(1) add_Suc) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1392 |
|
53
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1393 |
lemma v3_proj: |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1394 |
assumes "\<turnstile> v : r" and "\<exists>s. (flat v) = c # s" |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1395 |
shows "\<turnstile> (projval r c v) : der c r" |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1396 |
using assms |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1397 |
apply(induct rule: Prf.induct) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1398 |
prefer 4 |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1399 |
apply(simp) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1400 |
prefer 4 |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1401 |
apply(simp) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1402 |
apply (metis Prf.intros(4)) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1403 |
prefer 2 |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1404 |
apply(simp) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1405 |
apply (metis Prf.intros(2)) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1406 |
prefer 2 |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1407 |
apply(simp) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1408 |
apply (metis Prf.intros(3)) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1409 |
apply(auto) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1410 |
apply(rule Prf.intros) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1411 |
apply(simp) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1412 |
apply (metis Prf_flat_L nullable_correctness) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1413 |
apply(rule Prf.intros) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1414 |
apply(rule Prf.intros) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1415 |
apply (metis Cons_eq_append_conv) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1416 |
apply(simp) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1417 |
apply(rule Prf.intros) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1418 |
apply (metis Cons_eq_append_conv) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1419 |
apply(simp) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1420 |
done |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1421 |
|
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1422 |
lemma v3s_proj: |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1423 |
assumes "\<Turnstile>(c#s) v : r" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1424 |
shows "\<Turnstile>s (projval r c v) : der c r" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1425 |
using assms |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1426 |
apply(induct s\<equiv>"c#s" v r arbitrary: s rule: Prfs.induct) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1427 |
prefer 4 |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1428 |
apply(simp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1429 |
apply (metis Prfs.intros(4)) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1430 |
prefer 2 |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1431 |
apply(simp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1432 |
apply (metis Prfs.intros(2)) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1433 |
prefer 2 |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1434 |
apply(simp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1435 |
apply (metis Prfs.intros(3)) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1436 |
apply(auto) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1437 |
apply(rule Prfs.intros) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1438 |
apply (metis Prfs_flat append_Nil) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1439 |
prefer 2 |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1440 |
apply(rule Prfs.intros) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1441 |
apply(subst (asm) append_eq_Cons_conv) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1442 |
apply(auto)[1] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1443 |
apply (metis Prfs_flat) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1444 |
apply(rule Prfs.intros) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1445 |
apply metis |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1446 |
apply(simp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1447 |
apply(subst (asm) append_eq_Cons_conv) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1448 |
apply(auto)[1] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1449 |
apply (metis Prf_flat_L Prfs_Prf nullable_correctness) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1450 |
apply (metis Prfs_flat list.distinct(1)) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1451 |
apply(subst (asm) append_eq_Cons_conv) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1452 |
apply(auto)[1] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1453 |
apply (metis Prfs_flat) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1454 |
by (metis Prfs.intros(1)) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1455 |
|
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1456 |
text {* |
53
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1457 |
The string behind the injection value is an added c |
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1458 |
*} |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1459 |
|
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1460 |
lemma v4s: |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1461 |
assumes "\<Turnstile>s v : der c r" shows "flat (injval r c v) = c # (flat v)" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1462 |
using assms |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1463 |
apply(induct arbitrary: s v rule: der.induct) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1464 |
apply(simp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1465 |
apply(erule Prfs.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1466 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1467 |
apply(simp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1468 |
apply(erule Prfs.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1469 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1470 |
apply(simp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1471 |
apply(case_tac "c = c'") |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1472 |
apply(simp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1473 |
apply(auto)[1] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1474 |
apply(erule Prfs.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1475 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1476 |
apply(simp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1477 |
apply(erule Prfs.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1478 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1479 |
apply(simp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1480 |
apply(erule Prfs.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1481 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1482 |
apply(simp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1483 |
apply(case_tac "nullable r1") |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1484 |
apply(simp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1485 |
apply(erule Prfs.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1486 |
apply(simp_all (no_asm_use))[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1487 |
apply(auto)[1] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1488 |
apply(erule Prfs.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1489 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1490 |
apply(clarify) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1491 |
apply(simp only: injval.simps flat.simps) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1492 |
apply(auto)[1] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1493 |
apply (metis mkeps_flat) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1494 |
apply(simp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1495 |
apply(erule Prfs.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1496 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1497 |
done |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1498 |
|
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1499 |
lemma v4: |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1500 |
assumes "\<turnstile> v : der c r" shows "flat (injval r c v) = c # (flat v)" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1501 |
using assms |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1502 |
apply(induct arbitrary: v rule: der.induct) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1503 |
apply(simp) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1504 |
apply(erule Prf.cases) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1505 |
apply(simp_all)[5] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1506 |
apply(simp) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1507 |
apply(erule Prf.cases) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1508 |
apply(simp_all)[5] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1509 |
apply(simp) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1510 |
apply(case_tac "c = c'") |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1511 |
apply(simp) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1512 |
apply(auto)[1] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1513 |
apply(erule Prf.cases) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1514 |
apply(simp_all)[5] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1515 |
apply(simp) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1516 |
apply(erule Prf.cases) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1517 |
apply(simp_all)[5] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1518 |
apply(simp) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1519 |
apply(erule Prf.cases) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1520 |
apply(simp_all)[5] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1521 |
apply(simp) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1522 |
apply(case_tac "nullable r1") |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1523 |
apply(simp) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1524 |
apply(erule Prf.cases) |
75
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
1525 |
apply(simp_all (no_asm_use))[5] |
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1526 |
apply(auto)[1] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1527 |
apply(erule Prf.cases) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1528 |
apply(simp_all)[5] |
75
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
1529 |
apply(clarify) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
1530 |
apply(simp only: injval.simps flat.simps) |
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1531 |
apply(auto)[1] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1532 |
apply (metis mkeps_flat) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1533 |
apply(simp) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1534 |
apply(erule Prf.cases) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1535 |
apply(simp_all)[5] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1536 |
done |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1537 |
|
53
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1538 |
lemma v4_proj: |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1539 |
assumes "\<turnstile> v : r" and "\<exists>s. (flat v) = c # s" |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1540 |
shows "c # flat (projval r c v) = flat v" |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1541 |
using assms |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1542 |
apply(induct rule: Prf.induct) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1543 |
prefer 4 |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1544 |
apply(simp) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1545 |
prefer 4 |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1546 |
apply(simp) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1547 |
prefer 2 |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1548 |
apply(simp) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1549 |
prefer 2 |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1550 |
apply(simp) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1551 |
apply(auto) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1552 |
by (metis Cons_eq_append_conv) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1553 |
|
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1554 |
lemma v4_proj2: |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1555 |
assumes "\<turnstile> v : r" and "(flat v) = c # s" |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1556 |
shows "flat (projval r c v) = s" |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1557 |
using assms |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1558 |
by (metis list.inject v4_proj) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1559 |
|
63
498171d2379a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
1560 |
lemma injval_inj: "inj_on (injval r c) {v. \<turnstile> v : der c r}" |
498171d2379a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
1561 |
apply(induct c r rule: der.induct) |
498171d2379a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
1562 |
unfolding inj_on_def |
498171d2379a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
1563 |
apply(auto)[1] |
53
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1564 |
apply(erule Prf.cases) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1565 |
apply(simp_all)[5] |
63
498171d2379a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
1566 |
apply(auto)[1] |
53
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1567 |
apply(erule Prf.cases) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1568 |
apply(simp_all)[5] |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1569 |
apply(auto)[1] |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1570 |
apply(erule Prf.cases) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1571 |
apply(simp_all)[5] |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1572 |
apply(erule Prf.cases) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1573 |
apply(simp_all)[5] |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1574 |
apply(erule Prf.cases) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1575 |
apply(simp_all)[5] |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1576 |
apply(auto)[1] |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1577 |
apply(erule Prf.cases) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1578 |
apply(simp_all)[5] |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1579 |
apply(erule Prf.cases) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1580 |
apply(simp_all)[5] |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1581 |
apply(erule Prf.cases) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1582 |
apply(simp_all)[5] |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1583 |
apply(auto)[1] |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1584 |
apply(erule Prf.cases) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1585 |
apply(simp_all)[5] |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1586 |
apply(erule Prf.cases) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1587 |
apply(simp_all)[5] |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1588 |
apply(clarify) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1589 |
apply(erule Prf.cases) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1590 |
apply(simp_all)[5] |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1591 |
apply(erule Prf.cases) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1592 |
apply(simp_all)[5] |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1593 |
apply(clarify) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1594 |
apply(erule Prf.cases) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1595 |
apply(simp_all)[5] |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1596 |
apply(clarify) |
63
498171d2379a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
1597 |
apply (metis list.distinct(1) mkeps_flat v4) |
498171d2379a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
1598 |
apply(erule Prf.cases) |
498171d2379a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
1599 |
apply(simp_all)[5] |
498171d2379a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
1600 |
apply(clarify) |
498171d2379a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
1601 |
apply(rotate_tac 6) |
498171d2379a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
1602 |
apply(erule Prf.cases) |
498171d2379a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
1603 |
apply(simp_all)[5] |
498171d2379a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
1604 |
apply (metis list.distinct(1) mkeps_flat v4) |
498171d2379a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
1605 |
apply(erule Prf.cases) |
498171d2379a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
1606 |
apply(simp_all)[5] |
498171d2379a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
1607 |
apply(erule Prf.cases) |
498171d2379a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
1608 |
apply(simp_all)[5] |
498171d2379a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
1609 |
done |
498171d2379a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
1610 |
|
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1611 |
lemma Values_nullable: |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1612 |
assumes "nullable r1" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1613 |
shows "mkeps r1 \<in> Values r1 s" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1614 |
using assms |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1615 |
apply(induct r1 arbitrary: s) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1616 |
apply(simp_all) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1617 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1618 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1619 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1620 |
apply(auto)[1] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1621 |
done |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1622 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1623 |
lemma Values_injval: |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1624 |
assumes "v \<in> Values (der c r) s" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1625 |
shows "injval r c v \<in> Values r (c#s)" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1626 |
using assms |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1627 |
apply(induct c r arbitrary: v s rule: der.induct) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1628 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1629 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1630 |
apply(case_tac "c = c'") |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1631 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1632 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1633 |
apply(simp add: prefix_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1634 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1635 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1636 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1637 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1638 |
apply(auto)[1] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1639 |
apply(case_tac "nullable r1") |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1640 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1641 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1642 |
apply(auto)[1] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1643 |
apply(simp add: rest_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1644 |
apply(subst v4) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1645 |
apply(simp add: Values_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1646 |
apply(simp add: Values_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1647 |
apply(rule Values_nullable) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1648 |
apply(assumption) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1649 |
apply(simp add: rest_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1650 |
apply(subst mkeps_flat) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1651 |
apply(assumption) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1652 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1653 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1654 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1655 |
apply(auto)[1] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1656 |
apply(simp add: rest_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1657 |
apply(subst v4) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1658 |
apply(simp add: Values_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1659 |
apply(simp add: Values_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1660 |
done |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1661 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1662 |
lemma Values_projval: |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1663 |
assumes "v \<in> Values r (c#s)" "\<exists>s. flat v = c # s" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1664 |
shows "projval r c v \<in> Values (der c r) s" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1665 |
using assms |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1666 |
apply(induct r arbitrary: v s c rule: rexp.induct) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1667 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1668 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1669 |
apply(case_tac "c = x") |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1670 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1671 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1672 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1673 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1674 |
apply(simp add: prefix_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1675 |
apply(case_tac "nullable x1") |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1676 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1677 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1678 |
apply(auto)[1] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1679 |
apply(simp add: rest_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1680 |
apply (metis hd_Cons_tl hd_append2 list.sel(1)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1681 |
apply(simp add: rest_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1682 |
apply(simp add: append_eq_Cons_conv) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1683 |
apply(auto)[1] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1684 |
apply(subst v4_proj2) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1685 |
apply(simp add: Values_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1686 |
apply(assumption) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1687 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1688 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1689 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1690 |
apply(auto)[1] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1691 |
apply(auto simp add: Values_def not_nullable_flat)[1] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1692 |
apply(simp add: append_eq_Cons_conv) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1693 |
apply(auto)[1] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1694 |
apply(simp add: append_eq_Cons_conv) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1695 |
apply(auto)[1] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1696 |
apply(simp add: rest_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1697 |
apply(subst v4_proj2) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1698 |
apply(simp add: Values_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1699 |
apply(assumption) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1700 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1701 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1702 |
apply(auto)[1] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1703 |
done |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1704 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1705 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1706 |
definition "MValue v r s \<equiv> (v \<in> Values r s \<and> (\<forall>v' \<in> Values r s. v 2\<succ> v'))" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1707 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1708 |
lemma |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1709 |
assumes "MValue v1 r1 s" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1710 |
shows "MValue (Seq v1 v2) (SEQ r1 r2) s |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1711 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1712 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1713 |
lemma MValue_SEQE: |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1714 |
assumes "MValue v (SEQ r1 r2) s" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1715 |
shows "(\<exists>v1 v2. MValue v1 r1 s \<and> MValue v2 r2 (rest v1 s) \<and> v = Seq v1 v2)" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1716 |
using assms |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1717 |
apply(simp add: MValue_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1718 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1719 |
apply(erule conjE) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1720 |
apply(erule exE)+ |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1721 |
apply(erule conjE)+ |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1722 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1723 |
apply(auto) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1724 |
apply(drule_tac x="Seq x v2" in spec) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1725 |
apply(drule mp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1726 |
apply(rule_tac x="x" in exI) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1727 |
apply(rule_tac x="v2" in exI) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1728 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1729 |
oops |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1730 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1731 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1732 |
lemma MValue_ALTE: |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1733 |
assumes "MValue v (ALT r1 r2) s" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1734 |
shows "(\<exists>vl. v = Left vl \<and> MValue vl r1 s \<and> (\<forall>vr \<in> Values r2 s. length (flat vr) \<le> length (flat vl))) \<or> |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1735 |
(\<exists>vr. v = Right vr \<and> MValue vr r2 s \<and> (\<forall>vl \<in> Values r1 s. length (flat vl) < length (flat vr)))" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1736 |
using assms |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1737 |
apply(simp add: MValue_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1738 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1739 |
apply(auto) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1740 |
apply(drule_tac x="Left x" in bspec) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1741 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1742 |
apply(erule ValOrd2.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1743 |
apply(simp_all) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1744 |
apply(drule_tac x="Right vr" in bspec) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1745 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1746 |
apply(erule ValOrd2.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1747 |
apply(simp_all) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1748 |
apply(drule_tac x="Right x" in bspec) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1749 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1750 |
apply(erule ValOrd2.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1751 |
apply(simp_all) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1752 |
apply(drule_tac x="Left vl" in bspec) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1753 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1754 |
apply(erule ValOrd2.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1755 |
apply(simp_all) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1756 |
done |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1757 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1758 |
lemma MValue_ALTI1: |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1759 |
assumes "MValue vl r1 s" "\<forall>vr \<in> Values r2 s. length (flat vr) \<le> length (flat vl)" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1760 |
shows "MValue (Left vl) (ALT r1 r2) s" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1761 |
using assms |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1762 |
apply(simp add: MValue_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1763 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1764 |
apply(auto) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1765 |
apply(rule ValOrd2.intros) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1766 |
apply metis |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1767 |
apply(rule ValOrd2.intros) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1768 |
apply metis |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1769 |
done |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1770 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1771 |
lemma MValue_ALTI2: |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1772 |
assumes "MValue vr r2 s" "\<forall>vl \<in> Values r1 s. length (flat vl) < length (flat vr)" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1773 |
shows "MValue (Right vr) (ALT r1 r2) s" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1774 |
using assms |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1775 |
apply(simp add: MValue_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1776 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1777 |
apply(auto) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1778 |
apply(rule ValOrd2.intros) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1779 |
apply metis |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1780 |
apply(rule ValOrd2.intros) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1781 |
apply metis |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1782 |
done |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1783 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1784 |
lemma MValue_injval: |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1785 |
assumes "MValue v (der c r) s" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1786 |
shows "MValue (injval r c v) r (c#s)" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1787 |
using assms |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1788 |
apply(induct c r arbitrary: v s rule: der.induct) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1789 |
apply(simp add: MValue_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1790 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1791 |
apply(simp add: MValue_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1792 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1793 |
apply(case_tac "c = c'") |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1794 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1795 |
apply(simp add: MValue_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1796 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1797 |
apply(simp add: prefix_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1798 |
apply(rule ValOrd2.intros) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1799 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1800 |
apply(simp add: MValue_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1801 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1802 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1803 |
apply(drule MValue_ALTE) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1804 |
apply(erule disjE) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1805 |
apply(auto)[1] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1806 |
apply(rule MValue_ALTI1) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1807 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1808 |
apply(subst v4) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1809 |
apply(simp add: MValue_def Values_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1810 |
apply(rule ballI) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1811 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1812 |
apply(case_tac "flat vr = []") |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1813 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1814 |
apply(drule_tac x="projval r2 c vr" in bspec) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1815 |
apply(rule Values_projval) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1816 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1817 |
apply(simp add: Values_def prefix_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1818 |
apply(auto)[1] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1819 |
apply(simp add: append_eq_Cons_conv) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1820 |
apply(auto)[1] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1821 |
apply(simp add: Values_def prefix_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1822 |
apply(auto)[1] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1823 |
apply(simp add: append_eq_Cons_conv) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1824 |
apply(auto)[1] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1825 |
apply(subst (asm) v4_proj2) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1826 |
apply(assumption) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1827 |
apply(assumption) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1828 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1829 |
apply(auto)[1] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1830 |
apply(rule MValue_ALTI2) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1831 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1832 |
apply(subst v4) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1833 |
apply(simp add: MValue_def Values_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1834 |
apply(rule ballI) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1835 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1836 |
apply(case_tac "flat vl = []") |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1837 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1838 |
apply(drule_tac x="projval r1 c vl" in bspec) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1839 |
apply(rule Values_projval) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1840 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1841 |
apply(simp add: Values_def prefix_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1842 |
apply(auto)[1] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1843 |
apply(simp add: append_eq_Cons_conv) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1844 |
apply(auto)[1] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1845 |
apply(simp add: Values_def prefix_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1846 |
apply(auto)[1] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1847 |
apply(simp add: append_eq_Cons_conv) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1848 |
apply(auto)[1] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1849 |
apply(subst (asm) v4_proj2) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1850 |
apply(simp add: MValue_def Values_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1851 |
apply(assumption) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1852 |
apply(assumption) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1853 |
apply(case_tac "nullable r1") |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1854 |
defer |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1855 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1856 |
apply(frule MValue_SEQE) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1857 |
apply(auto)[1] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1858 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1859 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1860 |
apply(simp add: MValue_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1861 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1862 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1863 |
lemma nullable_red: |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1864 |
"\<not>nullable (red c r)" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1865 |
apply(induct r) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1866 |
apply(auto) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1867 |
done |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1868 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1869 |
lemma twq: |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1870 |
assumes "\<turnstile> v : r" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1871 |
shows "\<turnstile> injval r c v : red c r" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1872 |
using assms |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1873 |
apply(induct) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1874 |
apply(auto) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1875 |
oops |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1876 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1877 |
lemma injval_inj_red: "inj_on (injval (red c r) c) {v. \<turnstile> v : r}" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1878 |
using injval_inj |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1879 |
apply(auto simp add: inj_on_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1880 |
apply(drule_tac x="red c r" in meta_spec) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1881 |
apply(drule_tac x="c" in meta_spec) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1882 |
apply(drule_tac x="x" in spec) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1883 |
apply(drule mp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1884 |
oops |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
1885 |
|
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1886 |
lemma |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1887 |
assumes "POSIXs v (der c r) s" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1888 |
shows "POSIXs (injval r c v) r (c # s)" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1889 |
using assms |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1890 |
apply(induct c r arbitrary: v s rule: der.induct) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1891 |
apply(auto simp add: POSIXs_def)[1] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1892 |
apply(erule Prfs.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1893 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1894 |
apply(erule Prfs.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1895 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1896 |
apply(auto simp add: POSIXs_def)[1] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1897 |
apply(erule Prfs.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1898 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1899 |
apply(erule Prfs.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1900 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1901 |
apply(case_tac "c = c'") |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1902 |
apply(auto simp add: POSIXs_def)[1] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1903 |
apply(erule Prfs.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1904 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1905 |
apply (metis Prfs.intros(5)) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1906 |
apply(erule Prfs.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1907 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1908 |
apply(erule Prfs.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1909 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1910 |
apply (metis ValOrd2.intros(8)) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1911 |
apply(auto simp add: POSIXs_def)[1] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1912 |
apply(erule Prfs.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1913 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1914 |
apply(erule Prfs.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1915 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1916 |
apply(frule Prfs_POSIX) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1917 |
apply(drule conjunct1) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1918 |
apply(erule Prfs.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1919 |
apply(simp_all)[5] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1920 |
apply(rule POSIXs_ALT_I1) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1921 |
apply (metis POSIXs_ALT2) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1922 |
apply(rule POSIXs_ALT_I2) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1923 |
apply (metis POSIXs_ALT1a) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1924 |
apply(frule POSIXs_ALT1b) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1925 |
apply(auto) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1926 |
apply(frule POSIXs_ALT1a) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1927 |
(* HERE *) |
78
279d0bc48308
updated the Isabelle theories with the totality proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
77
diff
changeset
|
1928 |
oops |
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
1929 |
|
53
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1930 |
lemma t: "(c#xs = c#ys) \<Longrightarrow> xs = ys" |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1931 |
by (metis list.sel(3)) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
1932 |
|
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
1933 |
lemma t2: "(xs = ys) \<Longrightarrow> (c#xs) = (c#ys)" |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
1934 |
by (metis) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
1935 |
|
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
1936 |
lemma "\<not>(nullable r) \<Longrightarrow> \<not>(\<exists>v. \<turnstile> v : r \<and> flat v = [])" |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
1937 |
by (metis Prf_flat_L nullable_correctness) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
1938 |
|
63
498171d2379a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
1939 |
|
73
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1940 |
lemma LeftRight: |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1941 |
assumes "(Left v1) \<succ>(der c (ALT r1 r2)) (Right v2)" |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1942 |
and "\<turnstile> v1 : der c r1" "\<turnstile> v2 : der c r2" |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1943 |
shows "(injval (ALT r1 r2) c (Left v1)) \<succ>(ALT r1 r2) (injval (ALT r1 r2) c (Right v2))" |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1944 |
using assms |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1945 |
apply(simp) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1946 |
apply(erule ValOrd.cases) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1947 |
apply(simp_all)[8] |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1948 |
apply(rule ValOrd.intros) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1949 |
apply(clarify) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1950 |
apply(subst v4) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1951 |
apply(simp) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1952 |
apply(subst v4) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1953 |
apply(simp) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1954 |
apply(simp) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1955 |
done |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1956 |
|
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1957 |
lemma RightLeft: |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1958 |
assumes "(Right v1) \<succ>(der c (ALT r1 r2)) (Left v2)" |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1959 |
and "\<turnstile> v1 : der c r2" "\<turnstile> v2 : der c r1" |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1960 |
shows "(injval (ALT r1 r2) c (Right v1)) \<succ>(ALT r1 r2) (injval (ALT r1 r2) c (Left v2))" |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1961 |
using assms |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1962 |
apply(simp) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1963 |
apply(erule ValOrd.cases) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1964 |
apply(simp_all)[8] |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1965 |
apply(rule ValOrd.intros) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1966 |
apply(clarify) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1967 |
apply(subst v4) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1968 |
apply(simp) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1969 |
apply(subst v4) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1970 |
apply(simp) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1971 |
apply(simp) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1972 |
done |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1973 |
|
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1974 |
lemma h: |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1975 |
assumes "nullable r1" "\<turnstile> v1 : der c r1" |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1976 |
shows "injval r1 c v1 \<succ>r1 mkeps r1" |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1977 |
using assms |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1978 |
apply(induct r1 arbitrary: v1 rule: der.induct) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1979 |
apply(simp) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1980 |
apply(simp) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1981 |
apply(erule Prf.cases) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1982 |
apply(simp_all)[5] |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1983 |
apply(simp) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1984 |
apply(simp) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1985 |
apply(erule Prf.cases) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1986 |
apply(simp_all)[5] |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1987 |
apply(clarify) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1988 |
apply(auto)[1] |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1989 |
apply (metis ValOrd.intros(6)) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1990 |
apply (metis ValOrd.intros(6)) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1991 |
apply (metis ValOrd.intros(3) le_add2 list.size(3) mkeps_flat monoid_add_class.add.right_neutral) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1992 |
apply(auto)[1] |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1993 |
apply (metis ValOrd.intros(4) length_greater_0_conv list.distinct(1) list.size(3) mkeps_flat v4) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1994 |
apply (metis ValOrd.intros(4) length_greater_0_conv list.distinct(1) list.size(3) mkeps_flat v4) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1995 |
apply (metis ValOrd.intros(5)) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1996 |
apply(simp) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1997 |
apply(erule Prf.cases) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1998 |
apply(simp_all)[5] |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
1999 |
apply(clarify) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
2000 |
apply(erule Prf.cases) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
2001 |
apply(simp_all)[5] |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
2002 |
apply(clarify) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
2003 |
apply (metis ValOrd.intros(2) list.distinct(1) mkeps_flat v4) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
2004 |
apply(clarify) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
2005 |
by (metis ValOrd.intros(1)) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
2006 |
|
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
2007 |
lemma LeftRightSeq: |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
2008 |
assumes "(Left (Seq v1 v2)) \<succ>(der c (SEQ r1 r2)) (Right v3)" |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
2009 |
and "nullable r1" "\<turnstile> v1 : der c r1" |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
2010 |
shows "(injval (SEQ r1 r2) c (Seq v1 v2)) \<succ>(SEQ r1 r2) (injval (SEQ r1 r2) c (Right v2))" |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
2011 |
using assms |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
2012 |
apply(simp) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
2013 |
apply(erule ValOrd.cases) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
2014 |
apply(simp_all)[8] |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
2015 |
apply(clarify) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
2016 |
apply(simp) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
2017 |
apply(rule ValOrd.intros(2)) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
2018 |
prefer 2 |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
2019 |
apply (metis list.distinct(1) mkeps_flat v4) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
2020 |
by (metis h) |
6e035162345a
solved one case
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
72
diff
changeset
|
2021 |
|
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2022 |
lemma rr1: |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2023 |
assumes "\<turnstile> v : r" "\<not>nullable r" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2024 |
shows "flat v \<noteq> []" |
76
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
2025 |
using assms |
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2026 |
by (metis Prf_flat_L nullable_correctness) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2027 |
|
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2028 |
section {* TESTTEST *} |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2029 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2030 |
inductive ValOrdA :: "val \<Rightarrow> rexp \<Rightarrow> val \<Rightarrow> bool" ("_ A\<succ>_ _" [100, 100, 100] 100) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2031 |
where |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2032 |
"v2 A\<succ>r2 v2' \<Longrightarrow> (Seq v1 v2) A\<succ>(SEQ r1 r2) (Seq v1 v2')" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2033 |
| "v1 A\<succ>r1 v1' \<Longrightarrow> (Seq v1 v2) A\<succ>(SEQ r1 r2) (Seq v1' v2')" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2034 |
| "length (flat v1) \<ge> length (flat v2) \<Longrightarrow> (Left v1) A\<succ>(ALT r1 r2) (Right v2)" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2035 |
| "length (flat v2) > length (flat v1) \<Longrightarrow> (Right v2) A\<succ>(ALT r1 r2) (Left v1)" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2036 |
| "v2 A\<succ>r2 v2' \<Longrightarrow> (Right v2) A\<succ>(ALT r1 r2) (Right v2')" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2037 |
| "v1 A\<succ>r1 v1' \<Longrightarrow> (Left v1) A\<succ>(ALT r1 r2) (Left v1')" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2038 |
| "Void A\<succ>EMPTY Void" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2039 |
| "(Char c) A\<succ>(CHAR c) (Char c)" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2040 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2041 |
inductive ValOrd4 :: "val \<Rightarrow> rexp \<Rightarrow> val \<Rightarrow> bool" ("_ 4\<succ> _ _" [100, 100] 100) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2042 |
where |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2043 |
(*"v1 4\<succ>(der c r) v1' \<Longrightarrow> (injval r c v1) 4\<succ>r (injval r c v1')" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2044 |
| "\<lbrakk>v1 4\<succ>r v2; v2 4\<succ>r v3\<rbrakk> \<Longrightarrow> v1 4\<succ>r v3" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2045 |
|*) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2046 |
"\<lbrakk>v1 4\<succ>r1 v1'; flat v2 = flat v2'; \<turnstile> v2 : r2; \<turnstile> v2' : r2\<rbrakk> \<Longrightarrow> (Seq v1 v2) 4\<succ>(SEQ r1 r2) (Seq v1' v2')" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2047 |
| "\<lbrakk>v2 4\<succ>r2 v2'; \<turnstile> v1 : r1\<rbrakk> \<Longrightarrow> (Seq v1 v2) 4\<succ>(SEQ r1 r2) (Seq v1 v2')" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2048 |
| "\<lbrakk>flat v1 = flat v2; \<turnstile> v1 : r1; \<turnstile> v2 : r2\<rbrakk> \<Longrightarrow> (Left v1) 4\<succ>(ALT r1 r2) (Right v2)" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2049 |
| "v2 4\<succ>r2 v2' \<Longrightarrow> (Right v2) 4\<succ>(ALT r1 r2) (Right v2')" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2050 |
| "v1 4\<succ>r1 v1' \<Longrightarrow> (Left v1) 4\<succ>(ALT r1 r2) (Left v1')" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2051 |
| "Void 4\<succ>(EMPTY) Void" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2052 |
| "(Char c) 4\<succ>(CHAR c) (Char c)" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2053 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2054 |
lemma ValOrd4_Prf: |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2055 |
assumes "v1 4\<succ>r v2" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2056 |
shows "\<turnstile> v1 : r \<and> \<turnstile> v2 : r" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2057 |
using assms |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2058 |
apply(induct v1 r v2) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2059 |
apply(auto intro: Prf.intros) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2060 |
done |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2061 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2062 |
lemma ValOrd4_flat: |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2063 |
assumes "v1 4\<succ>r v2" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2064 |
shows "flat v1 = flat v2" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2065 |
using assms |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2066 |
apply(induct v1 r v2) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2067 |
apply(simp_all) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2068 |
done |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2069 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2070 |
lemma ValOrd4_refl: |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2071 |
assumes "\<turnstile> v : r" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2072 |
shows "v 4\<succ>r v" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2073 |
using assms |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2074 |
apply(induct v r) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2075 |
apply(auto intro: ValOrd4.intros) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2076 |
done |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2077 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2078 |
lemma |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2079 |
assumes "v1 4\<succ>r v2" "v2 4\<succ>r v3" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2080 |
shows "v1 A\<succ>r v3" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2081 |
using assms |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2082 |
apply(induct v1 r v2 arbitrary: v3) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2083 |
apply(rotate_tac 5) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2084 |
apply(erule ValOrd4.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2085 |
apply(simp_all) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2086 |
apply(clarify) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2087 |
apply (metis ValOrdA.intros(2)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2088 |
apply(clarify) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2089 |
apply (metis ValOrd4_refl ValOrdA.intros(2)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2090 |
apply(rotate_tac 3) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2091 |
apply(erule ValOrd4.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2092 |
apply(simp_all) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2093 |
apply(clarify) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2094 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2095 |
apply (metis ValOrdA.intros(2)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2096 |
apply (metis ValOrdA.intros(1)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2097 |
apply (metis ValOrdA.intros(3) order_refl) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2098 |
apply (auto intro: ValOrdA.intros) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2099 |
done |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2100 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2101 |
lemma |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2102 |
assumes "v1 4\<succ>r v2" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2103 |
shows "v1 A\<succ>r v2" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2104 |
using assms |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2105 |
apply(induct v1 r v2 arbitrary:) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2106 |
apply (metis ValOrdA.intros(2)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2107 |
apply (metis ValOrdA.intros(1)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2108 |
apply (metis ValOrdA.intros(3) order_refl) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2109 |
apply (auto intro: ValOrdA.intros) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2110 |
done |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2111 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2112 |
lemma |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2113 |
assumes "v1 \<succ>r v2" "\<turnstile> v1 : r" "\<turnstile> v2 : r" "flat v1 = flat v2" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2114 |
shows "v1 4\<succ>r v2" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2115 |
using assms |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2116 |
apply(induct v1 r v2 arbitrary:) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2117 |
apply(erule Prf.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2118 |
apply(simp_all (no_asm_use))[5] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2119 |
apply(erule Prf.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2120 |
apply(simp_all (no_asm_use))[5] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2121 |
apply(clarify) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2122 |
apply (metis ValOrd4.intros(4) ValOrd4_flat ValOrd4_refl) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2123 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2124 |
apply(erule Prf.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2125 |
apply(simp_all (no_asm_use))[5] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2126 |
apply(erule Prf.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2127 |
apply(simp_all (no_asm_use))[5] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2128 |
apply(clarify) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2129 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2130 |
lemma |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2131 |
assumes "v1 \<succ>r v2" "\<turnstile> v1 : r" "\<turnstile> v2 : r" "flat v1 = flat v2" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2132 |
shows "v1 4\<succ>r v2" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2133 |
using assms |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2134 |
apply(induct v1 r v2 arbitrary:) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2135 |
apply(erule Prf.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2136 |
apply(simp_all (no_asm_use))[5] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2137 |
apply(erule Prf.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2138 |
apply(simp_all (no_asm_use))[5] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2139 |
apply(clarify) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2140 |
apply (metis ValOrd4.intros(4) ValOrd4_flat ValOrd4_refl) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2141 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2142 |
apply(erule Prf.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2143 |
apply(simp_all (no_asm_use))[5] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2144 |
apply(erule Prf.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2145 |
apply(simp_all (no_asm_use))[5] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2146 |
apply(clarify) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2147 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2148 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2149 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2150 |
apply(erule Prf.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2151 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2152 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2153 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2154 |
|
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2155 |
lemma rr2: "hd (flats v) \<noteq> [] \<Longrightarrow> flats v \<noteq> []" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2156 |
apply(induct v) |
76
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
2157 |
apply(auto) |
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2158 |
done |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2159 |
|
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2160 |
lemma rr3: "flats v = [] \<Longrightarrow> flat v = []" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2161 |
apply(induct v) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2162 |
apply(auto) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2163 |
done |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2164 |
|
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2165 |
lemma POSIXs_der: |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2166 |
assumes "POSIXs v (der c r) s" "\<Turnstile>s v : der c r" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2167 |
shows "POSIXs (injval r c v) r (c#s)" |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2168 |
using assms |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2169 |
unfolding POSIXs_def |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2170 |
apply(auto) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2171 |
thm v3s |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2172 |
apply (erule v3s) |
76
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
2173 |
apply(drule_tac x="projval r c v'" in spec) |
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
2174 |
apply(drule mp) |
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2175 |
thm v3s_proj |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2176 |
apply(rule v3s_proj) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2177 |
apply(simp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2178 |
thm v3s_proj |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2179 |
apply(drule v3s_proj) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2180 |
oops |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2181 |
|
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2182 |
term Values |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2183 |
(* HERE *) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2184 |
|
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2185 |
lemma Prf_inj_test: |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2186 |
assumes "v1 \<succ>(der c r) v2" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2187 |
"v1 \<in> Values (der c r) s" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2188 |
"v2 \<in> Values (der c r) s" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2189 |
"injval r c v1 \<in> Values r (c#s)" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2190 |
"injval r c v2 \<in> Values r (c#s)" |
78
279d0bc48308
updated the Isabelle theories with the totality proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
77
diff
changeset
|
2191 |
shows "(injval r c v1) 2\<succ> (injval r c v2)" |
279d0bc48308
updated the Isabelle theories with the totality proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
77
diff
changeset
|
2192 |
using assms |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2193 |
apply(induct c r arbitrary: v1 v2 s rule: der.induct) |
78
279d0bc48308
updated the Isabelle theories with the totality proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
77
diff
changeset
|
2194 |
(* NULL case *) |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2195 |
apply(simp add: Values_recs) |
78
279d0bc48308
updated the Isabelle theories with the totality proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
77
diff
changeset
|
2196 |
(* EMPTY case *) |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2197 |
apply(simp add: Values_recs) |
78
279d0bc48308
updated the Isabelle theories with the totality proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
77
diff
changeset
|
2198 |
(* CHAR case *) |
279d0bc48308
updated the Isabelle theories with the totality proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
77
diff
changeset
|
2199 |
apply(case_tac "c = c'") |
279d0bc48308
updated the Isabelle theories with the totality proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
77
diff
changeset
|
2200 |
apply(simp) |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2201 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2202 |
apply (metis ValOrd2.intros(8)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2203 |
apply(simp add: Values_recs) |
78
279d0bc48308
updated the Isabelle theories with the totality proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
77
diff
changeset
|
2204 |
(* ALT case *) |
279d0bc48308
updated the Isabelle theories with the totality proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
77
diff
changeset
|
2205 |
apply(simp) |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2206 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2207 |
apply(auto)[1] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2208 |
apply(erule ValOrd.cases) |
78
279d0bc48308
updated the Isabelle theories with the totality proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
77
diff
changeset
|
2209 |
apply(simp_all)[8] |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2210 |
apply (metis ValOrd2.intros(6)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2211 |
apply(erule ValOrd.cases) |
78
279d0bc48308
updated the Isabelle theories with the totality proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
77
diff
changeset
|
2212 |
apply(simp_all)[8] |
279d0bc48308
updated the Isabelle theories with the totality proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
77
diff
changeset
|
2213 |
apply(rule ValOrd2.intros) |
279d0bc48308
updated the Isabelle theories with the totality proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
77
diff
changeset
|
2214 |
apply(subst v4) |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2215 |
apply(simp add: Values_def) |
78
279d0bc48308
updated the Isabelle theories with the totality proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
77
diff
changeset
|
2216 |
apply(subst v4) |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2217 |
apply(simp add: Values_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2218 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2219 |
apply(erule ValOrd.cases) |
78
279d0bc48308
updated the Isabelle theories with the totality proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
77
diff
changeset
|
2220 |
apply(simp_all)[8] |
279d0bc48308
updated the Isabelle theories with the totality proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
77
diff
changeset
|
2221 |
apply(rule ValOrd2.intros) |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2222 |
apply(subst v4) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2223 |
apply(simp add: Values_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2224 |
apply(subst v4) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2225 |
apply(simp add: Values_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2226 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2227 |
apply(erule ValOrd.cases) |
78
279d0bc48308
updated the Isabelle theories with the totality proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
77
diff
changeset
|
2228 |
apply(simp_all)[8] |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2229 |
apply (metis ValOrd2.intros(5)) |
78
279d0bc48308
updated the Isabelle theories with the totality proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
77
diff
changeset
|
2230 |
(* SEQ case*) |
279d0bc48308
updated the Isabelle theories with the totality proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
77
diff
changeset
|
2231 |
apply(simp) |
279d0bc48308
updated the Isabelle theories with the totality proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
77
diff
changeset
|
2232 |
apply(case_tac "nullable r1") |
279d0bc48308
updated the Isabelle theories with the totality proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
77
diff
changeset
|
2233 |
apply(simp) |
279d0bc48308
updated the Isabelle theories with the totality proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
77
diff
changeset
|
2234 |
defer |
279d0bc48308
updated the Isabelle theories with the totality proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
77
diff
changeset
|
2235 |
apply(simp) |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2236 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2237 |
apply(auto)[1] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2238 |
apply(erule ValOrd.cases) |
78
279d0bc48308
updated the Isabelle theories with the totality proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
77
diff
changeset
|
2239 |
apply(simp_all)[8] |
279d0bc48308
updated the Isabelle theories with the totality proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
77
diff
changeset
|
2240 |
apply(clarify) |
279d0bc48308
updated the Isabelle theories with the totality proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
77
diff
changeset
|
2241 |
apply(rule ValOrd2.intros) |
279d0bc48308
updated the Isabelle theories with the totality proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
77
diff
changeset
|
2242 |
apply(simp) |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2243 |
apply (metis Ord1) |
78
279d0bc48308
updated the Isabelle theories with the totality proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
77
diff
changeset
|
2244 |
apply(clarify) |
279d0bc48308
updated the Isabelle theories with the totality proof
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
77
diff
changeset
|
2245 |
apply(rule ValOrd2.intros) |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2246 |
apply(subgoal_tac "rest v1 (flat v1 @ flat v2) = flat v2") |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2247 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2248 |
apply(subgoal_tac "rest (injval r1 c v1) (c # flat v1 @ flat v2) = flat v2") |
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2249 |
apply(simp) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2250 |
|
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2251 |
apply metis |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2252 |
using injval_inj |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2253 |
apply(simp add: Values_def inj_on_def) |
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2254 |
apply metis |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2255 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2256 |
apply(auto)[1] |
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2257 |
apply(erule ValOrd.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2258 |
apply(simp_all)[8] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2259 |
apply(clarify) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2260 |
apply(erule ValOrd.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2261 |
apply(simp_all)[8] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2262 |
apply(clarify) |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2263 |
apply (metis Ord1 ValOrd2.intros(1)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2264 |
apply(clarify) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2265 |
apply(rule ValOrd2.intros(2)) |
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2266 |
apply metis |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2267 |
using injval_inj |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2268 |
apply(simp add: Values_def inj_on_def) |
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2269 |
apply metis |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2270 |
apply(erule ValOrd.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2271 |
apply(simp_all)[8] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2272 |
apply(rule ValOrd2.intros(2)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2273 |
thm h |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2274 |
apply(rule Ord1) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2275 |
apply(rule h) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2276 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2277 |
apply(simp add: Values_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2278 |
apply(simp add: Values_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2279 |
apply (metis list.distinct(1) mkeps_flat v4) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2280 |
apply(erule ValOrd.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2281 |
apply(simp_all)[8] |
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2282 |
apply(clarify) |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2283 |
apply(simp add: Values_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2284 |
defer |
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2285 |
apply(erule ValOrd.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2286 |
apply(simp_all)[8] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2287 |
apply(clarify) |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2288 |
apply(rule ValOrd2.intros(1)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2289 |
apply(rotate_tac 1) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2290 |
apply(drule_tac x="v2" in meta_spec) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2291 |
apply(rotate_tac 8) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2292 |
apply(drule_tac x="v2'" in meta_spec) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2293 |
apply(rotate_tac 8) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2294 |
apply(drule_tac x="s" in meta_spec) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2295 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2296 |
apply(drule_tac meta_mp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2297 |
apply(simp add: rest_def mkeps_flat) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2298 |
apply(drule_tac meta_mp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2299 |
apply(simp add: rest_def mkeps_flat) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2300 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2301 |
apply(simp add: rest_def mkeps_flat) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2302 |
apply(subst (asm) (5) v4) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2303 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2304 |
apply(subst (asm) (5) v4) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2305 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2306 |
apply(subst (asm) (5) v4) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2307 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2308 |
apply(simp) |
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2309 |
apply(clarify) |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2310 |
apply(simp add: prefix_Cons) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2311 |
apply(subgoal_tac "((flat v1c) @ (flat v2b)) \<sqsubseteq> (flat v2)") |
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2312 |
prefer 2 |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2313 |
apply(simp add: prefix_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2314 |
apply(auto)[1] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2315 |
(* HEREHERE *) |
76
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
2316 |
|
39cef7b9212a
added an equivalent slightly simpler POSIX definition
Christian Urban <urbanc@in.tum.de>
parents:
75
diff
changeset
|
2317 |
|
74
dfa9dbb8f8e6
updated from the session today
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
73
diff
changeset
|
2318 |
lemma Prf_inj_test: |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2319 |
assumes "v1 \<succ>r v2" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2320 |
"v1 \<in> Values r s" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2321 |
"v2 \<in> Values r s" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2322 |
"injval r c v1 \<in> Values (red c r) (c#s)" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2323 |
"injval r c v2 \<in> Values (red c r) (c#s)" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2324 |
shows "(injval r c v1) \<succ>(red c r) (injval r c v2)" |
75
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2325 |
using assms |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2326 |
apply(induct v1 r v2 arbitrary: s rule: ValOrd.induct) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2327 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2328 |
apply (metis ValOrd.intros(1)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2329 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2330 |
apply(rule ValOrd.intros(2)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2331 |
apply(metis) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2332 |
defer |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2333 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2334 |
apply(rule ValOrd.intros) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2335 |
apply(subst v4) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2336 |
apply(simp add: Values_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2337 |
apply(subst v4) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2338 |
apply(simp add: Values_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2339 |
using injval_inj_red |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2340 |
apply(simp add: Values_def inj_on_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2341 |
apply(rule notI) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2342 |
apply(drule_tac x="r1" in meta_spec) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2343 |
apply(drule_tac x="c" in meta_spec) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2344 |
apply(drule_tac x="injval r1 c v1" in spec) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2345 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2346 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2347 |
apply(drule_tac x="c" in meta_spec) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2348 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2349 |
apply metis |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2350 |
apply (metis ValOrd.intros(1)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2351 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2352 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2353 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2354 |
done |
75
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2355 |
(* EMPTY case *) |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2356 |
apply(simp add: Values_recs) |
75
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2357 |
(* CHAR case *) |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2358 |
apply(case_tac "c = c'") |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2359 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2360 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2361 |
apply (metis ValOrd2.intros(8)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2362 |
apply(simp add: Values_recs) |
75
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2363 |
(* ALT case *) |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2364 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2365 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2366 |
apply(auto)[1] |
75
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2367 |
apply(erule ValOrd.cases) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2368 |
apply(simp_all)[8] |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2369 |
apply (metis ValOrd2.intros(6)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2370 |
apply(erule ValOrd.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2371 |
apply(simp_all)[8] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2372 |
apply(rule ValOrd2.intros) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2373 |
apply(subst v4) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2374 |
apply(simp add: Values_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2375 |
apply(subst v4) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2376 |
apply(simp add: Values_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2377 |
apply(simp) |
75
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2378 |
apply(erule ValOrd.cases) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2379 |
apply(simp_all)[8] |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2380 |
apply(rule ValOrd2.intros) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2381 |
apply(subst v4) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2382 |
apply(simp add: Values_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2383 |
apply(subst v4) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2384 |
apply(simp add: Values_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2385 |
apply(simp) |
75
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2386 |
apply(erule ValOrd.cases) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2387 |
apply(simp_all)[8] |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2388 |
apply (metis ValOrd2.intros(5)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2389 |
(* SEQ case*) |
75
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2390 |
apply(simp) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2391 |
apply(case_tac "nullable r1") |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2392 |
apply(simp) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2393 |
defer |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2394 |
apply(simp) |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2395 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2396 |
apply(auto)[1] |
75
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2397 |
apply(erule ValOrd.cases) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2398 |
apply(simp_all)[8] |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2399 |
apply(clarify) |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2400 |
apply(rule ValOrd2.intros) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2401 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2402 |
apply (metis Ord1) |
75
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2403 |
apply(clarify) |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2404 |
apply(rule ValOrd2.intros) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2405 |
apply metis |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2406 |
using injval_inj |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2407 |
apply(simp add: Values_def inj_on_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2408 |
apply metis |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2409 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2410 |
apply(auto)[1] |
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2411 |
apply(erule ValOrd.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2412 |
apply(simp_all)[8] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2413 |
apply(clarify) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2414 |
apply(erule ValOrd.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2415 |
apply(simp_all)[8] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2416 |
apply(clarify) |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2417 |
apply (metis Ord1 ValOrd2.intros(1)) |
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2418 |
apply(clarify) |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2419 |
apply(rule ValOrd2.intros(2)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2420 |
apply metis |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2421 |
using injval_inj |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2422 |
apply(simp add: Values_def inj_on_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2423 |
apply metis |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2424 |
apply(erule ValOrd.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2425 |
apply(simp_all)[8] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2426 |
apply(rule ValOrd2.intros(2)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2427 |
thm h |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2428 |
apply(rule Ord1) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2429 |
apply(rule h) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2430 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2431 |
apply(simp add: Values_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2432 |
apply(simp add: Values_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2433 |
apply (metis list.distinct(1) mkeps_flat v4) |
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2434 |
apply(erule ValOrd.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2435 |
apply(simp_all)[8] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2436 |
apply(clarify) |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2437 |
apply(simp add: Values_def) |
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2438 |
defer |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2439 |
apply(erule ValOrd.cases) |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2440 |
apply(simp_all)[8] |
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2441 |
apply(clarify) |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2442 |
apply(rule ValOrd2.intros(1)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2443 |
apply(rotate_tac 1) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2444 |
apply(drule_tac x="v2" in meta_spec) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2445 |
apply(rotate_tac 8) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2446 |
apply(drule_tac x="v2'" in meta_spec) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2447 |
apply(rotate_tac 8) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2448 |
apply(drule_tac x="s" in meta_spec) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2449 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2450 |
apply(drule_tac meta_mp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2451 |
apply(simp add: rest_def mkeps_flat) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2452 |
apply(drule_tac meta_mp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2453 |
apply(simp add: rest_def mkeps_flat) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2454 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2455 |
apply(simp add: rest_def mkeps_flat) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2456 |
apply(subst (asm) (5) v4) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2457 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2458 |
apply(subst (asm) (5) v4) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2459 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2460 |
apply(subst (asm) (5) v4) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2461 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2462 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2463 |
apply(clarify) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2464 |
apply(simp add: prefix_Cons) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2465 |
apply(subgoal_tac "((flat v1c) @ (flat v2b)) \<sqsubseteq> (flat v2)") |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2466 |
prefer 2 |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2467 |
apply(simp add: prefix_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2468 |
apply(auto)[1] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2469 |
(* HEREHERE *) |
77
4b4c677501e7
proved some basic properties (totality and trichonomity) for the orderings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
2470 |
|
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2471 |
lemma Prf_inj_test: |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2472 |
assumes "v1 \<succ>(der c r) v2" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2473 |
"v1 \<in> Values (der c r) s" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2474 |
"v2 \<in> Values (der c r) s" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2475 |
"injval r c v1 \<in> Values r (c#s)" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2476 |
"injval r c v2 \<in> Values r (c#s)" |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2477 |
shows "(injval r c v1) 2\<succ> (injval r c v2)" |
53
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
2478 |
using assms |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2479 |
apply(induct c r arbitrary: v1 v2 s rule: der.induct) |
55
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
53
diff
changeset
|
2480 |
(* NULL case *) |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2481 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2482 |
(* EMPTY case *) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2483 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2484 |
(* CHAR case *) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2485 |
apply(case_tac "c = c'") |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2486 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2487 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2488 |
apply (metis ValOrd2.intros(8)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2489 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2490 |
(* ALT case *) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2491 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2492 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2493 |
apply(auto)[1] |
53
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
2494 |
apply(erule ValOrd.cases) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
2495 |
apply(simp_all)[8] |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2496 |
apply (metis ValOrd2.intros(6)) |
53
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
2497 |
apply(erule ValOrd.cases) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
2498 |
apply(simp_all)[8] |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2499 |
apply(rule ValOrd2.intros) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2500 |
apply(subst v4) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2501 |
apply(simp add: Values_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2502 |
apply(subst v4) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2503 |
apply(simp add: Values_def) |
53
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
2504 |
apply(simp) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
2505 |
apply(erule ValOrd.cases) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
2506 |
apply(simp_all)[8] |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2507 |
apply(rule ValOrd2.intros) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2508 |
apply(subst v4) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2509 |
apply(simp add: Values_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2510 |
apply(subst v4) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2511 |
apply(simp add: Values_def) |
53
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
2512 |
apply(simp) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
2513 |
apply(erule ValOrd.cases) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
2514 |
apply(simp_all)[8] |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2515 |
apply (metis ValOrd2.intros(5)) |
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2516 |
(* SEQ case*) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2517 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2518 |
apply(case_tac "nullable r1") |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2519 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2520 |
defer |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2521 |
apply(simp) |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2522 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2523 |
apply(auto)[1] |
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2524 |
apply(erule ValOrd.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2525 |
apply(simp_all)[8] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2526 |
apply(clarify) |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2527 |
apply(rule ValOrd2.intros) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2528 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2529 |
apply (metis Ord1) |
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2530 |
apply(clarify) |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2531 |
apply(rule ValOrd2.intros) |
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2532 |
apply metis |
63
498171d2379a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
2533 |
using injval_inj |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2534 |
apply(simp add: Values_def inj_on_def) |
63
498171d2379a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
2535 |
apply metis |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2536 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2537 |
apply(auto)[1] |
63
498171d2379a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
2538 |
apply(erule ValOrd.cases) |
498171d2379a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
2539 |
apply(simp_all)[8] |
498171d2379a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
2540 |
apply(clarify) |
498171d2379a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
2541 |
apply(erule ValOrd.cases) |
498171d2379a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
2542 |
apply(simp_all)[8] |
498171d2379a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
2543 |
apply(clarify) |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2544 |
apply (metis Ord1 ValOrd2.intros(1)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2545 |
apply(clarify) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2546 |
apply(rule ValOrd2.intros(2)) |
63
498171d2379a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
2547 |
apply metis |
498171d2379a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
2548 |
using injval_inj |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2549 |
apply(simp add: Values_def inj_on_def) |
63
498171d2379a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
2550 |
apply metis |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2551 |
apply(erule ValOrd.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2552 |
apply(simp_all)[8] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2553 |
apply(rule ValOrd2.intros(2)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2554 |
thm h |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2555 |
apply(rule Ord1) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2556 |
apply(rule h) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2557 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2558 |
apply(simp add: Values_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2559 |
apply(simp add: Values_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2560 |
apply (metis list.distinct(1) mkeps_flat v4) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2561 |
apply(erule ValOrd.cases) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2562 |
apply(simp_all)[8] |
63
498171d2379a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
2563 |
apply(clarify) |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2564 |
apply(simp add: Values_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2565 |
defer |
63
498171d2379a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
2566 |
apply(erule ValOrd.cases) |
498171d2379a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
2567 |
apply(simp_all)[8] |
498171d2379a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
2568 |
apply(clarify) |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2569 |
apply(rule ValOrd2.intros(1)) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2570 |
apply(rotate_tac 1) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2571 |
apply(drule_tac x="v2" in meta_spec) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2572 |
apply(rotate_tac 8) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2573 |
apply(drule_tac x="v2'" in meta_spec) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2574 |
apply(rotate_tac 8) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2575 |
apply(drule_tac x="s" in meta_spec) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2576 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2577 |
apply(drule_tac meta_mp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2578 |
apply(simp add: rest_def mkeps_flat) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2579 |
apply(drule_tac meta_mp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2580 |
apply(simp add: rest_def mkeps_flat) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2581 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2582 |
apply(simp add: rest_def mkeps_flat) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2583 |
apply(subst (asm) (5) v4) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2584 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2585 |
apply(subst (asm) (5) v4) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2586 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2587 |
apply(subst (asm) (5) v4) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2588 |
apply(simp) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2589 |
apply(simp) |
63
498171d2379a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
2590 |
apply(clarify) |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2591 |
apply(simp add: prefix_Cons) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2592 |
apply(subgoal_tac "((flat v1c) @ (flat v2b)) \<sqsubseteq> (flat v2)") |
63
498171d2379a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
2593 |
prefer 2 |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2594 |
apply(simp add: prefix_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2595 |
apply(auto)[1] |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2596 |
(* HEREHERE *) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2597 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2598 |
apply(subst (asm) (7) v4) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2599 |
apply(simp) |
63
498171d2379a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
62
diff
changeset
|
2600 |
|
75
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2601 |
|
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2602 |
(* HEREHERE *) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2603 |
|
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2604 |
apply(simp add: Values_def) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2605 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2606 |
apply(simp add: Values_recs) |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2607 |
done |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2608 |
|
74
dfa9dbb8f8e6
updated from the session today
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
73
diff
changeset
|
2609 |
lemma POSIX_der: |
dfa9dbb8f8e6
updated from the session today
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
73
diff
changeset
|
2610 |
assumes "POSIX v (der c r)" "\<turnstile> v : der c r" |
dfa9dbb8f8e6
updated from the session today
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
73
diff
changeset
|
2611 |
shows "POSIX (injval r c v) r" |
dfa9dbb8f8e6
updated from the session today
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
73
diff
changeset
|
2612 |
using assms |
dfa9dbb8f8e6
updated from the session today
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
73
diff
changeset
|
2613 |
unfolding POSIX_def |
dfa9dbb8f8e6
updated from the session today
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
73
diff
changeset
|
2614 |
apply(auto) |
dfa9dbb8f8e6
updated from the session today
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
73
diff
changeset
|
2615 |
thm v3 |
75
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2616 |
apply (erule v3) |
74
dfa9dbb8f8e6
updated from the session today
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
73
diff
changeset
|
2617 |
thm v4 |
dfa9dbb8f8e6
updated from the session today
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
73
diff
changeset
|
2618 |
apply(subst (asm) v4) |
dfa9dbb8f8e6
updated from the session today
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
73
diff
changeset
|
2619 |
apply(assumption) |
dfa9dbb8f8e6
updated from the session today
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
73
diff
changeset
|
2620 |
apply(drule_tac x="projval r c v'" in spec) |
dfa9dbb8f8e6
updated from the session today
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
73
diff
changeset
|
2621 |
apply(drule mp) |
dfa9dbb8f8e6
updated from the session today
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
73
diff
changeset
|
2622 |
apply(rule conjI) |
dfa9dbb8f8e6
updated from the session today
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
73
diff
changeset
|
2623 |
thm v3_proj |
dfa9dbb8f8e6
updated from the session today
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
73
diff
changeset
|
2624 |
apply(rule v3_proj) |
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2625 |
apply(simp) |
74
dfa9dbb8f8e6
updated from the session today
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
73
diff
changeset
|
2626 |
apply(rule_tac x="flat v" in exI) |
dfa9dbb8f8e6
updated from the session today
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
73
diff
changeset
|
2627 |
apply(simp) |
dfa9dbb8f8e6
updated from the session today
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
73
diff
changeset
|
2628 |
thm t |
dfa9dbb8f8e6
updated from the session today
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
73
diff
changeset
|
2629 |
apply(rule_tac c="c" in t) |
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2630 |
apply(simp) |
74
dfa9dbb8f8e6
updated from the session today
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
73
diff
changeset
|
2631 |
thm v4_proj |
dfa9dbb8f8e6
updated from the session today
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
73
diff
changeset
|
2632 |
apply(subst v4_proj) |
dfa9dbb8f8e6
updated from the session today
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
73
diff
changeset
|
2633 |
apply(simp) |
dfa9dbb8f8e6
updated from the session today
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
73
diff
changeset
|
2634 |
apply(rule_tac x="flat v" in exI) |
dfa9dbb8f8e6
updated from the session today
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
73
diff
changeset
|
2635 |
apply(simp) |
dfa9dbb8f8e6
updated from the session today
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
73
diff
changeset
|
2636 |
apply(simp) |
81
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2637 |
thm Prf_inj_test |
7ac7782a7318
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
79
diff
changeset
|
2638 |
apply(drule_tac r="r" in Prf_inj_test) |
75
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2639 |
oops |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2640 |
|
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2641 |
lemma POSIX_der: |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2642 |
assumes "POSIX v (der c r)" "\<turnstile> v : der c r" |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2643 |
shows "POSIX (injval r c v) r" |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2644 |
using assms |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2645 |
apply(induct c r arbitrary: v rule: der.induct) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2646 |
(* null case*) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2647 |
apply(simp add: POSIX_def) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2648 |
apply(auto)[1] |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2649 |
apply(erule Prf.cases) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2650 |
apply(simp_all)[5] |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2651 |
apply(erule Prf.cases) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2652 |
apply(simp_all)[5] |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2653 |
(* empty case *) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2654 |
apply(simp add: POSIX_def) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2655 |
apply(auto)[1] |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2656 |
apply(erule Prf.cases) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2657 |
apply(simp_all)[5] |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2658 |
apply(erule Prf.cases) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2659 |
apply(simp_all)[5] |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2660 |
(* char case *) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2661 |
apply(simp add: POSIX_def) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2662 |
apply(case_tac "c = c'") |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2663 |
apply(auto)[1] |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2664 |
apply(erule Prf.cases) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2665 |
apply(simp_all)[5] |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2666 |
apply (metis Prf.intros(5)) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2667 |
apply(erule Prf.cases) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2668 |
apply(simp_all)[5] |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2669 |
apply(erule Prf.cases) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2670 |
apply(simp_all)[5] |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2671 |
apply (metis ValOrd.intros(8)) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2672 |
apply(auto)[1] |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2673 |
apply(erule Prf.cases) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2674 |
apply(simp_all)[5] |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2675 |
apply(erule Prf.cases) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2676 |
apply(simp_all)[5] |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2677 |
(* alt case *) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2678 |
apply(erule Prf.cases) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2679 |
apply(simp_all)[5] |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2680 |
apply(clarify) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2681 |
apply(simp (no_asm) add: POSIX_def) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2682 |
apply(auto)[1] |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2683 |
apply (metis Prf.intros(2) v3) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2684 |
apply(rotate_tac 4) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2685 |
apply(erule Prf.cases) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2686 |
apply(simp_all)[5] |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2687 |
apply (metis POSIX_ALT2 POSIX_def ValOrd.intros(6)) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2688 |
apply (metis ValOrd.intros(3) order_refl) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2689 |
apply(simp (no_asm) add: POSIX_def) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2690 |
apply(auto)[1] |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2691 |
apply (metis Prf.intros(3) v3) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2692 |
apply(rotate_tac 4) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2693 |
apply(erule Prf.cases) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2694 |
apply(simp_all)[5] |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2695 |
defer |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2696 |
apply (metis POSIX_ALT1a POSIX_def ValOrd.intros(5)) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2697 |
prefer 2 |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2698 |
apply(subst (asm) (5) POSIX_def) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2699 |
apply(auto)[1] |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2700 |
apply(rotate_tac 5) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2701 |
apply(erule Prf.cases) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2702 |
apply(simp_all)[5] |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2703 |
apply(rule ValOrd.intros) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2704 |
apply(subst (asm) v4) |
74
dfa9dbb8f8e6
updated from the session today
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
73
diff
changeset
|
2705 |
apply(simp) |
75
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2706 |
apply(drule_tac x="Left (projval r1a c v1)" in spec) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2707 |
apply(clarify) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2708 |
apply(drule mp) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2709 |
apply(rule conjI) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2710 |
apply (metis Prf.intros(2) v3_proj) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2711 |
apply(simp) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2712 |
apply (metis v4_proj2) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2713 |
apply(erule ValOrd.cases) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2714 |
apply(simp_all)[8] |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2715 |
apply (metis less_not_refl v4_proj2) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2716 |
(* seq case *) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2717 |
apply(case_tac "nullable r1") |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2718 |
defer |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2719 |
apply(simp add: POSIX_def) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2720 |
apply(auto)[1] |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2721 |
apply(erule Prf.cases) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2722 |
apply(simp_all)[5] |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2723 |
apply (metis Prf.intros(1) v3) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2724 |
apply(erule Prf.cases) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2725 |
apply(simp_all)[5] |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2726 |
apply(erule Prf.cases) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2727 |
apply(simp_all)[5] |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2728 |
apply(clarify) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2729 |
apply(subst (asm) (3) v4) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2730 |
apply(simp) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2731 |
apply(simp) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2732 |
apply(subgoal_tac "flat v1a \<noteq> []") |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2733 |
prefer 2 |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2734 |
apply (metis Prf_flat_L nullable_correctness) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2735 |
apply(subgoal_tac "\<exists>s. flat v1a = c # s") |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2736 |
prefer 2 |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2737 |
apply (metis append_eq_Cons_conv) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2738 |
apply(auto)[1] |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2739 |
|
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2740 |
|
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2741 |
apply(auto) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2742 |
thm v3 |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2743 |
apply (erule v3) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2744 |
thm v4 |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2745 |
apply(subst (asm) v4) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2746 |
apply(assumption) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2747 |
apply(drule_tac x="projval r c v'" in spec) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2748 |
apply(drule mp) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2749 |
apply(rule conjI) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2750 |
thm v3_proj |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2751 |
apply(rule v3_proj) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2752 |
apply(simp) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2753 |
apply(rule_tac x="flat v" in exI) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2754 |
apply(simp) |
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2755 |
thm t |
74
dfa9dbb8f8e6
updated from the session today
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
73
diff
changeset
|
2756 |
apply(rule_tac c="c" in t) |
dfa9dbb8f8e6
updated from the session today
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
73
diff
changeset
|
2757 |
apply(simp) |
dfa9dbb8f8e6
updated from the session today
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
73
diff
changeset
|
2758 |
thm v4_proj |
dfa9dbb8f8e6
updated from the session today
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
73
diff
changeset
|
2759 |
apply(subst v4_proj) |
dfa9dbb8f8e6
updated from the session today
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
73
diff
changeset
|
2760 |
apply(simp) |
dfa9dbb8f8e6
updated from the session today
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
73
diff
changeset
|
2761 |
apply(rule_tac x="flat v" in exI) |
dfa9dbb8f8e6
updated from the session today
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
73
diff
changeset
|
2762 |
apply(simp) |
dfa9dbb8f8e6
updated from the session today
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
73
diff
changeset
|
2763 |
apply(simp) |
75
f95a405c3180
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
74
diff
changeset
|
2764 |
oops |
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2765 |
|
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2766 |
|
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2767 |
lemma POSIX_ex: "\<turnstile> v : r \<Longrightarrow> \<exists>v. POSIX v r" |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2768 |
apply(induct r arbitrary: v) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2769 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2770 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2771 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2772 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2773 |
apply(rule_tac x="Void" in exI) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2774 |
apply(simp add: POSIX_def) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2775 |
apply(auto)[1] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2776 |
apply (metis Prf.intros(4)) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2777 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2778 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2779 |
apply (metis ValOrd.intros(7)) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2780 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2781 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2782 |
apply(rule_tac x="Char c" in exI) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2783 |
apply(simp add: POSIX_def) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2784 |
apply(auto)[1] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2785 |
apply (metis Prf.intros(5)) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2786 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2787 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2788 |
apply (metis ValOrd.intros(8)) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2789 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2790 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2791 |
apply(auto)[1] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2792 |
apply(drule_tac x="v1" in meta_spec) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2793 |
apply(drule_tac x="v2" in meta_spec) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2794 |
apply(auto)[1] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2795 |
defer |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2796 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2797 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2798 |
apply(auto)[1] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2799 |
apply (metis POSIX_ALT_I1) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2800 |
apply (metis POSIX_ALT_I1 POSIX_ALT_I2) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2801 |
apply(case_tac "nullable r1a") |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2802 |
apply(rule_tac x="Seq (mkeps r1a) va" in exI) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2803 |
apply(auto simp add: POSIX_def)[1] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2804 |
apply (metis Prf.intros(1) mkeps_nullable) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2805 |
apply(simp add: mkeps_flat) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2806 |
apply(rotate_tac 7) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2807 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2808 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2809 |
apply(case_tac "mkeps r1 = v1a") |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2810 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2811 |
apply (rule ValOrd.intros(1)) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2812 |
apply (metis append_Nil mkeps_flat) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2813 |
apply (rule ValOrd.intros(2)) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2814 |
apply(drule mkeps_POSIX) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2815 |
apply(simp add: POSIX_def) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2816 |
|
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2817 |
apply metis |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2818 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2819 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2820 |
apply(erule disjE) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2821 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2822 |
|
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2823 |
apply(drule_tac x="v2" in spec) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2824 |
|
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2825 |
lemma POSIX_ex2: "\<turnstile> v : r \<Longrightarrow> \<exists>v. POSIX v r \<and> \<turnstile> v : r" |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2826 |
apply(induct r arbitrary: v) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2827 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2828 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2829 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2830 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2831 |
apply(rule_tac x="Void" in exI) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2832 |
apply(simp add: POSIX_def) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2833 |
apply(auto)[1] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2834 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2835 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2836 |
apply (metis ValOrd.intros(7)) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2837 |
apply (metis Prf.intros(4)) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2838 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2839 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2840 |
apply(rule_tac x="Char c" in exI) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2841 |
apply(simp add: POSIX_def) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2842 |
apply(auto)[1] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2843 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2844 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2845 |
apply (metis ValOrd.intros(8)) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2846 |
apply (metis Prf.intros(5)) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2847 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2848 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2849 |
apply(auto)[1] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2850 |
apply(drule_tac x="v1" in meta_spec) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2851 |
apply(drule_tac x="v2" in meta_spec) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2852 |
apply(auto)[1] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2853 |
apply(simp add: POSIX_def) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2854 |
apply(auto)[1] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2855 |
apply(rule ccontr) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2856 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2857 |
apply(drule_tac x="Seq v va" in spec) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2858 |
apply(drule mp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2859 |
defer |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2860 |
apply (metis Prf.intros(1)) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2861 |
oops |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2862 |
|
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2863 |
lemma POSIX_ALT_cases: |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2864 |
assumes "\<turnstile> v : (ALT r1 r2)" "POSIX v (ALT r1 r2)" |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2865 |
shows "(\<exists>v1. v = Left v1 \<and> POSIX v1 r1) \<or> (\<exists>v2. v = Right v2 \<and> POSIX v2 r2)" |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2866 |
using assms |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2867 |
apply(erule_tac Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2868 |
apply(simp_all) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2869 |
unfolding POSIX_def |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2870 |
apply(auto) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2871 |
apply (metis POSIX_ALT2 POSIX_def assms(2)) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2872 |
by (metis POSIX_ALT1b assms(2)) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2873 |
|
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2874 |
lemma POSIX_ALT_cases2: |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2875 |
assumes "POSIX v (ALT r1 r2)" "\<turnstile> v : (ALT r1 r2)" |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2876 |
shows "(\<exists>v1. v = Left v1 \<and> POSIX v1 r1) \<or> (\<exists>v2. v = Right v2 \<and> POSIX v2 r2)" |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2877 |
using assms POSIX_ALT_cases by auto |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2878 |
|
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2879 |
lemma Prf_flat_empty: |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2880 |
assumes "\<turnstile> v : r" "flat v = []" |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2881 |
shows "nullable r" |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2882 |
using assms |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2883 |
apply(induct) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2884 |
apply(auto) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2885 |
done |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2886 |
|
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2887 |
lemma POSIX_proj: |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2888 |
assumes "POSIX v r" "\<turnstile> v : r" "\<exists>s. flat v = c#s" |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2889 |
shows "POSIX (projval r c v) (der c r)" |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2890 |
using assms |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2891 |
apply(induct r c v arbitrary: rule: projval.induct) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2892 |
defer |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2893 |
defer |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2894 |
defer |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2895 |
defer |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2896 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2897 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2898 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2899 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2900 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2901 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2902 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2903 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2904 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2905 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2906 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2907 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2908 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2909 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2910 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2911 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2912 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2913 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2914 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2915 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2916 |
apply(simp add: POSIX_def) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2917 |
apply(auto)[1] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2918 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2919 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2920 |
apply (metis ValOrd.intros(7)) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2921 |
apply(erule_tac [!] exE) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2922 |
prefer 3 |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2923 |
apply(frule POSIX_SEQ1) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2924 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2925 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2926 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2927 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2928 |
apply(case_tac "flat v1 = []") |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2929 |
apply(subgoal_tac "nullable r1") |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2930 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2931 |
prefer 2 |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2932 |
apply(rule_tac v="v1" in Prf_flat_empty) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2933 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2934 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2935 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2936 |
apply(frule POSIX_SEQ2) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2937 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2938 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2939 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2940 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2941 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2942 |
apply(drule meta_mp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2943 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2944 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2945 |
apply(rule ccontr) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2946 |
apply(subgoal_tac "\<turnstile> val.Right (projval r2 c v2) : (ALT (SEQ (der c r1) r2) (der c r2))") |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2947 |
apply(rotate_tac 11) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2948 |
apply(frule POSIX_ex) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2949 |
apply(erule exE) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2950 |
apply(drule POSIX_ALT_cases2) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2951 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2952 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2953 |
apply(drule v3_proj) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2954 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2955 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2956 |
apply(drule POSIX_ex) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2957 |
apply(erule exE) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2958 |
apply(frule POSIX_ALT_cases2) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2959 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2960 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2961 |
apply(erule |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2962 |
prefer 2 |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2963 |
apply(case_tac "nullable r1") |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2964 |
prefer 2 |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2965 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2966 |
apply(rotate_tac 1) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2967 |
apply(drule meta_mp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2968 |
apply(rule POSIX_SEQ1) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2969 |
apply(assumption) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2970 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2971 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2972 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2973 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2974 |
apply(rotate_tac 7) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2975 |
apply(drule meta_mp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2976 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2977 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2978 |
apply(rotate_tac 7) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2979 |
apply(drule meta_mp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2980 |
apply (metis Cons_eq_append_conv) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2981 |
|
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2982 |
|
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2983 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2984 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2985 |
apply(simp add: POSIX_def) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2986 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2987 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2988 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2989 |
apply(simp add: POSIX_def) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2990 |
|
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2991 |
|
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2992 |
lemma POSIX_proj: |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2993 |
assumes "POSIX v r" "\<turnstile> v : r" "\<exists>s. flat v = c#s" |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2994 |
shows "POSIX (projval r c v) (der c r)" |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2995 |
using assms |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2996 |
apply(induct r arbitrary: c v rule: rexp.induct) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2997 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2998 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
2999 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3000 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3001 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3002 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3003 |
apply(simp add: POSIX_def) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3004 |
apply(auto)[1] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3005 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3006 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3007 |
apply (metis ValOrd.intros(7)) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3008 |
|
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3009 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3010 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3011 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3012 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3013 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3014 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3015 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3016 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3017 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3018 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3019 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3020 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3021 |
apply(simp add: POSIX_def) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3022 |
apply(auto)[1] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3023 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3024 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3025 |
apply (metis ValOrd.intros(7)) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3026 |
apply(erule_tac [!] exE) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3027 |
prefer 3 |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3028 |
apply(frule POSIX_SEQ1) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3029 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3030 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3031 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3032 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3033 |
apply(case_tac "flat v1 = []") |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3034 |
apply(subgoal_tac "nullable r1") |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3035 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3036 |
prefer 2 |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3037 |
apply(rule_tac v="v1" in Prf_flat_empty) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3038 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3039 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3040 |
|
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3041 |
|
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3042 |
lemma POSIX_proj: |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3043 |
assumes "POSIX v r" "\<turnstile> v : r" "\<exists>s. flat v = c#s" |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3044 |
shows "POSIX (projval r c v) (der c r)" |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3045 |
using assms |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3046 |
apply(induct r c v arbitrary: rule: projval.induct) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3047 |
defer |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3048 |
defer |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3049 |
defer |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3050 |
defer |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3051 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3052 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3053 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3054 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3055 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3056 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3057 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3058 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3059 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3060 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3061 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3062 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3063 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3064 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3065 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3066 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3067 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3068 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3069 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3070 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3071 |
apply(simp add: POSIX_def) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3072 |
apply(auto)[1] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3073 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3074 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3075 |
apply (metis ValOrd.intros(7)) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3076 |
apply(erule_tac [!] exE) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3077 |
prefer 3 |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3078 |
apply(frule POSIX_SEQ1) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3079 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3080 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3081 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3082 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3083 |
apply(case_tac "flat v1 = []") |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3084 |
apply(subgoal_tac "nullable r1") |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3085 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3086 |
prefer 2 |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3087 |
apply(rule_tac v="v1" in Prf_flat_empty) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3088 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3089 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3090 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3091 |
apply(rule ccontr) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3092 |
apply(drule v3_proj) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3093 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3094 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3095 |
apply(drule POSIX_ex) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3096 |
apply(erule exE) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3097 |
apply(frule POSIX_ALT_cases2) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3098 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3099 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3100 |
apply(erule |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3101 |
prefer 2 |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3102 |
apply(case_tac "nullable r1") |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3103 |
prefer 2 |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3104 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3105 |
apply(rotate_tac 1) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3106 |
apply(drule meta_mp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3107 |
apply(rule POSIX_SEQ1) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3108 |
apply(assumption) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3109 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3110 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3111 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3112 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3113 |
apply(rotate_tac 7) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3114 |
apply(drule meta_mp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3115 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3116 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3117 |
apply(rotate_tac 7) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3118 |
apply(drule meta_mp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3119 |
apply (metis Cons_eq_append_conv) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3120 |
|
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3121 |
|
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3122 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3123 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3124 |
apply(simp add: POSIX_def) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3125 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3126 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3127 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3128 |
apply(simp add: POSIX_def) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3129 |
|
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3130 |
done |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3131 |
(* NULL case *) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3132 |
apply(simp add: POSIX_def) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3133 |
apply(auto)[1] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3134 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3135 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3136 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3137 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3138 |
apply (metis ValOrd.intros(7)) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3139 |
apply(rotate_tac 4) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3140 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3141 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3142 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3143 |
prefer 2 |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3144 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3145 |
apply(frule POSIX_ALT1a) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3146 |
apply(drule meta_mp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3147 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3148 |
apply(drule meta_mp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3149 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3150 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3151 |
apply(rule POSIX_ALT_I2) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3152 |
apply(assumption) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3153 |
apply(auto)[1] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3154 |
|
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3155 |
thm v4_proj2 |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3156 |
prefer 2 |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3157 |
apply(subst (asm) (13) POSIX_def) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3158 |
|
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3159 |
apply(drule_tac x="projval v2" in spec) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3160 |
apply(auto)[1] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3161 |
apply(drule mp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3162 |
apply(rule conjI) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3163 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3164 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3165 |
|
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3166 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3167 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3168 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3169 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3170 |
prefer 2 |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3171 |
apply(clarify) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3172 |
apply(subst (asm) (2) POSIX_def) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3173 |
|
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3174 |
apply (metis ValOrd.intros(5)) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3175 |
apply(clarify) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3176 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3177 |
apply(rotate_tac 3) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3178 |
apply(drule_tac c="c" in t2) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3179 |
apply(subst (asm) v4_proj) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3180 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3181 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3182 |
thm contrapos_np contrapos_nn |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3183 |
apply(erule contrapos_np) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3184 |
apply(rule ValOrd.intros) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3185 |
apply(subst v4_proj2) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3186 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3187 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3188 |
apply(subgoal_tac "\<not>(length (flat v1) < length (flat (projval r2a c v2a)))") |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3189 |
prefer 2 |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3190 |
apply(erule contrapos_nn) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3191 |
apply (metis nat_less_le v4_proj2) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3192 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3193 |
|
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3194 |
apply(blast) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3195 |
thm contrapos_nn |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3196 |
|
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3197 |
apply(simp add: POSIX_def) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3198 |
apply(auto)[1] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3199 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3200 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3201 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3202 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3203 |
apply(clarify) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3204 |
apply(rule ValOrd.intros) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3205 |
apply(drule meta_mp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3206 |
apply(auto)[1] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3207 |
apply (metis POSIX_ALT2 POSIX_def flat.simps(3)) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3208 |
apply metis |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3209 |
apply(clarify) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3210 |
apply(rule ValOrd.intros) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3211 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3212 |
apply(simp add: POSIX_def) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3213 |
apply(auto)[1] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3214 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3215 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3216 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3217 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3218 |
apply(clarify) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3219 |
apply(rule ValOrd.intros) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3220 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3221 |
|
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3222 |
apply(drule meta_mp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3223 |
apply(auto)[1] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3224 |
apply (metis POSIX_ALT2 POSIX_def flat.simps(3)) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3225 |
apply metis |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3226 |
apply(clarify) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3227 |
apply(rule ValOrd.intros) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3228 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3229 |
|
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3230 |
|
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3231 |
done |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3232 |
(* EMPTY case *) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3233 |
apply(simp add: POSIX_def) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3234 |
apply(auto)[1] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3235 |
apply(rotate_tac 3) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3236 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3237 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3238 |
apply(drule_tac c="c" in t2) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3239 |
apply(subst (asm) v4_proj) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3240 |
apply(auto)[2] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3241 |
|
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3242 |
apply(erule ValOrd.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3243 |
apply(simp_all)[8] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3244 |
(* CHAR case *) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3245 |
apply(case_tac "c = c'") |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3246 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3247 |
apply(erule ValOrd.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3248 |
apply(simp_all)[8] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3249 |
apply(rule ValOrd.intros) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3250 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3251 |
apply(erule ValOrd.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3252 |
apply(simp_all)[8] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3253 |
(* ALT case *) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3254 |
|
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3255 |
|
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3256 |
unfolding POSIX_def |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3257 |
apply(auto) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3258 |
thm v4 |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3259 |
|
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3260 |
lemma Prf_inj: |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3261 |
assumes "v1 \<succ>(der c r) v2" "\<turnstile> v1 : der c r" "\<turnstile> v2 : der c r" "flat v1 = flat v2" |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3262 |
shows "(injval r c v1) \<succ>r (injval r c v2)" |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3263 |
using assms |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3264 |
apply(induct arbitrary: v1 v2 rule: der.induct) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3265 |
(* NULL case *) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3266 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3267 |
apply(erule ValOrd.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3268 |
apply(simp_all)[8] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3269 |
(* EMPTY case *) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3270 |
apply(erule ValOrd.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3271 |
apply(simp_all)[8] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3272 |
(* CHAR case *) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3273 |
apply(case_tac "c = c'") |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3274 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3275 |
apply(erule ValOrd.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3276 |
apply(simp_all)[8] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3277 |
apply(rule ValOrd.intros) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3278 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3279 |
apply(erule ValOrd.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3280 |
apply(simp_all)[8] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3281 |
(* ALT case *) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3282 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3283 |
apply(erule ValOrd.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3284 |
apply(simp_all)[8] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3285 |
apply(rule ValOrd.intros) |
53
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3286 |
apply(subst v4) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3287 |
apply(clarify) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3288 |
apply(rotate_tac 3) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3289 |
apply(erule Prf.cases) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3290 |
apply(simp_all)[5] |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3291 |
apply(subst v4) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3292 |
apply(clarify) |
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3293 |
apply(rotate_tac 2) |
53
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3294 |
apply(erule Prf.cases) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3295 |
apply(simp_all)[5] |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3296 |
apply(simp) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3297 |
apply(rule ValOrd.intros) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3298 |
apply(clarify) |
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3299 |
apply(rotate_tac 3) |
53
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3300 |
apply(erule Prf.cases) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3301 |
apply(simp_all)[5] |
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3302 |
apply(clarify) |
53
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3303 |
apply(erule Prf.cases) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3304 |
apply(simp_all)[5] |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3305 |
apply(rule ValOrd.intros) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3306 |
apply(clarify) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3307 |
apply(erule Prf.cases) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3308 |
apply(simp_all)[5] |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3309 |
apply(erule Prf.cases) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3310 |
apply(simp_all)[5] |
55
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
53
diff
changeset
|
3311 |
(* SEQ case*) |
53
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3312 |
apply(simp) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3313 |
apply(case_tac "nullable r1") |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3314 |
defer |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3315 |
apply(simp) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3316 |
apply(erule ValOrd.cases) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3317 |
apply(simp_all)[8] |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3318 |
apply(clarify) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3319 |
apply(erule Prf.cases) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3320 |
apply(simp_all)[5] |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3321 |
apply(erule Prf.cases) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3322 |
apply(simp_all)[5] |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3323 |
apply(clarify) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3324 |
apply(rule ValOrd.intros) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3325 |
apply(simp) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3326 |
apply(simp) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3327 |
apply(rule ValOrd.intros(2)) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3328 |
apply(erule Prf.cases) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3329 |
apply(simp_all)[5] |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3330 |
apply(erule Prf.cases) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3331 |
apply(simp_all)[5] |
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3332 |
apply(clarify) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3333 |
defer |
53
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3334 |
apply(simp) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3335 |
apply(erule ValOrd.cases) |
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3336 |
apply(simp_all del: injval.simps)[8] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3337 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3338 |
apply(clarify) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3339 |
apply(simp) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3340 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3341 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3342 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3343 |
apply(simp_all)[5] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3344 |
apply(clarify) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3345 |
apply(erule Prf.cases) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3346 |
apply(simp_all)[5] |
53
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3347 |
apply(clarify) |
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3348 |
apply(rule ValOrd.intros(2)) |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3349 |
|
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3350 |
|
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3351 |
|
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3352 |
|
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3353 |
done |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3354 |
|
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3355 |
|
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3356 |
txt {* |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3357 |
done |
55
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
53
diff
changeset
|
3358 |
(* nullable case - unfinished *) |
53
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3359 |
apply(simp) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3360 |
apply(erule ValOrd.cases) |
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3361 |
apply(simp_all del: injval.simps)[8] |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3362 |
apply(simp) |
53
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3363 |
apply(clarify) |
55
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
53
diff
changeset
|
3364 |
apply(simp) |
53
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3365 |
apply(erule Prf.cases) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3366 |
apply(simp_all)[5] |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3367 |
apply(erule Prf.cases) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3368 |
apply(simp_all)[5] |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3369 |
apply(clarify) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3370 |
apply(erule Prf.cases) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3371 |
apply(simp_all)[5] |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3372 |
apply(clarify) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3373 |
apply(simp) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3374 |
apply(rule ValOrd.intros(2)) |
62
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3375 |
oops |
a6bb0152ccc2
updated some rules
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
56
diff
changeset
|
3376 |
*} |
55
c33cfa1e813a
added some notes (still incomplete)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
53
diff
changeset
|
3377 |
oops |
53
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3378 |
|
74
dfa9dbb8f8e6
updated from the session today
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
73
diff
changeset
|
3379 |
|
53
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3380 |
|
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3381 |
text {* |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3382 |
Injection followed by projection is the identity. |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3383 |
*} |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3384 |
|
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3385 |
lemma proj_inj_id: |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3386 |
assumes "\<turnstile> v : der c r" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3387 |
shows "projval r c (injval r c v) = v" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3388 |
using assms |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3389 |
apply(induct r arbitrary: c v rule: rexp.induct) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3390 |
apply(simp) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3391 |
apply(erule Prf.cases) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3392 |
apply(simp_all)[5] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3393 |
apply(simp) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3394 |
apply(erule Prf.cases) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3395 |
apply(simp_all)[5] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3396 |
apply(simp) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3397 |
apply(case_tac "c = char") |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3398 |
apply(simp) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3399 |
apply(erule Prf.cases) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3400 |
apply(simp_all)[5] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3401 |
apply(simp) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3402 |
apply(erule Prf.cases) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3403 |
apply(simp_all)[5] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3404 |
defer |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3405 |
apply(simp) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3406 |
apply(erule Prf.cases) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3407 |
apply(simp_all)[5] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3408 |
apply(simp) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3409 |
apply(case_tac "nullable rexp1") |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3410 |
apply(simp) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3411 |
apply(erule Prf.cases) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3412 |
apply(simp_all)[5] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3413 |
apply(auto)[1] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3414 |
apply(erule Prf.cases) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3415 |
apply(simp_all)[5] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3416 |
apply(auto)[1] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3417 |
apply (metis list.distinct(1) v4) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3418 |
apply(auto)[1] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3419 |
apply (metis mkeps_flat) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3420 |
apply(auto) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3421 |
apply(erule Prf.cases) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3422 |
apply(simp_all)[5] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3423 |
apply(auto)[1] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3424 |
apply(simp add: v4) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3425 |
done |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3426 |
|
48
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3427 |
lemma "L r \<noteq> {} \<Longrightarrow> \<exists>v. POSIX3 v r" |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3428 |
apply(induct r) |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3429 |
apply(simp) |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3430 |
apply(simp add: POSIX3_def) |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3431 |
apply(rule_tac x="Void" in exI) |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3432 |
apply(auto)[1] |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3433 |
apply (metis Prf.intros(4)) |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3434 |
apply (metis POSIX3_def flat.simps(1) mkeps.simps(1) mkeps_POSIX3 nullable.simps(2) order_refl) |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3435 |
apply(simp add: POSIX3_def) |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3436 |
apply(rule_tac x="Char char" in exI) |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3437 |
apply(auto)[1] |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3438 |
apply (metis Prf.intros(5)) |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3439 |
apply(erule Prf.cases) |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3440 |
apply(simp_all)[5] |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3441 |
apply (metis ValOrd.intros(8)) |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3442 |
apply(simp add: Sequ_def) |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3443 |
apply(auto)[1] |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3444 |
apply(drule meta_mp) |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3445 |
apply(auto)[2] |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3446 |
apply(drule meta_mp) |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3447 |
apply(auto)[2] |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3448 |
apply(rule_tac x="Seq v va" in exI) |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3449 |
apply(simp (no_asm) add: POSIX3_def) |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3450 |
apply(auto)[1] |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3451 |
apply (metis POSIX3_def Prf.intros(1)) |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3452 |
apply(erule Prf.cases) |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3453 |
apply(simp_all)[5] |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3454 |
apply(clarify) |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3455 |
apply(case_tac "v \<succ>r1a v1") |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3456 |
apply(rule ValOrd.intros(2)) |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3457 |
apply(simp) |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3458 |
apply(case_tac "v = v1") |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3459 |
apply(rule ValOrd.intros(1)) |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3460 |
apply(simp) |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3461 |
apply(simp) |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3462 |
apply (metis ValOrd_refl) |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3463 |
apply(simp add: POSIX3_def) |
53
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3464 |
oops |
48
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3465 |
|
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3466 |
lemma "\<exists>v. POSIX v r" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3467 |
apply(induct r) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3468 |
apply(rule exI) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3469 |
apply(simp add: POSIX_def) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3470 |
apply (metis (full_types) Prf_flat_L der.simps(1) der.simps(2) der.simps(3) flat.simps(1) nullable.simps(1) nullable_correctness proj_inj_id projval.simps(1) v3 v4) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3471 |
apply(rule_tac x = "Void" in exI) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3472 |
apply(simp add: POSIX_def) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3473 |
apply (metis POSIX_def flat.simps(1) mkeps.simps(1) mkeps_POSIX nullable.simps(2)) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3474 |
apply(rule_tac x = "Char char" in exI) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3475 |
apply(simp add: POSIX_def) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3476 |
apply(auto) [1] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3477 |
apply(erule Prf.cases) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3478 |
apply(simp_all) [5] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3479 |
apply (metis ValOrd.intros(8)) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3480 |
defer |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3481 |
apply(auto) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3482 |
apply (metis POSIX_ALT_I1) |
11
26b8a5213355
changed theory name
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
10
diff
changeset
|
3483 |
(* maybe it is too early to instantiate this existential quantifier *) |
26b8a5213355
changed theory name
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
10
diff
changeset
|
3484 |
(* potentially this is the wrong POSIX value *) |
20
c11651bbebf5
some small changes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
12
diff
changeset
|
3485 |
apply(case_tac "r1 = NULL") |
c11651bbebf5
some small changes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
12
diff
changeset
|
3486 |
apply(simp add: POSIX_def) |
c11651bbebf5
some small changes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
12
diff
changeset
|
3487 |
apply(auto)[1] |
c11651bbebf5
some small changes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
12
diff
changeset
|
3488 |
apply (metis L.simps(1) L.simps(4) Prf_flat_L mkeps_flat nullable.simps(1) nullable.simps(2) nullable_correctness seq_null(2)) |
c11651bbebf5
some small changes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
12
diff
changeset
|
3489 |
apply(case_tac "r1 = EMPTY") |
c11651bbebf5
some small changes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
12
diff
changeset
|
3490 |
apply(rule_tac x = "Seq Void va" in exI ) |
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3491 |
apply(simp (no_asm) add: POSIX_def) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3492 |
apply(auto) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3493 |
apply(erule Prf.cases) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3494 |
apply(simp_all) |
20
c11651bbebf5
some small changes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
12
diff
changeset
|
3495 |
apply(auto)[1] |
c11651bbebf5
some small changes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
12
diff
changeset
|
3496 |
apply(erule Prf.cases) |
c11651bbebf5
some small changes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
12
diff
changeset
|
3497 |
apply(simp_all) |
c11651bbebf5
some small changes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
12
diff
changeset
|
3498 |
apply(rule ValOrd.intros(2)) |
c11651bbebf5
some small changes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
12
diff
changeset
|
3499 |
apply(rule ValOrd.intros) |
c11651bbebf5
some small changes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
12
diff
changeset
|
3500 |
apply(case_tac "\<exists>c. r1 = CHAR c") |
c11651bbebf5
some small changes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
12
diff
changeset
|
3501 |
apply(auto) |
c11651bbebf5
some small changes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
12
diff
changeset
|
3502 |
apply(rule_tac x = "Seq (Char c) va" in exI ) |
c11651bbebf5
some small changes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
12
diff
changeset
|
3503 |
apply(simp (no_asm) add: POSIX_def) |
c11651bbebf5
some small changes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
12
diff
changeset
|
3504 |
apply(auto) |
c11651bbebf5
some small changes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
12
diff
changeset
|
3505 |
apply(erule Prf.cases) |
c11651bbebf5
some small changes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
12
diff
changeset
|
3506 |
apply(simp_all) |
c11651bbebf5
some small changes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
12
diff
changeset
|
3507 |
apply(auto)[1] |
c11651bbebf5
some small changes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
12
diff
changeset
|
3508 |
apply(erule Prf.cases) |
c11651bbebf5
some small changes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
12
diff
changeset
|
3509 |
apply(simp_all) |
c11651bbebf5
some small changes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
12
diff
changeset
|
3510 |
apply(auto)[1] |
c11651bbebf5
some small changes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
12
diff
changeset
|
3511 |
apply(rule ValOrd.intros(2)) |
c11651bbebf5
some small changes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
12
diff
changeset
|
3512 |
apply(rule ValOrd.intros) |
c11651bbebf5
some small changes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
12
diff
changeset
|
3513 |
apply(case_tac "\<exists>r1a r1b. r1 = ALT r1a r1b") |
c11651bbebf5
some small changes
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
12
diff
changeset
|
3514 |
apply(auto) |
48
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3515 |
oops (* not sure if this can be proved by induction *) |
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3516 |
|
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3517 |
text {* |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3518 |
|
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3519 |
HERE: Crucial lemma that does not go through in the sequence case. |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3520 |
|
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3521 |
*} |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3522 |
lemma v5: |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3523 |
assumes "\<turnstile> v : der c r" "POSIX v (der c r)" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3524 |
shows "POSIX (injval r c v) r" |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3525 |
using assms |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3526 |
apply(induct arbitrary: v rule: der.induct) |
53
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3527 |
(* NULL case *) |
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3528 |
apply(simp) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3529 |
apply(erule Prf.cases) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3530 |
apply(simp_all)[5] |
53
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3531 |
(* EMPTY case *) |
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3532 |
apply(simp) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3533 |
apply(erule Prf.cases) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3534 |
apply(simp_all)[5] |
53
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3535 |
(* CHAR case *) |
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3536 |
apply(simp) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3537 |
apply(case_tac "c = c'") |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3538 |
apply(auto simp add: POSIX_def)[1] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3539 |
apply(erule Prf.cases) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3540 |
apply(simp_all)[5] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3541 |
apply(erule Prf.cases) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3542 |
apply(simp_all)[5] |
53
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3543 |
apply(rule ValOrd.intros) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3544 |
apply(auto)[1] |
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3545 |
apply(erule Prf.cases) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3546 |
apply(simp_all)[5] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3547 |
(* base cases done *) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3548 |
(* ALT case *) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3549 |
apply(erule Prf.cases) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3550 |
apply(simp_all)[5] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3551 |
using POSIX_ALT POSIX_ALT_I1 apply blast |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3552 |
apply(clarify) |
53
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3553 |
apply(simp) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3554 |
apply(rule POSIX_ALT_I2) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3555 |
apply(drule POSIX_ALT1a) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3556 |
apply metis |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3557 |
apply(auto)[1] |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3558 |
apply(subst v4) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3559 |
apply(assumption) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3560 |
apply(simp) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3561 |
apply(drule POSIX_ALT1a) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3562 |
apply(rotate_tac 1) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3563 |
apply(drule_tac x="v2" in meta_spec) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3564 |
apply(simp) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3565 |
|
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3566 |
apply(rotate_tac 4) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3567 |
apply(erule Prf.cases) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3568 |
apply(simp_all)[5] |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3569 |
apply(rule ValOrd.intros) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3570 |
apply(simp) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3571 |
apply(subst (asm) v4) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3572 |
apply(assumption) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3573 |
apply(clarify) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3574 |
thm POSIX_ALT1a POSIX_ALT1b POSIX_ALT_I2 |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3575 |
apply(subst (asm) v4) |
38cde0214ad5
added some lemmas, attempted others
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
49
diff
changeset
|
3576 |
apply(auto simp add: POSIX_def)[1] |
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3577 |
apply(subgoal_tac "POSIX v2 (der c r2)") |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3578 |
prefer 2 |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3579 |
apply(auto simp add: POSIX_def)[1] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3580 |
apply (metis POSIX_ALT1a POSIX_def flat.simps(4)) |
48
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3581 |
apply(frule POSIX_ALT1a) |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3582 |
apply(drule POSIX_ALT1b) |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3583 |
apply(rule POSIX_ALT_I2) |
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3584 |
apply(rotate_tac 1) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3585 |
apply(drule_tac x="v2" in meta_spec) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3586 |
apply(simp) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3587 |
apply(subgoal_tac "\<turnstile> Right (injval r2 c v2) : (ALT r1 r2)") |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3588 |
prefer 2 |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3589 |
apply (metis Prf.intros(3) v3) |
48
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3590 |
apply auto[1] |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3591 |
apply(subst v4) |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3592 |
apply(auto)[2] |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3593 |
apply(subst (asm) (4) POSIX_def) |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3594 |
apply(subst (asm) v4) |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3595 |
apply(drule_tac x="v2" in meta_spec) |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3596 |
apply(simp) |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3597 |
|
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3598 |
apply(auto)[2] |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3599 |
|
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3600 |
thm POSIX_ALT_I2 |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3601 |
apply(rule POSIX_ALT_I2) |
652861c9473f
added a function for calculating values
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
20
diff
changeset
|
3602 |
|
10
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3603 |
apply(rule ccontr) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3604 |
apply(auto simp add: POSIX_def)[1] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3605 |
|
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3606 |
apply(rule allI) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3607 |
apply(rule impI) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3608 |
apply(erule conjE) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3609 |
thm POSIX_ALT_I2 |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3610 |
apply(frule POSIX_ALT1a) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3611 |
apply(drule POSIX_ALT1b) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3612 |
apply(rule POSIX_ALT_I2) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3613 |
apply auto[1] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3614 |
apply(subst v4) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3615 |
apply(auto)[2] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3616 |
apply(rotate_tac 1) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3617 |
apply(drule_tac x="v2" in meta_spec) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3618 |
apply(simp) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3619 |
apply(subst (asm) (4) POSIX_def) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3620 |
apply(subst (asm) v4) |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3621 |
apply(auto)[2] |
14d41b5b57b3
added test version
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3622 |
(* stuck in the ALT case *) |