444
|
1 |
theory BasicIdentities imports
|
|
2 |
"Lexer" "PDerivs"
|
|
3 |
begin
|
|
4 |
|
|
5 |
datatype rrexp =
|
|
6 |
RZERO
|
|
7 |
| RONE
|
|
8 |
| RCHAR char
|
|
9 |
| RSEQ rrexp rrexp
|
|
10 |
| RALTS "rrexp list"
|
|
11 |
| RSTAR rrexp
|
|
12 |
|
|
13 |
abbreviation
|
|
14 |
"RALT r1 r2 \<equiv> RALTS [r1, r2]"
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
fun
|
|
19 |
rnullable :: "rrexp \<Rightarrow> bool"
|
|
20 |
where
|
|
21 |
"rnullable (RZERO) = False"
|
|
22 |
| "rnullable (RONE ) = True"
|
|
23 |
| "rnullable (RCHAR c) = False"
|
|
24 |
| "rnullable (RALTS rs) = (\<exists>r \<in> set rs. rnullable r)"
|
|
25 |
| "rnullable (RSEQ r1 r2) = (rnullable r1 \<and> rnullable r2)"
|
|
26 |
| "rnullable (RSTAR r) = True"
|
|
27 |
|
|
28 |
|
|
29 |
fun
|
|
30 |
rder :: "char \<Rightarrow> rrexp \<Rightarrow> rrexp"
|
|
31 |
where
|
|
32 |
"rder c (RZERO) = RZERO"
|
|
33 |
| "rder c (RONE) = RZERO"
|
|
34 |
| "rder c (RCHAR d) = (if c = d then RONE else RZERO)"
|
|
35 |
| "rder c (RALTS rs) = RALTS (map (rder c) rs)"
|
|
36 |
| "rder c (RSEQ r1 r2) =
|
|
37 |
(if rnullable r1
|
|
38 |
then RALT (RSEQ (rder c r1) r2) (rder c r2)
|
|
39 |
else RSEQ (rder c r1) r2)"
|
|
40 |
| "rder c (RSTAR r) = RSEQ (rder c r) (RSTAR r)"
|
|
41 |
|
|
42 |
|
|
43 |
fun
|
|
44 |
rders :: "rrexp \<Rightarrow> string \<Rightarrow> rrexp"
|
|
45 |
where
|
|
46 |
"rders r [] = r"
|
|
47 |
| "rders r (c#s) = rders (rder c r) s"
|
|
48 |
|
|
49 |
fun rdistinct :: "'a list \<Rightarrow>'a set \<Rightarrow> 'a list"
|
|
50 |
where
|
|
51 |
"rdistinct [] acc = []"
|
|
52 |
| "rdistinct (x#xs) acc =
|
|
53 |
(if x \<in> acc then rdistinct xs acc
|
|
54 |
else x # (rdistinct xs ({x} \<union> acc)))"
|
|
55 |
|
475
|
56 |
lemma rdistinct_concat:
|
|
57 |
shows "set rs \<subseteq> rset \<Longrightarrow> rdistinct (rs @ rsa) rset = rdistinct rsa rset"
|
|
58 |
apply(induct rs)
|
|
59 |
apply simp+
|
|
60 |
done
|
|
61 |
|
|
62 |
lemma rdistinct_concat2:
|
|
63 |
shows "\<forall>r \<in> set rs. r \<in> rset \<Longrightarrow> rdistinct (rs @ rsa) rset = rdistinct rsa rset"
|
|
64 |
by (simp add: rdistinct_concat subsetI)
|
|
65 |
|
444
|
66 |
|
467
|
67 |
lemma distinct_not_exist:
|
|
68 |
shows "a \<notin> set rs \<Longrightarrow> rdistinct rs rset = rdistinct rs (insert a rset)"
|
|
69 |
apply(induct rs arbitrary: rset)
|
|
70 |
apply simp
|
|
71 |
apply(case_tac "aa \<in> rset")
|
|
72 |
apply simp
|
|
73 |
apply(subgoal_tac "a \<noteq> aa")
|
|
74 |
prefer 2
|
|
75 |
apply simp
|
|
76 |
apply simp
|
|
77 |
done
|
444
|
78 |
|
|
79 |
|
|
80 |
fun rflts :: "rrexp list \<Rightarrow> rrexp list"
|
|
81 |
where
|
|
82 |
"rflts [] = []"
|
|
83 |
| "rflts (RZERO # rs) = rflts rs"
|
|
84 |
| "rflts ((RALTS rs1) # rs) = rs1 @ rflts rs"
|
|
85 |
| "rflts (r1 # rs) = r1 # rflts rs"
|
|
86 |
|
|
87 |
|
|
88 |
fun rsimp_ALTs :: " rrexp list \<Rightarrow> rrexp"
|
|
89 |
where
|
|
90 |
"rsimp_ALTs [] = RZERO"
|
|
91 |
| "rsimp_ALTs [r] = r"
|
|
92 |
| "rsimp_ALTs rs = RALTS rs"
|
|
93 |
|
465
|
94 |
lemma rsimpalts_gte2elems:
|
|
95 |
shows "size rlist \<ge> 2 \<Longrightarrow> rsimp_ALTs rlist = RALTS rlist"
|
|
96 |
apply(induct rlist)
|
|
97 |
apply simp
|
|
98 |
apply(induct rlist)
|
|
99 |
apply simp
|
|
100 |
apply (metis Suc_le_length_iff rsimp_ALTs.simps(3))
|
|
101 |
by blast
|
|
102 |
|
|
103 |
lemma rsimpalts_conscons:
|
|
104 |
shows "rsimp_ALTs (r1 # rsa @ r2 # rsb) = RALTS (r1 # rsa @ r2 # rsb)"
|
|
105 |
by (metis Nil_is_append_conv list.exhaust rsimp_ALTs.simps(3))
|
|
106 |
|
|
107 |
|
444
|
108 |
fun rsimp_SEQ :: " rrexp \<Rightarrow> rrexp \<Rightarrow> rrexp"
|
|
109 |
where
|
|
110 |
"rsimp_SEQ RZERO _ = RZERO"
|
|
111 |
| "rsimp_SEQ _ RZERO = RZERO"
|
|
112 |
| "rsimp_SEQ RONE r2 = r2"
|
|
113 |
| "rsimp_SEQ r1 r2 = RSEQ r1 r2"
|
|
114 |
|
|
115 |
|
|
116 |
fun rsimp :: "rrexp \<Rightarrow> rrexp"
|
|
117 |
where
|
|
118 |
"rsimp (RSEQ r1 r2) = rsimp_SEQ (rsimp r1) (rsimp r2)"
|
|
119 |
| "rsimp (RALTS rs) = rsimp_ALTs (rdistinct (rflts (map rsimp rs)) {}) "
|
|
120 |
| "rsimp r = r"
|
|
121 |
|
|
122 |
|
|
123 |
fun
|
|
124 |
rders_simp :: "rrexp \<Rightarrow> string \<Rightarrow> rrexp"
|
|
125 |
where
|
|
126 |
"rders_simp r [] = r"
|
|
127 |
| "rders_simp r (c#s) = rders_simp (rsimp (rder c r)) s"
|
|
128 |
|
|
129 |
fun rsize :: "rrexp \<Rightarrow> nat" where
|
|
130 |
"rsize RZERO = 1"
|
|
131 |
| "rsize (RONE) = 1"
|
|
132 |
| "rsize (RCHAR c) = 1"
|
|
133 |
| "rsize (RALTS rs) = Suc (sum_list (map rsize rs))"
|
|
134 |
| "rsize (RSEQ r1 r2) = Suc (rsize r1 + rsize r2)"
|
|
135 |
| "rsize (RSTAR r) = Suc (rsize r)"
|
|
136 |
|
|
137 |
|
|
138 |
lemma rder_rsimp_ALTs_commute:
|
|
139 |
shows " (rder x (rsimp_ALTs rs)) = rsimp_ALTs (map (rder x) rs)"
|
|
140 |
apply(induct rs)
|
|
141 |
apply simp
|
|
142 |
apply(case_tac rs)
|
|
143 |
apply simp
|
|
144 |
apply auto
|
|
145 |
done
|
|
146 |
|
|
147 |
|
|
148 |
lemma rsimp_aalts_smaller:
|
|
149 |
shows "rsize (rsimp_ALTs rs) \<le> rsize (RALTS rs)"
|
|
150 |
apply(induct rs)
|
|
151 |
apply simp
|
|
152 |
apply simp
|
|
153 |
apply(case_tac "rs = []")
|
|
154 |
apply simp
|
|
155 |
apply(subgoal_tac "\<exists>rsp ap. rs = ap # rsp")
|
|
156 |
apply(erule exE)+
|
|
157 |
apply simp
|
|
158 |
apply simp
|
|
159 |
by(meson neq_Nil_conv)
|
|
160 |
|
|
161 |
|
|
162 |
|
|
163 |
|
|
164 |
|
|
165 |
lemma rSEQ_mono:
|
|
166 |
shows "rsize (rsimp_SEQ r1 r2) \<le>rsize ( RSEQ r1 r2)"
|
|
167 |
apply auto
|
|
168 |
apply(induct r1)
|
|
169 |
apply auto
|
|
170 |
apply(case_tac "r2")
|
|
171 |
apply simp_all
|
|
172 |
apply(case_tac r2)
|
|
173 |
apply simp_all
|
|
174 |
apply(case_tac r2)
|
|
175 |
apply simp_all
|
|
176 |
apply(case_tac r2)
|
|
177 |
apply simp_all
|
|
178 |
apply(case_tac r2)
|
|
179 |
apply simp_all
|
|
180 |
done
|
|
181 |
|
|
182 |
lemma ralts_cap_mono:
|
|
183 |
shows "rsize (RALTS rs) \<le> Suc ( sum_list (map rsize rs)) "
|
|
184 |
by simp
|
|
185 |
|
|
186 |
lemma rflts_def_idiot:
|
|
187 |
shows "\<lbrakk> a \<noteq> RZERO; \<nexists>rs1. a = RALTS rs1\<rbrakk>
|
|
188 |
\<Longrightarrow> rflts (a # rs) = a # rflts rs"
|
|
189 |
apply(case_tac a)
|
|
190 |
apply simp_all
|
|
191 |
done
|
|
192 |
|
|
193 |
|
|
194 |
lemma rflts_mono:
|
|
195 |
shows "sum_list (map rsize (rflts rs))\<le> sum_list (map rsize rs)"
|
|
196 |
apply(induct rs)
|
|
197 |
apply simp
|
|
198 |
apply(case_tac "a = RZERO")
|
|
199 |
apply simp
|
|
200 |
apply(case_tac "\<exists>rs1. a = RALTS rs1")
|
|
201 |
apply(erule exE)
|
|
202 |
apply simp
|
|
203 |
apply(subgoal_tac "rflts (a # rs) = a # (rflts rs)")
|
|
204 |
prefer 2
|
|
205 |
using rflts_def_idiot apply blast
|
|
206 |
apply simp
|
|
207 |
done
|
|
208 |
|
|
209 |
lemma rdistinct_smaller: shows "sum_list (map rsize (rdistinct rs ss)) \<le>
|
|
210 |
sum_list (map rsize rs )"
|
|
211 |
apply (induct rs arbitrary: ss)
|
|
212 |
apply simp
|
|
213 |
by (simp add: trans_le_add2)
|
|
214 |
|
|
215 |
lemma rdistinct_phi_smaller: "sum_list (map rsize (rdistinct rs {})) \<le> sum_list (map rsize rs)"
|
|
216 |
by (simp add: rdistinct_smaller)
|
|
217 |
|
|
218 |
|
|
219 |
lemma rsimp_alts_mono :
|
|
220 |
shows "\<And>x. (\<And>xa. xa \<in> set x \<Longrightarrow> rsize (rsimp xa) \<le> rsize xa) \<Longrightarrow>
|
|
221 |
rsize (rsimp_ALTs (rdistinct (rflts (map rsimp x)) {})) \<le> Suc (sum_list (map rsize x))"
|
|
222 |
apply(subgoal_tac "rsize (rsimp_ALTs (rdistinct (rflts (map rsimp x)) {} ))
|
|
223 |
\<le> rsize (RALTS (rdistinct (rflts (map rsimp x)) {} ))")
|
|
224 |
prefer 2
|
|
225 |
using rsimp_aalts_smaller apply auto[1]
|
|
226 |
apply(subgoal_tac "rsize (RALTS (rdistinct (rflts (map rsimp x)) {})) \<le>Suc( sum_list (map rsize (rdistinct (rflts (map rsimp x)) {})))")
|
|
227 |
prefer 2
|
|
228 |
using ralts_cap_mono apply blast
|
|
229 |
apply(subgoal_tac "sum_list (map rsize (rdistinct (rflts (map rsimp x)) {})) \<le>
|
|
230 |
sum_list (map rsize ( (rflts (map rsimp x))))")
|
|
231 |
prefer 2
|
|
232 |
using rdistinct_smaller apply presburger
|
|
233 |
apply(subgoal_tac "sum_list (map rsize (rflts (map rsimp x))) \<le>
|
|
234 |
sum_list (map rsize (map rsimp x))")
|
|
235 |
prefer 2
|
|
236 |
using rflts_mono apply blast
|
|
237 |
apply(subgoal_tac "sum_list (map rsize (map rsimp x)) \<le> sum_list (map rsize x)")
|
|
238 |
prefer 2
|
|
239 |
|
|
240 |
apply (simp add: sum_list_mono)
|
|
241 |
by linarith
|
|
242 |
|
|
243 |
|
|
244 |
|
|
245 |
|
|
246 |
|
|
247 |
lemma rsimp_mono:
|
|
248 |
shows "rsize (rsimp r) \<le> rsize r"
|
|
249 |
apply(induct r)
|
|
250 |
apply simp_all
|
|
251 |
apply(subgoal_tac "rsize (rsimp_SEQ (rsimp r1) (rsimp r2)) \<le> rsize (RSEQ (rsimp r1) (rsimp r2))")
|
|
252 |
apply force
|
|
253 |
using rSEQ_mono
|
|
254 |
apply presburger
|
|
255 |
using rsimp_alts_mono by auto
|
|
256 |
|
|
257 |
lemma idiot:
|
|
258 |
shows "rsimp_SEQ RONE r = r"
|
|
259 |
apply(case_tac r)
|
|
260 |
apply simp_all
|
|
261 |
done
|
|
262 |
|
|
263 |
lemma no_alt_short_list_after_simp:
|
|
264 |
shows "RALTS rs = rsimp r \<Longrightarrow> rsimp_ALTs rs = RALTS rs"
|
|
265 |
sorry
|
|
266 |
|
|
267 |
lemma no_further_dB_after_simp:
|
|
268 |
shows "RALTS rs = rsimp r \<Longrightarrow> rdistinct rs {} = rs"
|
|
269 |
sorry
|
|
270 |
|
|
271 |
|
|
272 |
lemma idiot2:
|
|
273 |
shows " \<lbrakk>r1 \<noteq> RZERO; r1 \<noteq> RONE;r2 \<noteq> RZERO\<rbrakk>
|
|
274 |
\<Longrightarrow> rsimp_SEQ r1 r2 = RSEQ r1 r2"
|
|
275 |
apply(case_tac r1)
|
|
276 |
apply(case_tac r2)
|
|
277 |
apply simp_all
|
|
278 |
apply(case_tac r2)
|
|
279 |
apply simp_all
|
|
280 |
apply(case_tac r2)
|
|
281 |
apply simp_all
|
|
282 |
apply(case_tac r2)
|
|
283 |
apply simp_all
|
|
284 |
apply(case_tac r2)
|
|
285 |
apply simp_all
|
|
286 |
done
|
|
287 |
|
|
288 |
lemma rders__onechar:
|
|
289 |
shows " (rders_simp r [c]) = (rsimp (rders r [c]))"
|
|
290 |
by simp
|
|
291 |
|
|
292 |
lemma rders_append:
|
|
293 |
"rders c (s1 @ s2) = rders (rders c s1) s2"
|
|
294 |
apply(induct s1 arbitrary: c s2)
|
|
295 |
apply(simp_all)
|
|
296 |
done
|
|
297 |
|
|
298 |
lemma rders_simp_append:
|
|
299 |
"rders_simp c (s1 @ s2) = rders_simp (rders_simp c s1) s2"
|
|
300 |
apply(induct s1 arbitrary: c s2)
|
465
|
301 |
apply(simp_all)
|
444
|
302 |
done
|
|
303 |
|
|
304 |
lemma inside_simp_removal:
|
|
305 |
shows " rsimp (rder x (rsimp r)) = rsimp (rder x r)"
|
|
306 |
sorry
|
|
307 |
|
|
308 |
lemma set_related_list:
|
|
309 |
shows "distinct rs \<Longrightarrow> length rs = card (set rs)"
|
|
310 |
by (simp add: distinct_card)
|
|
311 |
(*this section deals with the property of distinctBy: creates a list without duplicates*)
|
|
312 |
lemma rdistinct_never_added_twice:
|
|
313 |
shows "rdistinct (a # rs) {a} = rdistinct rs {a}"
|
|
314 |
by force
|
|
315 |
|
|
316 |
|
|
317 |
lemma rdistinct_does_the_job:
|
|
318 |
shows "distinct (rdistinct rs s)"
|
|
319 |
apply(induct rs arbitrary: s)
|
|
320 |
apply simp
|
|
321 |
apply simp
|
|
322 |
sorry
|
|
323 |
|
|
324 |
lemma rders_simp_same_simpders:
|
|
325 |
shows "s \<noteq> [] \<Longrightarrow> rders_simp r s = rsimp (rders r s)"
|
|
326 |
apply(induct s rule: rev_induct)
|
|
327 |
apply simp
|
|
328 |
apply(case_tac "xs = []")
|
|
329 |
apply simp
|
|
330 |
apply(simp add: rders_append rders_simp_append)
|
|
331 |
using inside_simp_removal by blast
|
|
332 |
|
|
333 |
lemma simp_helps_der_pierce:
|
|
334 |
shows " rsimp
|
|
335 |
(rder x
|
|
336 |
(rsimp_ALTs rs)) =
|
|
337 |
rsimp
|
|
338 |
(rsimp_ALTs
|
|
339 |
(map (rder x )
|
|
340 |
rs
|
|
341 |
)
|
|
342 |
)"
|
|
343 |
sorry
|
|
344 |
|
|
345 |
|
|
346 |
lemma rders_simp_one_char:
|
|
347 |
shows "rders_simp r [c] = rsimp (rder c r)"
|
|
348 |
apply auto
|
|
349 |
done
|
|
350 |
|
|
351 |
lemma rsimp_idem:
|
|
352 |
shows "rsimp (rsimp r) = rsimp r"
|
|
353 |
sorry
|
|
354 |
|
|
355 |
corollary rsimp_inner_idem1:
|
|
356 |
shows "rsimp r = RSEQ r1 r2 \<Longrightarrow> rsimp r1 = r1 \<and> rsimp r2 = r2"
|
|
357 |
|
|
358 |
sorry
|
|
359 |
|
|
360 |
corollary rsimp_inner_idem2:
|
|
361 |
shows "rsimp r = RALTS rs \<Longrightarrow> \<forall>r' \<in> (set rs). rsimp r' = r'"
|
|
362 |
sorry
|
|
363 |
|
|
364 |
corollary rsimp_inner_idem3:
|
|
365 |
shows "rsimp r = RALTS rs \<Longrightarrow> map rsimp rs = rs"
|
|
366 |
by (meson map_idI rsimp_inner_idem2)
|
|
367 |
|
|
368 |
corollary rsimp_inner_idem4:
|
465
|
369 |
shows "rsimp r = RALTS rs \<Longrightarrow> rflts rs = rs"
|
444
|
370 |
sorry
|
|
371 |
|
|
372 |
|
|
373 |
lemma head_one_more_simp:
|
|
374 |
shows "map rsimp (r # rs) = map rsimp (( rsimp r) # rs)"
|
|
375 |
by (simp add: rsimp_idem)
|
|
376 |
|
|
377 |
lemma head_one_more_dersimp:
|
|
378 |
shows "map rsimp ((rder x (rders_simp r s) # rs)) = map rsimp ((rders_simp r (s@[x]) ) # rs)"
|
|
379 |
using head_one_more_simp rders_simp_append rders_simp_one_char by presburger
|
|
380 |
|
|
381 |
|
|
382 |
|
|
383 |
|
|
384 |
lemma ders_simp_nullability:
|
|
385 |
shows "rnullable (rders r s) = rnullable (rders_simp r s)"
|
|
386 |
sorry
|
|
387 |
|
|
388 |
lemma first_elem_seqder:
|
|
389 |
shows "\<not>rnullable r1p \<Longrightarrow> map rsimp (rder x (RSEQ r1p r2)
|
|
390 |
# rs) = map rsimp ((RSEQ (rder x r1p) r2) # rs) "
|
|
391 |
by auto
|
|
392 |
|
|
393 |
lemma first_elem_seqder1:
|
|
394 |
shows "\<not>rnullable (rders_simp r xs) \<Longrightarrow> map rsimp ( (rder x (RSEQ (rders_simp r xs) r2)) # rs) =
|
|
395 |
map rsimp ( (RSEQ (rsimp (rder x (rders_simp r xs))) r2) # rs)"
|
|
396 |
by (simp add: rsimp_idem)
|
|
397 |
|
|
398 |
lemma first_elem_seqdersimps:
|
|
399 |
shows "\<not>rnullable (rders_simp r xs) \<Longrightarrow> map rsimp ( (rder x (RSEQ (rders_simp r xs) r2)) # rs) =
|
|
400 |
map rsimp ( (RSEQ (rders_simp r (xs @ [x])) r2) # rs)"
|
|
401 |
using first_elem_seqder1 rders_simp_append by auto
|
|
402 |
|
|
403 |
|
|
404 |
|
|
405 |
|
|
406 |
|
|
407 |
|
|
408 |
lemma seq_ders_closed_form1:
|
|
409 |
shows "\<exists>Ss. rders_simp (RSEQ r1 r2) [c] = rsimp (RALTS ((RSEQ (rders_simp r1 [c]) r2) #
|
|
410 |
(map ( rders_simp r2 ) Ss)))"
|
|
411 |
apply(case_tac "rnullable r1")
|
|
412 |
apply(subgoal_tac " rders_simp (RSEQ r1 r2) [c] =
|
|
413 |
rsimp (RALTS ((RSEQ (rders_simp r1 [c]) r2) # (map (rders_simp r2) [[c]])))")
|
|
414 |
prefer 2
|
|
415 |
apply (simp add: rsimp_idem)
|
|
416 |
apply(rule_tac x = "[[c]]" in exI)
|
|
417 |
apply simp
|
|
418 |
apply(subgoal_tac " rders_simp (RSEQ r1 r2) [c] =
|
|
419 |
rsimp (RALTS ((RSEQ (rders_simp r1 [c]) r2) # (map (rders_simp r2) [])))")
|
|
420 |
apply blast
|
|
421 |
apply(simp add: rsimp_idem)
|
|
422 |
sorry
|
|
423 |
|
|
424 |
|
|
425 |
|
|
426 |
|
|
427 |
|
|
428 |
|
|
429 |
|
|
430 |
|
|
431 |
lemma simp_flatten2:
|
|
432 |
shows "rsimp (RALTS (r # [RALTS rs])) = rsimp (RALTS (r # rs))"
|
|
433 |
sorry
|
|
434 |
|
|
435 |
|
|
436 |
lemma simp_flatten:
|
|
437 |
shows "rsimp (RALTS ((RALTS rsa) # rsb)) = rsimp (RALTS (rsa @ rsb))"
|
|
438 |
|
|
439 |
sorry
|
|
440 |
|
|
441 |
|
|
442 |
|
|
443 |
fun vsuf :: "char list \<Rightarrow> rrexp \<Rightarrow> char list list" where
|
|
444 |
"vsuf [] _ = []"
|
|
445 |
|"vsuf (c#cs) r1 = (if (rnullable r1) then (vsuf cs (rder c r1)) @ [c # cs]
|
|
446 |
else (vsuf cs (rder c r1))
|
|
447 |
) "
|
|
448 |
|
|
449 |
|
|
450 |
|
|
451 |
|
|
452 |
|
|
453 |
|
|
454 |
fun star_update :: "char \<Rightarrow> rrexp \<Rightarrow> char list list \<Rightarrow> char list list" where
|
|
455 |
"star_update c r [] = []"
|
|
456 |
|"star_update c r (s # Ss) = (if (rnullable (rders_simp r s))
|
|
457 |
then (s@[c]) # [c] # (star_update c r Ss)
|
|
458 |
else (s@[c]) # (star_update c r Ss) )"
|
|
459 |
|
|
460 |
fun star_updates :: "char list \<Rightarrow> rrexp \<Rightarrow> char list list \<Rightarrow> char list list"
|
|
461 |
where
|
|
462 |
"star_updates [] r Ss = Ss"
|
|
463 |
| "star_updates (c # cs) r Ss = star_updates cs r (star_update c r Ss)"
|
|
464 |
|
|
465 |
|
|
466 |
|
|
467 |
|
|
468 |
|
|
469 |
|
|
470 |
(*some basic facts about rsimp*)
|
|
471 |
|
|
472 |
|
|
473 |
|
|
474 |
|
|
475 |
end |