author | oheimb |
Fri, 11 Jul 2003 14:11:56 +0200 | |
changeset 14098 | 54f130df1136 |
parent 12030 | 46d57d0290a2 |
child 14981 | e73f8140af78 |
permissions | -rw-r--r-- |
9169 | 1 |
(* Title: HOLCF/Ssum0.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 |
12030 | 4 |
License: GPL (GNU GENERAL PUBLIC LICENSE) |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
5 |
|
9169 | 6 |
Strict sum with typedef |
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 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
10 |
(* A non-emptyness result for Sssum *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
11 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
12 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
13 |
Goalw [Ssum_def] "Sinl_Rep(a):Ssum"; |
10230 | 14 |
by (Blast_tac 1); |
9245 | 15 |
qed "SsumIl"; |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
16 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
17 |
Goalw [Ssum_def] "Sinr_Rep(a):Ssum"; |
10230 | 18 |
by (Blast_tac 1); |
9245 | 19 |
qed "SsumIr"; |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
20 |
|
9169 | 21 |
Goal "inj_on Abs_Ssum Ssum"; |
22 |
by (rtac inj_on_inverseI 1); |
|
23 |
by (etac Abs_Ssum_inverse 1); |
|
24 |
qed "inj_on_Abs_Ssum"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
25 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
26 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
27 |
(* Strictness of Sinr_Rep, Sinl_Rep and Isinl, Isinr *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
28 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
29 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
30 |
Goalw [Sinr_Rep_def,Sinl_Rep_def] |
9245 | 31 |
"Sinl_Rep(UU) = Sinr_Rep(UU)"; |
32 |
by (rtac ext 1); |
|
33 |
by (rtac ext 1); |
|
34 |
by (rtac ext 1); |
|
35 |
by (fast_tac HOL_cs 1); |
|
36 |
qed "strict_SinlSinr_Rep"; |
|
243
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 [Isinl_def,Isinr_def] |
9245 | 39 |
"Isinl(UU) = Isinr(UU)"; |
40 |
by (rtac (strict_SinlSinr_Rep RS arg_cong) 1); |
|
41 |
qed "strict_IsinlIsinr"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
42 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
43 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
44 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
45 |
(* distinctness of Sinl_Rep, Sinr_Rep and Isinl, Isinr *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
46 |
(* ------------------------------------------------------------------------ *) |
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 |
Goalw [Sinl_Rep_def,Sinr_Rep_def] |
9245 | 49 |
"(Sinl_Rep(a) = Sinr_Rep(b)) ==> a=UU & b=UU"; |
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
50 |
by (blast_tac (claset() addSDs [fun_cong]) 1); |
9245 | 51 |
qed "noteq_SinlSinr_Rep"; |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
52 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
53 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
54 |
Goalw [Isinl_def,Isinr_def] |
9245 | 55 |
"Isinl(a)=Isinr(b) ==> a=UU & b=UU"; |
56 |
by (rtac noteq_SinlSinr_Rep 1); |
|
57 |
by (etac (inj_on_Abs_Ssum RS inj_onD) 1); |
|
58 |
by (rtac SsumIl 1); |
|
59 |
by (rtac SsumIr 1); |
|
60 |
qed "noteq_IsinlIsinr"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
61 |
|
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 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
65 |
(* injectivity of Sinl_Rep, Sinr_Rep and Isinl, Isinr *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
66 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
67 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
68 |
Goalw [Sinl_Rep_def] "(Sinl_Rep(a) = Sinl_Rep(UU)) ==> a=UU"; |
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
69 |
by (blast_tac (claset() addSDs [fun_cong]) 1); |
9245 | 70 |
qed "inject_Sinl_Rep1"; |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
71 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
72 |
Goalw [Sinr_Rep_def] "(Sinr_Rep(b) = Sinr_Rep(UU)) ==> b=UU"; |
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
73 |
by (blast_tac (claset() addSDs [fun_cong]) 1); |
9245 | 74 |
qed "inject_Sinr_Rep1"; |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
75 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
76 |
Goalw [Sinl_Rep_def] |
9245 | 77 |
"[| a1~=UU ; a2~=UU ; Sinl_Rep(a1)=Sinl_Rep(a2) |] ==> a1=a2"; |
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
78 |
by (blast_tac (claset() addSDs [fun_cong]) 1); |
9245 | 79 |
qed "inject_Sinl_Rep2"; |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
80 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
81 |
Goalw [Sinr_Rep_def] |
9245 | 82 |
"[|b1~=UU ; b2~=UU ; Sinr_Rep(b1)=Sinr_Rep(b2) |] ==> b1=b2"; |
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
83 |
by (blast_tac (claset() addSDs [fun_cong]) 1); |
9245 | 84 |
qed "inject_Sinr_Rep2"; |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
85 |
|
9169 | 86 |
Goal "Sinl_Rep(a1)=Sinl_Rep(a2) ==> a1=a2"; |
87 |
by (case_tac "a1=UU" 1); |
|
88 |
by (hyp_subst_tac 1); |
|
89 |
by (rtac (inject_Sinl_Rep1 RS sym) 1); |
|
90 |
by (etac sym 1); |
|
91 |
by (case_tac "a2=UU" 1); |
|
92 |
by (hyp_subst_tac 1); |
|
93 |
by (etac inject_Sinl_Rep1 1); |
|
94 |
by (etac inject_Sinl_Rep2 1); |
|
95 |
by (atac 1); |
|
96 |
by (atac 1); |
|
97 |
qed "inject_Sinl_Rep"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
98 |
|
9169 | 99 |
Goal "Sinr_Rep(b1)=Sinr_Rep(b2) ==> b1=b2"; |
100 |
by (case_tac "b1=UU" 1); |
|
101 |
by (hyp_subst_tac 1); |
|
102 |
by (rtac (inject_Sinr_Rep1 RS sym) 1); |
|
103 |
by (etac sym 1); |
|
104 |
by (case_tac "b2=UU" 1); |
|
105 |
by (hyp_subst_tac 1); |
|
106 |
by (etac inject_Sinr_Rep1 1); |
|
107 |
by (etac inject_Sinr_Rep2 1); |
|
108 |
by (atac 1); |
|
109 |
by (atac 1); |
|
110 |
qed "inject_Sinr_Rep"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
111 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
112 |
Goalw [Isinl_def] "Isinl(a1)=Isinl(a2)==> a1=a2"; |
9245 | 113 |
by (rtac inject_Sinl_Rep 1); |
114 |
by (etac (inj_on_Abs_Ssum RS inj_onD) 1); |
|
115 |
by (rtac SsumIl 1); |
|
116 |
by (rtac SsumIl 1); |
|
117 |
qed "inject_Isinl"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
118 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
119 |
Goalw [Isinr_def] "Isinr(b1)=Isinr(b2) ==> b1=b2"; |
9245 | 120 |
by (rtac inject_Sinr_Rep 1); |
121 |
by (etac (inj_on_Abs_Ssum RS inj_onD) 1); |
|
122 |
by (rtac SsumIr 1); |
|
123 |
by (rtac SsumIr 1); |
|
124 |
qed "inject_Isinr"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
125 |
|
10230 | 126 |
AddSDs [inject_Isinl, inject_Isinr]; |
127 |
||
9169 | 128 |
Goal "a1~=a2 ==> Isinl(a1) ~= Isinl(a2)"; |
10230 | 129 |
by (Blast_tac 1); |
9169 | 130 |
qed "inject_Isinl_rev"; |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
131 |
|
9169 | 132 |
Goal "b1~=b2 ==> Isinr(b1) ~= Isinr(b2)"; |
10230 | 133 |
by (Blast_tac 1); |
9169 | 134 |
qed "inject_Isinr_rev"; |
243
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 |
(* Exhaustion of the strict sum ++ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
138 |
(* choice of the bottom representation is arbitrary *) |
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 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
141 |
Goalw [Isinl_def,Isinr_def] |
9245 | 142 |
"z=Isinl(UU) | (? a. z=Isinl(a) & a~=UU) | (? b. z=Isinr(b) & b~=UU)"; |
143 |
by (rtac (rewrite_rule [Ssum_def] Rep_Ssum RS CollectE) 1); |
|
144 |
by (etac disjE 1); |
|
145 |
by (etac exE 1); |
|
146 |
by (case_tac "z= Abs_Ssum(Sinl_Rep(UU))" 1); |
|
147 |
by (etac disjI1 1); |
|
148 |
by (rtac disjI2 1); |
|
149 |
by (rtac disjI1 1); |
|
150 |
by (rtac exI 1); |
|
151 |
by (rtac conjI 1); |
|
152 |
by (rtac (Rep_Ssum_inverse RS sym RS trans) 1); |
|
153 |
by (etac arg_cong 1); |
|
10230 | 154 |
by (res_inst_tac [("Q","Sinl_Rep(a)=Sinl_Rep(UU)")] contrapos_nn 1); |
9245 | 155 |
by (etac arg_cong 2); |
10230 | 156 |
by (etac contrapos_nn 1); |
9245 | 157 |
by (rtac (Rep_Ssum_inverse RS sym RS trans) 1); |
158 |
by (rtac trans 1); |
|
159 |
by (etac arg_cong 1); |
|
160 |
by (etac arg_cong 1); |
|
161 |
by (etac exE 1); |
|
162 |
by (case_tac "z= Abs_Ssum(Sinl_Rep(UU))" 1); |
|
163 |
by (etac disjI1 1); |
|
164 |
by (rtac disjI2 1); |
|
165 |
by (rtac disjI2 1); |
|
166 |
by (rtac exI 1); |
|
167 |
by (rtac conjI 1); |
|
168 |
by (rtac (Rep_Ssum_inverse RS sym RS trans) 1); |
|
169 |
by (etac arg_cong 1); |
|
10230 | 170 |
by (res_inst_tac [("Q","Sinr_Rep(b)=Sinl_Rep(UU)")] contrapos_nn 1); |
9245 | 171 |
by (hyp_subst_tac 2); |
172 |
by (rtac (strict_SinlSinr_Rep RS sym) 2); |
|
10230 | 173 |
by (etac contrapos_nn 1); |
9245 | 174 |
by (rtac (Rep_Ssum_inverse RS sym RS trans) 1); |
175 |
by (rtac trans 1); |
|
176 |
by (etac arg_cong 1); |
|
177 |
by (etac arg_cong 1); |
|
178 |
qed "Exh_Ssum"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
179 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
180 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
181 |
(* elimination rules for the strict sum ++ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
182 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
183 |
|
9169 | 184 |
val prems = Goal |
1461 | 185 |
"[|p=Isinl(UU) ==> Q ;\ |
186 |
\ !!x.[|p=Isinl(x); x~=UU |] ==> Q;\ |
|
9169 | 187 |
\ !!y.[|p=Isinr(y); y~=UU |] ==> Q|] ==> Q"; |
188 |
by (rtac (Exh_Ssum RS disjE) 1); |
|
189 |
by (etac disjE 2); |
|
190 |
by (eresolve_tac prems 1); |
|
191 |
by (etac exE 1); |
|
192 |
by (etac conjE 1); |
|
193 |
by (eresolve_tac prems 1); |
|
194 |
by (atac 1); |
|
195 |
by (etac exE 1); |
|
196 |
by (etac conjE 1); |
|
197 |
by (eresolve_tac prems 1); |
|
198 |
by (atac 1); |
|
199 |
qed "IssumE"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
200 |
|
9169 | 201 |
val prems = Goal |
202 |
"[| !!x. [| p = Isinl(x) |] ==> Q; !!y. [| p = Isinr(y) |] ==> Q |] ==>Q"; |
|
203 |
by (rtac IssumE 1); |
|
204 |
by (eresolve_tac prems 1); |
|
205 |
by (eresolve_tac prems 1); |
|
206 |
by (eresolve_tac prems 1); |
|
207 |
qed "IssumE2"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
208 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
209 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
210 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
211 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
212 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
213 |
(* rewrites for Iwhen *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
214 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
215 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
216 |
Goalw [Iwhen_def] |
9245 | 217 |
"Iwhen f g (Isinl UU) = UU"; |
9969 | 218 |
by (rtac some_equality 1); |
9245 | 219 |
by (rtac conjI 1); |
220 |
by (fast_tac HOL_cs 1); |
|
221 |
by (rtac conjI 1); |
|
222 |
by (strip_tac 1); |
|
223 |
by (res_inst_tac [("P","a=UU")] notE 1); |
|
224 |
by (fast_tac HOL_cs 1); |
|
225 |
by (rtac inject_Isinl 1); |
|
226 |
by (rtac sym 1); |
|
227 |
by (fast_tac HOL_cs 1); |
|
228 |
by (strip_tac 1); |
|
229 |
by (res_inst_tac [("P","b=UU")] notE 1); |
|
230 |
by (fast_tac HOL_cs 1); |
|
231 |
by (rtac inject_Isinr 1); |
|
232 |
by (rtac sym 1); |
|
233 |
by (rtac (strict_IsinlIsinr RS subst) 1); |
|
234 |
by (fast_tac HOL_cs 1); |
|
235 |
by (fast_tac HOL_cs 1); |
|
236 |
qed "Iwhen1"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
237 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
238 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
239 |
Goalw [Iwhen_def] |
10834 | 240 |
"x~=UU ==> Iwhen f g (Isinl x) = f$x"; |
9969 | 241 |
by (rtac some_equality 1); |
9245 | 242 |
by (fast_tac HOL_cs 2); |
243 |
by (rtac conjI 1); |
|
244 |
by (strip_tac 1); |
|
245 |
by (res_inst_tac [("P","x=UU")] notE 1); |
|
246 |
by (atac 1); |
|
247 |
by (rtac inject_Isinl 1); |
|
248 |
by (atac 1); |
|
249 |
by (rtac conjI 1); |
|
250 |
by (strip_tac 1); |
|
251 |
by (rtac cfun_arg_cong 1); |
|
252 |
by (rtac inject_Isinl 1); |
|
253 |
by (fast_tac HOL_cs 1); |
|
254 |
by (strip_tac 1); |
|
255 |
by (res_inst_tac [("P","Isinl(x) = Isinr(b)")] notE 1); |
|
256 |
by (fast_tac HOL_cs 2); |
|
10230 | 257 |
by (rtac contrapos_nn 1); |
9245 | 258 |
by (etac noteq_IsinlIsinr 2); |
259 |
by (fast_tac HOL_cs 1); |
|
260 |
qed "Iwhen2"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
261 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
262 |
Goalw [Iwhen_def] |
10834 | 263 |
"y~=UU ==> Iwhen f g (Isinr y) = g$y"; |
9969 | 264 |
by (rtac some_equality 1); |
9245 | 265 |
by (fast_tac HOL_cs 2); |
266 |
by (rtac conjI 1); |
|
267 |
by (strip_tac 1); |
|
268 |
by (res_inst_tac [("P","y=UU")] notE 1); |
|
269 |
by (atac 1); |
|
270 |
by (rtac inject_Isinr 1); |
|
271 |
by (rtac (strict_IsinlIsinr RS subst) 1); |
|
272 |
by (atac 1); |
|
273 |
by (rtac conjI 1); |
|
274 |
by (strip_tac 1); |
|
275 |
by (res_inst_tac [("P","Isinr(y) = Isinl(a)")] notE 1); |
|
276 |
by (fast_tac HOL_cs 2); |
|
10230 | 277 |
by (rtac contrapos_nn 1); |
9245 | 278 |
by (etac (sym RS noteq_IsinlIsinr) 2); |
279 |
by (fast_tac HOL_cs 1); |
|
280 |
by (strip_tac 1); |
|
281 |
by (rtac cfun_arg_cong 1); |
|
282 |
by (rtac inject_Isinr 1); |
|
283 |
by (fast_tac HOL_cs 1); |
|
284 |
qed "Iwhen3"; |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
285 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
286 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
287 |
(* instantiate the simplifier *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
288 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
289 |
|
8161 | 290 |
val Ssum0_ss = (simpset_of Cfun3.thy) delsimps [range_composition] addsimps |
1277
caef3601c0b2
corrected some errors that occurred after introduction of local simpsets
regensbu
parents:
1274
diff
changeset
|
291 |
[(strict_IsinlIsinr RS sym),Iwhen1,Iwhen2,Iwhen3]; |
caef3601c0b2
corrected some errors that occurred after introduction of local simpsets
regensbu
parents:
1274
diff
changeset
|
292 |
|
9248
e1dee89de037
massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents:
9245
diff
changeset
|
293 |
Addsimps [strict_IsinlIsinr RS sym, Iwhen1, Iwhen2, Iwhen3]; |