# HG changeset patch # User huffman # Date 1199291179 -3600 # Node ID ae71b21de8fbf597aa32d624f8241d8d823ec219 # Parent cf633e94545570a48987004b655e92827f2ff7bd add lemma dir2dir_monofun diff -r cf633e945455 -r ae71b21de8fb src/HOLCF/Cont.thy --- a/src/HOLCF/Cont.thy Wed Jan 02 16:44:58 2008 +0100 +++ b/src/HOLCF/Cont.thy Wed Jan 02 17:26:19 2008 +0100 @@ -89,6 +89,29 @@ apply (erule ub_rangeD) done +text {* monotone functions map directed sets to directed sets *} + +lemma dir2dir_monofun: + assumes f: "monofun f" + assumes S: "directed S" + shows "directed (f ` S)" +proof (rule directedI) + from directedD1 [OF S] + obtain x where "x \ S" .. + hence "f x \ f ` S" by simp + thus "\x. x \ f ` S" .. +next + fix x assume "x \ f ` S" + then obtain a where x: "x = f a" and a: "a \ S" .. + fix y assume "y \ f ` S" + then obtain b where y: "y = f b" and b: "b \ S" .. + from directedD2 [OF S a b] + obtain c where "c \ S" and "a \ c \ b \ c" .. + hence "f c \ f ` S" and "x \ f c \ y \ f c" + using monofunE [OF f] x y by simp_all + thus "\z\f ` S. x \ z \ y \ z" .. +qed + text {* left to right: @{prop "monofun f \ contlub f \ cont f"} *} lemma monocontlub2cont: "\monofun f; contlub f\ \ cont f"