src/HOLCF/Sprod.thy
changeset 16317 868eddbcaf6e
parent 16212 422f836f6b39
child 16553 aa36d41e4263
     1.1 --- a/src/HOLCF/Sprod.thy	Wed Jun 08 00:16:28 2005 +0200
     1.2 +++ b/src/HOLCF/Sprod.thy	Wed Jun 08 00:18:26 2005 +0200
     1.3 @@ -113,20 +113,20 @@
     1.4  
     1.5  subsection {* Properties of @{term spair} *}
     1.6  
     1.7 -lemma spair_strict1 [simp]: "(:\<bottom>, b:) = \<bottom>"
     1.8 +lemma spair_strict1 [simp]: "(:\<bottom>, y:) = \<bottom>"
     1.9  by (simp add: spair_Abs_Sprod UU_Abs_Sprod strictify_conv_if)
    1.10  
    1.11 -lemma spair_strict2 [simp]: "(:a, \<bottom>:) = \<bottom>"
    1.12 +lemma spair_strict2 [simp]: "(:x, \<bottom>:) = \<bottom>"
    1.13  by (simp add: spair_Abs_Sprod UU_Abs_Sprod strictify_conv_if)
    1.14  
    1.15 -lemma spair_strict: "a = \<bottom> \<or> b = \<bottom> \<Longrightarrow> (:a, b:) = \<bottom>"
    1.16 +lemma spair_strict: "x = \<bottom> \<or> y = \<bottom> \<Longrightarrow> (:x, y:) = \<bottom>"
    1.17  by auto
    1.18  
    1.19  lemma spair_strict_rev: "(:x, y:) \<noteq> \<bottom> \<Longrightarrow> x \<noteq> \<bottom> \<and> y \<noteq> \<bottom>"
    1.20  by (erule contrapos_np, auto)
    1.21  
    1.22  lemma spair_defined [simp]: 
    1.23 -  "\<lbrakk>a \<noteq> \<bottom>; b \<noteq> \<bottom>\<rbrakk> \<Longrightarrow> (:a, b:) \<noteq> \<bottom>"
    1.24 +  "\<lbrakk>x \<noteq> \<bottom>; y \<noteq> \<bottom>\<rbrakk> \<Longrightarrow> (:x, y:) \<noteq> \<bottom>"
    1.25  apply (simp add: spair_Abs_Sprod UU_Abs_Sprod)
    1.26  apply (subst Abs_Sprod_inject)
    1.27  apply (simp add: Sprod_def)
    1.28 @@ -134,15 +134,19 @@
    1.29  apply simp
    1.30  done
    1.31  
    1.32 -lemma spair_defined_rev: "(:a, b:) = \<bottom> \<Longrightarrow> a = \<bottom> \<or> b = \<bottom>"
    1.33 +lemma spair_defined_rev: "(:x, y:) = \<bottom> \<Longrightarrow> x = \<bottom> \<or> y = \<bottom>"
    1.34  by (erule contrapos_pp, simp)
    1.35  
    1.36 +lemma spair_eq:
    1.37 +  "\<lbrakk>x \<noteq> \<bottom>; y \<noteq> \<bottom>\<rbrakk> \<Longrightarrow> ((:x, y:) = (:a, b:)) = (x = a \<and> y = b)"
    1.38 +apply (simp add: spair_Abs_Sprod)
    1.39 +apply (simp add: Abs_Sprod_inject [OF _ spair_lemma] Sprod_def)
    1.40 +apply (simp add: strictify_conv_if)
    1.41 +done
    1.42 +
    1.43  lemma spair_inject:
    1.44 -  "\<lbrakk>aa \<noteq> \<bottom>; ba \<noteq> \<bottom>; (:a,b:) = (:aa,ba:)\<rbrakk> \<Longrightarrow> a = aa \<and> b = ba"
    1.45 -apply (simp add: spair_Abs_Sprod)
    1.46 -apply (simp add: Abs_Sprod_inject [OF spair_lemma] Sprod_def)
    1.47 -apply (simp add: strictify_conv_if split: split_if_asm)
    1.48 -done
    1.49 +  "\<lbrakk>x \<noteq> \<bottom>; y \<noteq> \<bottom>; (:x, y:) = (:a, b:)\<rbrakk> \<Longrightarrow> x = a \<and> y = b"
    1.50 +by (rule spair_eq [THEN iffD1])
    1.51  
    1.52  lemma inst_sprod_pcpo2: "UU = (:UU,UU:)"
    1.53  by simp
    1.54 @@ -169,10 +173,25 @@
    1.55  
    1.56  lemma sfstssnd_defined: "p \<noteq> \<bottom> \<Longrightarrow> sfst\<cdot>p \<noteq> \<bottom> \<and> ssnd\<cdot>p \<noteq> \<bottom>"
    1.57  by (rule_tac p=p in sprodE, simp_all)
    1.58 - 
    1.59 +
    1.60  lemma surjective_pairing_Sprod2: "(:sfst\<cdot>p, ssnd\<cdot>p:) = p"
    1.61  by (rule_tac p=p in sprodE, simp_all)
    1.62  
    1.63 +lemma less_sprod: "p1 \<sqsubseteq> p2 = (sfst\<cdot>p1 \<sqsubseteq> sfst\<cdot>p2 \<and> ssnd\<cdot>p1 \<sqsubseteq> ssnd\<cdot>p2)"
    1.64 +apply (simp add: less_sprod_def sfst_def ssnd_def cont_Rep_Sprod)
    1.65 +apply (rule less_cprod)
    1.66 +done
    1.67 +
    1.68 +lemma spair_less:
    1.69 +  "\<lbrakk>x \<noteq> \<bottom>; y \<noteq> \<bottom>\<rbrakk> \<Longrightarrow> (:x, y:) \<sqsubseteq> (:a, b:) = (x \<sqsubseteq> a \<and> y \<sqsubseteq> b)"
    1.70 +apply (case_tac "a = \<bottom>")
    1.71 +apply (simp add: eq_UU_iff [symmetric])
    1.72 +apply (case_tac "b = \<bottom>")
    1.73 +apply (simp add: eq_UU_iff [symmetric])
    1.74 +apply (simp add: less_sprod)
    1.75 +done
    1.76 +
    1.77 +
    1.78  subsection {* Properties of @{term ssplit} *}
    1.79  
    1.80  lemma ssplit1 [simp]: "ssplit\<cdot>f\<cdot>\<bottom> = \<bottom>"