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