equal
deleted
inserted
replaced
515 let |
515 let |
516 val goal = mk_eqs (mk_DEFL lhsT, mk_DEFL rhsT) |
516 val goal = mk_eqs (mk_DEFL lhsT, mk_DEFL rhsT) |
517 val DEFL_simps = |
517 val DEFL_simps = |
518 Named_Theorems.get (Proof_Context.init_global thy) @{named_theorems domain_defl_simps} |
518 Named_Theorems.get (Proof_Context.init_global thy) @{named_theorems domain_defl_simps} |
519 fun tac ctxt = |
519 fun tac ctxt = |
520 rewrite_goals_tac ctxt (map mk_meta_eq DEFL_simps) |
520 rewrite_goals_tac ctxt (map mk_meta_eq (rev DEFL_simps)) |
521 THEN TRY (resolve_tac defl_unfold_thms 1) |
521 THEN TRY (resolve_tac defl_unfold_thms 1) |
522 in |
522 in |
523 Goal.prove_global thy [] [] goal (tac o #context) |
523 Goal.prove_global thy [] [] goal (tac o #context) |
524 end |
524 end |
525 val DEFL_eq_thms = map mk_DEFL_eq_thm dom_eqns |
525 val DEFL_eq_thms = map mk_DEFL_eq_thm dom_eqns |
618 val map_ID_thms = Domain_Take_Proofs.get_map_ID_thms thy |
618 val map_ID_thms = Domain_Take_Proofs.get_map_ID_thms thy |
619 val map_ID_simps = map (fn th => th RS sym) map_ID_thms |
619 val map_ID_simps = map (fn th => th RS sym) map_ID_thms |
620 val isodefl_rules = |
620 val isodefl_rules = |
621 @{thms conjI isodefl_ID_DEFL isodefl_LIFTDEFL} |
621 @{thms conjI isodefl_ID_DEFL isodefl_LIFTDEFL} |
622 @ isodefl_abs_rep_thms |
622 @ isodefl_abs_rep_thms |
623 @ Named_Theorems.get (Proof_Context.init_global thy) @{named_theorems domain_isodefl} |
623 @ rev (Named_Theorems.get (Proof_Context.init_global thy) @{named_theorems domain_isodefl}) |
624 in |
624 in |
625 Goal.prove_global thy [] assms goal (fn {prems, context = ctxt} => |
625 Goal.prove_global thy [] assms goal (fn {prems, context = ctxt} => |
626 EVERY |
626 EVERY |
627 [rewrite_goals_tac ctxt (defl_apply_thms @ map_apply_thms), |
627 [rewrite_goals_tac ctxt (defl_apply_thms @ map_apply_thms), |
628 rtac (@{thm cont_parallel_fix_ind} |
628 rtac (@{thm cont_parallel_fix_ind} |
630 REPEAT (resolve_tac adm_rules 1), |
630 REPEAT (resolve_tac adm_rules 1), |
631 simp_tac (put_simpset HOL_basic_ss ctxt addsimps bottom_rules) 1, |
631 simp_tac (put_simpset HOL_basic_ss ctxt addsimps bottom_rules) 1, |
632 simp_tac (put_simpset HOL_basic_ss ctxt addsimps tuple_rules) 1, |
632 simp_tac (put_simpset HOL_basic_ss ctxt addsimps tuple_rules) 1, |
633 simp_tac (put_simpset HOL_basic_ss ctxt addsimps map_ID_simps) 1, |
633 simp_tac (put_simpset HOL_basic_ss ctxt addsimps map_ID_simps) 1, |
634 REPEAT (etac @{thm conjE} 1), |
634 REPEAT (etac @{thm conjE} 1), |
635 REPEAT (resolve_tac (rev isodefl_rules @ prems) 1 ORELSE atac 1)]) |
635 REPEAT (resolve_tac (isodefl_rules @ prems) 1 ORELSE atac 1)]) |
636 end |
636 end |
637 val isodefl_binds = map (Binding.prefix_name "isodefl_") dbinds |
637 val isodefl_binds = map (Binding.prefix_name "isodefl_") dbinds |
638 fun conjuncts [] _ = [] |
638 fun conjuncts [] _ = [] |
639 | conjuncts (n::[]) thm = [(n, thm)] |
639 | conjuncts (n::[]) thm = [(n, thm)] |
640 | conjuncts (n::ns) thm = let |
640 | conjuncts (n::ns) thm = let |