equal
deleted
inserted
replaced
15 inductive finite :: "'a set \<Rightarrow> bool" |
15 inductive finite :: "'a set \<Rightarrow> bool" |
16 where |
16 where |
17 emptyI [simp, intro!]: "finite {}" |
17 emptyI [simp, intro!]: "finite {}" |
18 | insertI [simp, intro!]: "finite A \<Longrightarrow> finite (insert a A)" |
18 | insertI [simp, intro!]: "finite A \<Longrightarrow> finite (insert a A)" |
19 |
19 |
|
20 (* FIXME: move to Set theory *) |
20 use "Tools/set_comprehension_pointfree.ML" |
21 use "Tools/set_comprehension_pointfree.ML" |
21 |
22 |
22 simproc_setup finite_Collect ("finite (Collect P)") = |
23 simproc_setup finite_Collect ("finite (Collect P)") = |
23 {* Set_Comprehension_Pointfree.simproc *} |
24 {* Set_Comprehension_Pointfree.simproc *} |
24 |
25 |
|
26 (* FIXME: move to Set theory*) |
|
27 setup {* |
|
28 Code_Preproc.map_pre (fn ss => ss addsimprocs |
|
29 [Raw_Simplifier.make_simproc {name = "set comprehension", lhss = [@{cpat "Collect ?P"}], |
|
30 proc = Set_Comprehension_Pointfree.code_simproc, identifier = []}]) |
|
31 *} |
25 |
32 |
26 lemma finite_induct [case_names empty insert, induct set: finite]: |
33 lemma finite_induct [case_names empty insert, induct set: finite]: |
27 -- {* Discharging @{text "x \<notin> F"} entails extra work. *} |
34 -- {* Discharging @{text "x \<notin> F"} entails extra work. *} |
28 assumes "finite F" |
35 assumes "finite F" |
29 assumes "P {}" |
36 assumes "P {}" |