author | oheimb |
Tue, 20 Feb 2001 18:47:29 +0100 | |
changeset 11166 | eca861fd1eb5 |
parent 9248 | e1dee89de037 |
child 12030 | 46d57d0290a2 |
permissions | -rw-r--r-- |
2640 | 1 |
(* Title: HOLCF/Sprod2.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 |
|
9245 | 6 |
Class Instance **::(pcpo,pcpo)po |
243
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 |
|
2640 | 9 |
(* for compatibility with old HOLCF-Version *) |
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
10 |
Goal "(op <<)=(%x y. Isfst x<<Isfst y&Issnd x<<Issnd y)"; |
9245 | 11 |
by (fold_goals_tac [less_sprod_def]); |
12 |
by (rtac refl 1); |
|
13 |
qed "inst_sprod_po"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
14 |
|
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 |
(* type sprod is pointed *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
17 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
18 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
19 |
Goal "Ispair UU UU << p"; |
9245 | 20 |
by (simp_tac(Sprod0_ss addsimps[inst_sprod_po,minimal])1); |
21 |
qed "minimal_sprod"; |
|
2640 | 22 |
|
23 |
bind_thm ("UU_sprod_def",minimal_sprod RS minimal2UU RS sym); |
|
24 |
||
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
25 |
Goal "? x::'a**'b.!y. x<<y"; |
9245 | 26 |
by (res_inst_tac [("x","Ispair UU UU")] exI 1); |
27 |
by (rtac (minimal_sprod RS allI) 1); |
|
28 |
qed "least_sprod"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
29 |
|
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 |
(* Ispair is monotone in both arguments *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
32 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
33 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
34 |
Goalw [monofun] "monofun(Ispair)"; |
9245 | 35 |
by (strip_tac 1); |
36 |
by (rtac (less_fun RS iffD2) 1); |
|
37 |
by (strip_tac 1); |
|
38 |
by (res_inst_tac [("Q","xa=UU")] (excluded_middle RS disjE) 1); |
|
39 |
by (res_inst_tac [("Q","x=UU")] (excluded_middle RS disjE) 1); |
|
40 |
by (ftac notUU_I 1); |
|
41 |
by (atac 1); |
|
42 |
by (REPEAT(asm_simp_tac(Sprod0_ss addsimps[inst_sprod_po,refl_less,minimal]) 1)); |
|
43 |
qed "monofun_Ispair1"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
44 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
45 |
Goalw [monofun] "monofun(Ispair(x))"; |
9245 | 46 |
by (strip_tac 1); |
47 |
by (res_inst_tac [("Q","x=UU")] (excluded_middle RS disjE) 1); |
|
48 |
by (res_inst_tac [("Q","xa=UU")] (excluded_middle RS disjE) 1); |
|
49 |
by (ftac notUU_I 1); |
|
50 |
by (atac 1); |
|
51 |
by (REPEAT(asm_simp_tac(Sprod0_ss addsimps[inst_sprod_po,refl_less,minimal]) 1)); |
|
52 |
qed "monofun_Ispair2"; |
|
2640 | 53 |
|
9245 | 54 |
Goal "[|x1<<x2; y1<<y2|] ==> Ispair x1 y1 << Ispair x2 y2"; |
55 |
by (rtac trans_less 1); |
|
56 |
by (rtac (monofun_Ispair1 RS monofunE RS spec RS spec RS mp RS |
|
57 |
(less_fun RS iffD1 RS spec)) 1); |
|
58 |
by (rtac (monofun_Ispair2 RS monofunE RS spec RS spec RS mp) 2); |
|
59 |
by (atac 1); |
|
60 |
by (atac 1); |
|
61 |
qed "monofun_Ispair"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
62 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
63 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
64 |
(* Isfst and Issnd are monotone *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
65 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
66 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
67 |
Goalw [monofun] "monofun(Isfst)"; |
9245 | 68 |
by (simp_tac (HOL_ss addsimps [inst_sprod_po]) 1); |
69 |
qed "monofun_Isfst"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
70 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
71 |
Goalw [monofun] "monofun(Issnd)"; |
9245 | 72 |
by (simp_tac (HOL_ss addsimps [inst_sprod_po]) 1); |
73 |
qed "monofun_Issnd"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
74 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
75 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
76 |
(* the type 'a ** 'b is a cpo *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
77 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
78 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
79 |
Goal |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4031
diff
changeset
|
80 |
"[|chain(S)|] ==> range(S) <<| \ |
9245 | 81 |
\ Ispair (lub(range(%i. Isfst(S i)))) (lub(range(%i. Issnd(S i))))"; |
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
82 |
by (rtac (is_lubI) 1); |
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
83 |
by (rtac (ub_rangeI) 1); |
9245 | 84 |
by (res_inst_tac [("t","S(i)")] (surjective_pairing_Sprod RS ssubst) 1); |
85 |
by (rtac monofun_Ispair 1); |
|
86 |
by (rtac is_ub_thelub 1); |
|
87 |
by (etac (monofun_Isfst RS ch2ch_monofun) 1); |
|
88 |
by (rtac is_ub_thelub 1); |
|
89 |
by (etac (monofun_Issnd RS ch2ch_monofun) 1); |
|
90 |
by (strip_tac 1); |
|
91 |
by (res_inst_tac [("t","u")] (surjective_pairing_Sprod RS ssubst) 1); |
|
92 |
by (rtac monofun_Ispair 1); |
|
93 |
by (rtac is_lub_thelub 1); |
|
94 |
by (etac (monofun_Isfst RS ch2ch_monofun) 1); |
|
95 |
by (etac (monofun_Isfst RS ub2ub_monofun) 1); |
|
96 |
by (rtac is_lub_thelub 1); |
|
97 |
by (etac (monofun_Issnd RS ch2ch_monofun) 1); |
|
98 |
by (etac (monofun_Issnd RS ub2ub_monofun) 1); |
|
99 |
qed "lub_sprod"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
100 |
|
1779 | 101 |
bind_thm ("thelub_sprod", lub_sprod RS thelubI); |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
102 |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
103 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
104 |
Goal "chain(S::nat=>'a**'b)==>? x. range(S)<<| x"; |
9245 | 105 |
by (rtac exI 1); |
106 |
by (etac lub_sprod 1); |
|
107 |
qed "cpo_sprod"; |