src/Doc/Datatypes/Datatypes.thy
changeset 71354 c71a44893645
parent 71264 0c454a5d125d
child 71393 fce780f9c9c6
equal deleted inserted replaced
71352:41f3ca717da5 71354:c71a44893645
  3020       unfolding equivp_reflp_symp_transp reflp_def symp_def transp_def
  3020       unfolding equivp_reflp_symp_transp reflp_def symp_def transp_def
  3021       by (blast intro: ignore_Inl_equivp)
  3021       by (blast intro: ignore_Inl_equivp)
  3022 
  3022 
  3023     lift_bnf 'a myoption (*<*)[wits: "Inl undefined :: 'a + 'a"](*>*)
  3023     lift_bnf 'a myoption (*<*)[wits: "Inl undefined :: 'a + 'a"](*>*)
  3024 
  3024 
  3025     proof (intro rel_funI)
  3025     proof -
  3026       fix f g :: "'a \<Rightarrow> 'b" and x y :: "'a + 'a"
       
  3027       assume "f = g" "ignore_Inl x y"
       
  3028       then show "ignore_Inl (map_sum f f x) (map_sum g g y)"
       
  3029         by (cases x; cases y) auto
       
  3030     next
       
  3031       fix P :: "'a \<Rightarrow> 'b \<Rightarrow> bool" and Q :: "'b \<Rightarrow> 'c \<Rightarrow> bool"
  3026       fix P :: "'a \<Rightarrow> 'b \<Rightarrow> bool" and Q :: "'b \<Rightarrow> 'c \<Rightarrow> bool"
  3032       assume "P OO Q \<noteq> bot"
  3027       assume "P OO Q \<noteq> bot"
  3033       then show "rel_sum P P OO ignore_Inl OO rel_sum Q Q
  3028       then show "rel_sum P P OO ignore_Inl OO rel_sum Q Q
  3034          \<le> ignore_Inl OO rel_sum (P OO Q) (P OO Q) OO ignore_Inl"
  3029          \<le> ignore_Inl OO rel_sum (P OO Q) (P OO Q) OO ignore_Inl"
  3035         by (fastforce(*<*) elim!: ignore_Inl.cases simp add: relcompp_apply fun_eq_iff rel_sum.simps(*>*))
  3030         by (fastforce(*<*) elim!: ignore_Inl.cases simp add: relcompp_apply fun_eq_iff rel_sum.simps(*>*))