author | wenzelm |
Tue, 04 Nov 1997 16:57:52 +0100 | |
changeset 4128 | 42584a53a3e7 |
parent 4098 | 71e05eb27fb6 |
child 4721 | c8a8482a8124 |
permissions | -rw-r--r-- |
1461 | 1 |
(* Title: HOLCF/fun2.ML |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
2 |
ID: $Id$ |
1461 | 3 |
Author: Franz Regensburger |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
4 |
Copyright 1993 Technische Universitaet Muenchen |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
5 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
6 |
Lemmas for fun2.thy |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
7 |
*) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
8 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
9 |
open Fun2; |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
10 |
|
2640 | 11 |
(* for compatibility with old HOLCF-Version *) |
3842 | 12 |
qed_goal "inst_fun_po" thy "(op <<)=(%f g.!x. f x << g x)" |
2640 | 13 |
(fn prems => |
14 |
[ |
|
3323
194ae2e0c193
eliminated the constant less by the introduction of the axclass sq_ord
slotosch
parents:
2838
diff
changeset
|
15 |
(fold_goals_tac [less_fun_def]), |
2640 | 16 |
(rtac refl 1) |
17 |
]); |
|
18 |
||
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
19 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
20 |
(* Type 'a::term => 'b::pcpo is pointed *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
21 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
22 |
|
3842 | 23 |
qed_goal "minimal_fun" thy "(%z. UU) << x" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
24 |
(fn prems => |
1461 | 25 |
[ |
4098 | 26 |
(simp_tac (simpset() addsimps [inst_fun_po,minimal]) 1) |
2640 | 27 |
]); |
28 |
||
29 |
bind_thm ("UU_fun_def",minimal_fun RS minimal2UU RS sym); |
|
30 |
||
3842 | 31 |
qed_goal "least_fun" thy "? x::'a=>'b::pcpo.!y. x<<y" |
2640 | 32 |
(fn prems => |
33 |
[ |
|
3842 | 34 |
(res_inst_tac [("x","(%z. UU)")] exI 1), |
2640 | 35 |
(rtac (minimal_fun RS allI) 1) |
1461 | 36 |
]); |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
37 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
38 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
39 |
(* make the symbol << accessible for type fun *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
40 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
41 |
|
2640 | 42 |
qed_goal "less_fun" thy "(f1 << f2) = (! x. f1(x) << f2(x))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
43 |
(fn prems => |
1461 | 44 |
[ |
2033 | 45 |
(stac inst_fun_po 1), |
1461 | 46 |
(fold_goals_tac [less_fun_def]), |
47 |
(rtac refl 1) |
|
48 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
49 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
50 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
51 |
(* chains of functions yield chains in the po range *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
52 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
53 |
|
2640 | 54 |
qed_goal "ch2ch_fun" thy |
3842 | 55 |
"is_chain(S::nat=>('a=>'b::po)) ==> is_chain(% i. S(i)(x))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
56 |
(fn prems => |
1461 | 57 |
[ |
58 |
(cut_facts_tac prems 1), |
|
59 |
(rewtac is_chain), |
|
60 |
(rtac allI 1), |
|
61 |
(rtac spec 1), |
|
62 |
(rtac (less_fun RS subst) 1), |
|
63 |
(etac allE 1), |
|
64 |
(atac 1) |
|
65 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
66 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
67 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
68 |
(* upper bounds of function chains yield upper bound in the po range *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
69 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
70 |
|
892 | 71 |
qed_goal "ub2ub_fun" Fun2.thy |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
72 |
" range(S::nat=>('a::term => 'b::po)) <| u ==> range(%i. S i x) <| u(x)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
73 |
(fn prems => |
1461 | 74 |
[ |
75 |
(cut_facts_tac prems 1), |
|
76 |
(rtac ub_rangeI 1), |
|
77 |
(rtac allI 1), |
|
78 |
(rtac allE 1), |
|
79 |
(rtac (less_fun RS subst) 1), |
|
80 |
(etac (ub_rangeE RS spec) 1), |
|
81 |
(atac 1) |
|
82 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
83 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
84 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
85 |
(* Type 'a::term => 'b::pcpo is chain complete *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
86 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
87 |
|
892 | 88 |
qed_goal "lub_fun" Fun2.thy |
2838
2e908f29bc3d
changed continuous functions from pcpo to cpo (including instances)
slotosch
parents:
2640
diff
changeset
|
89 |
"is_chain(S::nat=>('a::term => 'b::cpo)) ==> \ |
3842 | 90 |
\ range(S) <<| (% x. lub(range(% i. S(i)(x))))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
91 |
(fn prems => |
1461 | 92 |
[ |
93 |
(cut_facts_tac prems 1), |
|
94 |
(rtac is_lubI 1), |
|
95 |
(rtac conjI 1), |
|
96 |
(rtac ub_rangeI 1), |
|
97 |
(rtac allI 1), |
|
2033 | 98 |
(stac less_fun 1), |
1461 | 99 |
(rtac allI 1), |
100 |
(rtac is_ub_thelub 1), |
|
101 |
(etac ch2ch_fun 1), |
|
102 |
(strip_tac 1), |
|
2033 | 103 |
(stac less_fun 1), |
1461 | 104 |
(rtac allI 1), |
105 |
(rtac is_lub_thelub 1), |
|
106 |
(etac ch2ch_fun 1), |
|
107 |
(etac ub2ub_fun 1) |
|
108 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
109 |
|
1779 | 110 |
bind_thm ("thelub_fun", lub_fun RS thelubI); |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
111 |
(* is_chain ?S1 ==> lub (range ?S1) = (%x. lub (range (%i. ?S1 i x))) *) |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
112 |
|
892 | 113 |
qed_goal "cpo_fun" Fun2.thy |
2838
2e908f29bc3d
changed continuous functions from pcpo to cpo (including instances)
slotosch
parents:
2640
diff
changeset
|
114 |
"is_chain(S::nat=>('a::term => 'b::cpo)) ==> ? x. range(S) <<| x" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
115 |
(fn prems => |
1461 | 116 |
[ |
117 |
(cut_facts_tac prems 1), |
|
118 |
(rtac exI 1), |
|
119 |
(etac lub_fun 1) |
|
120 |
]); |