author | urbanc |
Sun, 31 Jul 2011 10:27:41 +0000 | |
changeset 181 | 97090fc7aa9f |
parent 180 | b755090d0f3d |
child 182 | 560712a29a36 |
permissions | -rw-r--r-- |
63 | 1 |
theory Myhill_2 |
162
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
2 |
imports Myhill_1 Prefix_subtract |
149 | 3 |
"~~/src/HOL/Library/List_Prefix" |
63 | 4 |
begin |
5 |
||
166 | 6 |
section {* Direction @{text "regular language \<Rightarrow> finite partition"} *} |
63 | 7 |
|
8 |
definition |
|
181 | 9 |
tag_eq :: "('a list \<Rightarrow> 'b) \<Rightarrow> ('a list \<times> 'a list) set" ("=_=") |
63 | 10 |
where |
166 | 11 |
"=tag= \<equiv> {(x, y). tag x = tag y}" |
117 | 12 |
|
181 | 13 |
abbreviation |
14 |
tag_eq_applied :: "'a list \<Rightarrow> ('a list \<Rightarrow> 'b) \<Rightarrow> 'a list \<Rightarrow> bool" ("_ =_= _") |
|
15 |
where |
|
16 |
"x =tag= y \<equiv> (x, y) \<in> =tag=" |
|
17 |
||
18 |
lemma test: |
|
19 |
shows "(\<approx>A) `` {x} = (\<approx>A) `` {y} \<longleftrightarrow> x \<approx>A y" |
|
20 |
unfolding str_eq_def |
|
21 |
by auto |
|
22 |
||
23 |
lemma test_refined_intro: |
|
24 |
assumes "\<And>x y z. \<lbrakk>x =tag= y; x @ z \<in> A\<rbrakk> \<Longrightarrow> y @ z \<in> A" |
|
25 |
shows "=tag= \<subseteq> \<approx>A" |
|
26 |
using assms |
|
27 |
unfolding str_eq_def tag_eq_def |
|
28 |
apply(clarify, simp (no_asm_use)) |
|
29 |
by metis |
|
30 |
||
31 |
||
117 | 32 |
lemma finite_eq_tag_rel: |
63 | 33 |
assumes rng_fnt: "finite (range tag)" |
109 | 34 |
shows "finite (UNIV // =tag=)" |
63 | 35 |
proof - |
119 | 36 |
let "?f" = "\<lambda>X. tag ` X" and ?A = "(UNIV // =tag=)" |
118 | 37 |
have "finite (?f ` ?A)" |
38 |
proof - |
|
119 | 39 |
have "range ?f \<subseteq> (Pow (range tag))" unfolding Pow_def by auto |
40 |
moreover |
|
41 |
have "finite (Pow (range tag))" using rng_fnt by simp |
|
42 |
ultimately |
|
43 |
have "finite (range ?f)" unfolding image_def by (blast intro: finite_subset) |
|
44 |
moreover |
|
45 |
have "?f ` ?A \<subseteq> range ?f" by auto |
|
46 |
ultimately show "finite (?f ` ?A)" by (rule rev_finite_subset) |
|
63 | 47 |
qed |
118 | 48 |
moreover |
119 | 49 |
have "inj_on ?f ?A" |
118 | 50 |
proof - |
51 |
{ fix X Y |
|
52 |
assume X_in: "X \<in> ?A" |
|
53 |
and Y_in: "Y \<in> ?A" |
|
54 |
and tag_eq: "?f X = ?f Y" |
|
162
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
55 |
then obtain x y |
119 | 56 |
where "x \<in> X" "y \<in> Y" "tag x = tag y" |
181 | 57 |
unfolding quotient_def Image_def image_def tag_eq_def |
119 | 58 |
by (simp) (blast) |
59 |
with X_in Y_in |
|
118 | 60 |
have "X = Y" |
181 | 61 |
unfolding quotient_def tag_eq_def by auto |
162
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
62 |
} |
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
63 |
then show "inj_on ?f ?A" unfolding inj_on_def by auto |
118 | 64 |
qed |
162
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
65 |
ultimately show "finite (UNIV // =tag=)" by (rule finite_imageD) |
63 | 66 |
qed |
67 |
||
68 |
lemma refined_partition_finite: |
|
118 | 69 |
assumes fnt: "finite (UNIV // R1)" |
63 | 70 |
and refined: "R1 \<subseteq> R2" |
118 | 71 |
and eq1: "equiv UNIV R1" and eq2: "equiv UNIV R2" |
72 |
shows "finite (UNIV // R2)" |
|
63 | 73 |
proof - |
118 | 74 |
let ?f = "\<lambda>X. {R1 `` {x} | x. x \<in> X}" |
75 |
and ?A = "UNIV // R2" and ?B = "UNIV // R1" |
|
76 |
have "?f ` ?A \<subseteq> Pow ?B" |
|
77 |
unfolding image_def Pow_def quotient_def by auto |
|
78 |
moreover |
|
79 |
have "finite (Pow ?B)" using fnt by simp |
|
80 |
ultimately |
|
81 |
have "finite (?f ` ?A)" by (rule finite_subset) |
|
82 |
moreover |
|
83 |
have "inj_on ?f ?A" |
|
84 |
proof - |
|
85 |
{ fix X Y |
|
86 |
assume X_in: "X \<in> ?A" and Y_in: "Y \<in> ?A" and eq_f: "?f X = ?f Y" |
|
87 |
from quotientE [OF X_in] |
|
88 |
obtain x where "X = R2 `` {x}" by blast |
|
89 |
with equiv_class_self[OF eq2] have x_in: "x \<in> X" by simp |
|
90 |
then have "R1 ``{x} \<in> ?f X" by auto |
|
91 |
with eq_f have "R1 `` {x} \<in> ?f Y" by simp |
|
92 |
then obtain y |
|
93 |
where y_in: "y \<in> Y" and eq_r1_xy: "R1 `` {x} = R1 `` {y}" by auto |
|
94 |
with eq_equiv_class[OF _ eq1] |
|
95 |
have "(x, y) \<in> R1" by blast |
|
96 |
with refined have "(x, y) \<in> R2" by auto |
|
97 |
with quotient_eqI [OF eq2 X_in Y_in x_in y_in] |
|
98 |
have "X = Y" . |
|
99 |
} |
|
100 |
then show "inj_on ?f ?A" unfolding inj_on_def by blast |
|
63 | 101 |
qed |
118 | 102 |
ultimately show "finite (UNIV // R2)" by (rule finite_imageD) |
63 | 103 |
qed |
104 |
||
105 |
lemma tag_finite_imageD: |
|
106 |
assumes rng_fnt: "finite (range tag)" |
|
162
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
107 |
and same_tag_eqvt: "\<And>m n. tag m = tag n \<Longrightarrow> m \<approx>A n" |
119 | 108 |
shows "finite (UNIV // \<approx>A)" |
109 |
proof (rule_tac refined_partition_finite [of "=tag="]) |
|
110 |
show "finite (UNIV // =tag=)" by (rule finite_eq_tag_rel[OF rng_fnt]) |
|
111 |
next |
|
112 |
from same_tag_eqvt |
|
181 | 113 |
show "=tag= \<subseteq> \<approx>A" unfolding tag_eq_def str_eq_def |
114 |
by blast |
|
119 | 115 |
next |
116 |
show "equiv UNIV =tag=" |
|
181 | 117 |
unfolding equiv_def tag_eq_def refl_on_def sym_def trans_def |
119 | 118 |
by auto |
119 |
next |
|
120 |
show "equiv UNIV (\<approx>A)" |
|
181 | 121 |
unfolding equiv_def str_eq_def sym_def refl_on_def trans_def |
119 | 122 |
by blast |
63 | 123 |
qed |
124 |
||
125 |
||
162
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
126 |
subsection {* The proof *} |
63 | 127 |
|
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
166
diff
changeset
|
128 |
subsubsection {* The base case for @{const "Zero"} *} |
63 | 129 |
|
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
166
diff
changeset
|
130 |
lemma quot_zero_eq: |
162
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
131 |
shows "UNIV // \<approx>{} = {UNIV}" |
181 | 132 |
unfolding quotient_def Image_def str_eq_def by auto |
63 | 133 |
|
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
166
diff
changeset
|
134 |
lemma quot_zero_finiteI [intro]: |
162
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
135 |
shows "finite (UNIV // \<approx>{})" |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
166
diff
changeset
|
136 |
unfolding quot_zero_eq by simp |
63 | 137 |
|
138 |
||
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
166
diff
changeset
|
139 |
subsubsection {* The base case for @{const "One"} *} |
63 | 140 |
|
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
166
diff
changeset
|
141 |
lemma quot_one_subset: |
162
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
142 |
shows "UNIV // \<approx>{[]} \<subseteq> {{[]}, UNIV - {[]}}" |
63 | 143 |
proof |
144 |
fix x |
|
145 |
assume "x \<in> UNIV // \<approx>{[]}" |
|
146 |
then obtain y where h: "x = {z. (y, z) \<in> \<approx>{[]}}" |
|
147 |
unfolding quotient_def Image_def by blast |
|
148 |
show "x \<in> {{[]}, UNIV - {[]}}" |
|
149 |
proof (cases "y = []") |
|
150 |
case True with h |
|
181 | 151 |
have "x = {[]}" by (auto simp: str_eq_def) |
63 | 152 |
thus ?thesis by simp |
153 |
next |
|
154 |
case False with h |
|
181 | 155 |
have "x = UNIV - {[]}" by (auto simp: str_eq_def) |
63 | 156 |
thus ?thesis by simp |
157 |
qed |
|
158 |
qed |
|
159 |
||
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
166
diff
changeset
|
160 |
lemma quot_one_finiteI [intro]: |
162
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
161 |
shows "finite (UNIV // \<approx>{[]})" |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
166
diff
changeset
|
162 |
by (rule finite_subset[OF quot_one_subset]) (simp) |
63 | 163 |
|
164 |
||
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
166
diff
changeset
|
165 |
subsubsection {* The base case for @{const "Atom"} *} |
63 | 166 |
|
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
166
diff
changeset
|
167 |
lemma quot_atom_subset: |
63 | 168 |
"UNIV // (\<approx>{[c]}) \<subseteq> {{[]},{[c]}, UNIV - {[], [c]}}" |
169 |
proof |
|
170 |
fix x |
|
171 |
assume "x \<in> UNIV // \<approx>{[c]}" |
|
172 |
then obtain y where h: "x = {z. (y, z) \<in> \<approx>{[c]}}" |
|
173 |
unfolding quotient_def Image_def by blast |
|
174 |
show "x \<in> {{[]},{[c]}, UNIV - {[], [c]}}" |
|
175 |
proof - |
|
176 |
{ assume "y = []" hence "x = {[]}" using h |
|
181 | 177 |
by (auto simp: str_eq_def) } |
162
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
178 |
moreover |
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
179 |
{ assume "y = [c]" hence "x = {[c]}" using h |
181 | 180 |
by (auto dest!: spec[where x = "[]"] simp: str_eq_def) } |
162
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
181 |
moreover |
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
182 |
{ assume "y \<noteq> []" and "y \<noteq> [c]" |
63 | 183 |
hence "\<forall> z. (y @ z) \<noteq> [c]" by (case_tac y, auto) |
184 |
moreover have "\<And> p. (p \<noteq> [] \<and> p \<noteq> [c]) = (\<forall> q. p @ q \<noteq> [c])" |
|
185 |
by (case_tac p, auto) |
|
186 |
ultimately have "x = UNIV - {[],[c]}" using h |
|
181 | 187 |
by (auto simp add: str_eq_def) |
162
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
188 |
} |
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
189 |
ultimately show ?thesis by blast |
63 | 190 |
qed |
191 |
qed |
|
192 |
||
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
166
diff
changeset
|
193 |
lemma quot_atom_finiteI [intro]: |
162
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
194 |
shows "finite (UNIV // \<approx>{[c]})" |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
166
diff
changeset
|
195 |
by (rule finite_subset[OF quot_atom_subset]) (simp) |
63 | 196 |
|
197 |
||
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
166
diff
changeset
|
198 |
subsubsection {* The inductive case for @{const Plus} *} |
63 | 199 |
|
200 |
definition |
|
181 | 201 |
tag_Plus :: "'a lang \<Rightarrow> 'a lang \<Rightarrow> 'a list \<Rightarrow> ('a lang \<times> 'a lang)" |
63 | 202 |
where |
181 | 203 |
"tag_Plus A B \<equiv> (\<lambda>x. (\<approx>A `` {x}, \<approx>B `` {x}))" |
63 | 204 |
|
181 | 205 |
lemma quot_plus_finiteI [intro]: |
119 | 206 |
assumes finite1: "finite (UNIV // \<approx>A)" |
207 |
and finite2: "finite (UNIV // \<approx>B)" |
|
208 |
shows "finite (UNIV // \<approx>(A \<union> B))" |
|
181 | 209 |
proof (rule_tac tag = "tag_Plus A B" in tag_finite_imageD) |
119 | 210 |
have "finite ((UNIV // \<approx>A) \<times> (UNIV // \<approx>B))" |
211 |
using finite1 finite2 by auto |
|
181 | 212 |
then show "finite (range (tag_Plus A B))" |
213 |
unfolding tag_Plus_def quotient_def |
|
119 | 214 |
by (rule rev_finite_subset) (auto) |
215 |
next |
|
181 | 216 |
show "\<And>x y. tag_Plus A B x = tag_Plus A B y \<Longrightarrow> x \<approx>(A \<union> B) y" |
217 |
unfolding tag_Plus_def |
|
63 | 218 |
unfolding str_eq_def |
219 |
by auto |
|
220 |
qed |
|
221 |
||
162
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
222 |
|
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
166
diff
changeset
|
223 |
subsubsection {* The inductive case for @{text "Times"}*} |
63 | 224 |
|
181 | 225 |
definition |
226 |
"Partitions s \<equiv> {(u, v). u @ v = s}" |
|
227 |
||
228 |
lemma conc_elim: |
|
229 |
assumes "x \<in> A \<cdot> B" |
|
230 |
shows "\<exists>(u, v) \<in> Partitions x. u \<in> A \<and> v \<in> B" |
|
231 |
using assms |
|
232 |
unfolding conc_def Partitions_def |
|
233 |
by auto |
|
234 |
||
235 |
lemma conc_intro: |
|
236 |
assumes "(u, v) \<in> Partitions x \<and> u \<in> A \<and> v \<in> B" |
|
237 |
shows "x \<in> A \<cdot> B" |
|
238 |
using assms |
|
239 |
unfolding conc_def Partitions_def |
|
240 |
by auto |
|
241 |
||
242 |
||
243 |
lemma y: |
|
244 |
"\<lbrakk>x \<in> A; x \<approx>A y\<rbrakk> \<Longrightarrow> y \<in> A" |
|
245 |
apply(simp add: str_eq_def) |
|
246 |
apply(drule_tac x="[]" in spec) |
|
247 |
apply(simp) |
|
248 |
done |
|
249 |
||
63 | 250 |
definition |
181 | 251 |
tag_Times3a :: "'a lang \<Rightarrow> 'a lang \<Rightarrow> 'a list \<Rightarrow> 'a lang" |
252 |
where |
|
253 |
"tag_Times3a A B \<equiv> (\<lambda>x. \<approx>A `` {x})" |
|
254 |
||
255 |
definition |
|
256 |
tag_Times3b :: "'a lang \<Rightarrow> 'a lang \<Rightarrow> 'a list \<Rightarrow> ('a lang \<times> 'a lang) set" |
|
257 |
where |
|
258 |
"tag_Times3b A B \<equiv> |
|
259 |
(\<lambda>x. ({(\<approx>A `` {u}, \<approx>B `` {v}) | u v. (u, v) \<in> Partitions x}))" |
|
260 |
||
261 |
definition |
|
262 |
tag_Times3 :: "'a lang \<Rightarrow> 'a lang \<Rightarrow> 'a list \<Rightarrow> 'a lang \<times> ('a lang \<times> 'a lang) set" |
|
63 | 263 |
where |
181 | 264 |
"tag_Times3 A B \<equiv> |
265 |
(\<lambda>x. (tag_Times3a A B x, tag_Times3b A B x))" |
|
63 | 266 |
|
181 | 267 |
lemma |
268 |
assumes a: "tag_Times3a A B x = tag_Times3a A B y" |
|
269 |
and b: "tag_Times3b A B x = tag_Times3b A B y" |
|
270 |
and c: "x @ z \<in> A \<cdot> B" |
|
271 |
shows "y @ z \<in> A \<cdot> B" |
|
272 |
proof - |
|
273 |
from c obtain u v where |
|
274 |
h1: "(u, v) \<in> Partitions (x @ z)" and |
|
275 |
h2: "u \<in> A" and |
|
276 |
h3: "v \<in> B" by (auto dest: conc_elim) |
|
277 |
from h1 have "x @ z = u @ v" unfolding Partitions_def by simp |
|
278 |
then obtain us |
|
279 |
where "(x = u @ us \<and> us @ z = v) \<or> (x @ us = u \<and> z = us @ v)" |
|
280 |
by (auto simp add: append_eq_append_conv2) |
|
281 |
moreover |
|
282 |
{ assume eq: "x = u @ us" "us @ z = v" |
|
283 |
have "(\<approx>A `` {u}, \<approx>B `` {us}) \<in> tag_Times3b A B x" |
|
284 |
unfolding tag_Times3b_def Partitions_def using eq by auto |
|
285 |
then have "(\<approx>A `` {u}, \<approx>B `` {us}) \<in> tag_Times3b A B y" |
|
286 |
using b by simp |
|
287 |
then obtain u' us' where |
|
288 |
q1: "\<approx>A `` {u} = \<approx>A `` {u'}" and |
|
289 |
q2: "\<approx>B `` {us} = \<approx>B `` {us'}" and |
|
290 |
q3: "(u', us') \<in> Partitions y" |
|
291 |
by (auto simp add: tag_Times3b_def) |
|
292 |
from q1 h2 have "u' \<in> A" |
|
293 |
using y unfolding Image_def str_eq_def by blast |
|
294 |
moreover from q2 h3 eq |
|
295 |
have "us' @ z \<in> B" |
|
296 |
unfolding Image_def str_eq_def by auto |
|
297 |
ultimately have "y @ z \<in> A \<cdot> B" using q3 |
|
298 |
unfolding Partitions_def by auto |
|
299 |
} |
|
300 |
moreover |
|
301 |
{ assume eq: "x @ us = u" "z = us @ v" |
|
302 |
have "(\<approx>A `` {x}) = tag_Times3a A B x" |
|
303 |
unfolding tag_Times3a_def by simp |
|
304 |
then have "(\<approx>A `` {x}) = tag_Times3a A B y" |
|
305 |
using a by simp |
|
306 |
then have "\<approx>A `` {x} = \<approx>A `` {y}" |
|
307 |
unfolding tag_Times3a_def by simp |
|
308 |
moreover |
|
309 |
have "x @ us \<in> A" using h2 eq by simp |
|
310 |
ultimately |
|
311 |
have "y @ us \<in> A" using y |
|
312 |
unfolding Image_def str_eq_def by blast |
|
313 |
then have "(y @ us) @ v \<in> A \<cdot> B" |
|
314 |
using h3 unfolding conc_def by blast |
|
315 |
then have "y @ z \<in> A \<cdot> B" using eq by simp |
|
316 |
} |
|
317 |
ultimately show "y @ z \<in> A \<cdot> B" by blast |
|
318 |
qed |
|
319 |
||
320 |
lemma conc_in_cases2: |
|
166 | 321 |
assumes "x @ z \<in> A \<cdot> B" |
162
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
322 |
shows "(\<exists> x' \<le> x. x' \<in> A \<and> (x - x') @ z \<in> B) \<or> |
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
323 |
(\<exists> z' \<le> z. (x @ z') \<in> A \<and> (z - z') \<in> B)" |
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
324 |
using assms |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
166
diff
changeset
|
325 |
unfolding conc_def prefix_def |
162
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
326 |
by (auto simp add: append_eq_append_conv2) |
63 | 327 |
|
181 | 328 |
definition |
329 |
tag_Times :: "'a lang \<Rightarrow> 'a lang \<Rightarrow> 'a list \<Rightarrow> ('a lang \<times> 'a lang set)" |
|
330 |
where |
|
331 |
"tag_Times A B \<equiv> |
|
332 |
(\<lambda>x. (\<approx>A `` {x}, {(\<approx>B `` {x - x'}) | x'. x' \<le> x \<and> x' \<in> A}))" |
|
333 |
||
334 |
lemma tag_Times_injI: |
|
335 |
assumes eq_tag: "tag_Times A B x = tag_Times A B y" |
|
166 | 336 |
shows "x \<approx>(A \<cdot> B) y" |
162
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
337 |
proof - |
63 | 338 |
{ fix x y z |
166 | 339 |
assume xz_in_seq: "x @ z \<in> A \<cdot> B" |
181 | 340 |
and tag_xy: "tag_Times A B x = tag_Times A B y" |
166 | 341 |
have"y @ z \<in> A \<cdot> B" |
162
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
342 |
proof - |
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
343 |
{ (* first case with x' in A and (x - x') @ z in B *) |
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
344 |
fix x' |
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
345 |
assume h1: "x' \<le> x" and h2: "x' \<in> A" and h3: "(x - x') @ z \<in> B" |
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
346 |
obtain y' |
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
347 |
where "y' \<le> y" |
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
348 |
and "y' \<in> A" |
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
349 |
and "(y - y') @ z \<in> B" |
63 | 350 |
proof - |
162
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
351 |
have "{\<approx>B `` {x - x'} |x'. x' \<le> x \<and> x' \<in> A} = |
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
352 |
{\<approx>B `` {y - y'} |y'. y' \<le> y \<and> y' \<in> A}" (is "?Left = ?Right") |
181 | 353 |
using tag_xy unfolding tag_Times_def by simp |
162
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
354 |
moreover |
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
355 |
have "\<approx>B `` {x - x'} \<in> ?Left" using h1 h2 by auto |
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
356 |
ultimately |
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
357 |
have "\<approx>B `` {x - x'} \<in> ?Right" by simp |
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
358 |
then obtain y' |
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
359 |
where eq_xy': "\<approx>B `` {x - x'} = \<approx>B `` {y - y'}" |
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
360 |
and pref_y': "y' \<le> y" and y'_in: "y' \<in> A" |
63 | 361 |
by simp blast |
162
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
362 |
have "(x - x') \<approx>B (y - y')" using eq_xy' |
181 | 363 |
unfolding Image_def str_eq_def by auto |
162
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
364 |
with h3 have "(y - y') @ z \<in> B" |
181 | 365 |
unfolding str_eq_def by simp |
162
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
366 |
with pref_y' y'_in |
63 | 367 |
show ?thesis using that by blast |
368 |
qed |
|
181 | 369 |
then have "y @ z \<in> A \<cdot> B" |
370 |
unfolding prefix_def by auto |
|
162
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
371 |
} |
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
372 |
moreover |
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
373 |
{ (* second case with x @ z' in A and z - z' in B *) |
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
374 |
fix z' |
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
375 |
assume h1: "z' \<le> z" and h2: "(x @ z') \<in> A" and h3: "z - z' \<in> B" |
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
376 |
have "\<approx>A `` {x} = \<approx>A `` {y}" |
181 | 377 |
using tag_xy unfolding tag_Times_def by simp |
162
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
378 |
with h2 have "y @ z' \<in> A" |
181 | 379 |
unfolding Image_def str_eq_def by auto |
166 | 380 |
with h1 h3 have "y @ z \<in> A \<cdot> B" |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
166
diff
changeset
|
381 |
unfolding prefix_def conc_def |
162
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
382 |
by (auto) (metis append_assoc) |
63 | 383 |
} |
166 | 384 |
ultimately show "y @ z \<in> A \<cdot> B" |
181 | 385 |
using conc_in_cases2 [OF xz_in_seq] by blast |
63 | 386 |
qed |
162
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
387 |
} |
63 | 388 |
from this [OF _ eq_tag] and this [OF _ eq_tag [THEN sym]] |
181 | 389 |
show "x \<approx>(A \<cdot> B) y" unfolding str_eq_def by blast |
63 | 390 |
qed |
391 |
||
181 | 392 |
lemma quot_conc_finiteI [intro]: |
393 |
fixes A B::"'a lang" |
|
394 |
assumes fin1: "finite (UNIV // \<approx>A)" |
|
395 |
and fin2: "finite (UNIV // \<approx>B)" |
|
396 |
shows "finite (UNIV // \<approx>(A \<cdot> B))" |
|
397 |
proof (rule_tac tag = "tag_Times A B" in tag_finite_imageD) |
|
398 |
show "\<And>x y. tag_Times A B x = tag_Times A B y \<Longrightarrow> x \<approx>(A \<cdot> B) y" |
|
399 |
by (rule tag_Times_injI) |
|
63 | 400 |
next |
181 | 401 |
have *: "finite ((UNIV // \<approx>A) \<times> (Pow (UNIV // \<approx>B)))" |
63 | 402 |
using fin1 fin2 by auto |
181 | 403 |
show "finite (range (tag_Times A B))" |
404 |
unfolding tag_Times_def |
|
63 | 405 |
apply(rule finite_subset[OF _ *]) |
406 |
unfolding quotient_def |
|
407 |
by auto |
|
408 |
qed |
|
409 |
||
162
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
410 |
|
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
166
diff
changeset
|
411 |
subsubsection {* The inductive case for @{const "Star"} *} |
63 | 412 |
|
181 | 413 |
definition |
414 |
"SPartitions s \<equiv> {(u, v). u @ v = s \<and> u < s}" |
|
415 |
||
416 |
lemma |
|
417 |
assumes "x \<in> A\<star>" "x \<noteq> []" |
|
418 |
shows "\<exists>(u, v) \<in> SPartitions x. u \<in> A\<star> \<and> v \<in> A\<star>" |
|
419 |
using assms |
|
420 |
apply(subst (asm) star_unfold_left) |
|
421 |
apply(simp) |
|
422 |
apply(simp add: conc_def) |
|
423 |
apply(erule exE)+ |
|
424 |
apply(erule conjE)+ |
|
425 |
apply(rule_tac x="([], xs @ ys)" in bexI) |
|
426 |
apply(simp) |
|
427 |
apply(simp add: SPartitions_def) |
|
428 |
apply(auto) |
|
429 |
apply (metis append_Cons list.exhaust strict_prefix_simps(2)) |
|
430 |
by (metis Nil_is_append_conv Nil_prefix xt1(11)) |
|
431 |
||
432 |
lemma |
|
433 |
assumes "x @ z \<in> A\<star>" "x \<noteq> []" |
|
434 |
shows "\<exists>(u, v) \<in> SPartitions x. u \<in> A\<star> \<and> v @ z \<in> A\<star>" |
|
435 |
using assms |
|
436 |
apply(subst (asm) star_unfold_left) |
|
437 |
apply(simp) |
|
438 |
apply(simp add: conc_def) |
|
439 |
apply(erule exE)+ |
|
440 |
apply(erule conjE)+ |
|
441 |
apply(rule_tac x="([], x)" in bexI) |
|
442 |
apply(simp) |
|
443 |
apply(simp add: SPartitions_def) |
|
444 |
by (metis Nil_prefix xt1(11)) |
|
445 |
||
446 |
lemma finite_set_has_max: |
|
447 |
"\<lbrakk>finite A; A \<noteq> {}\<rbrakk> \<Longrightarrow> \<exists> max \<in> A. \<forall> a \<in> A. length a \<le> length max" |
|
448 |
apply (induct rule:finite.induct) |
|
449 |
apply(simp) |
|
450 |
by (metis (full_types) all_not_in_conv insertI1 insert_iff linorder_linear order_eq_iff order_trans prefix_length_le) |
|
451 |
||
452 |
||
453 |
||
63 | 454 |
definition |
181 | 455 |
tag_Star3 :: "'a lang \<Rightarrow> 'a list \<Rightarrow> (bool \<times> 'a lang) set" |
63 | 456 |
where |
181 | 457 |
"tag_Star3 A \<equiv> |
458 |
(\<lambda>x. ({(u \<in> A\<star>, \<approx>A `` {v}) | u v. (u, v) \<in> Partitions x}))" |
|
459 |
||
460 |
||
461 |
||
462 |
||
463 |
definition |
|
464 |
tag_Star :: "'a lang \<Rightarrow> 'a list \<Rightarrow> ('a lang) set" |
|
465 |
where |
|
466 |
"tag_Star A \<equiv> (\<lambda>x. {\<approx>A `` {x - xa} | xa. xa < x \<and> xa \<in> A\<star>})" |
|
63 | 467 |
|
468 |
text {* A technical lemma. *} |
|
469 |
lemma finite_set_has_max: "\<lbrakk>finite A; A \<noteq> {}\<rbrakk> \<Longrightarrow> |
|
470 |
(\<exists> max \<in> A. \<forall> a \<in> A. f a <= (f max :: nat))" |
|
471 |
proof (induct rule:finite.induct) |
|
472 |
case emptyI thus ?case by simp |
|
473 |
next |
|
474 |
case (insertI A a) |
|
475 |
show ?case |
|
476 |
proof (cases "A = {}") |
|
477 |
case True thus ?thesis by (rule_tac x = a in bexI, auto) |
|
478 |
next |
|
479 |
case False |
|
480 |
with insertI.hyps and False |
|
481 |
obtain max |
|
482 |
where h1: "max \<in> A" |
|
483 |
and h2: "\<forall>a\<in>A. f a \<le> f max" by blast |
|
484 |
show ?thesis |
|
485 |
proof (cases "f a \<le> f max") |
|
486 |
assume "f a \<le> f max" |
|
487 |
with h1 h2 show ?thesis by (rule_tac x = max in bexI, auto) |
|
488 |
next |
|
489 |
assume "\<not> (f a \<le> f max)" |
|
490 |
thus ?thesis using h2 by (rule_tac x = a in bexI, auto) |
|
491 |
qed |
|
492 |
qed |
|
493 |
qed |
|
494 |
||
495 |
||
162
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
496 |
text {* The following is a technical lemma, which helps to show the range finiteness of tag function. *} |
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
497 |
|
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
166
diff
changeset
|
498 |
lemma finite_strict_prefix_set: |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
166
diff
changeset
|
499 |
shows "finite {xa. xa < (x::'a list)}" |
63 | 500 |
apply (induct x rule:rev_induct, simp) |
501 |
apply (subgoal_tac "{xa. xa < xs @ [x]} = {xa. xa < xs} \<union> {xs}") |
|
502 |
by (auto simp:strict_prefix_def) |
|
503 |
||
504 |
||
181 | 505 |
lemma tag_Star_injI: |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
166
diff
changeset
|
506 |
fixes L\<^isub>1::"('a::finite) lang" |
181 | 507 |
assumes eq_tag: "tag_Star L\<^isub>1 v = tag_Star L\<^isub>1 w" |
162
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
508 |
shows "v \<approx>(L\<^isub>1\<star>) w" |
63 | 509 |
proof- |
510 |
{ fix x y z |
|
511 |
assume xz_in_star: "x @ z \<in> L\<^isub>1\<star>" |
|
181 | 512 |
and tag_xy: "tag_Star L\<^isub>1 x = tag_Star L\<^isub>1 y" |
63 | 513 |
have "y @ z \<in> L\<^isub>1\<star>" |
514 |
proof(cases "x = []") |
|
515 |
case True |
|
516 |
with tag_xy have "y = []" |
|
181 | 517 |
by (auto simp add: tag_Star_def strict_prefix_def) |
63 | 518 |
thus ?thesis using xz_in_star True by simp |
519 |
next |
|
520 |
case False |
|
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
166
diff
changeset
|
521 |
let ?S = "{xa::('a::finite) list. xa < x \<and> xa \<in> L\<^isub>1\<star> \<and> (x - xa) @ z \<in> L\<^isub>1\<star>}" |
63 | 522 |
have "finite ?S" |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
166
diff
changeset
|
523 |
by (rule_tac B = "{xa. xa < x}" in finite_subset) |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
166
diff
changeset
|
524 |
(auto simp: finite_strict_prefix_set) |
63 | 525 |
moreover have "?S \<noteq> {}" using False xz_in_star |
526 |
by (simp, rule_tac x = "[]" in exI, auto simp:strict_prefix_def) |
|
527 |
ultimately have "\<exists> xa_max \<in> ?S. \<forall> xa \<in> ?S. length xa \<le> length xa_max" |
|
528 |
using finite_set_has_max by blast |
|
529 |
then obtain xa_max |
|
530 |
where h1: "xa_max < x" |
|
531 |
and h2: "xa_max \<in> L\<^isub>1\<star>" |
|
532 |
and h3: "(x - xa_max) @ z \<in> L\<^isub>1\<star>" |
|
533 |
and h4:"\<forall> xa < x. xa \<in> L\<^isub>1\<star> \<and> (x - xa) @ z \<in> L\<^isub>1\<star> |
|
534 |
\<longrightarrow> length xa \<le> length xa_max" |
|
535 |
by blast |
|
536 |
obtain ya |
|
537 |
where h5: "ya < y" and h6: "ya \<in> L\<^isub>1\<star>" |
|
538 |
and eq_xya: "(x - xa_max) \<approx>L\<^isub>1 (y - ya)" |
|
539 |
proof- |
|
540 |
from tag_xy have "{\<approx>L\<^isub>1 `` {x - xa} |xa. xa < x \<and> xa \<in> L\<^isub>1\<star>} = |
|
541 |
{\<approx>L\<^isub>1 `` {y - xa} |xa. xa < y \<and> xa \<in> L\<^isub>1\<star>}" (is "?left = ?right") |
|
181 | 542 |
by (auto simp:tag_Star_def) |
63 | 543 |
moreover have "\<approx>L\<^isub>1 `` {x - xa_max} \<in> ?left" using h1 h2 by auto |
544 |
ultimately have "\<approx>L\<^isub>1 `` {x - xa_max} \<in> ?right" by simp |
|
545 |
thus ?thesis using that |
|
181 | 546 |
apply (simp add: Image_def str_eq_def) by blast |
63 | 547 |
qed |
548 |
have "(y - ya) @ z \<in> L\<^isub>1\<star>" |
|
549 |
proof- |
|
550 |
obtain za zb where eq_zab: "z = za @ zb" |
|
551 |
and l_za: "(y - ya)@za \<in> L\<^isub>1" and ls_zb: "zb \<in> L\<^isub>1\<star>" |
|
552 |
proof - |
|
181 | 553 |
from h1 have "(x - xa_max) @ z \<noteq> []" |
554 |
unfolding strict_prefix_def prefix_def by auto |
|
180 | 555 |
from star_decom [OF h3 this] |
63 | 556 |
obtain a b where a_in: "a \<in> L\<^isub>1" |
557 |
and a_neq: "a \<noteq> []" and b_in: "b \<in> L\<^isub>1\<star>" |
|
558 |
and ab_max: "(x - xa_max) @ z = a @ b" by blast |
|
559 |
let ?za = "a - (x - xa_max)" and ?zb = "b" |
|
560 |
have pfx: "(x - xa_max) \<le> a" (is "?P1") |
|
561 |
and eq_z: "z = ?za @ ?zb" (is "?P2") |
|
562 |
proof - |
|
563 |
have "((x - xa_max) \<le> a \<and> (a - (x - xa_max)) @ b = z) \<or> |
|
564 |
(a < (x - xa_max) \<and> ((x - xa_max) - a) @ z = b)" |
|
162
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
565 |
using append_eq_dest[OF ab_max] by (auto simp:strict_prefix_def) |
63 | 566 |
moreover { |
567 |
assume np: "a < (x - xa_max)" |
|
568 |
and b_eqs: "((x - xa_max) - a) @ z = b" |
|
569 |
have "False" |
|
570 |
proof - |
|
571 |
let ?xa_max' = "xa_max @ a" |
|
572 |
have "?xa_max' < x" |
|
573 |
using np h1 by (clarsimp simp:strict_prefix_def diff_prefix) |
|
574 |
moreover have "?xa_max' \<in> L\<^isub>1\<star>" |
|
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
166
diff
changeset
|
575 |
using a_in h2 by (auto) |
63 | 576 |
moreover have "(x - ?xa_max') @ z \<in> L\<^isub>1\<star>" |
162
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
577 |
using b_eqs b_in np h1 by (simp add:diff_diff_append) |
63 | 578 |
moreover have "\<not> (length ?xa_max' \<le> length xa_max)" |
579 |
using a_neq by simp |
|
580 |
ultimately show ?thesis using h4 by blast |
|
581 |
qed } |
|
582 |
ultimately show ?P1 and ?P2 by auto |
|
583 |
qed |
|
181 | 584 |
hence "(x - xa_max)@?za \<in> L\<^isub>1" using a_in unfolding prefix_def by auto |
63 | 585 |
with eq_xya have "(y - ya) @ ?za \<in> L\<^isub>1" |
181 | 586 |
by (auto simp: str_eq_def) |
63 | 587 |
with eq_z and b_in |
588 |
show ?thesis using that by blast |
|
589 |
qed |
|
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
166
diff
changeset
|
590 |
have "((y - ya) @ za) @ zb \<in> L\<^isub>1\<star>" using l_za ls_zb |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
166
diff
changeset
|
591 |
by (rule_tac append_in_starI) (auto) |
63 | 592 |
with eq_zab show ?thesis by simp |
593 |
qed |
|
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
166
diff
changeset
|
594 |
with h5 h6 show ?thesis |
181 | 595 |
unfolding strict_prefix_def prefix_def by auto |
63 | 596 |
qed |
597 |
} |
|
598 |
from this [OF _ eq_tag] and this [OF _ eq_tag [THEN sym]] |
|
181 | 599 |
show ?thesis unfolding str_eq_def by blast |
63 | 600 |
qed |
601 |
||
602 |
lemma quot_star_finiteI [intro]: |
|
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
166
diff
changeset
|
603 |
fixes A::"('a::finite) lang" |
166 | 604 |
assumes finite1: "finite (UNIV // \<approx>A)" |
605 |
shows "finite (UNIV // \<approx>(A\<star>))" |
|
181 | 606 |
proof (rule_tac tag = "tag_Star A" in tag_finite_imageD) |
607 |
show "\<And>x y. tag_Star A x = tag_Star A y \<Longrightarrow> x \<approx>(A\<star>) y" |
|
608 |
by (rule tag_Star_injI) |
|
63 | 609 |
next |
166 | 610 |
have *: "finite (Pow (UNIV // \<approx>A))" |
63 | 611 |
using finite1 by auto |
181 | 612 |
show "finite (range (tag_Star A))" |
613 |
unfolding tag_Star_def |
|
63 | 614 |
apply(rule finite_subset[OF _ *]) |
615 |
unfolding quotient_def |
|
616 |
by auto |
|
617 |
qed |
|
618 |
||
619 |
subsubsection{* The conclusion *} |
|
620 |
||
112 | 621 |
lemma Myhill_Nerode2: |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
166
diff
changeset
|
622 |
fixes r::"('a::finite) rexp" |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
166
diff
changeset
|
623 |
shows "finite (UNIV // \<approx>(lang r))" |
63 | 624 |
by (induct r) (auto) |
625 |
||
132 | 626 |
theorem Myhill_Nerode: |
170
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
166
diff
changeset
|
627 |
fixes A::"('a::finite) lang" |
b1258b7d2789
made the theories compatible with the existing developments in the AFP; old theories are in the directory Attic
urbanc
parents:
166
diff
changeset
|
628 |
shows "(\<exists>r. A = lang r) \<longleftrightarrow> finite (UNIV // \<approx>A)" |
162
e93760534354
added directory for journal version; took uptodate version of the theory files
urbanc
parents:
160
diff
changeset
|
629 |
using Myhill_Nerode1 Myhill_Nerode2 by auto |
112 | 630 |
|
63 | 631 |
end |