respectfullness and preservation of prod_rel
authorCezary Kaliszyk <kaliszyk@in.tum.de>
Thu May 06 14:22:05 2010 +0200 (2010-05-06)
changeset 36695b434506fb0d4
parent 36694 978e6469b504
child 36696 1b69f78be286
respectfullness and preservation of prod_rel
src/HOL/Library/Quotient_Product.thy
     1.1 --- a/src/HOL/Library/Quotient_Product.thy	Thu May 06 10:55:09 2010 +0200
     1.2 +++ b/src/HOL/Library/Quotient_Product.thy	Thu May 06 14:22:05 2010 +0200
     1.3 @@ -93,6 +93,25 @@
     1.4    shows "(((Abs1 ---> Abs2 ---> id) ---> prod_fun Rep1 Rep2 ---> id) split) = split"
     1.5    by (simp add: expand_fun_eq Quotient_abs_rep[OF q1] Quotient_abs_rep[OF q2])
     1.6  
     1.7 +lemma [quot_respect]:
     1.8 +  shows "((R2 ===> R2 ===> op =) ===> (R1 ===> R1 ===> op =) ===>
     1.9 +  prod_rel R2 R1 ===> prod_rel R2 R1 ===> op =) prod_rel prod_rel"
    1.10 +  by auto
    1.11 +
    1.12 +lemma [quot_preserve]:
    1.13 +  assumes q1: "Quotient R1 abs1 rep1"
    1.14 +  and     q2: "Quotient R2 abs2 rep2"
    1.15 +  shows "((abs1 ---> abs1 ---> id) ---> (abs2 ---> abs2 ---> id) --->
    1.16 +  prod_fun rep1 rep2 ---> prod_fun rep1 rep2 ---> id) prod_rel = prod_rel"
    1.17 +  by (simp add: expand_fun_eq Quotient_abs_rep[OF q1] Quotient_abs_rep[OF q2])
    1.18 +
    1.19 +lemma [quot_preserve]:
    1.20 +  shows"(prod_rel ((rep1 ---> rep1 ---> id) R1) ((rep2 ---> rep2 ---> id) R2)
    1.21 +  (l1, l2) (r1, r2)) = (R1 (rep1 l1) (rep1 r1) \<and> R2 (rep2 l2) (rep2 r2))"
    1.22 +  by simp
    1.23 +
    1.24 +declare Pair_eq[quot_preserve]
    1.25 +
    1.26  lemma prod_fun_id[id_simps]:
    1.27    shows "prod_fun id id = id"
    1.28    by (simp add: prod_fun_def)