equal
deleted
inserted
replaced
97 REPEAT_DETERM_N m o etac ctxt exE THEN' hyp_subst_tac ctxt THEN' |
97 REPEAT_DETERM_N m o etac ctxt exE THEN' hyp_subst_tac ctxt THEN' |
98 SELECT_GOAL (unfold_thms_tac ctxt sels) THEN' rtac ctxt refl)); |
98 SELECT_GOAL (unfold_thms_tac ctxt sels) THEN' rtac ctxt refl)); |
99 |
99 |
100 fun mk_disc_eq_case_tac ctxt ct exhaust discs distincts cases = |
100 fun mk_disc_eq_case_tac ctxt ct exhaust discs distincts cases = |
101 HEADGOAL Goal.conjunction_tac THEN |
101 HEADGOAL Goal.conjunction_tac THEN |
102 ALLGOALS (rtac ctxt (cterm_instantiate_pos [SOME ct] exhaust) THEN_ALL_NEW |
102 ALLGOALS (rtac ctxt (infer_instantiate' ctxt [SOME ct] exhaust) THEN_ALL_NEW |
103 (hyp_subst_tac ctxt THEN' |
103 (hyp_subst_tac ctxt THEN' |
104 SELECT_GOAL (unfold_thms_tac ctxt (@{thms not_True_eq_False not_False_eq_True} @ cases @ |
104 SELECT_GOAL (unfold_thms_tac ctxt (@{thms not_True_eq_False not_False_eq_True} @ cases @ |
105 ((refl :: discs @ distincts) RL [eqTrueI, eqFalseI]))) THEN' |
105 ((refl :: discs @ distincts) RL [eqTrueI, eqFalseI]))) THEN' |
106 resolve_tac ctxt @{thms TrueI True_not_False False_not_True})); |
106 resolve_tac ctxt @{thms TrueI True_not_False False_not_True})); |
107 |
107 |
159 (if k' = k then mk_case_same_ctr_tac ctxt injects |
159 (if k' = k then mk_case_same_ctr_tac ctxt injects |
160 else mk_case_distinct_ctrs_tac ctxt distincts)) ks distinctss)) |
160 else mk_case_distinct_ctrs_tac ctxt distincts)) ks distinctss)) |
161 end; |
161 end; |
162 |
162 |
163 fun mk_case_distrib_tac ctxt ct exhaust cases = |
163 fun mk_case_distrib_tac ctxt ct exhaust cases = |
164 HEADGOAL (rtac ctxt (cterm_instantiate_pos [SOME ct] exhaust)) THEN |
164 HEADGOAL (rtac ctxt (infer_instantiate' ctxt [SOME ct] exhaust)) THEN |
165 ALLGOALS (hyp_subst_tac ctxt THEN' SELECT_GOAL (unfold_thms_tac ctxt cases) THEN' rtac ctxt refl); |
165 ALLGOALS (hyp_subst_tac ctxt THEN' SELECT_GOAL (unfold_thms_tac ctxt cases) THEN' rtac ctxt refl); |
166 |
166 |
167 fun mk_case_cong_tac ctxt uexhaust cases = |
167 fun mk_case_cong_tac ctxt uexhaust cases = |
168 HEADGOAL (rtac ctxt uexhaust THEN' |
168 HEADGOAL (rtac ctxt uexhaust THEN' |
169 EVERY' (maps (fn casex => [dtac ctxt sym, asm_simp_tac (ss_only [casex] ctxt)]) cases)); |
169 EVERY' (maps (fn casex => [dtac ctxt sym, asm_simp_tac (ss_only [casex] ctxt)]) cases)); |