src/HOLCF/Representable.thy
changeset 35489 dd02201d95b6
parent 35480 7a1f285cad25
child 35490 63f8121c6585
equal deleted inserted replaced
35488:eb0fd03d34f9 35489:dd02201d95b6
   180   shows "abs\<cdot>(rep\<cdot>x) = x"
   180   shows "abs\<cdot>(rep\<cdot>x) = x"
   181 unfolding abs_def rep_def by (simp add: REP [symmetric])
   181 unfolding abs_def rep_def by (simp add: REP [symmetric])
   182 
   182 
   183 lemma deflation_abs_rep:
   183 lemma deflation_abs_rep:
   184   fixes abs and rep and d
   184   fixes abs and rep and d
   185   assumes REP: "REP('b) = REP('a)"
   185   assumes abs_iso: "\<And>x. rep\<cdot>(abs\<cdot>x) = x"
   186   assumes abs_def: "abs \<equiv> (coerce :: 'a \<rightarrow> 'b)"
   186   assumes rep_iso: "\<And>y. abs\<cdot>(rep\<cdot>y) = y"
   187   assumes rep_def: "rep \<equiv> (coerce :: 'b \<rightarrow> 'a)"
       
   188   shows "deflation d \<Longrightarrow> deflation (abs oo d oo rep)"
   187   shows "deflation d \<Longrightarrow> deflation (abs oo d oo rep)"
   189 unfolding abs_def rep_def 
   188 by (rule ep_pair.deflation_e_d_p) (simp add: ep_pair.intro assms)
   190 apply (rule ep_pair.deflation_e_d_p)
       
   191 apply (rule ep_pair_coerce, simp add: REP)
       
   192 apply assumption
       
   193 done
       
   194 
   189 
   195 
   190 
   196 subsection {* Proving a subtype is representable *}
   191 subsection {* Proving a subtype is representable *}
   197 
   192 
   198 text {*
   193 text {*