src/HOL/Library/Quotient_Sum.thy
changeset 58916 229765cc3414
parent 58881 b9556a055632
child 60500 903bb1495239
     1.1 --- a/src/HOL/Library/Quotient_Sum.thy	Fri Nov 07 12:24:56 2014 +0100
     1.2 +++ b/src/HOL/Library/Quotient_Sum.thy	Fri Nov 07 11:28:37 2014 +0100
     1.3 @@ -12,11 +12,11 @@
     1.4  
     1.5  lemma rel_sum_map1:
     1.6    "rel_sum R1 R2 (map_sum f1 f2 x) y \<longleftrightarrow> rel_sum (\<lambda>x. R1 (f1 x)) (\<lambda>x. R2 (f2 x)) x y"
     1.7 -  by (simp add: rel_sum_def split: sum.split)
     1.8 +  by (rule sum.rel_map(1))
     1.9  
    1.10  lemma rel_sum_map2:
    1.11    "rel_sum R1 R2 x (map_sum f1 f2 y) \<longleftrightarrow> rel_sum (\<lambda>x y. R1 x (f1 y)) (\<lambda>x y. R2 x (f2 y)) x y"
    1.12 -  by (simp add: rel_sum_def split: sum.split)
    1.13 +  by (rule sum.rel_map(2))
    1.14  
    1.15  lemma map_sum_id [id_simps]:
    1.16    "map_sum id id = id"
    1.17 @@ -24,7 +24,7 @@
    1.18  
    1.19  lemma rel_sum_eq [id_simps]:
    1.20    "rel_sum (op =) (op =) = (op =)"
    1.21 -  by (simp add: rel_sum_def fun_eq_iff split: sum.split)
    1.22 +  by (rule sum.rel_eq)
    1.23  
    1.24  lemma reflp_rel_sum:
    1.25    "reflp R1 \<Longrightarrow> reflp R2 \<Longrightarrow> reflp (rel_sum R1 R2)"
    1.26 @@ -50,7 +50,7 @@
    1.27    apply (simp_all add: map_sum.compositionality comp_def map_sum.identity rel_sum_eq rel_sum_map1 rel_sum_map2
    1.28      Quotient3_abs_rep [OF q1] Quotient3_rel_rep [OF q1] Quotient3_abs_rep [OF q2] Quotient3_rel_rep [OF q2])
    1.29    using Quotient3_rel [OF q1] Quotient3_rel [OF q2]
    1.30 -  apply (simp add: rel_sum_def comp_def split: sum.split)
    1.31 +  apply (fastforce elim!: rel_sum.cases simp add: comp_def split: sum.split)
    1.32    done
    1.33  
    1.34  declare [[mapQ3 sum = (rel_sum, sum_quotient)]]