| author | aspinall | 
| Fri, 01 Oct 2004 11:51:55 +0200 | |
| changeset 15220 | cc88c8ee4d2f | 
| parent 15150 | c7af682b9ee5 | 
| child 15481 | fc075ae929e4 | 
| permissions | -rw-r--r-- | 
| 7701 | 1 | (* Title: HOL/Recdef.thy | 
| 2 | ID: $Id$ | |
| 10773 | 3 | Author: Konrad Slind and Markus Wenzel, TU Muenchen | 
| 12023 | 4 | *) | 
| 5123 | 5 | |
| 12023 | 6 | header {* TFL: recursive function definitions *}
 | 
| 7701 | 7 | |
| 15131 | 8 | theory Recdef | 
| 15140 | 9 | imports Wellfounded_Relations Datatype | 
| 7701 | 10 | files | 
| 15150 
c7af682b9ee5
fix to eliminate excessive case-splits in the recursion equations, by Luca Dixon
 paulson parents: 
15140diff
changeset | 11 |   ("../TFL/isand.ML")
 | 
| 
c7af682b9ee5
fix to eliminate excessive case-splits in the recursion equations, by Luca Dixon
 paulson parents: 
15140diff
changeset | 12 |   ("../TFL/casesplit.ML")
 | 
| 10773 | 13 |   ("../TFL/utils.ML")
 | 
| 14 |   ("../TFL/usyntax.ML")
 | |
| 15 |   ("../TFL/dcterm.ML")
 | |
| 16 |   ("../TFL/thms.ML")
 | |
| 17 |   ("../TFL/rules.ML")
 | |
| 18 |   ("../TFL/thry.ML")
 | |
| 19 |   ("../TFL/tfl.ML")
 | |
| 20 |   ("../TFL/post.ML")
 | |
| 15131 | 21 |   ("Tools/recdef_package.ML")
 | 
| 22 | begin | |
| 10773 | 23 | |
| 24 | lemma tfl_eq_True: "(x = True) --> x" | |
| 25 | by blast | |
| 26 | ||
| 27 | lemma tfl_rev_eq_mp: "(x = y) --> y --> x"; | |
| 28 | by blast | |
| 29 | ||
| 30 | lemma tfl_simp_thm: "(x --> y) --> (x = x') --> (x' --> y)" | |
| 31 | by blast | |
| 6438 | 32 | |
| 10773 | 33 | lemma tfl_P_imp_P_iff_True: "P ==> P = True" | 
| 34 | by blast | |
| 35 | ||
| 36 | lemma tfl_imp_trans: "(A --> B) ==> (B --> C) ==> (A --> C)" | |
| 37 | by blast | |
| 38 | ||
| 12023 | 39 | lemma tfl_disj_assoc: "(a \<or> b) \<or> c == a \<or> (b \<or> c)" | 
| 10773 | 40 | by simp | 
| 41 | ||
| 12023 | 42 | lemma tfl_disjE: "P \<or> Q ==> P --> R ==> Q --> R ==> R" | 
| 10773 | 43 | by blast | 
| 44 | ||
| 12023 | 45 | lemma tfl_exE: "\<exists>x. P x ==> \<forall>x. P x --> Q ==> Q" | 
| 10773 | 46 | by blast | 
| 47 | ||
| 15150 
c7af682b9ee5
fix to eliminate excessive case-splits in the recursion equations, by Luca Dixon
 paulson parents: 
15140diff
changeset | 48 | use "../TFL/isand.ML" | 
| 
c7af682b9ee5
fix to eliminate excessive case-splits in the recursion equations, by Luca Dixon
 paulson parents: 
15140diff
changeset | 49 | use "../TFL/casesplit.ML" | 
| 10773 | 50 | use "../TFL/utils.ML" | 
| 51 | use "../TFL/usyntax.ML" | |
| 52 | use "../TFL/dcterm.ML" | |
| 53 | use "../TFL/thms.ML" | |
| 54 | use "../TFL/rules.ML" | |
| 55 | use "../TFL/thry.ML" | |
| 56 | use "../TFL/tfl.ML" | |
| 57 | use "../TFL/post.ML" | |
| 58 | use "Tools/recdef_package.ML" | |
| 6438 | 59 | setup RecdefPackage.setup | 
| 60 | ||
| 9855 | 61 | lemmas [recdef_simp] = | 
| 62 | inv_image_def | |
| 63 | measure_def | |
| 64 | lex_prod_def | |
| 11284 | 65 | same_fst_def | 
| 9855 | 66 | less_Suc_eq [THEN iffD2] | 
| 67 | ||
| 11165 | 68 | lemmas [recdef_cong] = if_cong image_cong | 
| 9855 | 69 | |
| 70 | lemma let_cong [recdef_cong]: | |
| 71 | "M = N ==> (!!x. x = N ==> f x = g x) ==> Let M f = Let N g" | |
| 72 | by (unfold Let_def) blast | |
| 73 | ||
| 74 | lemmas [recdef_wf] = | |
| 75 | wf_trancl | |
| 76 | wf_less_than | |
| 77 | wf_lex_prod | |
| 78 | wf_inv_image | |
| 79 | wf_measure | |
| 80 | wf_pred_nat | |
| 10653 | 81 | wf_same_fst | 
| 9855 | 82 | wf_empty | 
| 83 | ||
| 6438 | 84 | end |