src/HOLCF/Domain.thy
author immler@in.tum.de
Thu, 26 Feb 2009 10:13:43 +0100
changeset 30151 629f3a92863e
parent 29138 661a8db7e647
child 30910 a7cc0ef93269
permissions -rw-r--r--
removed global ref dfg_format
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
    Author:     Brian Huffman
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
     3
*)
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
header {* Domain package *}
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
     6
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
     7
theory Domain
16230
9c9d9ba41bac fix imports
huffman
parents: 16223
diff changeset
     8
imports Ssum Sprod Up One Tr Fixrec
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
     9
begin
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    10
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    11
defaultsort pcpo
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    12
23376
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
    13
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    14
subsection {* Continuous isomorphisms *}
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    15
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    16
text {* A locale for continuous isomorphisms *}
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    17
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    18
locale iso =
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    19
  fixes abs :: "'a \<rightarrow> 'b"
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    20
  fixes rep :: "'b \<rightarrow> 'a"
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    21
  assumes abs_iso [simp]: "rep\<cdot>(abs\<cdot>x) = x"
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    22
  assumes rep_iso [simp]: "abs\<cdot>(rep\<cdot>y) = y"
23376
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
    23
begin
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    24
23376
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
    25
lemma swap: "iso rep abs"
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
    26
  by (rule iso.intro [OF rep_iso abs_iso])
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    27
23376
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
    28
lemma abs_less: "(abs\<cdot>x \<sqsubseteq> abs\<cdot>y) = (x \<sqsubseteq> y)"
17835
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
    29
proof
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
    30
  assume "abs\<cdot>x \<sqsubseteq> abs\<cdot>y"
23376
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
    31
  then have "rep\<cdot>(abs\<cdot>x) \<sqsubseteq> rep\<cdot>(abs\<cdot>y)" by (rule monofun_cfun_arg)
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
    32
  then show "x \<sqsubseteq> y" by simp
17835
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
    33
next
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
    34
  assume "x \<sqsubseteq> y"
23376
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
    35
  then show "abs\<cdot>x \<sqsubseteq> abs\<cdot>y" by (rule monofun_cfun_arg)
17835
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
    36
qed
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
    37
23376
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
    38
lemma rep_less: "(rep\<cdot>x \<sqsubseteq> rep\<cdot>y) = (x \<sqsubseteq> y)"
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
    39
  by (rule iso.abs_less [OF swap])
17835
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
    40
23376
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
    41
lemma abs_eq: "(abs\<cdot>x = abs\<cdot>y) = (x = y)"
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
    42
  by (simp add: po_eq_conv abs_less)
17835
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
    43
23376
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
    44
lemma rep_eq: "(rep\<cdot>x = rep\<cdot>y) = (x = y)"
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
    45
  by (rule iso.abs_eq [OF swap])
17835
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
    46
23376
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
    47
lemma abs_strict: "abs\<cdot>\<bottom> = \<bottom>"
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    48
proof -
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    49
  have "\<bottom> \<sqsubseteq> rep\<cdot>\<bottom>" ..
23376
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
    50
  then have "abs\<cdot>\<bottom> \<sqsubseteq> abs\<cdot>(rep\<cdot>\<bottom>)" by (rule monofun_cfun_arg)
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
    51
  then have "abs\<cdot>\<bottom> \<sqsubseteq> \<bottom>" by simp
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
    52
  then show ?thesis by (rule UU_I)
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    53
qed
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    54
23376
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
    55
lemma rep_strict: "rep\<cdot>\<bottom> = \<bottom>"
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
    56
  by (rule iso.abs_strict [OF swap])
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    57
23376
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
    58
lemma abs_defin': "abs\<cdot>x = \<bottom> \<Longrightarrow> x = \<bottom>"
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    59
proof -
17835
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
    60
  have "x = rep\<cdot>(abs\<cdot>x)" by simp
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
    61
  also assume "abs\<cdot>x = \<bottom>"
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    62
  also note rep_strict
17835
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
    63
  finally show "x = \<bottom>" .
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    64
qed
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    65
23376
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
    66
