src/HOL/Recdef.thy
author paulson
Tue Feb 01 18:01:57 2005 +0100 (2005-02-01)
changeset 15481 fc075ae929e4
parent 15150 c7af682b9ee5
child 16417 9bc16273c2d4
permissions -rw-r--r--
the new subst tactic, by Lucas Dixon
     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/casesplit.ML")
    12   ("../TFL/utils.ML")
    13   ("../TFL/usyntax.ML")
    14   ("../TFL/dcterm.ML")
    15   ("../TFL/thms.ML")
    16   ("../TFL/rules.ML")
    17   ("../TFL/thry.ML")
    18   ("../TFL/tfl.ML")
    19   ("../TFL/post.ML")
    20   ("Tools/recdef_package.ML")
    21 begin
    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
    31 
    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/casesplit.ML"
    48 use "../TFL/utils.ML"
    49 use "../TFL/usyntax.ML"
    50 use "../TFL/dcterm.ML"
    51 use "../TFL/thms.ML"
    52 use "../TFL/rules.ML"
    53 use "../TFL/thry.ML"
    54 use "../TFL/tfl.ML"
    55 use "../TFL/post.ML"
    56 use "Tools/recdef_package.ML"
    57 setup RecdefPackage.setup
    58 
    59 lemmas [recdef_simp] =
    60   inv_image_def
    61   measure_def
    62   lex_prod_def
    63   same_fst_def
    64   less_Suc_eq [THEN iffD2]
    65 
    66 lemmas [recdef_cong] = if_cong image_cong
    67 
    68 lemma let_cong [recdef_cong]:
    69     "M = N ==> (!!x. x = N ==> f x = g x) ==> Let M f = Let N g"
    70   by (unfold Let_def) blast
    71 
    72 lemmas [recdef_wf] =
    73   wf_trancl
    74   wf_less_than
    75   wf_lex_prod
    76   wf_inv_image
    77   wf_measure
    78   wf_pred_nat
    79   wf_same_fst
    80   wf_empty
    81 
    82 end