42 open BNF_Util |
42 open BNF_Util |
43 open BNF_FP_Util |
43 open BNF_FP_Util |
44 |
44 |
45 val basic_simp_thms = @{thms simp_thms(7,8,12,14,22,24)}; |
45 val basic_simp_thms = @{thms simp_thms(7,8,12,14,22,24)}; |
46 val more_simp_thms = basic_simp_thms @ @{thms simp_thms(11,15,16,21)}; |
46 val more_simp_thms = basic_simp_thms @ @{thms simp_thms(11,15,16,21)}; |
|
47 val simp_thms' = @{thms simp_thms(6,7,8,11,12,15,16,22,24)}; |
47 |
48 |
48 val sumprod_thms_map = @{thms id_apply map_prod_simp prod.case sum.case map_sum.simps}; |
49 val sumprod_thms_map = @{thms id_apply map_prod_simp prod.case sum.case map_sum.simps}; |
49 val sumprod_thms_set = |
50 val sumprod_thms_set = |
50 @{thms UN_empty UN_insert Un_empty_left Un_empty_right Un_iff UN_simps(10) UN_iff |
51 @{thms UN_empty UN_insert Un_empty_left Un_empty_right Un_iff UN_simps(10) UN_iff |
51 Union_Un_distrib image_iff o_apply map_prod_simp |
52 Union_Un_distrib image_iff o_apply map_prod_simp |
216 (rtac exhaust THEN_ALL_NEW (rtac exhaust THEN_ALL_NEW |
217 (rtac exhaust THEN_ALL_NEW (rtac exhaust THEN_ALL_NEW |
217 (dtac (rotate_prems (~1) ((cterm_instantiate_pos [NONE, NONE, NONE, NONE, SOME ct] @{thm |
218 (dtac (rotate_prems (~1) ((cterm_instantiate_pos [NONE, NONE, NONE, NONE, SOME ct] @{thm |
218 arg_cong2}) RS iffD1)) THEN' |
219 arg_cong2}) RS iffD1)) THEN' |
219 atac THEN' atac THEN' hyp_subst_tac ctxt THEN' dtac assm THEN' |
220 atac THEN' atac THEN' hyp_subst_tac ctxt THEN' dtac assm THEN' |
220 REPEAT_DETERM o etac conjE))) 1 THEN |
221 REPEAT_DETERM o etac conjE))) 1 THEN |
221 Local_Defs.unfold_tac ctxt ((discs RL @{thms iffD2[OF eq_True] iffD2[OF eq_False]}) @ |
222 Local_Defs.unfold_tac ctxt ((discs RL @{thms iffD2[OF eq_True] iffD2[OF eq_False]}) @ sels |
222 sels @ @{thms simp_thms(6,7,8,11,12,15,16,22,24)}) THEN |
223 @ simp_thms') THEN |
223 Local_Defs.unfold_tac ctxt (dtor_ctor :: rel_pre_def :: abs_inverse :: ctor_inject :: |
224 Local_Defs.unfold_tac ctxt (dtor_ctor :: rel_pre_def :: abs_inverse :: ctor_inject :: |
224 abs_inject :: ctor_defs @ @{thms BNF_Comp.id_bnf_comp_def rel_sum_simps rel_prod_apply |
225 abs_inject :: ctor_defs @ simp_thms' @ @{thms BNF_Comp.id_bnf_comp_def rel_sum_simps |
225 vimage2p_def Inl_Inr_False iffD2[OF eq_False Inr_not_Inl] sum.inject prod.inject |
226 rel_prod_apply vimage2p_def Inl_Inr_False iffD2[OF eq_False Inr_not_Inl] sum.inject |
226 simp_thms(6,7,8,11,12,15,16,22,24)}) THEN |
227 prod.inject}) THEN |
227 REPEAT_DETERM (HEADGOAL ((REPEAT_DETERM o etac conjE) THEN' (REPEAT_DETERM o rtac conjI) THEN' |
228 REPEAT_DETERM (HEADGOAL ((REPEAT_DETERM o etac conjE) THEN' (REPEAT_DETERM o rtac conjI) THEN' |
228 (rtac refl ORELSE' atac)))) |
229 (rtac refl ORELSE' atac)))) |
229 cts assms exhausts discss selss ctor_defss dtor_ctors ctor_injects abs_injects rel_pre_defs |
230 cts assms exhausts discss selss ctor_defss dtor_ctors ctor_injects abs_injects rel_pre_defs |
230 abs_inverses); |
231 abs_inverses); |
231 |
232 |