src/HOLCF/Lift.thy
changeset 25131 2c8caac48ade
parent 19764 372065f34795
child 25701 73fbe868b4e7
equal deleted inserted replaced
25130:d91391a8705b 25131:2c8caac48ade
    14 pcpodef 'a lift = "UNIV :: 'a discr u set"
    14 pcpodef 'a lift = "UNIV :: 'a discr u set"
    15 by simp
    15 by simp
    16 
    16 
    17 lemmas inst_lift_pcpo = Abs_lift_strict [symmetric]
    17 lemmas inst_lift_pcpo = Abs_lift_strict [symmetric]
    18 
    18 
    19 constdefs
    19 definition
    20   Def :: "'a \<Rightarrow> 'a lift"
    20   Def :: "'a \<Rightarrow> 'a lift" where
    21   "Def x \<equiv> Abs_lift (up\<cdot>(Discr x))"
    21   "Def x = Abs_lift (up\<cdot>(Discr x))"
    22 
    22 
    23 subsection {* Lift as a datatype *}
    23 subsection {* Lift as a datatype *}
    24 
    24 
    25 lemma lift_distinct1: "\<bottom> \<noteq> Def x"
    25 lemma lift_distinct1: "\<bottom> \<noteq> Def x"
    26 by (simp add: Def_def Abs_lift_inject lift_def inst_lift_pcpo)
    26 by (simp add: Def_def Abs_lift_inject lift_def inst_lift_pcpo)
   108 lemma cont_Rep_CFun_app_app: "\<lbrakk>cont g; cont f\<rbrakk> \<Longrightarrow> cont(\<lambda>x. ((f x)\<cdot>(g x)) s t)"
   108 lemma cont_Rep_CFun_app_app: "\<lbrakk>cont g; cont f\<rbrakk> \<Longrightarrow> cont(\<lambda>x. ((f x)\<cdot>(g x)) s t)"
   109 by (rule cont_Rep_CFun_app [THEN cont2cont_fun])
   109 by (rule cont_Rep_CFun_app [THEN cont2cont_fun])
   110 
   110 
   111 subsection {* Further operations *}
   111 subsection {* Further operations *}
   112 
   112 
   113 constdefs
   113 definition
   114   flift1 :: "('a \<Rightarrow> 'b::pcpo) \<Rightarrow> ('a lift \<rightarrow> 'b)" (binder "FLIFT " 10)
   114   flift1 :: "('a \<Rightarrow> 'b::pcpo) \<Rightarrow> ('a lift \<rightarrow> 'b)"  (binder "FLIFT " 10)  where
   115   "flift1 \<equiv> \<lambda>f. (\<Lambda> x. lift_case \<bottom> f x)"
   115   "flift1 = (\<lambda>f. (\<Lambda> x. lift_case \<bottom> f x))"
   116 
   116 
   117   flift2 :: "('a \<Rightarrow> 'b) \<Rightarrow> ('a lift \<rightarrow> 'b lift)"
   117 definition
   118   "flift2 f \<equiv> FLIFT x. Def (f x)"
   118   flift2 :: "('a \<Rightarrow> 'b) \<Rightarrow> ('a lift \<rightarrow> 'b lift)" where
   119 
   119   "flift2 f = (FLIFT x. Def (f x))"
   120   liftpair :: "'a lift \<times> 'b lift \<Rightarrow> ('a \<times> 'b) lift"
   120 
   121   "liftpair x \<equiv> csplit\<cdot>(FLIFT x y. Def (x, y))\<cdot>x"
   121 definition
       
   122   liftpair :: "'a lift \<times> 'b lift \<Rightarrow> ('a \<times> 'b) lift" where
       
   123   "liftpair x = csplit\<cdot>(FLIFT x y. Def (x, y))\<cdot>x"
   122 
   124 
   123 subsection {* Continuity Proofs for flift1, flift2 *}
   125 subsection {* Continuity Proofs for flift1, flift2 *}
   124 
   126 
   125 text {* Need the instance of @{text flat}. *}
   127 text {* Need the instance of @{text flat}. *}
   126 
   128