src/HOL/Library/Quotient_Sum.thy
changeset 55931 62156e694f3d
parent 55564 e81ee43ab290
child 55943 5c2df04e97d1
     1.1 --- a/src/HOL/Library/Quotient_Sum.thy	Thu Mar 06 12:17:26 2014 +0100
     1.2 +++ b/src/HOL/Library/Quotient_Sum.thy	Thu Mar 06 13:36:15 2014 +0100
     1.3 @@ -11,16 +11,16 @@
     1.4  subsection {* Rules for the Quotient package *}
     1.5  
     1.6  lemma sum_rel_map1:
     1.7 -  "sum_rel R1 R2 (sum_map f1 f2 x) y \<longleftrightarrow> sum_rel (\<lambda>x. R1 (f1 x)) (\<lambda>x. R2 (f2 x)) x y"
     1.8 +  "sum_rel R1 R2 (map_sum f1 f2 x) y \<longleftrightarrow> sum_rel (\<lambda>x. R1 (f1 x)) (\<lambda>x. R2 (f2 x)) x y"
     1.9    by (simp add: sum_rel_def split: sum.split)
    1.10  
    1.11  lemma sum_rel_map2:
    1.12 -  "sum_rel R1 R2 x (sum_map f1 f2 y) \<longleftrightarrow> sum_rel (\<lambda>x y. R1 x (f1 y)) (\<lambda>x y. R2 x (f2 y)) x y"
    1.13 +  "sum_rel R1 R2 x (map_sum f1 f2 y) \<longleftrightarrow> sum_rel (\<lambda>x y. R1 x (f1 y)) (\<lambda>x y. R2 x (f2 y)) x y"
    1.14    by (simp add: sum_rel_def split: sum.split)
    1.15  
    1.16 -lemma sum_map_id [id_simps]:
    1.17 -  "sum_map id id = id"
    1.18 -  by (simp add: id_def sum_map.identity fun_eq_iff)
    1.19 +lemma map_sum_id [id_simps]:
    1.20 +  "map_sum id id = id"
    1.21 +  by (simp add: id_def map_sum.identity fun_eq_iff)
    1.22  
    1.23  lemma sum_rel_eq [id_simps]:
    1.24    "sum_rel (op =) (op =) = (op =)"
    1.25 @@ -45,9 +45,9 @@
    1.26  lemma sum_quotient [quot_thm]:
    1.27    assumes q1: "Quotient3 R1 Abs1 Rep1"
    1.28    assumes q2: "Quotient3 R2 Abs2 Rep2"
    1.29 -  shows "Quotient3 (sum_rel R1 R2) (sum_map Abs1 Abs2) (sum_map Rep1 Rep2)"
    1.30 +  shows "Quotient3 (sum_rel R1 R2) (map_sum Abs1 Abs2) (map_sum Rep1 Rep2)"
    1.31    apply (rule Quotient3I)
    1.32 -  apply (simp_all add: sum_map.compositionality comp_def sum_map.identity sum_rel_eq sum_rel_map1 sum_rel_map2
    1.33 +  apply (simp_all add: map_sum.compositionality comp_def map_sum.identity sum_rel_eq sum_rel_map1 sum_rel_map2
    1.34      Quotient3_abs_rep [OF q1] Quotient3_rel_rep [OF q1] Quotient3_abs_rep [OF q2] Quotient3_rel_rep [OF q2])
    1.35    using Quotient3_rel [OF q1] Quotient3_rel [OF q2]
    1.36    apply (simp add: sum_rel_def comp_def split: sum.split)
    1.37 @@ -70,7 +70,7 @@
    1.38  lemma sum_Inl_prs [quot_preserve]:
    1.39    assumes q1: "Quotient3 R1 Abs1 Rep1"
    1.40    assumes q2: "Quotient3 R2 Abs2 Rep2"
    1.41 -  shows "(Rep1 ---> sum_map Abs1 Abs2) Inl = Inl"
    1.42 +  shows "(Rep1 ---> map_sum Abs1 Abs2) Inl = Inl"
    1.43    apply(simp add: fun_eq_iff)
    1.44    apply(simp add: Quotient3_abs_rep[OF q1])
    1.45    done
    1.46 @@ -78,7 +78,7 @@
    1.47  lemma sum_Inr_prs [quot_preserve]:
    1.48    assumes q1: "Quotient3 R1 Abs1 Rep1"
    1.49    assumes q2: "Quotient3 R2 Abs2 Rep2"
    1.50 -  shows "(Rep2 ---> sum_map Abs1 Abs2) Inr = Inr"
    1.51 +  shows "(Rep2 ---> map_sum Abs1 Abs2) Inr = Inr"
    1.52    apply(simp add: fun_eq_iff)
    1.53    apply(simp add: Quotient3_abs_rep[OF q2])
    1.54    done