src/HOLCF/Domain.thy
author wenzelm
Thu, 22 Dec 2005 00:29:22 +0100
changeset 18487 4d1015084876
parent 17839 060dd0213f94
child 18846 89b0fbbc4d8e
permissions -rw-r--r--
exh_casedist2: norm_hhf_eq;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
     1
(*  Title:      HOLCF/Domain.thy
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
     2
    ID:         $Id$
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
     3
    Author:     Brian Huffman
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
     4
*)
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
     5
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
     6
header {* Domain package *}
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
     7
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
     8
theory Domain
16230
9c9d9ba41bac fix imports
huffman
parents: 16223
diff changeset
     9
imports Ssum Sprod Up One Tr Fixrec
16223
84a177eeb49c add dependency on Fixrec.thy
huffman
parents: 16217
diff changeset
    10
(*
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    11
files
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    12
  ("domain/library.ML")
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    13
  ("domain/syntax.ML")
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    14
  ("domain/axioms.ML")
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    15
  ("domain/theorems.ML")
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    16
  ("domain/extender.ML")
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    17
  ("domain/interface.ML")
16223
84a177eeb49c add dependency on Fixrec.thy
huffman
parents: 16217
diff changeset
    18
*)
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    19
begin
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    20
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    21
defaultsort pcpo
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    22
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    23
subsection {* Continuous isomorphisms *}
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    24
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    25
text {* A locale for continuous isomorphisms *}
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    26
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    27
locale iso =
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    28
  fixes abs :: "'a \<rightarrow> 'b"
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    29
  fixes rep :: "'b \<rightarrow> 'a"
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    30
  assumes abs_iso [simp]: "rep\<cdot>(abs\<cdot>x) = x"
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    31
  assumes rep_iso [simp]: "abs\<cdot>(rep\<cdot>y) = y"
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    32
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    33
lemma (in iso) swap: "iso rep abs"
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    34
by (rule iso.intro [OF rep_iso abs_iso])
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    35
17835
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
    36
lemma (in iso) abs_less: "(abs\<cdot>x \<sqsubseteq> abs\<cdot>y) = (x \<sqsubseteq> y)"
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
    37
proof
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
    38
  assume "abs\<cdot>x \<sqsubseteq> abs\<cdot>y"
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
    39
  hence "rep\<cdot>(abs\<cdot>x) \<sqsubseteq> rep\<cdot>(abs\<cdot>y)" by (rule monofun_cfun_arg)
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
    40
  thus "x \<sqsubseteq> y" by simp
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
    41
next
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
    42
  assume "x \<sqsubseteq> y"
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
    43
  thus "abs\<cdot>x \<sqsubseteq> abs\<cdot>y" by (rule monofun_cfun_arg)
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
    44
qed
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
    45
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
    46
lemma (in iso) rep_less: "(rep\<cdot>x \<sqsubseteq> rep\<cdot>y) = (x \<sqsubseteq> y)"
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
    47
by (rule iso.abs_less [OF swap])
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
    48
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
    49
lemma (in iso) abs_eq: "(abs\<cdot>x = abs\<cdot>y) = (x = y)"
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
    50
by (simp add: po_eq_conv abs_less)
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
    51
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
    52
lemma (in iso) rep_eq: "(rep\<cdot>x = rep\<cdot>y) = (x = y)"
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
    53
by (rule iso.abs_eq [OF swap])
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
    54
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    55
lemma (in iso) abs_strict: "abs\<cdot>\<bottom> = \<bottom>"
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    56
proof -
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    57
  have "\<bottom> \<sqsubseteq> rep\<cdot>\<bottom>" ..
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    58
  hence "abs\<cdot>\<bottom> \<sqsubseteq> abs\<cdot>(rep\<cdot>\<bottom>)" by (rule monofun_cfun_arg)
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    59
  hence "abs\<cdot>\<bottom> \<sqsubseteq> \<bottom>" by simp
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    60
  thus ?thesis by (rule UU_I)
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    61
qed
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    62
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    63
lemma (in iso) rep_strict: "rep\<cdot>\<bottom> = \<bottom>"
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    64
by (rule iso.abs_strict [OF swap])
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    65
17835
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
    66
