# HG changeset patch # User huffman # Date 1287771892 25200 # Node ID baf5953615da000491f6487cc881263069644935 # Parent 1ca61fbd8a794c02ec10af8b34caca29f626ddf2 do proofs using Rep_Sprod_simps, Rep_Ssum_simps; remove unused lemmas diff -r 1ca61fbd8a79 -r baf5953615da src/HOLCF/Sprod.thy --- a/src/HOLCF/Sprod.thy Fri Oct 22 07:45:32 2010 -0700 +++ b/src/HOLCF/Sprod.thy Fri Oct 22 11:24:52 2010 -0700 @@ -56,16 +56,17 @@ lemma spair_Sprod: "(strict\b\a, strict\a\b) \ Sprod" by (simp add: Sprod_def strict_conv_if) -lemma spair_Abs_Sprod: "(:a, b:) = Abs_Sprod (strict\b\a, strict\a\b)" -by (simp add: spair_def cont_Abs_Sprod spair_Sprod) +lemma Rep_Sprod_spair: "Rep_Sprod (:a, b:) = (strict\b\a, strict\a\b)" +by (simp add: spair_def cont_Abs_Sprod Abs_Sprod_inverse spair_Sprod) -lemma Rep_Sprod_spair: "Rep_Sprod (:a, b:) = (strict\b\a, strict\a\b)" -by (simp add: spair_Abs_Sprod Abs_Sprod_inverse spair_Sprod) +lemmas Rep_Sprod_simps = + Rep_Sprod_inject [symmetric] below_Sprod_def + Pair_fst_snd_eq below_prod_def + Rep_Sprod_strict Rep_Sprod_spair lemma sprodE [case_names bottom spair, cases type: sprod]: obtains "p = \" | x y where "p = (:x, y:)" and "x \ \" and "y \ \" -by (induct p rule: Abs_Sprod_induct) - (auto simp add: Sprod_def spair_Abs_Sprod Abs_Sprod_strict) +using Rep_Sprod [of p] by (auto simp add: Sprod_def Rep_Sprod_simps) lemma sprod_induct [case_names bottom spair, induct type: sprod]: "\P \; \x y. \x \ \; y \ \\ \ P (:x, y:)\ \ P x" @@ -73,10 +74,6 @@ subsection {* Properties of \emph{spair} *} -lemmas Rep_Sprod_simps = - Rep_Sprod_inject [symmetric] below_Sprod_def - Rep_Sprod_strict Rep_Sprod_spair - lemma spair_strict1 [simp]: "(:\, y:) = \" by (simp add: Rep_Sprod_simps strict_conv_if) diff -r 1ca61fbd8a79 -r baf5953615da src/HOLCF/Ssum.thy --- a/src/HOLCF/Ssum.thy Fri Oct 22 07:45:32 2010 -0700 +++ b/src/HOLCF/Ssum.thy Fri Oct 22 11:24:52 2010 -0700 @@ -43,33 +43,32 @@ lemma sinr_Ssum: "(strict\b\FF, \, b) \ Ssum" by (simp add: Ssum_def strict_conv_if) -lemma sinl_Abs_Ssum: "sinl\a = Abs_Ssum (strict\a\TT, a, \)" -by (simp add: sinl_def cont_Abs_Ssum sinl_Ssum) - -lemma sinr_Abs_Ssum: "sinr\b = Abs_Ssum (strict\b\FF, \, b)" -by (simp add: sinr_def cont_Abs_Ssum sinr_Ssum) - lemma Rep_Ssum_sinl: "Rep_Ssum (sinl\a) = (strict\a\TT, a, \)" -by (simp add: sinl_Abs_Ssum Abs_Ssum_inverse sinl_Ssum) +by (simp add: sinl_def cont_Abs_Ssum Abs_Ssum_inverse sinl_Ssum) lemma Rep_Ssum_sinr: "Rep_Ssum (sinr\b) = (strict\b\FF, \, b)" -by (simp add: sinr_Abs_Ssum Abs_Ssum_inverse sinr_Ssum) +by (simp add: sinr_def cont_Abs_Ssum Abs_Ssum_inverse sinr_Ssum) + +lemmas Rep_Ssum_simps = + Rep_Ssum_inject [symmetric] below_Ssum_def + Pair_fst_snd_eq below_prod_def + Rep_Ssum_strict Rep_Ssum_sinl Rep_Ssum_sinr subsection {* Properties of \emph{sinl} and \emph{sinr} *} text {* Ordering *} lemma sinl_below [simp]: "(sinl\x \ sinl\y) = (x \ y)" -by (simp add: below_Ssum_def Rep_Ssum_sinl strict_conv_if) +by (simp add: Rep_Ssum_simps strict_conv_if) lemma sinr_below [simp]: "(sinr\x \ sinr\y) = (x \ y)" -by (simp add: below_Ssum_def Rep_Ssum_sinr strict_conv_if) +by (simp add: Rep_Ssum_simps strict_conv_if) lemma sinl_below_sinr [simp]: "(sinl\x \ sinr\y) = (x = \)" -by (simp add: below_Ssum_def Rep_Ssum_sinl Rep_Ssum_sinr strict_conv_if) +by (simp add: Rep_Ssum_simps strict_conv_if) lemma sinr_below_sinl [simp]: "(sinr\x \ sinl\y) = (x = \)" -by (simp add: below_Ssum_def Rep_Ssum_sinl Rep_Ssum_sinr strict_conv_if) +by (simp add: Rep_Ssum_simps strict_conv_if) text {* Equality *} @@ -94,10 +93,10 @@ text {* Strictness *} lemma sinl_strict [simp]: "sinl\\ = \" -by (simp add: sinl_Abs_Ssum Abs_Ssum_strict) +by (simp add: Rep_Ssum_simps) lemma sinr_strict [simp]: "sinr\\ = \" -by (simp add: sinr_Abs_Ssum Abs_Ssum_strict) +by (simp add: Rep_Ssum_simps) lemma sinl_defined_iff [simp]: "(sinl\x = \) = (x = \)" using sinl_eq [of "x" "\"] by simp @@ -139,8 +138,7 @@ obtains "p = \" | x where "p = sinl\x" and "x \ \" | y where "p = sinr\y" and "y \ \" -by (induct p rule: Abs_Ssum_induct) - (auto simp add: Ssum_def sinl_Abs_Ssum sinr_Abs_Ssum Abs_Ssum_strict) +using Rep_Ssum [of p] by (auto simp add: Ssum_def Rep_Ssum_simps) lemma ssum_induct [case_names bottom sinl sinr, induct type: ssum]: "\P \;