src/HOL/FunDef.thy
changeset 26748 4d51ddd6aa5c
parent 25567 5720345ea689
child 26749 397a1aeede7d
equal deleted inserted replaced
26747:f32fa5f5bdd1 26748:4d51ddd6aa5c
     4 *)
     4 *)
     5 
     5 
     6 header {* General recursive function definitions *}
     6 header {* General recursive function definitions *}
     7 
     7 
     8 theory FunDef
     8 theory FunDef
     9 imports Accessible_Part
     9 imports Wellfounded
    10 uses
    10 uses
    11   ("Tools/function_package/fundef_lib.ML")
    11   ("Tools/function_package/fundef_lib.ML")
    12   ("Tools/function_package/fundef_common.ML")
    12   ("Tools/function_package/fundef_common.ML")
    13   ("Tools/function_package/inductive_wrap.ML")
    13   ("Tools/function_package/inductive_wrap.ML")
    14   ("Tools/function_package/context_tree.ML")
    14   ("Tools/function_package/context_tree.ML")
    17   ("Tools/function_package/mutual.ML")
    17   ("Tools/function_package/mutual.ML")
    18   ("Tools/function_package/pattern_split.ML")
    18   ("Tools/function_package/pattern_split.ML")
    19   ("Tools/function_package/fundef_package.ML")
    19   ("Tools/function_package/fundef_package.ML")
    20   ("Tools/function_package/auto_term.ML")
    20   ("Tools/function_package/auto_term.ML")
    21   ("Tools/function_package/induction_scheme.ML")
    21   ("Tools/function_package/induction_scheme.ML")
       
    22   ("Tools/function_package/lexicographic_order.ML")
       
    23   ("Tools/function_package/fundef_datatype.ML")
    22 begin
    24 begin
    23 
    25 
    24 text {* Definitions with default value. *}
    26 text {* Definitions with default value. *}
    25 
    27 
    26 definition
    28 definition
   104 use "Tools/function_package/mutual.ML"
   106 use "Tools/function_package/mutual.ML"
   105 use "Tools/function_package/pattern_split.ML"
   107 use "Tools/function_package/pattern_split.ML"
   106 use "Tools/function_package/auto_term.ML"
   108 use "Tools/function_package/auto_term.ML"
   107 use "Tools/function_package/fundef_package.ML"
   109 use "Tools/function_package/fundef_package.ML"
   108 use "Tools/function_package/induction_scheme.ML"
   110 use "Tools/function_package/induction_scheme.ML"
       
   111 use "Tools/function_package/lexicographic_order.ML"
       
   112 use "Tools/function_package/fundef_datatype.ML"
   109 
   113 
   110 setup {* 
   114 setup {* 
   111   FundefPackage.setup 
   115   FundefPackage.setup 
   112   #> InductionScheme.setup
   116   #> InductionScheme.setup
       
   117   #> LexicographicOrder.setup 
       
   118   #> FundefDatatype.setup
   113 *}
   119 *}
   114 
   120 
   115 lemma let_cong [fundef_cong]:
   121 lemma let_cong [fundef_cong]:
   116   "M = N \<Longrightarrow> (\<And>x. x = N \<Longrightarrow> f x = g x) \<Longrightarrow> Let M f = Let N g"
   122   "M = N \<Longrightarrow> (\<And>x. x = N \<Longrightarrow> f x = g x) \<Longrightarrow> Let M f = Let N g"
   117   unfolding Let_def by blast
   123   unfolding Let_def by blast