added theorems less_sprod, spair_less, spair_eq, spair_inject
authorhuffman
Wed Jun 08 00:18:26 2005 +0200 (2005-06-08)
changeset 16317868eddbcaf6e
parent 16316 17db5df51a35
child 16318 45b12a01382f
added theorems less_sprod, spair_less, spair_eq, spair_inject
src/HOLCF/Sprod.ML
src/HOLCF/Sprod.thy
     1.1 --- a/src/HOLCF/Sprod.ML	Wed Jun 08 00:16:28 2005 +0200
     1.2 +++ b/src/HOLCF/Sprod.ML	Wed Jun 08 00:18:26 2005 +0200
     1.3 @@ -6,7 +6,6 @@
     1.4  val sfst_def = thm "sfst_def";
     1.5  val ssnd_def = thm "ssnd_def";
     1.6  val ssplit_def = thm "ssplit_def";
     1.7 -val spair_inject = thm "spair_inject";
     1.8  val inst_sprod_pcpo2 = thm "inst_sprod_pcpo2";
     1.9  val spair_strict = thm "spair_strict";
    1.10  val spair_strict1 = thm "spair_strict1";
    1.11 @@ -14,6 +13,8 @@
    1.12  val spair_strict_rev = thm "spair_strict_rev";
    1.13  val spair_defined_rev = thm "spair_defined_rev";
    1.14  val spair_defined = thm "spair_defined";
    1.15 +val spair_eq = thm "spair_eq";
    1.16 +val spair_inject = thm "spair_inject";
    1.17  val Exh_Sprod2 = thm "Exh_Sprod2";
    1.18  val sprodE = thm "sprodE";
    1.19  val sfst_strict = thm "sfst_strict";
    1.20 @@ -22,6 +23,8 @@
    1.21  val ssnd_spair = thm "ssnd_spair";
    1.22  val sfstssnd_defined = thm "sfstssnd_defined";
    1.23  val surjective_pairing_Sprod2 = thm "surjective_pairing_Sprod2";
    1.24 +val less_sprod = thm "less_sprod";
    1.25 +val spair_less = thm "spair_less";
    1.26  val ssplit1 = thm "ssplit1";
    1.27  val ssplit2 = thm "ssplit2";
    1.28  val ssplit3 = thm "ssplit3";
     2.1 --- a/src/HOLCF/Sprod.thy	Wed Jun 08 00:16:28 2005 +0200
     2.2 +++ b/src/HOLCF/Sprod.thy	Wed Jun 08 00:18:26 2005 +0200
     2.3 @@ -113,20 +113,20 @@
     2.4  
     2.5  subsection {* Properties of @{term spair} *}
     2.6  
     2.7 -lemma spair_strict1 [simp]: "(:\<bottom>, b:) = \<bottom>"
     2.8 +lemma spair_strict1 [simp]: "(:\<bottom>, y:) = \<bottom>"
     2.9  by (simp add: spair_Abs_Sprod UU_Abs_Sprod strictify_conv_if)
    2.10  
    2.11 -lemma spair_strict2 [simp]: "(:a, \<bottom>:) = \<bottom>"
    2.12 +lemma spair_strict2 [simp]: "(:x, \<bottom>:) = \<bottom>"
    2.13  by (simp add: spair_Abs_Sprod UU_Abs_Sprod strictify_conv_if)
    2.14  
    2.15 -lemma spair_strict: "a = \<bottom> \<or> b = \<bottom> \<Longrightarrow> (:a, b:) = \<bottom>"
    2.16 +lemma spair_strict: "x = \<bottom> \<or> y = \<bottom> \<Longrightarrow> (:x, y:) = \<bottom>"
    2.17  by auto
    2.18  
    2.19  lemma spair_strict_rev: "(:x, y:) \<noteq> \<bottom> \<Longrightarrow> x \<noteq> \<bottom> \<and> y \<noteq> \<bottom>"
    2.20  by (erule contrapos_np, auto)
    2.21  
    2.22  lemma spair_defined [simp]: 
    2.23 -  "\<lbrakk>a \<noteq> \<bottom>; b \<noteq> \<bottom>\<rbrakk> \<Longrightarrow> (:a, b:) \<noteq> \<bottom>"
    2.24 +  "\<lbrakk>x \<noteq> \<bottom>; y \<noteq> \<bottom>\<rbrakk> \<Longrightarrow> (:x, y:) \<noteq> \<bottom>"
    2.25  apply (simp add: spair_Abs_Sprod UU_Abs_Sprod)
    2.26  apply (subst Abs_Sprod_inject)
    2.27  apply (simp add: Sprod_def)
    2.28 @@ -134,15 +134,19 @@
    2.29  apply simp
    2.30  done
    2.31  
    2.32 -lemma spair_defined_rev: "(:a, b:) = \<bottom> \<Longrightarrow> a = \<bottom> \<or> b = \<bottom>"
    2.33 +lemma spair_defined_rev: "(:x, y:) = \<bottom> \<Longrightarrow> x = \<bottom> \<or> y = \<bottom>"
    2.34  by (erule contrapos_pp, simp)
    2.35  
    2.36 +lemma spair_eq:
    2.37 +  "\<lbrakk>x \<noteq> \<bottom>; y \<noteq> \<bottom>\<rbrakk> \<Longrightarrow> ((:x, y:) = (:a, b:)) = (x = a \<and> y = b)"
    2.38 +apply (simp add: spair_Abs_Sprod)
    2.39 +apply (simp add: Abs_Sprod_inject [OF _ spair_lemma] Sprod_def)
    2.40 +apply (simp add: strictify_conv_if)
    2.41 +done
    2.42 +
    2.43  lemma spair_inject:
    2.44 -  "\<lbrakk>aa \<noteq> \<bottom>; ba \<noteq> \<bottom>; (:a,b:) = (:aa,ba:)\<rbrakk> \<Longrightarrow> a = aa \<and> b = ba"
    2.45 -apply (simp add: spair_Abs_Sprod)
    2.46 -apply (simp add: Abs_Sprod_inject [OF spair_lemma] Sprod_def)
    2.47 -apply (simp add: strictify_conv_if split: split_if_asm)
    2.48 -done
    2.49 +  "\<lbrakk>x \<noteq> \<bottom>; y \<noteq> \<bottom>; (:x, y:) = (:a, b:)\<rbrakk> \<Longrightarrow> x = a \<and> y = b"
    2.50 +by (rule spair_eq [THEN iffD1])
    2.51  
    2.52  lemma inst_sprod_pcpo2: "UU = (:UU,UU:)"
    2.53  by simp
    2.54 @@ -169,10 +173,25 @@
    2.55  
    2.56  lemma sfstssnd_defined: "p \<noteq> \<bottom> \<Longrightarrow> sfst\<cdot>p \<noteq> \<bottom> \<and> ssnd\<cdot>p \<noteq> \<bottom>"
    2.57  by (rule_tac p=p in sprodE, simp_all)
    2.58 - 
    2.59 +
    2.60  lemma surjective_pairing_Sprod2: "(:sfst\<cdot>p, ssnd\<cdot>p:) = p"
    2.61  by (rule_tac p=p in sprodE, simp_all)
    2.62  
    2.63 +lemma less_sprod: "p1 \<sqsubseteq> p2 = (sfst\<cdot>p1 \<sqsubseteq> sfst\<cdot>p2 \<and> ssnd\<cdot>p1 \<sqsubseteq> ssnd\<cdot>p2)"
    2.64 +apply (simp add: less_sprod_def sfst_def ssnd_def cont_Rep_Sprod)
    2.65 +apply (rule less_cprod)
    2.66 +done
    2.67 +
    2.68 +lemma spair_less:
    2.69 +  "\<lbrakk>x \<noteq> \<bottom>; y \<noteq> \<bottom>\<rbrakk> \<Longrightarrow> (:x, y:) \<sqsubseteq> (:a, b:) = (x \<sqsubseteq> a \<and> y \<sqsubseteq> b)"
    2.70 +apply (case_tac "a = \<bottom>")
    2.71 +apply (simp add: eq_UU_iff [symmetric])
    2.72 +apply (case_tac "b = \<bottom>")
    2.73 +apply (simp add: eq_UU_iff [symmetric])
    2.74 +apply (simp add: less_sprod)
    2.75 +done
    2.76 +
    2.77 +
    2.78  subsection {* Properties of @{term ssplit} *}
    2.79  
    2.80  lemma ssplit1 [simp]: "ssplit\<cdot>f\<cdot>\<bottom> = \<bottom>"