7701
|
1 |
(* Title: HOL/Recdef.thy
|
|
2 |
ID: $Id$
|
10773
|
3 |
Author: Konrad Slind and Markus Wenzel, TU Muenchen
|
5123
|
4 |
|
7701
|
5 |
TFL: recursive function definitions.
|
|
6 |
*)
|
|
7 |
|
10212
|
8 |
theory Recdef = Wellfounded_Relations + Datatype
|
7701
|
9 |
files
|
10773
|
10 |
("../TFL/utils.ML")
|
|
11 |
("../TFL/usyntax.ML")
|
|
12 |
("../TFL/dcterm.ML")
|
|
13 |
("../TFL/thms.ML")
|
|
14 |
("../TFL/rules.ML")
|
|
15 |
("../TFL/thry.ML")
|
|
16 |
("../TFL/tfl.ML")
|
|
17 |
("../TFL/post.ML")
|
|
18 |
("Tools/recdef_package.ML"):
|
|
19 |
|
|
20 |
lemma tfl_some: "\<forall>P x. P x --> P (Eps P)"
|
|
21 |
by (blast intro: someI)
|
|
22 |
|
|
23 |
lemma tfl_eq_True: "(x = True) --> x"
|
|
24 |
by blast
|
|
25 |
|
|
26 |
lemma tfl_rev_eq_mp: "(x = y) --> y --> x";
|
|
27 |
by blast
|
|
28 |
|
|
29 |
lemma tfl_simp_thm: "(x --> y) --> (x = x') --> (x' --> y)"
|
|
30 |
by blast
|
6438
|
31 |
|
10773
|
32 |
lemma tfl_P_imp_P_iff_True: "P ==> P = True"
|
|
33 |
by blast
|
|
34 |
|
|
35 |
lemma tfl_imp_trans: "(A --> B) ==> (B --> C) ==> (A --> C)"
|
|
36 |
by blast
|
|
37 |
|
|
38 |
lemma tfl_disj_assoc: "(a \<or> b) \<or> c == a \<or> (b \<or> c)"
|
|
39 |
by simp
|
|
40 |
|
|
41 |
lemma tfl_disjE: "P \<or> Q ==> P --> R ==> Q --> R ==> R"
|
|
42 |
by blast
|
|
43 |
|
|
44 |
lemma tfl_exE: "\<exists>x. P x ==> \<forall>x. P x --> Q ==> Q"
|
|
45 |
by blast
|
|
46 |
|
|
47 |
use "../TFL/utils.ML"
|
|
48 |
use "../TFL/usyntax.ML"
|
|
49 |
use "../TFL/dcterm.ML"
|
|
50 |
use "../TFL/thms.ML"
|
|
51 |
use "../TFL/rules.ML"
|
|
52 |
use "../TFL/thry.ML"
|
|
53 |
use "../TFL/tfl.ML"
|
|
54 |
use "../TFL/post.ML"
|
|
55 |
use "Tools/recdef_package.ML"
|
6438
|
56 |
setup RecdefPackage.setup
|
|
57 |
|
9855
|
58 |
lemmas [recdef_simp] =
|
|
59 |
inv_image_def
|
|
60 |
measure_def
|
|
61 |
lex_prod_def
|
|
62 |
less_Suc_eq [THEN iffD2]
|
|
63 |
|
|
64 |
lemmas [recdef_cong] =
|
|
65 |
if_cong
|
|
66 |
|
|
67 |
lemma let_cong [recdef_cong]:
|
|
68 |
"M = N ==> (!!x. x = N ==> f x = g x) ==> Let M f = Let N g"
|
|
69 |
by (unfold Let_def) blast
|
|
70 |
|
|
71 |
lemmas [recdef_wf] =
|
|
72 |
wf_trancl
|
|
73 |
wf_less_than
|
|
74 |
wf_lex_prod
|
|
75 |
wf_inv_image
|
|
76 |
wf_measure
|
|
77 |
wf_pred_nat
|
10653
|
78 |
wf_same_fst
|
9855
|
79 |
wf_empty
|
|
80 |
|
6438
|
81 |
end
|