393 val rews = map mk_meta_eq (fst_conv :: snd_conv :: rec_thms); |
393 val rews = map mk_meta_eq (fst_conv :: snd_conv :: rec_thms); |
394 val thm = Goal.prove_global thy [] prems concl (fn {prems, ...} => EVERY |
394 val thm = Goal.prove_global thy [] prems concl (fn {prems, ...} => EVERY |
395 [rtac (#raw_induct ind_info) 1, |
395 [rtac (#raw_induct ind_info) 1, |
396 rewrite_goals_tac rews, |
396 rewrite_goals_tac rews, |
397 REPEAT ((resolve_tac prems THEN_ALL_NEW EVERY' |
397 REPEAT ((resolve_tac prems THEN_ALL_NEW EVERY' |
398 [K (rewrite_goals_tac rews), ObjectLogic.atomize_prems_tac, |
398 [K (rewrite_goals_tac rews), Object_Logic.atomize_prems_tac, |
399 DEPTH_SOLVE_1 o FIRST' [atac, etac allE, etac impE]]) 1)]); |
399 DEPTH_SOLVE_1 o FIRST' [atac, etac allE, etac impE]]) 1)]); |
400 val (thm', thy') = PureThy.store_thm (Binding.qualified_name (space_implode "_" |
400 val (thm', thy') = PureThy.store_thm (Binding.qualified_name (space_implode "_" |
401 (Long_Name.qualify qualifier "induct" :: vs' @ Ps @ ["correctness"])), thm) thy; |
401 (Long_Name.qualify qualifier "induct" :: vs' @ Ps @ ["correctness"])), thm) thy; |
402 val thms = map (fn th => zero_var_indexes (rotate_prems ~1 (th RS mp))) |
402 val thms = map (fn th => zero_var_indexes (rotate_prems ~1 (th RS mp))) |
403 (Datatype_Aux.split_conj_thm thm'); |
403 (Datatype_Aux.split_conj_thm thm'); |
452 (Logic.strip_imp_prems rlz') (Logic.strip_imp_concl rlz') (fn {prems, ...} => EVERY |
452 (Logic.strip_imp_prems rlz') (Logic.strip_imp_concl rlz') (fn {prems, ...} => EVERY |
453 [cut_facts_tac [hd prems] 1, |
453 [cut_facts_tac [hd prems] 1, |
454 etac elimR 1, |
454 etac elimR 1, |
455 ALLGOALS (asm_simp_tac HOL_basic_ss), |
455 ALLGOALS (asm_simp_tac HOL_basic_ss), |
456 rewrite_goals_tac rews, |
456 rewrite_goals_tac rews, |
457 REPEAT ((resolve_tac prems THEN_ALL_NEW (ObjectLogic.atomize_prems_tac THEN' |
457 REPEAT ((resolve_tac prems THEN_ALL_NEW (Object_Logic.atomize_prems_tac THEN' |
458 DEPTH_SOLVE_1 o FIRST' [atac, etac allE, etac impE])) 1)]); |
458 DEPTH_SOLVE_1 o FIRST' [atac, etac allE, etac impE])) 1)]); |
459 val (thm', thy') = PureThy.store_thm (Binding.qualified_name (space_implode "_" |
459 val (thm', thy') = PureThy.store_thm (Binding.qualified_name (space_implode "_" |
460 (name_of_thm elim :: vs @ Ps @ ["correctness"])), thm) thy |
460 (name_of_thm elim :: vs @ Ps @ ["correctness"])), thm) thy |
461 in |
461 in |
462 Extraction.add_realizers_i |
462 Extraction.add_realizers_i |