lemma rep_defin': "rep\<cdot>z = \<bottom> \<Longrightarrow> z = \<bottom>"
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
    67
  by (rule iso.abs_defin' [OF swap])
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    68
23376
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
    69
lemma abs_defined: "z \<noteq> \<bottom> \<Longrightarrow> abs\<cdot>z \<noteq> \<bottom>"
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
    70
  by (erule contrapos_nn, erule abs_defin')
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    71
23376
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
    72
lemma rep_defined: "z \<noteq> \<bottom> \<Longrightarrow> rep\<cdot>z \<noteq> \<bottom>"
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
    73
  by (rule iso.abs_defined [OF iso.swap]) (rule iso_axioms)
17835
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
    74
23376
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
    75
lemma abs_defined_iff: "(abs\<cdot>x = \<bottom>) = (x = \<bottom>)"
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
    76
  by (auto elim: abs_defin' intro: abs_strict)
17835
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
    77
23376
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
    78
lemma rep_defined_iff: "(rep\<cdot>x = \<bottom>) = (x = \<bottom>)"
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
    79
  by (rule iso.abs_defined_iff [OF iso.swap]) (rule iso_axioms)
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    80
17836
5d9c9e284d16 added compactness theorems in locale iso
huffman
parents: 17835
diff changeset
    81
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
    82
proof (unfold compact_def)
5d9c9e284d16 added compactness theorems in locale iso
huffman
parents: 17835
diff changeset
    83
  assume "adm (\<lambda>y. \<not> abs\<cdot>x \<sqsubseteq> y)"
5d9c9e284d16 added compactness theorems in locale iso
huffman
parents: 17835
diff changeset
    84
  with cont_Rep_CFun2
5d9c9e284d16 added compactness theorems in locale iso
huffman
parents: 17835
diff changeset
    85
  have "adm (\<lambda>y. \<not> abs\<cdot>x \<sqsubseteq> abs\<cdot>y)" by (rule adm_subst)
23376
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
    86
  then show "adm (\<lambda>y. \<not> x \<sqsubseteq> y)" using abs_less by simp
17836
5d9c9e284d16 added compactness theorems in locale iso
huffman
parents: 17835
diff changeset
    87
qed
5d9c9e284d16 added compactness theorems in locale iso
huffman
parents: 17835
diff changeset
    88
23376
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
    89
lemma compact_rep_rev: "compact (rep\<cdot>x) \<Longrightarrow> compact x"
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
    90
  by (rule iso.compact_abs_rev [OF iso.swap]) (rule iso_axioms)
17836
5d9c9e284d16 added compactness theorems in locale iso
huffman
parents: 17835
diff changeset
    91
23376
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
    92
lemma compact_abs: "compact x \<Longrightarrow> compact (abs\<cdot>x)"
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
    93
  by (rule compact_rep_rev) simp
17836
5d9c9e284d16 added compactness theorems in locale iso
huffman
parents: 17835
diff changeset
    94
23376
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
    95
lemma compact_rep: "compact x \<Longrightarrow> compact (rep\<cdot>x)"
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
    96
  by (rule iso.compact_abs [OF iso.swap]) (rule iso_axioms)
17836
5d9c9e284d16 added compactness theorems in locale iso
huffman
parents: 17835
diff changeset
    97
23376
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
    98
lemma iso_swap: "(x = abs\<cdot>y) = (rep\<cdot>x = y)"
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
    99
proof
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   100
  assume "x = abs\<cdot>y"
23376
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
   101
  then have "rep\<cdot>x = rep\<cdot>(abs\<cdot>y)" by simp
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
   102
  then show "rep\<cdot>x = y" by simp
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   103
next
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   104
  assume "rep\<cdot>x = y"
23376
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
   105
  then have "abs\<cdot>(rep\<cdot>x) = abs\<cdot>y" by simp
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
   106
  then show "x = abs\<cdot>y" by simp
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   107
qed
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   108
23376
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
   109
end
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
   110
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
   111
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   112
subsection {* Casedist *}
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   113
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   114
lemma ex_one_defined_iff:
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   115
  "(\<exists>x. P x \<and> x \<noteq> \<bottom>) = P ONE"
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   116
 apply safe
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   117
  apply (rule_tac p=x in oneE)
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   118
   apply simp
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   119
  apply simp
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   120
 apply force
23376
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
   121
 done
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   122
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   123
lemma ex_up_defined_iff:
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   124
  "(\<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
   125
 apply safe
16754
1b979f8b7e8e renamed upE1 to upE
huffman
parents: 16320
diff changeset
   126
  apply (rule_tac p=x in upE)
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   127
   apply simp
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   128
  apply fast
16320
89917621becf fixed renamed lemma
huffman
parents: 16230
diff changeset
   129
 apply (force intro!: up_defined)
23376
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
   130
 done
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   131
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   132
lemma ex_sprod_defined_iff:
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   133
 "(\<exists>y. P y \<and> y \<noteq> \<bottom>) =
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   134
  (\<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
   135
 apply safe
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   136
  apply (rule_tac p=y in sprodE)
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   137
   apply simp
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   138
  apply fast
16217
96f0c8546265 renamed defined lemmas
huffman
parents: 16121
diff changeset
   139
 apply (force intro!: spair_defined)
23376
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
   140
 done
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   141
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   142
lemma ex_sprod_up_defined_iff:
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   143
 "(\<exists>y. P y \<and> y \<noteq> \<bottom>) =
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   144
  (\<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
   145
 apply safe
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   146
  apply (rule_tac p=y in sprodE)
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   147
   apply simp
16754
1b979f8b7e8e renamed upE1 to upE
huffman
parents: 16320
diff changeset
   148
  apply (rule_tac p=x in upE)
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   149
   apply simp
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   150
  apply fast
16217
96f0c8546265 renamed defined lemmas
huffman
parents: 16121
diff changeset
   151
 apply (force intro!: spair_defined)
23376
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
   152
 done
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   153
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   154
lemma ex_ssum_defined_iff:
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   155
 "(\<exists>x. P x \<and> x \<noteq> \<bottom>) =
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   156
 ((\<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
   157
  (\<exists>x. P (sinr\<cdot>x) \<and> x \<noteq> \<bottom>))"
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   158
 apply (rule iffI)
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   159
  apply (erule exE)
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   160
  apply (erule conjE)
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   161
  apply (rule_tac p=x in ssumE)
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   162
    apply simp
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   163
   apply (rule disjI1, fast)
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   164
  apply (rule disjI2, fast)
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   165
 apply (erule disjE)
17835
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
   166
  apply force
74e6140e5f1f added several theorems in locale iso
huffman
parents: 16754
diff changeset
   167
 apply force
23376
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
   168
 done
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   169
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   170
lemma exh_start: "p = \<bottom> \<or> (\<exists>x. p = x \<and> x \<noteq> \<bottom>)"
23376
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
   171
  by auto
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   172
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   173
lemmas ex_defined_iffs =
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   174
   ex_ssum_defined_iff
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   175
   ex_sprod_up_defined_iff
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   176
   ex_sprod_defined_iff
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   177
   ex_up_defined_iff
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   178
   ex_one_defined_iff
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   179
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   180
text {* Rules for turning exh into casedist *}
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   181
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   182
lemma exh_casedist0: "\<lbrakk>R; R \<Longrightarrow> P\<rbrakk> \<Longrightarrow> P" (* like make_elim *)
23376
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
   183
  by auto
15741
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
lemma exh_casedist1: "((P \<or> Q \<Longrightarrow> R) \<Longrightarrow> S) \<equiv> (\<lbrakk>P \<Longrightarrow> R; Q \<Longrightarrow> R\<rbrakk> \<Longrightarrow> S)"
23376
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
   186
  by rule auto
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   187
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   188
lemma exh_casedist2: "(\<exists>x. P x \<Longrightarrow> Q) \<equiv> (\<And>x. P x \<Longrightarrow> Q)"
23376
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
   189
  by rule auto
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   190
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   191
lemma exh_casedist3: "(P \<and> Q \<Longrightarrow> R) \<equiv> (P \<Longrightarrow> Q \<Longrightarrow> R)"
23376
53317a1ec8b2 tuned proofs: avoid implicit prems;
wenzelm
parents: 23152
diff changeset
   192
  by rule auto
15741
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   193
29a78517543f New file for theorems used by the domain package
huffman
parents:
diff changeset
   194
lemmas exh_casedists = exh_casedist1 exh_casedist2 exh_casedist3
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
end