equal
deleted
inserted
replaced
209 |
209 |
210 goalw List.thy [flat_def] |
210 goalw List.thy [flat_def] |
211 "!!ls. ls: list(list(A)) ==> flat(ls) : list(A)"; |
211 "!!ls. ls: list(list(A)) ==> flat(ls) : list(A)"; |
212 by (REPEAT (ares_tac (list.intrs @ [list_rec_type, app_type]) 1)); |
212 by (REPEAT (ares_tac (list.intrs @ [list_rec_type, app_type]) 1)); |
213 qed "flat_type"; |
213 qed "flat_type"; |
|
214 |
|
215 |
|
216 (** set_of_list **) |
|
217 |
|
218 val [set_of_list_Nil,set_of_list_Cons] = list_recs set_of_list_def; |
|
219 |
|
220 goalw List.thy [set_of_list_def] |
|
221 "!!l. l: list(A) ==> set_of_list(l) : Pow(A)"; |
|
222 be list_rec_type 1; |
|
223 by (ALLGOALS (fast_tac ZF_cs)); |
|
224 qed "set_of_list_type"; |
|
225 |
|
226 goal List.thy |
|
227 "!!l. xs: list(A) ==> \ |
|
228 \ set_of_list (xs@ys) = set_of_list(xs) Un set_of_list(ys)"; |
|
229 by (etac list.induct 1); |
|
230 by (ALLGOALS (asm_simp_tac (ZF_ss addsimps [set_of_list_Nil,set_of_list_Cons, |
|
231 app_Nil,app_Cons,Un_cons]))); |
|
232 qed "set_of_list_append"; |
214 |
233 |
215 |
234 |
216 (** list_add **) |
235 (** list_add **) |
217 |
236 |
218 val [list_add_Nil,list_add_Cons] = list_recs list_add_def; |
237 val [list_add_Nil,list_add_Cons] = list_recs list_add_def; |