src/HOL/HOLCF/Library/Defl_Bifinite.thy
changeset 41292 2b7bc8d9fd6e
parent 41290 e9c9577d88b5
child 41394 51c866d1b53b
equal deleted inserted replaced
41291:752d81c2ce25 41292:2b7bc8d9fd6e
   635 apply (rule bifinite_approx_chain.defl_approx)
   635 apply (rule bifinite_approx_chain.defl_approx)
   636 apply (unfold bifinite_approx_chain_def)
   636 apply (unfold bifinite_approx_chain_def)
   637 apply (rule someI_ex [OF bifinite])
   637 apply (rule someI_ex [OF bifinite])
   638 done
   638 done
   639 
   639 
   640 instantiation defl :: (bifinite) liftdomain
   640 instantiation defl :: (bifinite) "domain"
   641 begin
   641 begin
   642 
   642 
   643 definition
   643 definition
   644   "emb = udom_emb defl_approx"
   644   "emb = udom_emb defl_approx"
   645 
   645 
   649 definition
   649 definition
   650   "defl (t::'a defl itself) =
   650   "defl (t::'a defl itself) =
   651     (\<Squnion>i. defl_principal (Abs_fin_defl (emb oo defl_approx i oo prj)))"
   651     (\<Squnion>i. defl_principal (Abs_fin_defl (emb oo defl_approx i oo prj)))"
   652 
   652 
   653 definition
   653 definition
   654   "(liftemb :: 'a defl u \<rightarrow> udom) = u_emb oo u_map\<cdot>emb"
   654   "(liftemb :: 'a defl u \<rightarrow> udom u) = u_map\<cdot>emb"
   655 
   655 
   656 definition
   656 definition
   657   "(liftprj :: udom \<rightarrow> 'a defl u) = u_map\<cdot>prj oo u_prj"
   657   "(liftprj :: udom u \<rightarrow> 'a defl u) = u_map\<cdot>prj"
   658 
   658 
   659 definition
   659 definition
   660   "liftdefl (t::'a defl itself) = u_defl\<cdot>DEFL('a defl)"
   660   "liftdefl (t::'a defl itself) = pdefl\<cdot>DEFL('a defl)"
   661 
   661 
   662 instance
   662 instance proof
   663 using liftemb_defl_def liftprj_defl_def liftdefl_defl_def
       
   664 proof (rule liftdomain_class_intro)
       
   665   show ep: "ep_pair emb (prj :: udom \<rightarrow> 'a defl)"
   663   show ep: "ep_pair emb (prj :: udom \<rightarrow> 'a defl)"
   666     unfolding emb_defl_def prj_defl_def
   664     unfolding emb_defl_def prj_defl_def
   667     by (rule ep_pair_udom [OF defl_approx])
   665     by (rule ep_pair_udom [OF defl_approx])
   668   show "cast\<cdot>DEFL('a defl) = emb oo (prj :: udom \<rightarrow> 'a defl)"
   666   show "cast\<cdot>DEFL('a defl) = emb oo (prj :: udom \<rightarrow> 'a defl)"
   669     unfolding defl_defl_def
   667     unfolding defl_defl_def
   680     apply (simp add: Abs_fin_defl_inverse approx_chain.finite_deflation_approx [OF defl_approx]
   678     apply (simp add: Abs_fin_defl_inverse approx_chain.finite_deflation_approx [OF defl_approx]
   681                      ep_pair.finite_deflation_e_d_p [OF ep])
   679                      ep_pair.finite_deflation_e_d_p [OF ep])
   682     apply (simp add: lub_distribs approx_chain.chain_approx [OF defl_approx]
   680     apply (simp add: lub_distribs approx_chain.chain_approx [OF defl_approx]
   683                      approx_chain.lub_approx [OF defl_approx])
   681                      approx_chain.lub_approx [OF defl_approx])
   684     done
   682     done
   685 qed
   683 qed (fact liftemb_defl_def liftprj_defl_def liftdefl_defl_def)+
   686 
   684 
   687 end
   685 end
   688 
   686 
   689 end
   687 end