src/HOLCF/Ffun.thy
changeset 26452 ed657432b8b9
parent 26028 74668c3a8f70
child 27413 3154f3765cc7
equal deleted inserted replaced
26451:f8a615f3bb31 26452:ed657432b8b9
   238 apply (simp add: thelub_fun ch2ch_cont)
   238 apply (simp add: thelub_fun ch2ch_cont)
   239 done
   239 done
   240 
   240 
   241 text {* Note @{text "(\<lambda>x. \<lambda>y. f x y) = f"} *}
   241 text {* Note @{text "(\<lambda>x. \<lambda>y. f x y) = f"} *}
   242 
   242 
   243 lemma mono2mono_lambda: "(\<And>y. monofun (\<lambda>x. f x y)) \<Longrightarrow> monofun f"
   243 lemma mono2mono_lambda:
       
   244   assumes f: "\<And>y. monofun (\<lambda>x. f x y)" shows "monofun f"
   244 apply (rule monofunI)
   245 apply (rule monofunI)
   245 apply (rule less_fun_ext)
   246 apply (rule less_fun_ext)
   246 apply (blast dest: monofunE)
   247 apply (erule monofunE [OF f])
   247 done
   248 done
   248 
   249 
   249 lemma cont2cont_lambda: "(\<And>y. cont (\<lambda>x. f x y)) \<Longrightarrow> cont f"
   250 lemma cont2cont_lambda [simp]:
       
   251   assumes f: "\<And>y. cont (\<lambda>x. f x y)" shows "cont f"
   250 apply (subgoal_tac "monofun f")
   252 apply (subgoal_tac "monofun f")
   251 apply (rule monocontlub2cont)
   253 apply (rule monocontlub2cont)
   252 apply assumption
   254 apply assumption
   253 apply (rule contlubI)
   255 apply (rule contlubI)
   254 apply (rule ext)
   256 apply (rule ext)
   255 apply (simp add: thelub_fun ch2ch_monofun)
   257 apply (simp add: thelub_fun ch2ch_monofun)
   256 apply (blast dest: cont2contlubE)
   258 apply (erule cont2contlubE [OF f])
   257 apply (simp add: mono2mono_lambda cont2mono)
   259 apply (simp add: mono2mono_lambda cont2mono f)
   258 done
   260 done
   259 
   261 
   260 text {* What D.A.Schmidt calls continuity of abstraction; never used here *}
   262 text {* What D.A.Schmidt calls continuity of abstraction; never used here *}
   261 
   263 
   262 lemma contlub_lambda:
   264 lemma contlub_lambda:
   266 
   268 
   267 lemma contlub_abstraction:
   269 lemma contlub_abstraction:
   268   "\<lbrakk>chain Y; \<forall>y. cont (\<lambda>x.(c::'a::cpo\<Rightarrow>'b::type\<Rightarrow>'c::cpo) x y)\<rbrakk> \<Longrightarrow>
   270   "\<lbrakk>chain Y; \<forall>y. cont (\<lambda>x.(c::'a::cpo\<Rightarrow>'b::type\<Rightarrow>'c::cpo) x y)\<rbrakk> \<Longrightarrow>
   269     (\<lambda>y. \<Squnion>i. c (Y i) y) = (\<Squnion>i. (\<lambda>y. c (Y i) y))"
   271     (\<lambda>y. \<Squnion>i. c (Y i) y) = (\<Squnion>i. (\<lambda>y. c (Y i) y))"
   270 apply (rule thelub_fun [symmetric])
   272 apply (rule thelub_fun [symmetric])
   271 apply (rule ch2ch_cont)
   273 apply (simp add: ch2ch_cont)
   272 apply (simp add: cont2cont_lambda)
       
   273 apply assumption
       
   274 done
   274 done
   275 
   275 
   276 lemma mono2mono_app:
   276 lemma mono2mono_app:
   277   "\<lbrakk>monofun f; \<forall>x. monofun (f x); monofun t\<rbrakk> \<Longrightarrow> monofun (\<lambda>x. (f x) (t x))"
   277   "\<lbrakk>monofun f; \<forall>x. monofun (f x); monofun t\<rbrakk> \<Longrightarrow> monofun (\<lambda>x. (f x) (t x))"
   278 apply (rule monofunI)
   278 apply (rule monofunI)