author | wenzelm |
Wed, 08 Mar 2000 17:48:31 +0100 | |
changeset 8364 | 0eb9ee70c8f8 |
parent 4721 | c8a8482a8124 |
child 9245 | 428385c4bc50 |
permissions | -rw-r--r-- |
1461 | 1 |
(* Title: HOLCF/cprod2.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 cprod2.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 Cprod2; |
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_cprod_po" thy "(op <<)=(%x y. fst x<<fst y & snd x<<snd y)" |
2640 | 13 |
(fn prems => |
14 |
[ |
|
3323
194ae2e0c193
eliminated the constant less by the introduction of the axclass sq_ord
slotosch
parents:
2840
diff
changeset
|
15 |
(fold_goals_tac [less_cprod_def]), |
2640 | 16 |
(rtac refl 1) |
17 |
]); |
|
18 |
||
19 |
qed_goalw "less_cprod4c" thy [inst_cprod_po RS eq_reflection] |
|
20 |
"(x1,y1) << (x2,y2) ==> x1 << x2 & y1 << y2" |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
21 |
(fn prems => |
1461 | 22 |
[ |
23 |
(cut_facts_tac prems 1), |
|
2640 | 24 |
(etac conjE 1), |
25 |
(dtac (fst_conv RS subst) 1), |
|
26 |
(dtac (fst_conv RS subst) 1), |
|
27 |
(dtac (fst_conv RS subst) 1), |
|
28 |
(dtac (snd_conv RS subst) 1), |
|
29 |
(dtac (snd_conv RS subst) 1), |
|
30 |
(dtac (snd_conv RS subst) 1), |
|
31 |
(rtac conjI 1), |
|
32 |
(atac 1), |
|
33 |
(atac 1) |
|
1461 | 34 |
]); |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
35 |
|
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 |
(* type cprod is pointed *) |
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 |
|
2640 | 40 |
qed_goal "minimal_cprod" thy "(UU,UU)<<p" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
41 |
(fn prems => |
1461 | 42 |
[ |
4098 | 43 |
(simp_tac(simpset() addsimps[inst_cprod_po])1) |
2640 | 44 |
]); |
45 |
||
46 |
bind_thm ("UU_cprod_def",minimal_cprod RS minimal2UU RS sym); |
|
47 |
||
3842 | 48 |
qed_goal "least_cprod" thy "? x::'a*'b.!y. x<<y" |
2640 | 49 |
(fn prems => |
50 |
[ |
|
51 |
(res_inst_tac [("x","(UU,UU)")] exI 1), |
|
52 |
(rtac (minimal_cprod RS allI) 1) |
|
1461 | 53 |
]); |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
54 |
|
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 |
(* Pair <_,_> is monotone in both arguments *) |
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 |
|
2640 | 59 |
qed_goalw "monofun_pair1" thy [monofun] "monofun Pair" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
60 |
(fn prems => |
1461 | 61 |
[ |
62 |
(strip_tac 1), |
|
63 |
(rtac (less_fun RS iffD2) 1), |
|
64 |
(strip_tac 1), |
|
4098 | 65 |
(asm_simp_tac (simpset() addsimps [inst_cprod_po]) 1) |
1461 | 66 |
]); |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
67 |
|
2640 | 68 |
qed_goalw "monofun_pair2" thy [monofun] "monofun(Pair x)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
69 |
(fn prems => |
1461 | 70 |
[ |
4098 | 71 |
(asm_simp_tac (simpset() addsimps [inst_cprod_po]) 1) |
1461 | 72 |
]); |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
73 |
|
3323
194ae2e0c193
eliminated the constant less by the introduction of the axclass sq_ord
slotosch
parents:
2840
diff
changeset
|
74 |
qed_goal "monofun_pair" thy "[|x1<<x2; y1<<y2|] ==> (x1::'a::cpo,y1::'b::cpo)<<(x2,y2)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
75 |
(fn prems => |
1461 | 76 |
[ |
77 |
(cut_facts_tac prems 1), |
|
78 |
(rtac trans_less 1), |
|
79 |
(rtac (monofun_pair1 RS monofunE RS spec RS spec RS mp RS |
|
80 |
(less_fun RS iffD1 RS spec)) 1), |
|
81 |
(rtac (monofun_pair2 RS monofunE RS spec RS spec RS mp) 2), |
|
82 |
(atac 1), |
|
83 |
(atac 1) |
|
84 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
85 |
|
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 |
(* fst and snd are monotone *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
88 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
89 |
|
2640 | 90 |
qed_goalw "monofun_fst" thy [monofun] "monofun fst" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
91 |
(fn prems => |
1461 | 92 |
[ |
93 |
(strip_tac 1), |
|
94 |
(res_inst_tac [("p","x")] PairE 1), |
|
95 |
(hyp_subst_tac 1), |
|
96 |
(res_inst_tac [("p","y")] PairE 1), |
|
97 |
(hyp_subst_tac 1), |
|
98 |
(Asm_simp_tac 1), |
|
99 |
(etac (less_cprod4c RS conjunct1) 1) |
|
100 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
101 |
|
2640 | 102 |
qed_goalw "monofun_snd" thy [monofun] "monofun snd" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
103 |
(fn prems => |
1461 | 104 |
[ |
105 |
(strip_tac 1), |
|
106 |
(res_inst_tac [("p","x")] PairE 1), |
|
107 |
(hyp_subst_tac 1), |
|
108 |
(res_inst_tac [("p","y")] PairE 1), |
|
109 |
(hyp_subst_tac 1), |
|
110 |
(Asm_simp_tac 1), |
|
111 |
(etac (less_cprod4c RS conjunct2) 1) |
|
112 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
113 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
114 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
115 |
(* the type 'a * 'b is a cpo *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
116 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
117 |
|
2640 | 118 |
qed_goal "lub_cprod" thy |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
119 |
"chain S ==> range S<<|(lub(range(%i. fst(S i))),lub(range(%i. snd(S i))))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
120 |
(fn prems => |
1461 | 121 |
[ |
122 |
(cut_facts_tac prems 1), |
|
2640 | 123 |
(rtac (conjI RS is_lubI) 1), |
124 |
(rtac (allI RS ub_rangeI) 1), |
|
125 |
(res_inst_tac [("t","S i")] (surjective_pairing RS ssubst) 1), |
|
1461 | 126 |
(rtac monofun_pair 1), |
127 |
(rtac is_ub_thelub 1), |
|
128 |
(etac (monofun_fst RS ch2ch_monofun) 1), |
|
129 |
(rtac is_ub_thelub 1), |
|
130 |
(etac (monofun_snd RS ch2ch_monofun) 1), |
|
131 |
(strip_tac 1), |
|
132 |
(res_inst_tac [("t","u")] (surjective_pairing RS ssubst) 1), |
|
133 |
(rtac monofun_pair 1), |
|
134 |
(rtac is_lub_thelub 1), |
|
135 |
(etac (monofun_fst RS ch2ch_monofun) 1), |
|
136 |
(etac (monofun_fst RS ub2ub_monofun) 1), |
|
137 |
(rtac is_lub_thelub 1), |
|
138 |
(etac (monofun_snd RS ch2ch_monofun) 1), |
|
139 |
(etac (monofun_snd RS ub2ub_monofun) 1) |
|
140 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
141 |
|
1779 | 142 |
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
|
143 |
(* |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
144 |
"chain ?S1 ==> |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
899
diff
changeset
|
145 |
lub (range ?S1) = |
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
899
diff
changeset
|
146 |
(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
|
147 |
|
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
899
diff
changeset
|
148 |
*) |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
149 |
|
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4098
diff
changeset
|
150 |
qed_goal "cpo_cprod" thy "chain(S::nat=>'a::cpo*'b::cpo)==>? x. range S<<| x" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
151 |
(fn prems => |
1461 | 152 |
[ |
153 |
(cut_facts_tac prems 1), |
|
154 |
(rtac exI 1), |
|
155 |
(etac lub_cprod 1) |
|
156 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
157 |
|
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
899
diff
changeset
|
158 |