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