author | wenzelm |
Sat, 03 Jul 1999 00:23:17 +0200 | |
changeset 6891 | 7bb02d03035d |
parent 4721 | c8a8482a8124 |
child 7499 | 23e090051cb8 |
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 |
|
2640 | 6 |
Lemmas for Sprod2.thy |
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 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
9 |
open Sprod2; |
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_sprod_po" thy "(op <<)=(%x y. Isfst x<<Isfst y&Issnd x<<Issnd y)" |
2640 | 13 |
(fn prems => |
1461 | 14 |
[ |
3323
194ae2e0c193
eliminated the constant less by the introduction of the axclass sq_ord
slotosch
parents:
2640
diff
changeset
|
15 |
(fold_goals_tac [less_sprod_def]), |
2640 | 16 |
(rtac refl 1) |
1461 | 17 |
]); |
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 sprod 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 |
|
2640 | 23 |
qed_goal "minimal_sprod" thy "Ispair UU UU << p" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
24 |
(fn prems => |
1461 | 25 |
[ |
2640 | 26 |
(simp_tac(Sprod0_ss addsimps[inst_sprod_po,minimal])1) |
27 |
]); |
|
28 |
||
29 |
bind_thm ("UU_sprod_def",minimal_sprod RS minimal2UU RS sym); |
|
30 |
||
3842 | 31 |
qed_goal "least_sprod" thy "? x::'a**'b.!y. x<<y" |
2640 | 32 |
(fn prems => |
33 |
[ |
|
34 |
(res_inst_tac [("x","Ispair UU UU")] exI 1), |
|
35 |
(rtac (minimal_sprod 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 |
(* Ispair is monotone in both arguments *) |
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 |
|
892 | 42 |
qed_goalw "monofun_Ispair1" Sprod2.thy [monofun] "monofun(Ispair)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
43 |
(fn prems => |
1461 | 44 |
[ |
45 |
(strip_tac 1), |
|
46 |
(rtac (less_fun RS iffD2) 1), |
|
47 |
(strip_tac 1), |
|
2640 | 48 |
(res_inst_tac [("Q","xa=UU")] (excluded_middle RS disjE) 1), |
49 |
(res_inst_tac [("Q","x=UU")] (excluded_middle RS disjE) 1), |
|
50 |
(forward_tac [notUU_I] 1), |
|
1461 | 51 |
(atac 1), |
2640 | 52 |
(REPEAT(asm_simp_tac(Sprod0_ss |
53 |
addsimps[inst_sprod_po,refl_less,minimal]) 1)) |
|
1461 | 54 |
]); |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
55 |
|
892 | 56 |
qed_goalw "monofun_Ispair2" Sprod2.thy [monofun] "monofun(Ispair(x))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
57 |
(fn prems => |
1461 | 58 |
[ |
59 |
(strip_tac 1), |
|
2640 | 60 |
(res_inst_tac [("Q","x=UU")] (excluded_middle RS disjE) 1), |
61 |
(res_inst_tac [("Q","xa=UU")] (excluded_middle RS disjE) 1), |
|
62 |
(forward_tac [notUU_I] 1), |
|
1461 | 63 |
(atac 1), |
2640 | 64 |
(REPEAT(asm_simp_tac(Sprod0_ss |
65 |
addsimps[inst_sprod_po,refl_less,minimal]) 1)) |
|
1461 | 66 |
]); |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
67 |
|
2640 | 68 |
|
4031 | 69 |
qed_goal "monofun_Ispair" Sprod2.thy |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
892
diff
changeset
|
70 |
"[|x1<<x2; y1<<y2|] ==> Ispair x1 y1 << Ispair x2 y2" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
71 |
(fn prems => |
1461 | 72 |
[ |
73 |
(cut_facts_tac prems 1), |
|
74 |
(rtac trans_less 1), |
|
75 |
(rtac (monofun_Ispair1 RS monofunE RS spec RS spec RS mp RS |
|
76 |
(less_fun RS iffD1 RS spec)) 1), |
|
77 |
(rtac (monofun_Ispair2 RS monofunE RS spec RS spec RS mp) 2), |
|
78 |
(atac 1), |
|
79 |
(atac 1) |
|
80 |
]); |
|
243
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 |
|
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 |
(* Isfst and Issnd are monotone *) |
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 |
|
2640 | 87 |
qed_goalw "monofun_Isfst" Sprod2.thy [monofun] "monofun(Isfst)" |
88 |
(fn prems => [(simp_tac (HOL_ss addsimps [inst_sprod_po]) 1)]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
89 |
|
892 | 90 |
qed_goalw "monofun_Issnd" Sprod2.thy [monofun] "monofun(Issnd)" |
2640 | 91 |
(fn prems => [(simp_tac (HOL_ss addsimps [inst_sprod_po]) 1)]); |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
92 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
93 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
94 |
(* the type 'a ** 'b is a cpo *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
95 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
96 |
|
892 | 97 |
qed_goal "lub_sprod" Sprod2.thy |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4031
diff
changeset
|
98 |
"[|chain(S)|] ==> range(S) <<| \ |
3842 | 99 |
\ Ispair (lub(range(%i. Isfst(S i)))) (lub(range(%i. Issnd(S i))))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
100 |
(fn prems => |
1461 | 101 |
[ |
102 |
(cut_facts_tac prems 1), |
|
2640 | 103 |
(rtac (conjI RS is_lubI) 1), |
104 |
(rtac (allI RS ub_rangeI) 1), |
|
1461 | 105 |
(res_inst_tac [("t","S(i)")] (surjective_pairing_Sprod RS ssubst) 1), |
106 |
(rtac monofun_Ispair 1), |
|
107 |
(rtac is_ub_thelub 1), |
|
108 |
(etac (monofun_Isfst RS ch2ch_monofun) 1), |
|
109 |
(rtac is_ub_thelub 1), |
|
110 |
(etac (monofun_Issnd RS ch2ch_monofun) 1), |
|
111 |
(strip_tac 1), |
|
112 |
(res_inst_tac [("t","u")] (surjective_pairing_Sprod RS ssubst) 1), |
|
113 |
(rtac monofun_Ispair 1), |
|
114 |
(rtac is_lub_thelub 1), |
|
115 |
(etac (monofun_Isfst RS ch2ch_monofun) 1), |
|
116 |
(etac (monofun_Isfst RS ub2ub_monofun) 1), |
|
117 |
(rtac is_lub_thelub 1), |
|
118 |
(etac (monofun_Issnd RS ch2ch_monofun) 1), |
|
119 |
(etac (monofun_Issnd RS ub2ub_monofun) 1) |
|
120 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
121 |
|
1779 | 122 |
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
|
123 |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
124 |
|
892 | 125 |
qed_goal "cpo_sprod" Sprod2.thy |
4721
c8a8482a8124
renamed is_chain to chain, is_tord to tord, replaced chain_finite by chfin
oheimb
parents:
4031
diff
changeset
|
126 |
"chain(S::nat=>'a**'b)==>? x. range(S)<<| x" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
127 |
(fn prems => |
1461 | 128 |
[ |
129 |
(cut_facts_tac prems 1), |
|
130 |
(rtac exI 1), |
|
131 |
(etac lub_sprod 1) |
|
132 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
133 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
134 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
135 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
136 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
137 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
138 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
139 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
140 |