author | wenzelm |
Mon, 22 Oct 2001 17:58:26 +0200 | |
changeset 11880 | a625de9ad62a |
parent 9248 | e1dee89de037 |
child 12030 | 46d57d0290a2 |
permissions | -rw-r--r-- |
9245 | 1 |
(* Title: HOLCF/Cprod2 |
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. fst x<<fst y & snd x<<snd y)"; |
9245 | 11 |
by (fold_goals_tac [less_cprod_def]); |
12 |
by (rtac refl 1); |
|
13 |
qed "inst_cprod_po"; |
|
2640 | 14 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
15 |
Goal "(x1,y1) << (x2,y2) ==> x1 << x2 & y1 << y2"; |
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
16 |
by (asm_full_simp_tac (simpset() addsimps [inst_cprod_po]) 1); |
9245 | 17 |
qed "less_cprod4c"; |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
18 |
|
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 cprod 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 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
23 |
Goal "(UU,UU)<<p"; |
9245 | 24 |
by (simp_tac(simpset() addsimps[inst_cprod_po])1); |
25 |
qed "minimal_cprod"; |
|
2640 | 26 |
|
27 |
bind_thm ("UU_cprod_def",minimal_cprod RS minimal2UU RS sym); |
|
28 |
||
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
29 |
Goal "EX x::'a*'b. ALL y. x<<y"; |
9245 | 30 |
by (res_inst_tac [("x","(UU,UU)")] exI 1); |
31 |
by (rtac (minimal_cprod RS allI) 1); |
|
32 |
qed "least_cprod"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
33 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
34 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
35 |
(* Pair <_,_> is monotone in both arguments *) |
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 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
38 |
Goalw [monofun] "monofun Pair"; |
9245 | 39 |
by (strip_tac 1); |
40 |
by (rtac (less_fun RS iffD2) 1); |
|
41 |
by (strip_tac 1); |
|
42 |
by (asm_simp_tac (simpset() addsimps [inst_cprod_po]) 1); |
|
43 |
qed "monofun_pair1"; |
|
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(Pair x)"; |
9245 | 46 |
by (asm_simp_tac (simpset() addsimps [inst_cprod_po]) 1); |
47 |
qed "monofun_pair2"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
48 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
49 |
Goal "[|x1<<x2; y1<<y2|] ==> (x1::'a::cpo,y1::'b::cpo)<<(x2,y2)"; |
9245 | 50 |
by (rtac trans_less 1); |
51 |
by (rtac (monofun_pair1 RS monofunE RS spec RS spec RS mp RS (less_fun RS iffD1 RS spec)) 1); |
|
52 |
by (rtac (monofun_pair2 RS monofunE RS spec RS spec RS mp) 2); |
|
53 |
by (atac 1); |
|
54 |
by (atac 1); |
|
55 |
qed "monofun_pair"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
56 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
57 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
58 |
(* fst and snd are monotone *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
59 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
60 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
61 |
Goalw [monofun] "monofun fst"; |
9245 | 62 |
by (strip_tac 1); |
63 |
by (res_inst_tac [("p","x")] PairE 1); |
|
64 |
by (hyp_subst_tac 1); |
|
65 |
by (res_inst_tac [("p","y")] PairE 1); |
|
66 |
by (hyp_subst_tac 1); |
|
67 |
by (Asm_simp_tac 1); |
|
68 |
by (etac (less_cprod4c RS conjunct1) 1); |
|
69 |
qed "monofun_fst"; |
|
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 snd"; |
9245 | 72 |
by (strip_tac 1); |
73 |
by (res_inst_tac [("p","x")] PairE 1); |
|
74 |
by (hyp_subst_tac 1); |
|
75 |
by (res_inst_tac [("p","y")] PairE 1); |
|
76 |
by (hyp_subst_tac 1); |
|
77 |
by (Asm_simp_tac 1); |
|
78 |
by (etac (less_cprod4c RS conjunct2) 1); |
|
79 |
qed "monofun_snd"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
80 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
81 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
82 |
(* the type 'a * 'b is a cpo *) |
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 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
85 |
Goal |
9245 | 86 |
"chain S ==> range S<<|(lub(range(%i. fst(S i))),lub(range(%i. snd(S i))))"; |
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
87 |
by (rtac (is_lubI) 1); |
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
88 |
by (rtac (ub_rangeI) 1); |
9245 | 89 |
by (res_inst_tac [("t","S i")] (surjective_pairing RS ssubst) 1); |
90 |
by (rtac monofun_pair 1); |
|
91 |
by (rtac is_ub_thelub 1); |
|
92 |
by (etac (monofun_fst RS ch2ch_monofun) 1); |
|
93 |
by (rtac is_ub_thelub 1); |
|
94 |
by (etac (monofun_snd RS ch2ch_monofun) 1); |
|
95 |
by (strip_tac 1); |
|
96 |
by (res_inst_tac [("t","u")] (surjective_pairing RS ssubst) 1); |
|
97 |
by (rtac monofun_pair 1); |
|
98 |
by (rtac is_lub_thelub 1); |
|
99 |
by (etac (monofun_fst RS ch2ch_monofun) 1); |
|
100 |
by (etac (monofun_fst RS ub2ub_monofun) 1); |
|
101 |
by (rtac is_lub_thelub 1); |
|
102 |
by (etac (monofun_snd RS ch2ch_monofun) 1); |
|
103 |
by (etac (monofun_snd RS ub2ub_monofun) 1); |
|
104 |
qed "lub_cprod"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
105 |
|
1779 | 106 |
bind_thm ("thelub_cprod", lub_cprod RS thelubI); |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
899
diff
changeset
|
107 |
(* |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
108 |
"chain ?S1 ==> |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
899
diff
changeset
|
109 |
lub (range ?S1) = |
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
899
diff
changeset
|
110 |
(lub (range (%i. fst (?S1 i))), lub (range (%i. snd (?S1 i))))" : thm |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
111 |
|
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
899
diff
changeset
|
112 |
*) |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
113 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
114 |
Goal "chain(S::nat=>'a::cpo*'b::cpo)==>EX x. range S<<| x"; |
9245 | 115 |
by (rtac exI 1); |
116 |
by (etac lub_cprod 1); |
|
117 |
qed "cpo_cprod"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
118 |
|
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
899
diff
changeset
|
119 |