author wenzelm Wed Jun 13 18:30:17 2007 +0200 (2007-06-13) changeset 23376 53317a1ec8b2 parent 23375 45cd7db985b3 child 23377 197b6a39592c
tuned proofs: avoid implicit prems;
tuned;
 src/HOLCF/Domain.thy file | annotate | diff | revisions
```     1.1 --- a/src/HOLCF/Domain.thy	Wed Jun 13 18:30:16 2007 +0200
1.2 +++ b/src/HOLCF/Domain.thy	Wed Jun 13 18:30:17 2007 +0200
1.3 @@ -11,6 +11,7 @@
1.4
1.5  defaultsort pcpo
1.6
1.7 +
1.8  subsection {* Continuous isomorphisms *}
1.9
1.10  text {* A locale for continuous isomorphisms *}
1.11 @@ -20,41 +21,42 @@
1.12    fixes rep :: "'b \<rightarrow> 'a"
1.13    assumes abs_iso [simp]: "rep\<cdot>(abs\<cdot>x) = x"
1.14    assumes rep_iso [simp]: "abs\<cdot>(rep\<cdot>y) = y"
1.15 +begin
1.16
1.17 -lemma (in iso) swap: "iso rep abs"
1.18 -by (rule iso.intro [OF rep_iso abs_iso])
1.19 +lemma swap: "iso rep abs"
1.20 +  by (rule iso.intro [OF rep_iso abs_iso])
1.21
1.22 -lemma (in iso) abs_less: "(abs\<cdot>x \<sqsubseteq> abs\<cdot>y) = (x \<sqsubseteq> y)"
1.23 +lemma abs_less: "(abs\<cdot>x \<sqsubseteq> abs\<cdot>y) = (x \<sqsubseteq> y)"
1.24  proof
1.25    assume "abs\<cdot>x \<sqsubseteq> abs\<cdot>y"
1.26 -  hence "rep\<cdot>(abs\<cdot>x) \<sqsubseteq> rep\<cdot>(abs\<cdot>y)" by (rule monofun_cfun_arg)
1.27 -  thus "x \<sqsubseteq> y" by simp
1.28 +  then have "rep\<cdot>(abs\<cdot>x) \<sqsubseteq> rep\<cdot>(abs\<cdot>y)" by (rule monofun_cfun_arg)
1.29 +  then show "x \<sqsubseteq> y" by simp
1.30  next
1.31    assume "x \<sqsubseteq> y"
1.32 -  thus "abs\<cdot>x \<sqsubseteq> abs\<cdot>y" by (rule monofun_cfun_arg)
1.33 +  then show "abs\<cdot>x \<sqsubseteq> abs\<cdot>y" by (rule monofun_cfun_arg)
1.34  qed
1.35
1.36 -lemma (in iso) rep_less: "(rep\<cdot>x \<sqsubseteq> rep\<cdot>y) = (x \<sqsubseteq> y)"
1.37 -by (rule iso.abs_less [OF swap])
1.38 +lemma rep_less: "(rep\<cdot>x \<sqsubseteq> rep\<cdot>y) = (x \<sqsubseteq> y)"
1.39 +  by (rule iso.abs_less [OF swap])
1.40
1.41 -lemma (in iso) abs_eq: "(abs\<cdot>x = abs\<cdot>y) = (x = y)"
1.42 -by (simp add: po_eq_conv abs_less)
1.43 +lemma abs_eq: "(abs\<cdot>x = abs\<cdot>y) = (x = y)"
1.44 +  by (simp add: po_eq_conv abs_less)
1.45
1.46 -lemma (in iso) rep_eq: "(rep\<cdot>x = rep\<cdot>y) = (x = y)"
1.47 -by (rule iso.abs_eq [OF swap])
1.48 +lemma rep_eq: "(rep\<cdot>x = rep\<cdot>y) = (x = y)"
1.49 +  by (rule iso.abs_eq [OF swap])
1.50
1.51 -lemma (in iso) abs_strict: "abs\<cdot>\<bottom> = \<bottom>"
1.52 +lemma abs_strict: "abs\<cdot>\<bottom> = \<bottom>"
1.53  proof -
1.54    have "\<bottom> \<sqsubseteq> rep\<cdot>\<bottom>" ..
1.55 -  hence "abs\<cdot>\<bottom> \<sqsubseteq> abs\<cdot>(rep\<cdot>\<bottom>)" by (rule monofun_cfun_arg)
1.56 -  hence "abs\<cdot>\<bottom> \<sqsubseteq> \<bottom>" by simp
1.57 -  thus ?thesis by (rule UU_I)
1.58 +  then have "abs\<cdot>\<bottom> \<sqsubseteq> abs\<cdot>(rep\<cdot>\<bottom>)" by (rule monofun_cfun_arg)
1.59 +  then have "abs\<cdot>\<bottom> \<sqsubseteq> \<bottom>" by simp
1.60 +  then show ?thesis by (rule UU_I)
1.61  qed
1.62
1.63 -lemma (in iso) rep_strict: "rep\<cdot>\<bottom> = \<bottom>"
1.64 -by (rule iso.abs_strict [OF swap])
1.65 +lemma rep_strict: "rep\<cdot>\<bottom> = \<bottom>"
1.66 +  by (rule iso.abs_strict [OF swap])
1.67
1.68 -lemma (in iso) abs_defin': "abs\<cdot>x = \<bottom> \<Longrightarrow> x = \<bottom>"
1.69 +lemma abs_defin': "abs\<cdot>x = \<bottom> \<Longrightarrow> x = \<bottom>"
1.70  proof -
1.71    have "x = rep\<cdot>(abs\<cdot>x)" by simp
1.72    also assume "abs\<cdot>x = \<bottom>"
1.73 @@ -62,49 +64,52 @@
1.74    finally show "x = \<bottom>" .
1.75  qed
1.76
1.77 -lemma (in iso) rep_defin': "rep\<cdot>z = \<bottom> \<Longrightarrow> z = \<bottom>"
1.78 -by (rule iso.abs_defin' [OF swap])
1.79 +lemma rep_defin': "rep\<cdot>z = \<bottom> \<Longrightarrow> z = \<bottom>"
1.80 +  by (rule iso.abs_defin' [OF swap])
1.81
1.82 -lemma (in iso) abs_defined: "z \<noteq> \<bottom> \<Longrightarrow> abs\<cdot>z \<noteq> \<bottom>"
1.83 -by (erule contrapos_nn, erule abs_defin')
1.84 +lemma abs_defined: "z \<noteq> \<bottom> \<Longrightarrow> abs\<cdot>z \<noteq> \<bottom>"
1.85 +  by (erule contrapos_nn, erule abs_defin')
1.86
1.87 -lemma (in iso) rep_defined: "z \<noteq> \<bottom> \<Longrightarrow> rep\<cdot>z \<noteq> \<bottom>"
1.88 -by (rule iso.abs_defined [OF iso.swap])
1.89 +lemma rep_defined: "z \<noteq> \<bottom> \<Longrightarrow> rep\<cdot>z \<noteq> \<bottom>"
1.90 +  by (rule iso.abs_defined [OF iso.swap]) (rule iso_axioms)
1.91
1.92 -lemma (in iso) abs_defined_iff: "(abs\<cdot>x = \<bottom>) = (x = \<bottom>)"
1.93 -by (auto elim: abs_defin' intro: abs_strict)
1.94 +lemma abs_defined_iff: "(abs\<cdot>x = \<bottom>) = (x = \<bottom>)"
1.95 +  by (auto elim: abs_defin' intro: abs_strict)
1.96
1.97 -lemma (in iso) rep_defined_iff: "(rep\<cdot>x = \<bottom>) = (x = \<bottom>)"
1.98 -by (rule iso.abs_defined_iff [OF iso.swap])
1.99 +lemma rep_defined_iff: "(rep\<cdot>x = \<bottom>) = (x = \<bottom>)"
1.100 +  by (rule iso.abs_defined_iff [OF iso.swap]) (rule iso_axioms)
1.101
1.102  lemma (in iso) compact_abs_rev: "compact (abs\<cdot>x) \<Longrightarrow> compact x"
1.103  proof (unfold compact_def)
1.104    assume "adm (\<lambda>y. \<not> abs\<cdot>x \<sqsubseteq> y)"
1.105    with cont_Rep_CFun2
1.107 -  thus "adm (\<lambda>y. \<not> x \<sqsubseteq> y)" using abs_less by simp
1.108 +  then show "adm (\<lambda>y. \<not> x \<sqsubseteq> y)" using abs_less by simp
1.109  qed
1.110
1.111 -lemma (in iso) compact_rep_rev: "compact (rep\<cdot>x) \<Longrightarrow> compact x"
1.112 -by (rule iso.compact_abs_rev [OF iso.swap])
1.113 +lemma compact_rep_rev: "compact (rep\<cdot>x) \<Longrightarrow> compact x"
1.114 +  by (rule iso.compact_abs_rev [OF iso.swap]) (rule iso_axioms)
1.115
1.116 -lemma (in iso) compact_abs: "compact x \<Longrightarrow> compact (abs\<cdot>x)"
1.117 -by (rule compact_rep_rev, simp)
1.118 +lemma compact_abs: "compact x \<Longrightarrow> compact (abs\<cdot>x)"
1.119 +  by (rule compact_rep_rev) simp
1.120
1.121 -lemma (in iso) compact_rep: "compact x \<Longrightarrow> compact (rep\<cdot>x)"
1.122 -by (rule iso.compact_abs [OF iso.swap])
1.123 +lemma compact_rep: "compact x \<Longrightarrow> compact (rep\<cdot>x)"
1.124 +  by (rule iso.compact_abs [OF iso.swap]) (rule iso_axioms)
1.125
1.126 -lemma (in iso) iso_swap: "(x = abs\<cdot>y) = (rep\<cdot>x = y)"
1.127 +lemma iso_swap: "(x = abs\<cdot>y) = (rep\<cdot>x = y)"
1.128  proof
1.129    assume "x = abs\<cdot>y"
1.130 -  hence "rep\<cdot>x = rep\<cdot>(abs\<cdot>y)" by simp
1.131 -  thus "rep\<cdot>x = y" by simp
1.132 +  then have "rep\<cdot>x = rep\<cdot>(abs\<cdot>y)" by simp
1.133 +  then show "rep\<cdot>x = y" by simp
1.134  next
1.135    assume "rep\<cdot>x = y"
1.136 -  hence "abs\<cdot>(rep\<cdot>x) = abs\<cdot>y" by simp
1.137 -  thus "x = abs\<cdot>y" by simp
1.138 +  then have "abs\<cdot>(rep\<cdot>x) = abs\<cdot>y" by simp
1.139 +  then show "x = abs\<cdot>y" by simp
1.140  qed
1.141
1.142 +end
1.143 +
1.144 +
1.145  subsection {* Casedist *}
1.146
1.147  lemma ex_one_defined_iff:
1.148 @@ -114,7 +119,7 @@
1.149     apply simp
1.150    apply simp
1.151   apply force
1.152 -done
1.153 + done
1.154
1.155  lemma ex_up_defined_iff:
1.156    "(\<exists>x. P x \<and> x \<noteq> \<bottom>) = (\<exists>x. P (up\<cdot>x))"
1.157 @@ -123,7 +128,7 @@
1.158     apply simp
1.159    apply fast
1.160   apply (force intro!: up_defined)
1.161 -done
1.162 + done
1.163
1.164  lemma ex_sprod_defined_iff:
1.165   "(\<exists>y. P y \<and> y \<noteq> \<bottom>) =
1.166 @@ -133,7 +138,7 @@
1.167     apply simp
1.168    apply fast
1.169   apply (force intro!: spair_defined)
1.170 -done
1.171 + done
1.172
1.173  lemma ex_sprod_up_defined_iff:
1.174   "(\<exists>y. P y \<and> y \<noteq> \<bottom>) =
1.175 @@ -145,7 +150,7 @@
1.176     apply simp
1.177    apply fast
1.178   apply (force intro!: spair_defined)
1.179 -done
1.180 + done
1.181
1.182  lemma ex_ssum_defined_iff:
1.183   "(\<exists>x. P x \<and> x \<noteq> \<bottom>) =
1.184 @@ -161,10 +166,10 @@
1.185   apply (erule disjE)
1.186    apply force
1.187   apply force
1.188 -done
1.189 + done
1.190
1.191  lemma exh_start: "p = \<bottom> \<or> (\<exists>x. p = x \<and> x \<noteq> \<bottom>)"
1.192 -by auto
1.193 +  by auto
1.194
1.195  lemmas ex_defined_iffs =
1.196     ex_ssum_defined_iff
1.197 @@ -176,16 +181,16 @@
1.198  text {* Rules for turning exh into casedist *}
1.199
1.200  lemma exh_casedist0: "\<lbrakk>R; R \<Longrightarrow> P\<rbrakk> \<Longrightarrow> P" (* like make_elim *)
1.201 -by auto
1.202 +  by auto
1.203
1.204  lemma exh_casedist1: "((P \<or> Q \<Longrightarrow> R) \<Longrightarrow> S) \<equiv> (\<lbrakk>P \<Longrightarrow> R; Q \<Longrightarrow> R\<rbrakk> \<Longrightarrow> S)"
1.205 -by rule auto
1.206 +  by rule auto
1.207
1.208  lemma exh_casedist2: "(\<exists>x. P x \<Longrightarrow> Q) \<equiv> (\<And>x. P x \<Longrightarrow> Q)"
1.209 -by rule auto
1.210 +  by rule auto
1.211
1.212  lemma exh_casedist3: "(P \<and> Q \<Longrightarrow> R) \<equiv> (P \<Longrightarrow> Q \<Longrightarrow> R)"
1.213 -by rule auto
1.214 +  by rule auto
1.215
1.216  lemmas exh_casedists = exh_casedist1 exh_casedist2 exh_casedist3
1.217
```