src/HOL/Library/Quotient_Sum.thy
changeset 55931 62156e694f3d
parent 55564 e81ee43ab290
child 55943 5c2df04e97d1
--- a/src/HOL/Library/Quotient_Sum.thy	Thu Mar 06 12:17:26 2014 +0100
+++ b/src/HOL/Library/Quotient_Sum.thy	Thu Mar 06 13:36:15 2014 +0100
@@ -11,16 +11,16 @@
 subsection {* Rules for the Quotient package *}
 
 lemma sum_rel_map1:
-  "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"
+  "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"
   by (simp add: sum_rel_def split: sum.split)
 
 lemma sum_rel_map2:
-  "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"
+  "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"
   by (simp add: sum_rel_def split: sum.split)
 
-lemma sum_map_id [id_simps]:
-  "sum_map id id = id"
-  by (simp add: id_def sum_map.identity fun_eq_iff)
+lemma map_sum_id [id_simps]:
+  "map_sum id id = id"
+  by (simp add: id_def map_sum.identity fun_eq_iff)
 
 lemma sum_rel_eq [id_simps]:
   "sum_rel (op =) (op =) = (op =)"
@@ -45,9 +45,9 @@
 lemma sum_quotient [quot_thm]:
   assumes q1: "Quotient3 R1 Abs1 Rep1"
   assumes q2: "Quotient3 R2 Abs2 Rep2"
-  shows "Quotient3 (sum_rel R1 R2) (sum_map Abs1 Abs2) (sum_map Rep1 Rep2)"
+  shows "Quotient3 (sum_rel R1 R2) (map_sum Abs1 Abs2) (map_sum Rep1 Rep2)"
   apply (rule Quotient3I)
-  apply (simp_all add: sum_map.compositionality comp_def sum_map.identity sum_rel_eq sum_rel_map1 sum_rel_map2
+  apply (simp_all add: map_sum.compositionality comp_def map_sum.identity sum_rel_eq sum_rel_map1 sum_rel_map2
     Quotient3_abs_rep [OF q1] Quotient3_rel_rep [OF q1] Quotient3_abs_rep [OF q2] Quotient3_rel_rep [OF q2])
   using Quotient3_rel [OF q1] Quotient3_rel [OF q2]
   apply (simp add: sum_rel_def comp_def split: sum.split)
@@ -70,7 +70,7 @@
 lemma sum_Inl_prs [quot_preserve]:
   assumes q1: "Quotient3 R1 Abs1 Rep1"
   assumes q2: "Quotient3 R2 Abs2 Rep2"
-  shows "(Rep1 ---> sum_map Abs1 Abs2) Inl = Inl"
+  shows "(Rep1 ---> map_sum Abs1 Abs2) Inl = Inl"
   apply(simp add: fun_eq_iff)
   apply(simp add: Quotient3_abs_rep[OF q1])
   done
@@ -78,7 +78,7 @@
 lemma sum_Inr_prs [quot_preserve]:
   assumes q1: "Quotient3 R1 Abs1 Rep1"
   assumes q2: "Quotient3 R2 Abs2 Rep2"
-  shows "(Rep2 ---> sum_map Abs1 Abs2) Inr = Inr"
+  shows "(Rep2 ---> map_sum Abs1 Abs2) Inr = Inr"
   apply(simp add: fun_eq_iff)
   apply(simp add: Quotient3_abs_rep[OF q2])
   done