src/HOL/BNF_Fixpoint_Base.thy
changeset 58734 20235f0512e2
parent 58732 854eed6e5aed
child 58889 5b7a9633cfa8
equal deleted inserted replaced
58733:797d0e7aefc7 58734:20235f0512e2
   184   by (erule arg_cong)
   184   by (erule arg_cong)
   185 
   185 
   186 lemma inj_on_convol_ident: "inj_on (\<lambda>x. (x, f x)) X"
   186 lemma inj_on_convol_ident: "inj_on (\<lambda>x. (x, f x)) X"
   187   unfolding inj_on_def by simp
   187   unfolding inj_on_def by simp
   188 
   188 
       
   189 lemma map_sum_if_distrib_then:
       
   190   "\<And>f g e x y. map_sum f g (if e then Inl x else y) = (if e then Inl (f x) else map_sum f g y)"
       
   191   "\<And>f g e x y. map_sum f g (if e then Inr x else y) = (if e then Inr (g x) else map_sum f g y)"
       
   192   by simp_all
       
   193 
       
   194 lemma map_sum_if_distrib_else:
       
   195   "\<And>f g e x y. map_sum f g (if e then x else Inl y) = (if e then map_sum f g x else Inl (f y))"
       
   196   "\<And>f g e x y. map_sum f g (if e then x else Inr y) = (if e then map_sum f g x else Inr (g y))"
       
   197   by simp_all
       
   198 
   189 lemma case_prod_app: "case_prod f x y = case_prod (\<lambda>l r. f l r y) x"
   199 lemma case_prod_app: "case_prod f x y = case_prod (\<lambda>l r. f l r y) x"
   190   by (case_tac x) simp
   200   by (case_tac x) simp
   191 
   201 
   192 lemma case_sum_map_sum: "case_sum l r (map_sum f g x) = case_sum (l \<circ> f) (r \<circ> g) x"
   202 lemma case_sum_map_sum: "case_sum l r (map_sum f g x) = case_sum (l \<circ> f) (r \<circ> g) x"
   193   by (case_tac x) simp+
   203   by (case_tac x) simp+