equal
deleted
inserted
replaced
7 *) |
7 *) |
8 |
8 |
9 open Lift2; |
9 open Lift2; |
10 |
10 |
11 (* for compatibility with old HOLCF-Version *) |
11 (* for compatibility with old HOLCF-Version *) |
12 qed_goal "inst_lift_po" thy "(op <<)=(%x y.x=y|x=Undef)" |
12 qed_goal "inst_lift_po" thy "(op <<)=(%x y. x=y|x=Undef)" |
13 (fn prems => |
13 (fn prems => |
14 [ |
14 [ |
15 (fold_goals_tac [less_lift_def]), |
15 (fold_goals_tac [less_lift_def]), |
16 (rtac refl 1) |
16 (rtac refl 1) |
17 ]); |
17 ]); |
24 by (simp_tac (!simpset addsimps [inst_lift_po]) 1); |
24 by (simp_tac (!simpset addsimps [inst_lift_po]) 1); |
25 qed"minimal_lift"; |
25 qed"minimal_lift"; |
26 |
26 |
27 bind_thm ("UU_lift_def",minimal_lift RS minimal2UU RS sym); |
27 bind_thm ("UU_lift_def",minimal_lift RS minimal2UU RS sym); |
28 |
28 |
29 qed_goal "least_lift" thy "? x::'a lift.!y.x<<y" |
29 qed_goal "least_lift" thy "? x::'a lift.!y. x<<y" |
30 (fn prems => |
30 (fn prems => |
31 [ |
31 [ |
32 (res_inst_tac [("x","Undef")] exI 1), |
32 (res_inst_tac [("x","Undef")] exI 1), |
33 (rtac (minimal_lift RS allI) 1) |
33 (rtac (minimal_lift RS allI) 1) |
34 ]); |
34 ]); |
55 |
55 |
56 (* Tailoring chain_mono2 of Pcpo.ML to Undef *) |
56 (* Tailoring chain_mono2 of Pcpo.ML to Undef *) |
57 |
57 |
58 goal Lift2.thy |
58 goal Lift2.thy |
59 "!!Y. [|? j.~Y(j)=Undef;is_chain(Y::nat=>('a)lift)|] \ |
59 "!!Y. [|? j.~Y(j)=Undef;is_chain(Y::nat=>('a)lift)|] \ |
60 \ ==> ? j.!i.j<i-->~Y(i)=Undef"; |
60 \ ==> ? j.!i. j<i-->~Y(i)=Undef"; |
61 by Safe_tac; |
61 by Safe_tac; |
62 by (Step_tac 1); |
62 by (Step_tac 1); |
63 by (strip_tac 1); |
63 by (strip_tac 1); |
64 by (rtac notUndef_I 1); |
64 by (rtac notUndef_I 1); |
65 by (atac 2); |
65 by (atac 2); |
72 |
72 |
73 goal Lift2.thy |
73 goal Lift2.thy |
74 "(! Y. is_chain(Y::nat=>('a)lift)-->(? n. max_in_chain n Y))"; |
74 "(! Y. is_chain(Y::nat=>('a)lift)-->(? n. max_in_chain n Y))"; |
75 by (rewtac max_in_chain_def); |
75 by (rewtac max_in_chain_def); |
76 by (strip_tac 1); |
76 by (strip_tac 1); |
77 by (res_inst_tac [("P","!i.Y(i)=Undef")] case_split_thm 1); |
77 by (res_inst_tac [("P","!i. Y(i)=Undef")] case_split_thm 1); |
78 by (res_inst_tac [("x","0")] exI 1); |
78 by (res_inst_tac [("x","0")] exI 1); |
79 by (strip_tac 1); |
79 by (strip_tac 1); |
80 by (rtac trans 1); |
80 by (rtac trans 1); |
81 by (etac spec 1); |
81 by (etac spec 1); |
82 by (rtac sym 1); |
82 by (rtac sym 1); |
83 by (etac spec 1); |
83 by (etac spec 1); |
84 |
84 |
85 by (subgoal_tac "!x y.x<<(y::('a)lift) --> x=Undef | x=y" 1); |
85 by (subgoal_tac "!x y. x<<(y::('a)lift) --> x=Undef | x=y" 1); |
86 by (simp_tac (!simpset addsimps [inst_lift_po]) 2); |
86 by (simp_tac (!simpset addsimps [inst_lift_po]) 2); |
87 by (rtac (chain_mono2_po RS exE) 1); |
87 by (rtac (chain_mono2_po RS exE) 1); |
88 by (Fast_tac 1); |
88 by (Fast_tac 1); |
89 by (atac 1); |
89 by (atac 1); |
90 by (res_inst_tac [("x","Suc(x)")] exI 1); |
90 by (res_inst_tac [("x","Suc(x)")] exI 1); |
108 |
108 |
109 |
109 |
110 (* Main Lemma: cpo_lift *) |
110 (* Main Lemma: cpo_lift *) |
111 |
111 |
112 goal Lift2.thy |
112 goal Lift2.thy |
113 "!!Y. is_chain(Y::nat=>('a)lift) ==> ? x.range(Y) <<|x"; |
113 "!!Y. is_chain(Y::nat=>('a)lift) ==> ? x. range(Y) <<|x"; |
114 by (cut_inst_tac [] flat_imp_chain_finite_poo 1); |
114 by (cut_inst_tac [] flat_imp_chain_finite_poo 1); |
115 by (Step_tac 1); |
115 by (Step_tac 1); |
116 by Safe_tac; |
116 by Safe_tac; |
117 by (Step_tac 1); |
117 by (Step_tac 1); |
118 by (rtac exI 1); |
118 by (rtac exI 1); |