equal
deleted
inserted
replaced
127 (* Find the variable we instantiate *) |
127 (* Find the variable we instantiate *) |
128 let |
128 let |
129 val thy = theory_of_thm thm; |
129 val thy = theory_of_thm thm; |
130 val abs_fresh = Global_Theory.get_thms thy "abs_fresh"; |
130 val abs_fresh = Global_Theory.get_thms thy "abs_fresh"; |
131 val fresh_perm_app = Global_Theory.get_thms thy "fresh_perm_app"; |
131 val fresh_perm_app = Global_Theory.get_thms thy "fresh_perm_app"; |
132 val ss = simpset_of ctxt; |
132 val simp_ctxt = |
133 val ss' = ss addsimps fresh_prod::abs_fresh; |
133 ctxt addsimps (fresh_prod :: abs_fresh) |
134 val ss'' = ss' addsimps fresh_perm_app; |
134 addsimps fresh_perm_app; |
135 val x = hd (tl (Misc_Legacy.term_vars (prop_of exI))); |
135 val x = hd (tl (Misc_Legacy.term_vars (prop_of exI))); |
136 val goal = nth (prems_of thm) (i-1); |
136 val goal = nth (prems_of thm) (i-1); |
137 val atom_name_opt = get_inner_fresh_fun goal; |
137 val atom_name_opt = get_inner_fresh_fun goal; |
138 val n = length (Logic.strip_params goal); |
138 val n = length (Logic.strip_params goal); |
139 (* Here we rely on the fact that the variable introduced by generate_fresh_tac *) |
139 (* Here we rely on the fact that the variable introduced by generate_fresh_tac *) |
162 (* The tactics which solve the subgoals generated |
162 (* The tactics which solve the subgoals generated |
163 by the conditionnal rewrite rule. *) |
163 by the conditionnal rewrite rule. *) |
164 val post_rewrite_tacs = |
164 val post_rewrite_tacs = |
165 [rtac pt_name_inst, |
165 [rtac pt_name_inst, |
166 rtac at_name_inst, |
166 rtac at_name_inst, |
167 TRY o SOLVED' (NominalPermeq.finite_guess_tac ss''), |
167 TRY o SOLVED' (NominalPermeq.finite_guess_tac simp_ctxt), |
168 inst_fresh vars params THEN' |
168 inst_fresh vars params THEN' |
169 (TRY o SOLVED' (NominalPermeq.fresh_guess_tac ss'')) THEN' |
169 (TRY o SOLVED' (NominalPermeq.fresh_guess_tac simp_ctxt)) THEN' |
170 (TRY o SOLVED' (asm_full_simp_tac ss''))] |
170 (TRY o SOLVED' (asm_full_simp_tac simp_ctxt))] |
171 in |
171 in |
172 ((if no_asm then no_tac else |
172 ((if no_asm then no_tac else |
173 (subst_inner_asm_tac ctxt fresh_fun_app' i THEN (RANGE post_rewrite_tacs i))) |
173 (subst_inner_asm_tac ctxt fresh_fun_app' i THEN (RANGE post_rewrite_tacs i))) |
174 ORELSE |
174 ORELSE |
175 (subst_inner_tac ctxt fresh_fun_app' i THEN (RANGE post_rewrite_tacs i))) st |
175 (subst_inner_tac ctxt fresh_fun_app' i THEN (RANGE post_rewrite_tacs i))) st |