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