author | paulson |
Wed, 13 Nov 1996 10:47:08 +0100 | |
changeset 2183 | 8d42a7bccf0b |
parent 2033 | 639de962ded4 |
child 2640 | ee4dfce170a0 |
permissions | -rw-r--r-- |
1461 | 1 |
(* Title: HOLCF/cprod1.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 theory cprod1.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 Cprod1; |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
10 |
|
892 | 11 |
qed_goalw "less_cprod1b" Cprod1.thy [less_cprod_def] |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
899
diff
changeset
|
12 |
"less_cprod p1 p2 = ( fst(p1) << fst(p2) & snd(p1) << snd(p2))" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
13 |
(fn prems => |
1461 | 14 |
[ |
15 |
(rtac refl 1) |
|
16 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
17 |
|
892 | 18 |
qed_goalw "less_cprod2a" Cprod1.thy [less_cprod_def] |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
899
diff
changeset
|
19 |
"less_cprod (x,y) (UU,UU) ==> x = UU & y = UU" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
20 |
(fn prems => |
1461 | 21 |
[ |
22 |
(cut_facts_tac prems 1), |
|
23 |
(etac conjE 1), |
|
24 |
(dtac (fst_conv RS subst) 1), |
|
25 |
(dtac (fst_conv RS subst) 1), |
|
26 |
(dtac (fst_conv RS subst) 1), |
|
27 |
(dtac (snd_conv RS subst) 1), |
|
28 |
(dtac (snd_conv RS subst) 1), |
|
29 |
(dtac (snd_conv RS subst) 1), |
|
30 |
(rtac conjI 1), |
|
31 |
(etac UU_I 1), |
|
32 |
(etac UU_I 1) |
|
33 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
34 |
|
892 | 35 |
qed_goal "less_cprod2b" Cprod1.thy |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
899
diff
changeset
|
36 |
"less_cprod p (UU,UU) ==> p = (UU,UU)" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
37 |
(fn prems => |
1461 | 38 |
[ |
39 |
(cut_facts_tac prems 1), |
|
40 |
(res_inst_tac [("p","p")] PairE 1), |
|
41 |
(hyp_subst_tac 1), |
|
42 |
(dtac less_cprod2a 1), |
|
43 |
(Asm_simp_tac 1) |
|
44 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
45 |
|
892 | 46 |
qed_goalw "less_cprod2c" Cprod1.thy [less_cprod_def] |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
899
diff
changeset
|
47 |
"less_cprod (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
|
48 |
(fn prems => |
1461 | 49 |
[ |
50 |
(cut_facts_tac prems 1), |
|
51 |
(etac conjE 1), |
|
52 |
(dtac (fst_conv RS subst) 1), |
|
53 |
(dtac (fst_conv RS subst) 1), |
|
54 |
(dtac (fst_conv RS subst) 1), |
|
55 |
(dtac (snd_conv RS subst) 1), |
|
56 |
(dtac (snd_conv RS subst) 1), |
|
57 |
(dtac (snd_conv RS subst) 1), |
|
58 |
(rtac conjI 1), |
|
59 |
(atac 1), |
|
60 |
(atac 1) |
|
61 |
]); |
|
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 |
(* less_cprod is a partial order on 'a * 'b *) |
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 |
|
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
899
diff
changeset
|
67 |
qed_goalw "refl_less_cprod" Cprod1.thy [less_cprod_def] "less_cprod p p" |
1267 | 68 |
(fn prems => [Simp_tac 1]); |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
69 |
|
892 | 70 |
qed_goal "antisym_less_cprod" Cprod1.thy |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
899
diff
changeset
|
71 |
"[|less_cprod p1 p2;less_cprod p2 p1|] ==> p1=p2" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
72 |
(fn prems => |
1461 | 73 |
[ |
74 |
(cut_facts_tac prems 1), |
|
75 |
(res_inst_tac [("p","p1")] PairE 1), |
|
76 |
(hyp_subst_tac 1), |
|
77 |
(res_inst_tac [("p","p2")] PairE 1), |
|
78 |
(hyp_subst_tac 1), |
|
79 |
(dtac less_cprod2c 1), |
|
80 |
(dtac less_cprod2c 1), |
|
81 |
(etac conjE 1), |
|
82 |
(etac conjE 1), |
|
2033 | 83 |
(stac Pair_eq 1), |
1461 | 84 |
(fast_tac (HOL_cs addSIs [antisym_less]) 1) |
85 |
]); |
|
243
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 |
|
892 | 88 |
qed_goal "trans_less_cprod" Cprod1.thy |
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
899
diff
changeset
|
89 |
"[|less_cprod p1 p2;less_cprod p2 p3|] ==> less_cprod p1 p3" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
90 |
(fn prems => |
1461 | 91 |
[ |
92 |
(cut_facts_tac prems 1), |
|
93 |
(res_inst_tac [("p","p1")] PairE 1), |
|
94 |
(hyp_subst_tac 1), |
|
95 |
(res_inst_tac [("p","p3")] PairE 1), |
|
96 |
(hyp_subst_tac 1), |
|
97 |
(res_inst_tac [("p","p2")] PairE 1), |
|
98 |
(hyp_subst_tac 1), |
|
99 |
(dtac less_cprod2c 1), |
|
100 |
(dtac less_cprod2c 1), |
|
2033 | 101 |
(stac less_cprod1b 1), |
1461 | 102 |
(Simp_tac 1), |
103 |
(etac conjE 1), |
|
104 |
(etac conjE 1), |
|
105 |
(rtac conjI 1), |
|
106 |
(etac trans_less 1), |
|
107 |
(atac 1), |
|
108 |
(etac trans_less 1), |
|
109 |
(atac 1) |
|
110 |
]); |
|
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 |
|
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
899
diff
changeset
|
113 |