src/HOLCF/Product_Cpo.thy
changeset 29535 08824fad8879
parent 29533 7f4a32134447
child 31041 85b4843d9939
     1.1 --- a/src/HOLCF/Product_Cpo.thy	Wed Jan 14 18:22:43 2009 -0800
     1.2 +++ b/src/HOLCF/Product_Cpo.thy	Thu Jan 15 08:11:50 2009 -0800
     1.3 @@ -5,7 +5,7 @@
     1.4  header {* The cpo of cartesian products *}
     1.5  
     1.6  theory Product_Cpo
     1.7 -imports Cont
     1.8 +imports Adm
     1.9  begin
    1.10  
    1.11  defaultsort cpo
    1.12 @@ -63,7 +63,7 @@
    1.13  lemma prod_lessI: "\<lbrakk>fst p \<sqsubseteq> fst q; snd p \<sqsubseteq> snd q\<rbrakk> \<Longrightarrow> p \<sqsubseteq> q"
    1.14  unfolding less_cprod_def by simp
    1.15  
    1.16 -lemma Pair_less_iff [simp]: "(a, b) \<sqsubseteq> (c, d) = (a \<sqsubseteq> c \<and> b \<sqsubseteq> d)"
    1.17 +lemma Pair_less_iff [simp]: "(a, b) \<sqsubseteq> (c, d) \<longleftrightarrow> a \<sqsubseteq> c \<and> b \<sqsubseteq> d"
    1.18  unfolding less_cprod_def by simp
    1.19  
    1.20  text {* Pair @{text "(_,_)"}  is monotone in both arguments *}
    1.21 @@ -149,6 +149,20 @@
    1.22  lemma inst_cprod_pcpo: "\<bottom> = (\<bottom>, \<bottom>)"
    1.23  by (rule minimal_cprod [THEN UU_I, symmetric])
    1.24  
    1.25 +lemma Pair_defined_iff [simp]: "(x, y) = \<bottom> \<longleftrightarrow> x = \<bottom> \<and> y = \<bottom>"
    1.26 +unfolding inst_cprod_pcpo by simp
    1.27 +
    1.28 +lemma fst_strict [simp]: "fst \<bottom> = \<bottom>"
    1.29 +unfolding inst_cprod_pcpo by (rule fst_conv)
    1.30 +
    1.31 +lemma csnd_strict [simp]: "snd \<bottom> = \<bottom>"
    1.32 +unfolding inst_cprod_pcpo by (rule snd_conv)
    1.33 +
    1.34 +lemma Pair_strict [simp]: "(\<bottom>, \<bottom>) = \<bottom>"
    1.35 +by simp
    1.36 +
    1.37 +lemma split_strict [simp]: "split f \<bottom> = f \<bottom> \<bottom>"
    1.38 +unfolding split_def by simp
    1.39  
    1.40  subsection {* Continuity of @{text "(_,_)"}, @{term fst}, @{term snd} *}
    1.41  
    1.42 @@ -201,4 +215,33 @@
    1.43  
    1.44  lemmas cont2cont_snd [cont2cont] = cont2cont_compose [OF cont_snd]
    1.45  
    1.46 +subsection {* Compactness and chain-finiteness *}
    1.47 +
    1.48 +lemma fst_less_iff: "fst (x::'a \<times> 'b) \<sqsubseteq> y \<longleftrightarrow> x \<sqsubseteq> (y, snd x)"
    1.49 +unfolding less_cprod_def by simp
    1.50 +
    1.51 +lemma snd_less_iff: "snd (x::'a \<times> 'b) \<sqsubseteq> y = x \<sqsubseteq> (fst x, y)"
    1.52 +unfolding less_cprod_def by simp
    1.53 +
    1.54 +lemma compact_fst: "compact x \<Longrightarrow> compact (fst x)"
    1.55 +by (rule compactI, simp add: fst_less_iff)
    1.56 +
    1.57 +lemma compact_snd: "compact x \<Longrightarrow> compact (snd x)"
    1.58 +by (rule compactI, simp add: snd_less_iff)
    1.59 +
    1.60 +lemma compact_Pair: "\<lbrakk>compact x; compact y\<rbrakk> \<Longrightarrow> compact (x, y)"
    1.61 +by (rule compactI, simp add: less_cprod_def)
    1.62 +
    1.63 +lemma compact_Pair_iff [simp]: "compact (x, y) \<longleftrightarrow> compact x \<and> compact y"
    1.64 +apply (safe intro!: compact_Pair)
    1.65 +apply (drule compact_fst, simp)
    1.66 +apply (drule compact_snd, simp)
    1.67 +done
    1.68 +
    1.69 +instance "*" :: (chfin, chfin) chfin
    1.70 +apply intro_classes
    1.71 +apply (erule compact_imp_max_in_chain)
    1.72 +apply (case_tac "\<Squnion>i. Y i", simp)
    1.73 +done
    1.74 +
    1.75  end