lemma (in iso) abs_defin': "abs\<cdot>x = \<bottom> \<Longrightarrow> x = \<bottom>"
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    67
proof -
17835
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
    68
  have "x = rep\<cdot>(abs\<cdot>x)" by simp
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
    69
  also assume "abs\<cdot>x = \<bottom>"
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    70
  also note rep_strict
17835
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
    71
  finally show "x = \<bottom>" .
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    72
qed
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    73
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    74
lemma (in iso) rep_defin': "rep\<cdot>z = \<bottom> \<Longrightarrow> z = \<bottom>"
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    75
by (rule iso.abs_defin' [OF swap])
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    76
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    77
lemma (in iso) abs_defined: "z \<noteq> \<bottom> \<Longrightarrow> abs\<cdot>z \<noteq> \<bottom>"
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    78
by (erule contrapos_nn, erule abs_defin')
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    79
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    80
lemma (in iso) rep_defined: "z \<noteq> \<bottom> \<Longrightarrow> rep\<cdot>z \<noteq> \<bottom>"
17835
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
    81
by (rule iso.abs_defined [OF iso.swap])
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
    82
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
    83
lemma (in iso) abs_defined_iff: "(abs\<cdot>x = \<bottom>) = (x = \<bottom>)"
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
    84
by (auto elim: abs_defin' intro: abs_strict)
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
    85
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
    86
lemma (in iso) rep_defined_iff: "(rep\<cdot>x = \<bottom>) = (x = \<bottom>)"
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
    87
by (rule iso.abs_defined_iff [OF iso.swap])
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    88
17836
5d9c9e284d16 added compactness theorems in locale iso
huffman
parents: 17835
diff changeset
    89
lemma (in iso) compact_abs_rev: "compact (abs\<cdot>x) \<Longrightarrow> compact x"
5d9c9e284d16 added compactness theorems in locale iso
huffman
parents: 17835
diff changeset
    90
proof (unfold compact_def)
5d9c9e284d16 added compactness theorems in locale iso
huffman
parents: 17835
diff changeset
    91
  assume "adm (\<lambda>y. \<not> abs\<cdot>x \<sqsubseteq> y)"
5d9c9e284d16 added compactness theorems in locale iso
huffman
parents: 17835
diff changeset
    92
  with cont_Rep_CFun2
5d9c9e284d16 added compactness theorems in locale iso
huffman
parents: 17835
diff changeset
    93
  have "adm (\<lambda>y. \<not> abs\<cdot>x \<sqsubseteq> abs\<cdot>y)" by (rule adm_subst)
5d9c9e284d16 added compactness theorems in locale iso
huffman
parents: 17835
diff changeset
    94
  thus "adm (\<lambda>y. \<not> x \<sqsubseteq> y)" using abs_less by simp
5d9c9e284d16 added compactness theorems in locale iso
huffman
parents: 17835
diff changeset
    95
qed
5d9c9e284d16 added compactness theorems in locale iso
huffman
parents: 17835
diff changeset
    96
5d9c9e284d16 added compactness theorems in locale iso
huffman
parents: 17835
diff changeset
    97
lemma (in iso) compact_rep_rev: "compact (rep\<cdot>x) \<Longrightarrow> compact x"
5d9c9e284d16 added compactness theorems in locale iso
huffman
parents: 17835
diff changeset
    98
by (rule iso.compact_abs_rev [OF iso.swap])
5d9c9e284d16 added compactness theorems in locale iso
huffman
parents: 17835
diff changeset
    99
5d9c9e284d16 added compactness theorems in locale iso
huffman
parents: 17835
diff changeset
   100
lemma (in iso) compact_abs: "compact x \<Longrightarrow> compact (abs\<cdot>x)"
5d9c9e284d16 added compactness theorems in locale iso
huffman
parents: 17835
diff changeset
   101
by (rule compact_rep_rev, simp)
5d9c9e284d16 added compactness theorems in locale iso
huffman
parents: 17835
diff changeset
   102
5d9c9e284d16 added compactness theorems in locale iso
huffman
parents: 17835
diff changeset
   103
lemma (in iso) compact_rep: "compact x \<Longrightarrow> compact (rep\<cdot>x)"
5d9c9e284d16 added compactness theorems in locale iso
huffman
parents: 17835
diff changeset
   104
by (rule iso.compact_abs [OF iso.swap])
5d9c9e284d16 added compactness theorems in locale iso
huffman
parents: 17835
diff changeset
   105
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   106
lemma (in iso) iso_swap: "(x = abs\<cdot>y) = (rep\<cdot>x = y)"
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   107
proof
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   108
  assume "x = abs\<cdot>y"
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   109
  hence "rep\<cdot>x = rep\<cdot>(abs\<cdot>y)" by simp
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   110
  thus "rep\<cdot>x = y" by simp
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   111
next
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   112
  assume "rep\<cdot>x = y"
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   113
  hence "abs\<cdot>(rep\<cdot>x) = abs\<cdot>y" by simp
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   114
  thus "x = abs\<cdot>y" by simp
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   115
qed
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   116
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   117
subsection {* Casedist *}
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   118
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   119
lemma ex_one_defined_iff:
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   120
  "(\<exists>x. P x \<and> x \<noteq> \<bottom>) = P ONE"
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   121
 apply safe
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   122
  apply (rule_tac p=x in oneE)
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   123
   apply simp
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   124
  apply simp
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   125
 apply force
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   126
done
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   127
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   128
lemma ex_up_defined_iff:
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   129
  "(\<exists>x. P x \<and> x \<noteq> \<bottom>) = (\<exists>x. P (up\<cdot>x))"
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   130
 apply safe
16754
1b979f8b7e8e renamed upE1 to upE
huffman
parents: 16320
diff changeset
   131
  apply (rule_tac p=x in upE)
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   132
   apply simp
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   133
  apply fast
16320
89917621becf fixed renamed lemma
huffman
parents: 16230
diff changeset
   134
 apply (force intro!: up_defined)
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   135
done
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   136
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   137
lemma ex_sprod_defined_iff:
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   138
 "(\<exists>y. P y \<and> y \<noteq> \<bottom>) =
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   139
  (\<exists>x y. (P (:x, y:) \<and> x \<noteq> \<bottom>) \<and> y \<noteq> \<bottom>)"
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   140
 apply safe
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   141
  apply (rule_tac p=y in sprodE)
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   142
   apply simp
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   143
  apply fast
16217
96f0c8546265 renamed defined lemmas
huffman
parents: 16121
diff changeset
   144
 apply (force intro!: spair_defined)
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   145
done
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   146
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   147
lemma ex_sprod_up_defined_iff:
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   148
 "(\<exists>y. P y \<and> y \<noteq> \<bottom>) =
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   149
  (\<exists>x y. P (:up\<cdot>x, y:) \<and> y \<noteq> \<bottom>)"
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   150
 apply safe
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   151
  apply (rule_tac p=y in sprodE)
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   152
   apply simp
16754
1b979f8b7e8e renamed upE1 to upE
huffman
parents: 16320
diff changeset
   153
  apply (rule_tac p=x in upE)
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   154
   apply simp
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   155
  apply fast
16217
96f0c8546265 renamed defined lemmas
huffman
parents: 16121
diff changeset
   156
 apply (force intro!: spair_defined)
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   157
done
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   158
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   159
lemma ex_ssum_defined_iff:
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   160
 "(\<exists>x. P x \<and> x \<noteq> \<bottom>) =
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   161
 ((\<exists>x. P (sinl\<cdot>x) \<and> x \<noteq> \<bottom>) \<or>
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   162
  (\<exists>x. P (sinr\<cdot>x) \<and> x \<noteq> \<bottom>))"
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   163
 apply (rule iffI)
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   164
  apply (erule exE)
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   165
  apply (erule conjE)
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   166
  apply (rule_tac p=x in ssumE)
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   167
    apply simp
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   168
   apply (rule disjI1, fast)
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   169
  apply (rule disjI2, fast)
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   170
 apply (erule disjE)
17835
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
   171
  apply force
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
   172
 apply force
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   173
done
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   174
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   175
lemma exh_start: "p = \<bottom> \<or> (\<exists>x. p = x \<and> x \<noteq> \<bottom>)"
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   176
by auto
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   177
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   178
lemmas ex_defined_iffs =
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   179
   ex_ssum_defined_iff
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   180
   ex_sprod_up_defined_iff
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   181
   ex_sprod_defined_iff
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   182
   ex_up_defined_iff
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   183
   ex_one_defined_iff
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   184
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   185
text {* Rules for turning exh into casedist *}
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   186
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   187
lemma exh_casedist0: "\<lbrakk>R; R \<Longrightarrow> P\<rbrakk> \<Longrightarrow> P" (* like make_elim *)
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   188
by auto
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   189
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   190
lemma exh_casedist1: "((P \<or> Q \<Longrightarrow> R) \<Longrightarrow> S) \<equiv> (\<lbrakk>P \<Longrightarrow> R; Q \<Longrightarrow> R\<rbrakk> \<Longrightarrow> S)"
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   191
by rule auto
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   192
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   193
lemma exh_casedist2: "(\<exists>x. P x \<Longrightarrow> Q) \<equiv> (\<And>x. P x \<Longrightarrow> Q)"
18487
4d1015084876 exh_casedist2: norm_hhf_eq;
wenzelm
parents: 17839
diff changeset
   194
by rule (auto simp: norm_hhf_eq)
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   195
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   196
lemma exh_casedist3: "(P \<and> Q \<Longrightarrow> R) \<equiv> (P \<Longrightarrow> Q \<Longrightarrow> R)"
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   197
by rule auto
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   198
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   199
lemmas exh_casedists = exh_casedist1 exh_casedist2 exh_casedist3
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   200
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   201
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   202
subsection {* Setting up the package *}
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   203
16121
wenzelm
parents: 16070
diff changeset
   204
ML {*
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   205
val iso_intro       = thm "iso.intro";
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   206
val iso_abs_iso     = thm "iso.abs_iso";
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   207
val iso_rep_iso     = thm "iso.rep_iso";
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   208
val iso_abs_strict  = thm "iso.abs_strict";
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   209
val iso_rep_strict  = thm "iso.rep_strict";
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   210
val iso_abs_defin'  = thm "iso.abs_defin'";
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   211
val iso_rep_defin'  = thm "iso.rep_defin'";
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   212
val iso_abs_defined = thm "iso.abs_defined";
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   213
val iso_rep_defined = thm "iso.rep_defined";
17839
060dd0213f94 add ML bindings for compactness lemmas
huffman
parents: 17836
diff changeset
   214
val iso_compact_abs = thm "iso.compact_abs";
060dd0213f94 add ML bindings for compactness lemmas
huffman
parents: 17836
diff changeset
   215
val iso_compact_rep = thm "iso.compact_rep";
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   216
val iso_iso_swap    = thm "iso.iso_swap";
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   217
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   218
val exh_start = thm "exh_start";
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   219
val ex_defined_iffs = thms "ex_defined_iffs";
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   220
val exh_casedist0 = thm "exh_casedist0";
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   221
val exh_casedists = thms "exh_casedists";
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   222
*}
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   223
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   224
end