add strictness and compactness lemmas to Product_Cpo.thy
authorhuffman
Thu Jan 15 08:11:50 2009 -0800 (2009-01-15)
changeset 2953508824fad8879
parent 29534 247e4c816004
child 29536 2de73447d47c
add strictness and compactness lemmas to Product_Cpo.thy
src/HOLCF/Cprod.thy
src/HOLCF/Product_Cpo.thy
     1.1 --- a/src/HOLCF/Cprod.thy	Wed Jan 14 18:22:43 2009 -0800
     1.2 +++ b/src/HOLCF/Cprod.thy	Thu Jan 15 08:11:50 2009 -0800
     1.3 @@ -69,10 +69,10 @@
     1.4  by (simp add: cpair_eq_pair)
     1.5  
     1.6  lemma cpair_less [iff]: "(<a, b> \<sqsubseteq> <a', b'>) = (a \<sqsubseteq> a' \<and> b \<sqsubseteq> b')"
     1.7 -by (simp add: cpair_eq_pair less_cprod_def)
     1.8 +by (simp add: cpair_eq_pair)
     1.9  
    1.10  lemma cpair_defined_iff [iff]: "(<x, y> = \<bottom>) = (x = \<bottom> \<and> y = \<bottom>)"
    1.11 -by (simp add: inst_cprod_pcpo cpair_eq_pair)
    1.12 +by (simp add: cpair_eq_pair)
    1.13  
    1.14  lemma cpair_strict [simp]: "\<langle>\<bottom>, \<bottom>\<rangle> = \<bottom>"
    1.15  by simp
    1.16 @@ -97,10 +97,10 @@
    1.17  by (simp add: cpair_eq_pair csnd_def cont_snd)
    1.18  
    1.19  lemma cfst_strict [simp]: "cfst\<cdot>\<bottom> = \<bottom>"
    1.20 -unfolding inst_cprod_pcpo2 by (rule cfst_cpair)
    1.21 +by (simp add: cfst_def)
    1.22  
    1.23  lemma csnd_strict [simp]: "csnd\<cdot>\<bottom> = \<bottom>"
    1.24 -unfolding inst_cprod_pcpo2 by (rule csnd_cpair)
    1.25 +by (simp add: csnd_def)
    1.26  
    1.27  lemma cpair_cfst_csnd: "\<langle>cfst\<cdot>p, csnd\<cdot>p\<rangle> = p"
    1.28  by (cases p rule: cprodE, simp)
    1.29 @@ -126,19 +126,10 @@
    1.30  by (rule compactI, simp add: csnd_less_iff)
    1.31  
    1.32  lemma compact_cpair: "\<lbrakk>compact x; compact y\<rbrakk> \<Longrightarrow> compact <x, y>"
    1.33 -by (rule compactI, simp add: less_cprod)
    1.34 +by (simp add: cpair_eq_pair)
    1.35  
    1.36  lemma compact_cpair_iff [simp]: "compact <x, y> = (compact x \<and> compact y)"
    1.37 -apply (safe intro!: compact_cpair)
    1.38 -apply (drule compact_cfst, simp)
    1.39 -apply (drule compact_csnd, simp)
    1.40 -done
    1.41 -
    1.42 -instance "*" :: (chfin, chfin) chfin
    1.43 -apply intro_classes
    1.44 -apply (erule compact_imp_max_in_chain)
    1.45 -apply (rule_tac p="\<Squnion>i. Y i" in cprodE, simp)
    1.46 -done
    1.47 +by (simp add: cpair_eq_pair)
    1.48  
    1.49  lemma lub_cprod2: 
    1.50    "chain S \<Longrightarrow> range S <<| <\<Squnion>i. cfst\<cdot>(S i), \<Squnion>i. csnd\<cdot>(S i)>"
     2.1 --- a/src/HOLCF/Product_Cpo.thy	Wed Jan 14 18:22:43 2009 -0800
     2.2 +++ b/src/HOLCF/Product_Cpo.thy	Thu Jan 15 08:11:50 2009 -0800
     2.3 @@ -5,7 +5,7 @@
     2.4  header {* The cpo of cartesian products *}
     2.5  
     2.6  theory Product_Cpo
     2.7 -imports Cont
     2.8 +imports Adm
     2.9  begin
    2.10  
    2.11  defaultsort cpo
    2.12 @@ -63,7 +63,7 @@
    2.13  lemma prod_lessI: "\<lbrakk>fst p \<sqsubseteq> fst q; snd p \<sqsubseteq> snd q\<rbrakk> \<Longrightarrow> p \<sqsubseteq> q"
    2.14  unfolding less_cprod_def by simp
    2.15  
    2.16 -lemma Pair_less_iff [simp]: "(a, b) \<sqsubseteq> (c, d) = (a \<sqsubseteq> c \<and> b \<sqsubseteq> d)"
    2.17 +lemma Pair_less_iff [simp]: "(a, b) \<sqsubseteq> (c, d) \<longleftrightarrow> a \<sqsubseteq> c \<and> b \<sqsubseteq> d"
    2.18  unfolding less_cprod_def by simp
    2.19  
    2.20  text {* Pair @{text "(_,_)"}  is monotone in both arguments *}
    2.21 @@ -149,6 +149,20 @@
    2.22  lemma inst_cprod_pcpo: "\<bottom> = (\<bottom>, \<bottom>)"
    2.23  by (rule minimal_cprod [THEN UU_I, symmetric])
    2.24  
    2.25 +lemma Pair_defined_iff [simp]: "(x, y) = \<bottom> \<longleftrightarrow> x = \<bottom> \<and> y = \<bottom>"
    2.26 +unfolding inst_cprod_pcpo by simp
    2.27 +
    2.28 +lemma fst_strict [simp]: "fst \<bottom> = \<bottom>"
    2.29 +unfolding inst_cprod_pcpo by (rule fst_conv)
    2.30 +
    2.31 +lemma csnd_strict [simp]: "snd \<bottom> = \<bottom>"
    2.32 +unfolding inst_cprod_pcpo by (rule snd_conv)
    2.33 +
    2.34 +lemma Pair_strict [simp]: "(\<bottom>, \<bottom>) = \<bottom>"
    2.35 +by simp
    2.36 +
    2.37 +lemma split_strict [simp]: "split f \<bottom> = f \<bottom> \<bottom>"
    2.38 +unfolding split_def by simp
    2.39  
    2.40  subsection {* Continuity of @{text "(_,_)"}, @{term fst}, @{term snd} *}
    2.41  
    2.42 @@ -201,4 +215,33 @@
    2.43  
    2.44  lemmas cont2cont_snd [cont2cont] = cont2cont_compose [OF cont_snd]
    2.45  
    2.46 +subsection {* Compactness and chain-finiteness *}
    2.47 +
    2.48 +lemma fst_less_iff: "fst (x::'a \<times> 'b) \<sqsubseteq> y \<longleftrightarrow> x \<sqsubseteq> (y, snd x)"
    2.49 +unfolding less_cprod_def by simp
    2.50 +
    2.51 +lemma snd_less_iff: "snd (x::'a \<times> 'b) \<sqsubseteq> y = x \<sqsubseteq> (fst x, y)"
    2.52 +unfolding less_cprod_def by simp
    2.53 +
    2.54 +lemma compact_fst: "compact x \<Longrightarrow> compact (fst x)"
    2.55 +by (rule compactI, simp add: fst_less_iff)
    2.56 +
    2.57 +lemma compact_snd: "compact x \<Longrightarrow> compact (snd x)"
    2.58 +by (rule compactI, simp add: snd_less_iff)
    2.59 +
    2.60 +lemma compact_Pair: "\<lbrakk>compact x; compact y\<rbrakk> \<Longrightarrow> compact (x, y)"
    2.61 +by (rule compactI, simp add: less_cprod_def)
    2.62 +
    2.63 +lemma compact_Pair_iff [simp]: "compact (x, y) \<longleftrightarrow> compact x \<and> compact y"
    2.64 +apply (safe intro!: compact_Pair)
    2.65 +apply (drule compact_fst, simp)
    2.66 +apply (drule compact_snd, simp)
    2.67 +done
    2.68 +
    2.69 +instance "*" :: (chfin, chfin) chfin
    2.70 +apply intro_classes
    2.71 +apply (erule compact_imp_max_in_chain)
    2.72 +apply (case_tac "\<Squnion>i. Y i", simp)
    2.73 +done
    2.74 +
    2.75  end