author | urbanc |
Thu, 11 Aug 2011 10:26:19 +0000 | |
changeset 191 | f6a603be52d6 |
parent 190 | b73478aaf33e |
child 193 | 2a5ac68db24b |
permissions | -rw-r--r-- |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
1 |
theory Derivatives |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
2 |
imports Myhill_2 |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
3 |
begin |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
4 |
|
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
5 |
section {* Left-Quotients and Derivatives *} |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
6 |
|
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
7 |
subsection {* Left-Quotients *} |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
8 |
|
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
9 |
definition |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
10 |
Delta :: "'a lang \<Rightarrow> 'a lang" |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
11 |
where |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
12 |
"Delta A = (if [] \<in> A then {[]} else {})" |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
13 |
|
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
14 |
definition |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
15 |
Der :: "'a \<Rightarrow> 'a lang \<Rightarrow> 'a lang" |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
16 |
where |
179 | 17 |
"Der c A \<equiv> {s'. [c] @ s' \<in> A}" |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
18 |
|
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
19 |
definition |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
20 |
Ders :: "'a list \<Rightarrow> 'a lang \<Rightarrow> 'a lang" |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
21 |
where |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
22 |
"Ders s A \<equiv> {s'. s @ s' \<in> A}" |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
23 |
|
187 | 24 |
abbreviation |
25 |
"Derss s A \<equiv> \<Union> (Ders s) ` A" |
|
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
26 |
|
187 | 27 |
lemma Der_simps [simp]: |
28 |
shows "Der c {} = {}" |
|
29 |
and "Der c {[]} = {}" |
|
30 |
and "Der c {[d]} = (if c = d then {[]} else {})" |
|
31 |
and "Der c (A \<union> B) = Der c A \<union> Der c B" |
|
32 |
unfolding Der_def by auto |
|
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
33 |
|
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
34 |
lemma Der_conc [simp]: |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
35 |
shows "Der c (A \<cdot> B) = (Der c A) \<cdot> B \<union> (Delta A \<cdot> Der c B)" |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
36 |
unfolding Der_def Delta_def conc_def |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
37 |
by (auto simp add: Cons_eq_append_conv) |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
38 |
|
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
39 |
lemma Der_star [simp]: |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
40 |
shows "Der c (A\<star>) = (Der c A) \<cdot> A\<star>" |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
41 |
proof - |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
42 |
have incl: "Delta A \<cdot> Der c (A\<star>) \<subseteq> (Der c A) \<cdot> A\<star>" |
187 | 43 |
unfolding Der_def Delta_def conc_def |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
44 |
apply(auto) |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
45 |
apply(drule star_decom) |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
46 |
apply(auto simp add: Cons_eq_append_conv) |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
47 |
done |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
48 |
|
180 | 49 |
have "Der c (A\<star>) = Der c (A \<cdot> A\<star> \<union> {[]})" |
50 |
by (simp only: star_unfold_left[symmetric]) |
|
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
51 |
also have "... = Der c (A \<cdot> A\<star>)" |
187 | 52 |
by (simp only: Der_simps) (simp) |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
53 |
also have "... = (Der c A) \<cdot> A\<star> \<union> (Delta A \<cdot> Der c (A\<star>))" |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
54 |
by simp |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
55 |
also have "... = (Der c A) \<cdot> A\<star>" |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
56 |
using incl by auto |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
57 |
finally show "Der c (A\<star>) = (Der c A) \<cdot> A\<star>" . |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
58 |
qed |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
59 |
|
187 | 60 |
lemma Ders_simps [simp]: |
179 | 61 |
shows "Ders [] A = A" |
187 | 62 |
and "Ders (c # s) A = Ders s (Der c A)" |
63 |
and "Ders (s1 @ s2) A = Ders s2 (Ders s1 A)" |
|
179 | 64 |
unfolding Ders_def Der_def by auto |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
65 |
|
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
66 |
subsection {* Brozowsky's derivatives of regular expressions *} |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
67 |
|
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
68 |
fun |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
69 |
nullable :: "'a rexp \<Rightarrow> bool" |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
70 |
where |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
71 |
"nullable (Zero) = False" |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
72 |
| "nullable (One) = True" |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
73 |
| "nullable (Atom c) = False" |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
74 |
| "nullable (Plus r1 r2) = (nullable r1 \<or> nullable r2)" |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
75 |
| "nullable (Times r1 r2) = (nullable r1 \<and> nullable r2)" |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
76 |
| "nullable (Star r) = True" |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
77 |
|
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
78 |
fun |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
79 |
der :: "'a \<Rightarrow> 'a rexp \<Rightarrow> 'a rexp" |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
80 |
where |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
81 |
"der c (Zero) = Zero" |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
82 |
| "der c (One) = Zero" |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
83 |
| "der c (Atom c') = (if c = c' then One else Zero)" |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
84 |
| "der c (Plus r1 r2) = Plus (der c r1) (der c r2)" |
174 | 85 |
| "der c (Times r1 r2) = |
86 |
(if nullable r1 then Plus (Times (der c r1) r2) (der c r2) else Times (der c r1) r2)" |
|
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
87 |
| "der c (Star r) = Times (der c r) (Star r)" |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
88 |
|
179 | 89 |
fun |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
90 |
ders :: "'a list \<Rightarrow> 'a rexp \<Rightarrow> 'a rexp" |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
91 |
where |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
92 |
"ders [] r = r" |
179 | 93 |
| "ders (c # s) r = ders s (der c r)" |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
94 |
|
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
95 |
|
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
96 |
lemma Delta_nullable: |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
97 |
shows "Delta (lang r) = (if nullable r then {[]} else {})" |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
98 |
unfolding Delta_def |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
99 |
by (induct r) (auto simp add: conc_def split: if_splits) |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
100 |
|
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
101 |
lemma Der_der: |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
102 |
shows "Der c (lang r) = lang (der c r)" |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
103 |
by (induct r) (simp_all add: Delta_nullable) |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
104 |
|
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
105 |
lemma Ders_ders: |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
106 |
shows "Ders s (lang r) = lang (ders s r)" |
179 | 107 |
by (induct s arbitrary: r) (simp_all add: Der_der) |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
108 |
|
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
109 |
|
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
110 |
subsection {* Antimirov's Partial Derivatives *} |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
111 |
|
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
112 |
abbreviation |
187 | 113 |
"Timess rs r \<equiv> {Times r' r | r'. r' \<in> rs}" |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
114 |
|
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
115 |
fun |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
116 |
pder :: "'a \<Rightarrow> 'a rexp \<Rightarrow> ('a rexp) set" |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
117 |
where |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
118 |
"pder c Zero = {Zero}" |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
119 |
| "pder c One = {Zero}" |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
120 |
| "pder c (Atom c') = (if c = c' then {One} else {Zero})" |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
121 |
| "pder c (Plus r1 r2) = (pder c r1) \<union> (pder c r2)" |
179 | 122 |
| "pder c (Times r1 r2) = |
187 | 123 |
(if nullable r1 then Timess (pder c r1) r2 \<union> pder c r2 else Timess (pder c r1) r2)" |
124 |
| "pder c (Star r) = Timess (pder c r) (Star r)" |
|
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
125 |
|
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
126 |
abbreviation |
187 | 127 |
"pder_set c rs \<equiv> \<Union> pder c ` rs" |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
128 |
|
179 | 129 |
fun |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
130 |
pders :: "'a list \<Rightarrow> 'a rexp \<Rightarrow> ('a rexp) set" |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
131 |
where |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
132 |
"pders [] r = {r}" |
180 | 133 |
| "pders (c # s) r = \<Union> (pders s) ` (pder c r)" |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
134 |
|
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
135 |
abbreviation |
187 | 136 |
"pderss s A \<equiv> \<Union> (pders s) ` A" |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
137 |
|
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
138 |
lemma pders_append: |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
139 |
"pders (s1 @ s2) r = \<Union> (pders s2) ` (pders s1 r)" |
179 | 140 |
by (induct s1 arbitrary: r) (simp_all) |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
141 |
|
179 | 142 |
lemma pders_snoc: |
143 |
shows "pders (s @ [c]) r = pder_set c (pders s r)" |
|
144 |
by (simp add: pders_append) |
|
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
145 |
|
187 | 146 |
lemma pders_simps [simp]: |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
147 |
shows "pders s Zero = {Zero}" |
187 | 148 |
and "pders s One = (if s = [] then {One} else {Zero})" |
149 |
and "pders s (Atom c) = (if s = [] then {Atom c} else (if s = [c] then {One} else {Zero}))" |
|
150 |
and "pders s (Plus r1 r2) = (if s = [] then {Plus r1 r2} else (pders s r1) \<union> (pders s r2))" |
|
179 | 151 |
by (induct s) (auto) |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
152 |
|
187 | 153 |
subsection {* Relating left-quotients and partial derivatives *} |
154 |
||
155 |
lemma Der_pder: |
|
156 |
shows "Der c (lang r) = \<Union> lang ` (pder c r)" |
|
157 |
by (induct r) (auto simp add: Delta_nullable conc_UNION_distrib) |
|
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
158 |
|
187 | 159 |
lemma Ders_pders: |
160 |
shows "Ders s (lang r) = \<Union> lang ` (pders s r)" |
|
161 |
proof (induct s arbitrary: r) |
|
162 |
case (Cons c s) |
|
163 |
have ih: "\<And>r. Ders s (lang r) = \<Union> lang ` (pders s r)" by fact |
|
164 |
have "Ders (c # s) (lang r) = Ders s (Der c (lang r))" by simp |
|
165 |
also have "\<dots> = Ders s (\<Union> lang ` (pder c r))" by (simp add: Der_pder) |
|
166 |
also have "\<dots> = Derss s (lang ` (pder c r))" |
|
167 |
by (auto simp add: Ders_def) |
|
168 |
also have "\<dots> = \<Union> lang ` (pderss s (pder c r))" |
|
169 |
using ih by auto |
|
170 |
also have "\<dots> = \<Union> lang ` (pders (c # s) r)" by simp |
|
171 |
finally show "Ders (c # s) (lang r) = \<Union> lang ` pders (c # s) r" . |
|
172 |
qed (simp add: Ders_def) |
|
173 |
||
174 |
subsection {* Relating derivatives and partial derivatives *} |
|
175 |
||
190 | 176 |
lemma der_pder: |
187 | 177 |
shows "(\<Union> lang ` (pder c r)) = lang (der c r)" |
178 |
unfolding Der_der[symmetric] Der_pder by simp |
|
179 |
||
190 | 180 |
lemma ders_pders: |
187 | 181 |
shows "(\<Union> lang ` (pders s r)) = lang (ders s r)" |
182 |
unfolding Ders_ders[symmetric] Ders_pders by simp |
|
183 |
||
184 |
||
185 |
subsection {* There are only finitely many partial derivatives for a language *} |
|
186 |
||
191 | 187 |
definition |
190 | 188 |
"pders_lang A r \<equiv> \<Union>s \<in> A. pders s r" |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
189 |
|
191 | 190 |
lemma pders_lang_subsetI [intro]: |
191 |
assumes "\<And>s. s \<in> A \<Longrightarrow> pders s r \<subseteq> C" |
|
192 |
shows "pders_lang A r \<subseteq> C" |
|
193 |
using assms unfolding pders_lang_def by (rule UN_least) |
|
194 |
||
195 |
lemma pders_lang_union: |
|
196 |
shows "pders_lang (A \<union> B) r = (pders_lang A r \<union> pders_lang B r)" |
|
197 |
by (simp add: pders_lang_def) |
|
198 |
||
199 |
definition |
|
200 |
"UNIV1 \<equiv> UNIV - {[]}" |
|
201 |
||
202 |
lemma pders_lang_Zero [simp]: |
|
203 |
shows "pders_lang UNIV1 Zero = {Zero}" |
|
204 |
unfolding UNIV1_def pders_lang_def by auto |
|
205 |
||
206 |
lemma pders_lang_One [simp]: |
|
207 |
shows "pders_lang UNIV1 One = {Zero}" |
|
208 |
unfolding UNIV1_def pders_lang_def by (auto split: if_splits) |
|
209 |
||
210 |
lemma pders_lang_Atom: |
|
211 |
shows "pders_lang UNIV1 (Atom c) \<subseteq> {One, Zero}" |
|
212 |
unfolding UNIV1_def pders_lang_def by (auto split: if_splits) |
|
213 |
||
214 |
lemma pders_lang_Plus [simp]: |
|
215 |
shows "pders_lang UNIV1 (Plus r1 r2) = pders_lang UNIV1 r1 \<union> pders_lang UNIV1 r2" |
|
216 |
unfolding UNIV1_def pders_lang_def by auto |
|
217 |
||
218 |
||
219 |
text {* Non-empty suffixes of a string (needed for teh cases of @{const Times} and @{const Star} *} |
|
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
220 |
|
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
221 |
definition |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
222 |
"Suf s \<equiv> {v. v \<noteq> [] \<and> (\<exists>u. u @ v = s)}" |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
223 |
|
187 | 224 |
lemma Suf_snoc: |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
225 |
shows "Suf (s @ [c]) = (Suf s) \<cdot> {[c]} \<union> {[c]}" |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
226 |
unfolding Suf_def conc_def |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
227 |
by (auto simp add: append_eq_append_conv2 append_eq_Cons_conv) |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
228 |
|
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
229 |
lemma Suf_Union: |
187 | 230 |
shows "(\<Union>v \<in> Suf s \<cdot> {[c]}. f v) = (\<Union>v \<in> Suf s. f (v @ [c]))" |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
231 |
by (auto simp add: conc_def) |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
232 |
|
190 | 233 |
lemma pders_lang_snoc: |
234 |
shows "pders_lang (Suf s \<cdot> {[c]}) r = (pder_set c (pders_lang (Suf s) r))" |
|
191 | 235 |
unfolding pders_lang_def |
187 | 236 |
by (simp add: Suf_Union pders_snoc) |
237 |
||
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
238 |
lemma pders_Times: |
190 | 239 |
shows "pders s (Times r1 r2) \<subseteq> Timess (pders s r1) r2 \<union> (pders_lang (Suf s) r2)" |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
240 |
proof (induct s rule: rev_induct) |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
241 |
case (snoc c s) |
190 | 242 |
have ih: "pders s (Times r1 r2) \<subseteq> Timess (pders s r1) r2 \<union> (pders_lang (Suf s) r2)" |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
243 |
by fact |
179 | 244 |
have "pders (s @ [c]) (Times r1 r2) = pder_set c (pders s (Times r1 r2))" |
245 |
by (simp add: pders_snoc) |
|
190 | 246 |
also have "\<dots> \<subseteq> pder_set c (Timess (pders s r1) r2 \<union> (pders_lang (Suf s) r2))" |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
247 |
using ih by (auto) (blast) |
190 | 248 |
also have "\<dots> = pder_set c (Timess (pders s r1) r2) \<union> pder_set c (pders_lang (Suf s) r2)" |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
249 |
by (simp) |
190 | 250 |
also have "\<dots> = pder_set c (Timess (pders s r1) r2) \<union> pders_lang (Suf s \<cdot> {[c]}) r2" |
251 |
by (simp add: pders_lang_snoc) |
|
252 |
also have "\<dots> \<subseteq> pder_set c (Timess (pders s r1) r2) \<union> pder c r2 \<union> pders_lang (Suf s \<cdot> {[c]}) r2" |
|
187 | 253 |
by auto |
190 | 254 |
also have "\<dots> \<subseteq> Timess (pder_set c (pders s r1)) r2 \<union> pder c r2 \<union> pders_lang (Suf s \<cdot> {[c]}) r2" |
255 |
by (auto simp add: if_splits) (blast) |
|
256 |
also have "\<dots> = Timess (pders (s @ [c]) r1) r2 \<union> pder c r2 \<union> pders_lang (Suf s \<cdot> {[c]}) r2" |
|
257 |
by (simp add: pders_snoc) |
|
258 |
also have "\<dots> \<subseteq> Timess (pders (s @ [c]) r1) r2 \<union> pders_lang (Suf (s @ [c])) r2" |
|
191 | 259 |
unfolding pders_lang_def by (auto simp add: Suf_snoc) |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
260 |
finally show ?case . |
187 | 261 |
qed (simp) |
262 |
||
191 | 263 |
lemma pders_lang_Times_aux1: |
264 |
assumes a: "s \<in> UNIV1" |
|
265 |
shows "pders_lang (Suf s) r \<subseteq> pders_lang UNIV1 r" |
|
266 |
using a unfolding UNIV1_def Suf_def pders_lang_def by auto |
|
267 |
||
268 |
lemma pders_lang_Times_aux2: |
|
269 |
assumes a: "s \<in> UNIV1" |
|
270 |
shows "Timess (pders s r1) r2 \<subseteq> Timess (pders_lang UNIV1 r1) r2" |
|
271 |
using a unfolding pders_lang_def by auto |
|
272 |
||
273 |
lemma pders_lang_Times [intro]: |
|
274 |
shows "pders_lang UNIV1 (Times r1 r2) \<subseteq> Timess (pders_lang UNIV1 r1) r2 \<union> pders_lang UNIV1 r2" |
|
275 |
apply(rule pders_lang_subsetI) |
|
276 |
apply(rule subset_trans) |
|
277 |
apply(rule pders_Times) |
|
278 |
using pders_lang_Times_aux1 pders_lang_Times_aux2 |
|
279 |
apply(blast) |
|
280 |
done |
|
281 |
||
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
282 |
lemma pders_Star: |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
283 |
assumes a: "s \<noteq> []" |
190 | 284 |
shows "pders s (Star r) \<subseteq> Timess (pders_lang (Suf s) r) (Star r)" |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
285 |
using a |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
286 |
proof (induct s rule: rev_induct) |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
287 |
case (snoc c s) |
190 | 288 |
have ih: "s \<noteq> [] \<Longrightarrow> pders s (Star r) \<subseteq> Timess (pders_lang (Suf s) r) (Star r)" by fact |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
289 |
{ assume asm: "s \<noteq> []" |
179 | 290 |
have "pders (s @ [c]) (Star r) = pder_set c (pders s (Star r))" by (simp add: pders_snoc) |
190 | 291 |
also have "\<dots> \<subseteq> pder_set c (Timess (pders_lang (Suf s) r) (Star r))" |
187 | 292 |
using ih[OF asm] by (auto) (blast) |
190 | 293 |
also have "\<dots> \<subseteq> Timess (pder_set c (pders_lang (Suf s) r)) (Star r) \<union> pder c (Star r)" |
294 |
by (auto split: if_splits) (blast)+ |
|
295 |
also have "\<dots> \<subseteq> Timess (pders_lang (Suf (s @ [c])) r) (Star r) \<union> (Timess (pder c r) (Star r))" |
|
191 | 296 |
by (simp only: Suf_snoc pders_lang_snoc pders_lang_union) |
297 |
(auto simp add: pders_lang_def) |
|
190 | 298 |
also have "\<dots> = Timess (pders_lang (Suf (s @ [c])) r) (Star r)" |
191 | 299 |
by (auto simp add: Suf_snoc Suf_Union pders_snoc pders_lang_def) |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
300 |
finally have ?case . |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
301 |
} |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
302 |
moreover |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
303 |
{ assume asm: "s = []" |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
304 |
then have ?case |
191 | 305 |
apply (auto simp add: pders_lang_def pders_snoc Suf_def) |
190 | 306 |
apply(rule_tac x = "[c]" in exI) |
307 |
apply(auto) |
|
308 |
done |
|
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
309 |
} |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
310 |
ultimately show ?case by blast |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
311 |
qed (simp) |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
312 |
|
191 | 313 |
lemma pders_lang_Star [intro]: |
314 |
shows "pders_lang UNIV1 (Star r) \<subseteq> Timess (pders_lang UNIV1 r) (Star r)" |
|
315 |
apply(rule pders_lang_subsetI) |
|
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
316 |
apply(rule subset_trans) |
191 | 317 |
apply(rule pders_Star) |
318 |
apply(simp add: UNIV1_def) |
|
319 |
apply(simp add: UNIV1_def Suf_def) |
|
320 |
apply(auto simp add: pders_lang_def) |
|
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
321 |
done |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
322 |
|
191 | 323 |
lemma finite_Timess [simp]: |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
324 |
assumes a: "finite A" |
187 | 325 |
shows "finite (Timess A r)" |
190 | 326 |
using a by auto |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
327 |
|
190 | 328 |
lemma finite_pders_lang_UNIV1: |
329 |
shows "finite (pders_lang UNIV1 r)" |
|
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
330 |
apply(induct r) |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
331 |
apply(simp) |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
332 |
apply(simp) |
191 | 333 |
apply(rule finite_subset[OF pders_lang_Atom]) |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
334 |
apply(simp) |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
335 |
apply(simp) |
191 | 336 |
apply(rule finite_subset[OF pders_lang_Times]) |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
337 |
apply(simp) |
191 | 338 |
apply(rule finite_subset[OF pders_lang_Star]) |
339 |
apply(simp) |
|
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
340 |
done |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
341 |
|
191 | 342 |
lemma pders_lang_UNIV: |
190 | 343 |
shows "pders_lang UNIV r = pders [] r \<union> pders_lang UNIV1 r" |
191 | 344 |
unfolding UNIV1_def pders_lang_def |
345 |
by blast |
|
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
346 |
|
190 | 347 |
lemma finite_pders_lang_UNIV: |
348 |
shows "finite (pders_lang UNIV r)" |
|
191 | 349 |
unfolding pders_lang_UNIV |
190 | 350 |
by (simp add: finite_pders_lang_UNIV1) |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
351 |
|
190 | 352 |
lemma finite_pders_lang: |
353 |
shows "finite (pders_lang A r)" |
|
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
354 |
apply(rule rev_finite_subset) |
190 | 355 |
apply(rule_tac r="r" in finite_pders_lang_UNIV) |
191 | 356 |
apply(auto simp add: pders_lang_def) |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
357 |
done |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
358 |
|
179 | 359 |
text {* Relating the Myhill-Nerode relation with left-quotients. *} |
360 |
||
361 |
lemma MN_Rel_Ders: |
|
362 |
shows "x \<approx>A y \<longleftrightarrow> Ders x A = Ders y A" |
|
181 | 363 |
unfolding Ders_def str_eq_def |
179 | 364 |
by auto |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
365 |
|
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
366 |
subsection {* |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
367 |
The second direction of the Myhill-Nerode theorem using |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
368 |
partial derivatives. |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
369 |
*} |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
370 |
|
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
371 |
lemma Myhill_Nerode3: |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
372 |
fixes r::"'a rexp" |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
373 |
shows "finite (UNIV // \<approx>(lang r))" |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
374 |
proof - |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
375 |
have "finite (UNIV // =(\<lambda>x. pders x r)=)" |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
376 |
proof - |
191 | 377 |
have "range (\<lambda>x. pders x r) \<subseteq> Pow (pders_lang UNIV r)" |
378 |
unfolding pders_lang_def by auto |
|
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
379 |
moreover |
191 | 380 |
have "finite (Pow (pders_lang UNIV r))" by (simp add: finite_pders_lang) |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
381 |
ultimately |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
382 |
have "finite (range (\<lambda>x. pders x r))" |
191 | 383 |
by (simp add: finite_subset) |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
384 |
then show "finite (UNIV // =(\<lambda>x. pders x r)=)" |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
385 |
by (rule finite_eq_tag_rel) |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
386 |
qed |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
387 |
moreover |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
388 |
have "=(\<lambda>x. pders x r)= \<subseteq> \<approx>(lang r)" |
181 | 389 |
unfolding tag_eq_def |
390 |
by (auto simp add: MN_Rel_Ders Ders_pders) |
|
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
391 |
moreover |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
392 |
have "equiv UNIV =(\<lambda>x. pders x r)=" |
190 | 393 |
and "equiv UNIV (\<approx>(lang r))" |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
394 |
unfolding equiv_def refl_on_def sym_def trans_def |
190 | 395 |
unfolding tag_eq_def str_eq_def |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
396 |
by auto |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
397 |
ultimately show "finite (UNIV // \<approx>(lang r))" |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
398 |
by (rule refined_partition_finite) |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
399 |
qed |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
400 |
|
179 | 401 |
|
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
diff
changeset
|
402 |
end |