author | paulson |
Wed, 16 Jan 2002 17:53:22 +0100 | |
changeset 12777 | 70b2651af635 |
parent 12338 | de0f4a63baa5 |
child 14981 | e73f8140af78 |
permissions | -rw-r--r-- |
9245 | 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 |
12030 | 4 |
License: GPL (GNU GENERAL PUBLIC LICENSE) |
243
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 |
|
2640 | 7 |
(* for compatibility with old HOLCF-Version *) |
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
8 |
Goal "(op <<)=(%f g.!x. f x << g x)"; |
9245 | 9 |
by (fold_goals_tac [less_fun_def]); |
10 |
by (rtac refl 1); |
|
11 |
qed "inst_fun_po"; |
|
2640 | 12 |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
13 |
(* ------------------------------------------------------------------------ *) |
12338
de0f4a63baa5
renamed class "term" to "type" (actually "HOL.type");
wenzelm
parents:
12030
diff
changeset
|
14 |
(* Type 'a::type => 'b::pcpo is pointed *) |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
15 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
16 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
17 |
Goal "(%z. UU) << x"; |
9245 | 18 |
by (simp_tac (simpset() addsimps [inst_fun_po,minimal]) 1); |
19 |
qed "minimal_fun"; |
|
2640 | 20 |
|
21 |
bind_thm ("UU_fun_def",minimal_fun RS minimal2UU RS sym); |
|
22 |
||
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
23 |
Goal "? x::'a=>'b::pcpo.!y. x<<y"; |
9245 | 24 |
by (res_inst_tac [("x","(%z. UU)")] exI 1); |
25 |
by (rtac (minimal_fun RS allI) 1); |
|
26 |
qed "least_fun"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
27 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
28 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
29 |
(* make the symbol << accessible for type fun *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
30 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
31 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
32 |
Goal "(f1 << f2) = (! x. f1(x) << f2(x))"; |
9245 | 33 |
by (stac inst_fun_po 1); |
34 |
by (rtac refl 1); |
|
35 |
qed "less_fun"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
36 |
|
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 |
(* 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
|
39 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
40 |
|
11346 | 41 |
Goalw [chain_def] "chain (S::nat=>('a=>'b::po)) ==> chain (%i. S i x)"; |
9245 | 42 |
by (asm_full_simp_tac (simpset() addsimps [less_fun]) 1); |
43 |
qed "ch2ch_fun"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
44 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
45 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
46 |
(* 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
|
47 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
48 |
|
12338
de0f4a63baa5
renamed class "term" to "type" (actually "HOL.type");
wenzelm
parents:
12030
diff
changeset
|
49 |
Goal "range(S::nat=>('a::type => 'b::po)) <| u ==> range(%i. S i x) <| u(x)"; |
9245 | 50 |
by (rtac ub_rangeI 1); |
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
51 |
by (dtac ub_rangeD 1); |
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
52 |
by (asm_full_simp_tac (simpset() addsimps [less_fun]) 1); |
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
53 |
by Auto_tac; |
9245 | 54 |
qed "ub2ub_fun"; |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
55 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
56 |
(* ------------------------------------------------------------------------ *) |
12338
de0f4a63baa5
renamed class "term" to "type" (actually "HOL.type");
wenzelm
parents:
12030
diff
changeset
|
57 |
(* Type 'a::type => 'b::pcpo is chain complete *) |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
58 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
59 |
|
12338
de0f4a63baa5
renamed class "term" to "type" (actually "HOL.type");
wenzelm
parents:
12030
diff
changeset
|
60 |
Goal "chain(S::nat=>('a::type => 'b::cpo)) ==> \ |
9245 | 61 |
\ range(S) <<| (% x. lub(range(% i. S(i)(x))))"; |
62 |
by (rtac is_lubI 1); |
|
63 |
by (rtac ub_rangeI 1); |
|
64 |
by (stac less_fun 1); |
|
65 |
by (rtac allI 1); |
|
66 |
by (rtac is_ub_thelub 1); |
|
67 |
by (etac ch2ch_fun 1); |
|
68 |
by (strip_tac 1); |
|
69 |
by (stac less_fun 1); |
|
70 |
by (rtac allI 1); |
|
71 |
by (rtac is_lub_thelub 1); |
|
72 |
by (etac ch2ch_fun 1); |
|
73 |
by (etac ub2ub_fun 1); |
|
74 |
qed "lub_fun"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
75 |
|
1779 | 76 |
bind_thm ("thelub_fun", lub_fun RS thelubI); |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
77 |
(* 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
|
78 |
|
12338
de0f4a63baa5
renamed class "term" to "type" (actually "HOL.type");
wenzelm
parents:
12030
diff
changeset
|
79 |
Goal "chain(S::nat=>('a::type => 'b::cpo)) ==> ? x. range(S) <<| x"; |
9245 | 80 |
by (rtac exI 1); |
81 |
by (etac lub_fun 1); |
|
82 |
qed "cpo_fun"; |