equal
deleted
inserted
replaced
309 val ctxt = Context.init_proof thy; |
309 val ctxt = Context.init_proof thy; |
310 val inject = (#inject o DatatypePackage.the_datatype thy) dtco; |
310 val inject = (#inject o DatatypePackage.the_datatype thy) dtco; |
311 val simpset = Simplifier.context ctxt |
311 val simpset = Simplifier.context ctxt |
312 (MetaSimplifier.empty_ss addsimprocs [distinct_simproc]); |
312 (MetaSimplifier.empty_ss addsimprocs [distinct_simproc]); |
313 in |
313 in |
314 (TRY o ALLGOALS o resolve_tac) [HOL.eq_reflection] |
314 (TRY o ALLGOALS o match_tac) [HOL.eq_reflection] |
315 THEN ( |
315 THEN ( |
316 (ALLGOALS o resolve_tac) (eqTrueI :: inject) |
316 (ALLGOALS o match_tac) (eqTrueI :: inject) |
317 ORELSE (ALLGOALS o simp_tac) simpset |
317 ORELSE (ALLGOALS o simp_tac) simpset |
318 ) |
318 ) |
319 THEN (ALLGOALS o resolve_tac) [HOL.refl, Drule.reflexive_thm] |
319 THEN (ALLGOALS o match_tac) [HOL.refl, Drule.reflexive_thm] |
320 end; |
320 end; |
321 |
321 |
322 fun get_datatype_spec_thms thy dtco = |
322 fun get_datatype_spec_thms thy dtco = |
323 case DatatypePackage.get_datatype_spec thy dtco |
323 case DatatypePackage.get_datatype_spec thy dtco |
324 of SOME vs_cos => |
324 of SOME vs_cos => |