894
|
1 |
(* Elegant proof for continuity of fixed-point operator *)
|
|
2 |
(* Loeckx & Sieber S.88 *)
|
|
3 |
|
|
4 |
val prems = goalw Fix.thy [Ifix_def]
|
|
5 |
"Ifix(F)=lub(range(%i.%G.iterate(i,G,UU)))(F)";
|
|
6 |
by (rtac (thelub_fun RS ssubst) 1);
|
|
7 |
by (rtac ch2ch_fun 1);
|
|
8 |
back();
|
|
9 |
by (rtac refl 2);
|
|
10 |
by (rtac is_chainI 1);
|
|
11 |
by (strip_tac 1);
|
|
12 |
by (rtac (less_fun RS iffD2) 1);
|
|
13 |
by (strip_tac 1);
|
|
14 |
by (rtac (less_fun RS iffD2) 1);
|
|
15 |
by (strip_tac 1);
|
|
16 |
by (rtac (is_chain_iterate RS is_chainE RS spec) 1);
|
|
17 |
val loeckx_sieber = result();
|
|
18 |
|
|
19 |
(*
|
|
20 |
|
|
21 |
Idea: %i.%G.iterate(i,G,UU)) is a chain of continuous functions and
|
|
22 |
Ifix is the lub of this chain. Hence Ifix is continuous.
|
|
23 |
|
|
24 |
----- The proof in HOLCF -----------------------
|
|
25 |
|
|
26 |
Since we already proved the theorem
|
|
27 |
|
|
28 |
val contX_lubcfun = prove_goal Cfun2.thy
|
|
29 |
"is_chain(F) ==> contX(% x.lub(range(% j.F(j)[x])))"
|
|
30 |
|
|
31 |
|
|
32 |
we suffices to prove:
|
|
33 |
|
|
34 |
Ifix = (%f.lub(range(%j.(LAM f. iterate(j, f, UU))[f])))
|
|
35 |
|
|
36 |
and
|
|
37 |
|
|
38 |
contX(%f.lub(range(%j.(LAM f. iterate(j, f, UU))[f])))
|
|
39 |
|
|
40 |
Note that if we use the term
|
|
41 |
|
|
42 |
%i.%G.iterate(i,G,UU)) instead of (%j.(LAM f. iterate(j, f, UU)))
|
|
43 |
|
|
44 |
we cannot use the theorem contX_lubcfun
|
|
45 |
|
|
46 |
*)
|
|
47 |
|
|
48 |
val prems = goal Fix.thy "contX(Ifix)";
|
|
49 |
by (res_inst_tac [("t","Ifix"),("s","(%f.lub(range(%j.(LAM f. iterate(j, f, UU))[f])))")] ssubst 1);
|
|
50 |
by (rtac ext 1);
|
|
51 |
by (rewrite_goals_tac [Ifix_def] );
|
|
52 |
by (subgoal_tac " range(% i.iterate(i, f, UU)) = range(%j.(LAM f. iterate(j, f, UU))[f])" 1);
|
|
53 |
by (etac arg_cong 1);
|
|
54 |
by (subgoal_tac " (% i.iterate(i, f, UU)) = (%j.(LAM f. iterate(j, f, UU))[f])" 1);
|
|
55 |
by (etac arg_cong 1);
|
|
56 |
by (rtac ext 1);
|
|
57 |
by (rtac (beta_cfun RS ssubst) 1);
|
|
58 |
by (rtac contX2contX_CF1L 1);
|
|
59 |
by (rtac contX_iterate 1);
|
|
60 |
by (rtac refl 1);
|
|
61 |
by (rtac contX_lubcfun 1);
|
|
62 |
by (rtac is_chainI 1);
|
|
63 |
by (strip_tac 1);
|
|
64 |
by (rtac less_cfun2 1);
|
|
65 |
by (rtac (beta_cfun RS ssubst) 1);
|
|
66 |
by (rtac contX2contX_CF1L 1);
|
|
67 |
by (rtac contX_iterate 1);
|
|
68 |
by (rtac (beta_cfun RS ssubst) 1);
|
|
69 |
by (rtac contX2contX_CF1L 1);
|
|
70 |
by (rtac contX_iterate 1);
|
|
71 |
by (rtac (is_chain_iterate RS is_chainE RS spec) 1);
|
|
72 |
val contX_Ifix2 = result();
|
|
73 |
|
|
74 |
(* the proof in little steps *)
|
|
75 |
|
|
76 |
val prems = goal Fix.thy
|
|
77 |
"(% i.iterate(i, f, UU)) = (%j.(LAM f. iterate(j, f, UU))[f])";
|
|
78 |
by (rtac ext 1);
|
|
79 |
by (rtac (beta_cfun RS ssubst) 1);
|
|
80 |
by (rtac contX2contX_CF1L 1);
|
|
81 |
by (rtac contX_iterate 1);
|
|
82 |
by (rtac refl 1);
|
|
83 |
val fix_lemma1 = result();
|
|
84 |
|
|
85 |
val prems = goal Fix.thy
|
|
86 |
" Ifix = (%f.lub(range(%j.(LAM f.iterate(j,f,UU))[f])))";
|
|
87 |
by (rtac ext 1);
|
|
88 |
by (rewrite_goals_tac [Ifix_def] );
|
|
89 |
by (rtac (fix_lemma1 RS ssubst) 1);
|
|
90 |
by (rtac refl 1);
|
|
91 |
val fix_lemma2 = result();
|
|
92 |
|
|
93 |
(*
|
|
94 |
- contX_lubcfun;
|
|
95 |
val it = "is_chain(?F) ==> contX(%x. lub(range(%j. ?F(j)[x])))" : thm
|
|
96 |
|
|
97 |
*)
|
|
98 |
|
|
99 |
val prems = goal Fix.thy "contX(Ifix)";
|
|
100 |
by (rtac ( fix_lemma2 RS ssubst) 1);
|
|
101 |
by (rtac contX_lubcfun 1);
|
|
102 |
by (rtac is_chainI 1);
|
|
103 |
by (strip_tac 1);
|
|
104 |
by (rtac less_cfun2 1);
|
|
105 |
by (rtac (beta_cfun RS ssubst) 1);
|
|
106 |
by (rtac contX2contX_CF1L 1);
|
|
107 |
by (rtac contX_iterate 1);
|
|
108 |
by (rtac (beta_cfun RS ssubst) 1);
|
|
109 |
by (rtac contX2contX_CF1L 1);
|
|
110 |
by (rtac contX_iterate 1);
|
|
111 |
by (rtac (is_chain_iterate RS is_chainE RS spec) 1);
|
|
112 |
val contX_Ifix2 = result();
|
|
113 |
|
|
114 |
|
|
115 |
|
|
116 |
|
|
117 |
|
|
118 |
|
|
119 |
|
|
120 |
|