148 by (case_tac "a=b" 1); |
148 by (case_tac "a=b" 1); |
149 by (Blast_tac 1); |
149 by (Blast_tac 1); |
150 by (blast_tac (claset() addSIs [r_into_rtrancl]) 1); |
150 by (blast_tac (claset() addSIs [r_into_rtrancl]) 1); |
151 qed "rtrancl_r_diff_Id"; |
151 qed "rtrancl_r_diff_Id"; |
152 |
152 |
153 Goal "(x,y) : (r^-1)^* ==> (x,y) : (r^*)^-1"; |
153 Goal "(x,y) : (r^-1)^* ==> (y,x) : r^*"; |
154 by (rtac converseI 1); |
|
155 by (etac rtrancl_induct 1); |
154 by (etac rtrancl_induct 1); |
156 by (rtac rtrancl_refl 1); |
155 by (rtac rtrancl_refl 1); |
157 by (blast_tac (claset() addIs [r_into_rtrancl,rtrancl_trans]) 1); |
156 by (blast_tac (claset() addIs [r_into_rtrancl,rtrancl_trans]) 1); |
158 qed "rtrancl_converseD"; |
157 qed "rtrancl_converseD"; |
159 |
158 |
160 Goal "(x,y) : (r^*)^-1 ==> (x,y) : (r^-1)^*"; |
159 Goal "(y,x) : r^* ==> (x,y) : (r^-1)^*"; |
161 by (dtac converseD 1); |
|
162 by (etac rtrancl_induct 1); |
160 by (etac rtrancl_induct 1); |
163 by (rtac rtrancl_refl 1); |
161 by (rtac rtrancl_refl 1); |
164 by (blast_tac (claset() addIs [r_into_rtrancl,rtrancl_trans]) 1); |
162 by (blast_tac (claset() addIs [r_into_rtrancl,rtrancl_trans]) 1); |
165 qed "rtrancl_converseI"; |
163 qed "rtrancl_converseI"; |
166 |
164 |
167 Goal "(r^-1)^* = (r^*)^-1"; |
165 Goal "(r^-1)^* = (r^*)^-1"; |
|
166 (*blast_tac fails: the split_all_tac wrapper must be called to convert |
|
167 the set element to a pair*) |
168 by (safe_tac (claset() addSDs [rtrancl_converseD] addSIs [rtrancl_converseI])); |
168 by (safe_tac (claset() addSDs [rtrancl_converseD] addSIs [rtrancl_converseI])); |
169 qed "rtrancl_converse"; |
169 qed "rtrancl_converse"; |
170 |
170 |
171 val major::prems = Goal |
171 val major::prems = Goal |
172 "[| (a,b) : r^*; P(b); \ |
172 "[| (a,b) : r^*; P(b); \ |
173 \ !!y z.[| (y,z) : r; (z,b) : r^*; P(z) |] ==> P(y) |] \ |
173 \ !!y z.[| (y,z) : r; (z,b) : r^*; P(z) |] ==> P(y) |] \ |
174 \ ==> P(a)"; |
174 \ ==> P(a)"; |
175 by (rtac ((major RS converseI RS rtrancl_converseI) RS rtrancl_induct) 1); |
175 by (rtac (major RS rtrancl_converseI RS rtrancl_induct) 1); |
176 by (resolve_tac prems 1); |
176 by (resolve_tac prems 1); |
177 by (blast_tac (claset() addIs prems addSDs[rtrancl_converseD])1); |
177 by (blast_tac (claset() addIs prems addSDs[rtrancl_converseD])1); |
178 qed "converse_rtrancl_induct"; |
178 qed "converse_rtrancl_induct"; |
179 |
179 |
180 bind_thm ("converse_rtrancl_induct2", split_rule |
180 bind_thm ("converse_rtrancl_induct2", split_rule |