3 Author: Franz Regensburger
4 Copyright 1993 Technische Universitaet Muenchen
11 (* for compatibility with old HOLCF-Version *)
12 qed_goal "inst_up_po" thy "(op <<)=(%x1 x2. case Rep_Up(x1) of \
14 \ | Inr(y2) => (case Rep_Up(x2) of Inl(z1) => False \
15 \ | Inr(z2) => y2<<z2))"
18 (fold_goals_tac [less_up_def]),
22 (* -------------------------------------------------------------------------*)
23 (* type ('a)u is pointed *)
24 (* ------------------------------------------------------------------------ *)
26 qed_goal "minimal_up" thy "Abs_Up(Inl ()) << z"
29 (simp_tac (simpset() addsimps [less_up1a]) 1)
32 bind_thm ("UU_up_def",minimal_up RS minimal2UU RS sym);
34 qed_goal "least_up" thy "? x::'a u.!y. x<<y"
37 (res_inst_tac [("x","Abs_Up(Inl ())")] exI 1),
38 (rtac (minimal_up RS allI) 1)
41 (* -------------------------------------------------------------------------*)
42 (* access to less_up in class po *)
43 (* ------------------------------------------------------------------------ *)
45 qed_goal "less_up2b" thy "~ Iup(x) << Abs_Up(Inl ())"
48 (simp_tac (simpset() addsimps [less_up1b]) 1)
51 qed_goal "less_up2c" thy "(Iup(x)<<Iup(y)) = (x<<y)"
54 (simp_tac (simpset() addsimps [less_up1c]) 1)
57 (* ------------------------------------------------------------------------ *)
58 (* Iup and Ifup are monotone *)
59 (* ------------------------------------------------------------------------ *)
61 qed_goalw "monofun_Iup" thy [monofun] "monofun(Iup)"
65 (etac (less_up2c RS iffD2) 1)
68 qed_goalw "monofun_Ifup1" thy [monofun] "monofun(Ifup)"
72 (rtac (less_fun RS iffD2) 1),
74 (res_inst_tac [("p","xa")] upE 1),
75 (asm_simp_tac Up0_ss 1),
76 (asm_simp_tac Up0_ss 1),
77 (etac monofun_cfun_fun 1)
80 qed_goalw "monofun_Ifup2" thy [monofun] "monofun(Ifup(f))"
84 (res_inst_tac [("p","x")] upE 1),
85 (asm_simp_tac Up0_ss 1),
86 (asm_simp_tac Up0_ss 1),
87 (res_inst_tac [("p","y")] upE 1),
92 (asm_simp_tac Up0_ss 1),
93 (rtac monofun_cfun_arg 1),
95 (etac (less_up2c RS iffD1) 1)
98 (* ------------------------------------------------------------------------ *)
99 (* Some kind of surjectivity lemma *)
100 (* ------------------------------------------------------------------------ *)
102 qed_goal "up_lemma1" thy "z=Iup(x) ==> Iup(Ifup(LAM x. x)(z)) = z"
105 (cut_facts_tac prems 1),
106 (asm_simp_tac Up0_ss 1)
109 (* ------------------------------------------------------------------------ *)
111 (* ------------------------------------------------------------------------ *)
113 qed_goal "lub_up1a" thy
114 "[|chain(Y);? i x. Y(i)=Iup(x)|] ==>\
115 \ range(Y) <<| Iup(lub(range(%i.(Ifup (LAM x. x) (Y(i))))))"
118 (cut_facts_tac prems 1),
123 (res_inst_tac [("p","Y(i)")] upE 1),
124 (res_inst_tac [("s","Abs_Up (Inl ())"),("t","Y(i)")] subst 1),
127 (res_inst_tac [("t","Y(i)")] (up_lemma1 RS subst) 1),
129 (rtac (less_up2c RS iffD2) 1),
130 (rtac is_ub_thelub 1),
131 (etac (monofun_Ifup2 RS ch2ch_monofun) 1),
133 (res_inst_tac [("p","u")] upE 1),
136 (res_inst_tac [("P","Y(i)<<Abs_Up (Inl ())")] notE 1),
137 (res_inst_tac [("s","Iup(x)"),("t","Y(i)")] ssubst 1),
141 (etac (ub_rangeE RS spec) 1),
142 (res_inst_tac [("t","u")] (up_lemma1 RS subst) 1),
144 (rtac (less_up2c RS iffD2) 1),
145 (rtac is_lub_thelub 1),
146 (etac (monofun_Ifup2 RS ch2ch_monofun) 1),
147 (etac (monofun_Ifup2 RS ub2ub_monofun) 1)
150 qed_goal "lub_up1b" thy
151 "[|chain(Y);!i x. Y(i)~=Iup(x)|] ==>\
152 \ range(Y) <<| Abs_Up (Inl ())"
155 (cut_facts_tac prems 1),
160 (res_inst_tac [("p","Y(i)")] upE 1),
161 (res_inst_tac [("s","Abs_Up (Inl ())"),("t","Y(i)")] ssubst 1),
173 bind_thm ("thelub_up1a", lub_up1a RS thelubI);
175 [| chain ?Y1; ? i x. ?Y1 i = Iup x |] ==>
176 lub (range ?Y1) = Iup (lub (range (%i. Iup (LAM x. x) (?Y1 i))))
179 bind_thm ("thelub_up1b", lub_up1b RS thelubI);
181 [| chain ?Y1; ! i x. ?Y1 i ~= Iup x |] ==>
182 lub (range ?Y1) = UU_up
185 qed_goal "cpo_up" thy
186 "chain(Y::nat=>('a)u) ==> ? x. range(Y) <<|x"
189 (cut_facts_tac prems 1),