author wenzelm Wed, 13 Jun 2007 18:30:17 +0200 changeset 23376 53317a1ec8b2 parent 23375 45cd7db985b3 child 23377 197b6a39592c
tuned proofs: avoid implicit prems; tuned;
 src/HOLCF/Domain.thy file | annotate | diff | comparison | revisions
```--- a/src/HOLCF/Domain.thy	Wed Jun 13 18:30:16 2007 +0200
+++ b/src/HOLCF/Domain.thy	Wed Jun 13 18:30:17 2007 +0200
@@ -11,6 +11,7 @@

defaultsort pcpo

+
subsection {* Continuous isomorphisms *}

text {* A locale for continuous isomorphisms *}
@@ -20,41 +21,42 @@
fixes rep :: "'b \<rightarrow> 'a"
assumes abs_iso [simp]: "rep\<cdot>(abs\<cdot>x) = x"
assumes rep_iso [simp]: "abs\<cdot>(rep\<cdot>y) = y"
+begin

-lemma (in iso) swap: "iso rep abs"
-by (rule iso.intro [OF rep_iso abs_iso])
+lemma swap: "iso rep abs"
+  by (rule iso.intro [OF rep_iso abs_iso])

-lemma (in iso) abs_less: "(abs\<cdot>x \<sqsubseteq> abs\<cdot>y) = (x \<sqsubseteq> y)"
+lemma abs_less: "(abs\<cdot>x \<sqsubseteq> abs\<cdot>y) = (x \<sqsubseteq> y)"
proof
assume "abs\<cdot>x \<sqsubseteq> abs\<cdot>y"
-  hence "rep\<cdot>(abs\<cdot>x) \<sqsubseteq> rep\<cdot>(abs\<cdot>y)" by (rule monofun_cfun_arg)
-  thus "x \<sqsubseteq> y" by simp
+  then have "rep\<cdot>(abs\<cdot>x) \<sqsubseteq> rep\<cdot>(abs\<cdot>y)" by (rule monofun_cfun_arg)
+  then show "x \<sqsubseteq> y" by simp
next
assume "x \<sqsubseteq> y"
-  thus "abs\<cdot>x \<sqsubseteq> abs\<cdot>y" by (rule monofun_cfun_arg)
+  then show "abs\<cdot>x \<sqsubseteq> abs\<cdot>y" by (rule monofun_cfun_arg)
qed

-lemma (in iso) rep_less: "(rep\<cdot>x \<sqsubseteq> rep\<cdot>y) = (x \<sqsubseteq> y)"
-by (rule iso.abs_less [OF swap])
+lemma rep_less: "(rep\<cdot>x \<sqsubseteq> rep\<cdot>y) = (x \<sqsubseteq> y)"
+  by (rule iso.abs_less [OF swap])

-lemma (in iso) abs_eq: "(abs\<cdot>x = abs\<cdot>y) = (x = y)"
+lemma abs_eq: "(abs\<cdot>x = abs\<cdot>y) = (x = y)"
+  by (simp add: po_eq_conv abs_less)

-lemma (in iso) rep_eq: "(rep\<cdot>x = rep\<cdot>y) = (x = y)"
-by (rule iso.abs_eq [OF swap])
+lemma rep_eq: "(rep\<cdot>x = rep\<cdot>y) = (x = y)"
+  by (rule iso.abs_eq [OF swap])

-lemma (in iso) abs_strict: "abs\<cdot>\<bottom> = \<bottom>"
+lemma abs_strict: "abs\<cdot>\<bottom> = \<bottom>"
proof -
have "\<bottom> \<sqsubseteq> rep\<cdot>\<bottom>" ..
-  hence "abs\<cdot>\<bottom> \<sqsubseteq> abs\<cdot>(rep\<cdot>\<bottom>)" by (rule monofun_cfun_arg)
-  hence "abs\<cdot>\<bottom> \<sqsubseteq> \<bottom>" by simp
-  thus ?thesis by (rule UU_I)
+  then have "abs\<cdot>\<bottom> \<sqsubseteq> abs\<cdot>(rep\<cdot>\<bottom>)" by (rule monofun_cfun_arg)
+  then have "abs\<cdot>\<bottom> \<sqsubseteq> \<bottom>" by simp
+  then show ?thesis by (rule UU_I)
qed

-lemma (in iso) rep_strict: "rep\<cdot>\<bottom> = \<bottom>"
-by (rule iso.abs_strict [OF swap])
+lemma rep_strict: "rep\<cdot>\<bottom> = \<bottom>"
+  by (rule iso.abs_strict [OF swap])

-lemma (in iso) abs_defin': "abs\<cdot>x = \<bottom> \<Longrightarrow> x = \<bottom>"
+lemma abs_defin': "abs\<cdot>x = \<bottom> \<Longrightarrow> x = \<bottom>"
proof -
have "x = rep\<cdot>(abs\<cdot>x)" by simp
also assume "abs\<cdot>x = \<bottom>"
@@ -62,49 +64,52 @@
finally show "x = \<bottom>" .
qed

-lemma (in iso) rep_defin': "rep\<cdot>z = \<bottom> \<Longrightarrow> z = \<bottom>"
-by (rule iso.abs_defin' [OF swap])
+lemma rep_defin': "rep\<cdot>z = \<bottom> \<Longrightarrow> z = \<bottom>"
+  by (rule iso.abs_defin' [OF swap])

-lemma (in iso) abs_defined: "z \<noteq> \<bottom> \<Longrightarrow> abs\<cdot>z \<noteq> \<bottom>"
-by (erule contrapos_nn, erule abs_defin')
+lemma abs_defined: "z \<noteq> \<bottom> \<Longrightarrow> abs\<cdot>z \<noteq> \<bottom>"
+  by (erule contrapos_nn, erule abs_defin')

-lemma (in iso) rep_defined: "z \<noteq> \<bottom> \<Longrightarrow> rep\<cdot>z \<noteq> \<bottom>"
-by (rule iso.abs_defined [OF iso.swap])
+lemma rep_defined: "z \<noteq> \<bottom> \<Longrightarrow> rep\<cdot>z \<noteq> \<bottom>"
+  by (rule iso.abs_defined [OF iso.swap]) (rule iso_axioms)

-lemma (in iso) abs_defined_iff: "(abs\<cdot>x = \<bottom>) = (x = \<bottom>)"
-by (auto elim: abs_defin' intro: abs_strict)
+lemma abs_defined_iff: "(abs\<cdot>x = \<bottom>) = (x = \<bottom>)"
+  by (auto elim: abs_defin' intro: abs_strict)

-lemma (in iso) rep_defined_iff: "(rep\<cdot>x = \<bottom>) = (x = \<bottom>)"
-by (rule iso.abs_defined_iff [OF iso.swap])
+lemma rep_defined_iff: "(rep\<cdot>x = \<bottom>) = (x = \<bottom>)"
+  by (rule iso.abs_defined_iff [OF iso.swap]) (rule iso_axioms)

lemma (in iso) compact_abs_rev: "compact (abs\<cdot>x) \<Longrightarrow> compact x"
proof (unfold compact_def)
assume "adm (\<lambda>y. \<not> abs\<cdot>x \<sqsubseteq> y)"
with cont_Rep_CFun2
-  thus "adm (\<lambda>y. \<not> x \<sqsubseteq> y)" using abs_less by simp
+  then show "adm (\<lambda>y. \<not> x \<sqsubseteq> y)" using abs_less by simp
qed

-lemma (in iso) compact_rep_rev: "compact (rep\<cdot>x) \<Longrightarrow> compact x"
-by (rule iso.compact_abs_rev [OF iso.swap])
+lemma compact_rep_rev: "compact (rep\<cdot>x) \<Longrightarrow> compact x"
+  by (rule iso.compact_abs_rev [OF iso.swap]) (rule iso_axioms)

-lemma (in iso) compact_abs: "compact x \<Longrightarrow> compact (abs\<cdot>x)"
-by (rule compact_rep_rev, simp)
+lemma compact_abs: "compact x \<Longrightarrow> compact (abs\<cdot>x)"
+  by (rule compact_rep_rev) simp

-lemma (in iso) compact_rep: "compact x \<Longrightarrow> compact (rep\<cdot>x)"
-by (rule iso.compact_abs [OF iso.swap])
+lemma compact_rep: "compact x \<Longrightarrow> compact (rep\<cdot>x)"
+  by (rule iso.compact_abs [OF iso.swap]) (rule iso_axioms)

-lemma (in iso) iso_swap: "(x = abs\<cdot>y) = (rep\<cdot>x = y)"
+lemma iso_swap: "(x = abs\<cdot>y) = (rep\<cdot>x = y)"
proof
assume "x = abs\<cdot>y"
-  hence "rep\<cdot>x = rep\<cdot>(abs\<cdot>y)" by simp
-  thus "rep\<cdot>x = y" by simp
+  then have "rep\<cdot>x = rep\<cdot>(abs\<cdot>y)" by simp
+  then show "rep\<cdot>x = y" by simp
next
assume "rep\<cdot>x = y"
-  hence "abs\<cdot>(rep\<cdot>x) = abs\<cdot>y" by simp
-  thus "x = abs\<cdot>y" by simp
+  then have "abs\<cdot>(rep\<cdot>x) = abs\<cdot>y" by simp
+  then show "x = abs\<cdot>y" by simp
qed

+end
+
+
subsection {* Casedist *}

lemma ex_one_defined_iff:
@@ -114,7 +119,7 @@
apply simp
apply simp
apply force
-done
+ done

lemma ex_up_defined_iff:
"(\<exists>x. P x \<and> x \<noteq> \<bottom>) = (\<exists>x. P (up\<cdot>x))"
@@ -123,7 +128,7 @@
apply simp
apply fast
apply (force intro!: up_defined)
-done
+ done

lemma ex_sprod_defined_iff:
"(\<exists>y. P y \<and> y \<noteq> \<bottom>) =
@@ -133,7 +138,7 @@
apply simp
apply fast
apply (force intro!: spair_defined)
-done
+ done

lemma ex_sprod_up_defined_iff:
"(\<exists>y. P y \<and> y \<noteq> \<bottom>) =
@@ -145,7 +150,7 @@
apply simp
apply fast
apply (force intro!: spair_defined)
-done
+ done

lemma ex_ssum_defined_iff:
"(\<exists>x. P x \<and> x \<noteq> \<bottom>) =
@@ -161,10 +166,10 @@
apply (erule disjE)
apply force
apply force
-done
+ done

lemma exh_start: "p = \<bottom> \<or> (\<exists>x. p = x \<and> x \<noteq> \<bottom>)"
-by auto
+  by auto

lemmas ex_defined_iffs =
ex_ssum_defined_iff
@@ -176,16 +181,16 @@
text {* Rules for turning exh into casedist *}

lemma exh_casedist0: "\<lbrakk>R; R \<Longrightarrow> P\<rbrakk> \<Longrightarrow> P" (* like make_elim *)
-by auto
+  by auto

lemma exh_casedist1: "((P \<or> Q \<Longrightarrow> R) \<Longrightarrow> S) \<equiv> (\<lbrakk>P \<Longrightarrow> R; Q \<Longrightarrow> R\<rbrakk> \<Longrightarrow> S)"
-by rule auto
+  by rule auto

lemma exh_casedist2: "(\<exists>x. P x \<Longrightarrow> Q) \<equiv> (\<And>x. P x \<Longrightarrow> Q)"
-by rule auto
+  by rule auto

lemma exh_casedist3: "(P \<and> Q \<Longrightarrow> R) \<equiv> (P \<Longrightarrow> Q \<Longrightarrow> R)"
-by rule auto
+  by rule auto

lemmas exh_casedists = exh_casedist1 exh_casedist2 exh_casedist3
```