diff options
| author | herbelin | 2003-10-21 10:05:41 +0000 |
|---|---|---|
| committer | herbelin | 2003-10-21 10:05:41 +0000 |
| commit | 1451dd046e318b0a53218b44a691854381eac6f5 (patch) | |
| tree | d357f30283ec603e9f7945f7437d24046bbd67b4 | |
| parent | 8a7a3efa44c871af94d919488233a99e5fe9249e (diff) | |
Bug Abstract en presence de LetIn; essai d'un Assumption d'abord avec alpha-conversion et seulement apres avec conversion (suggestion de Carlos Simpson)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@4686 85f007b7-540e-0410-9357-904b9bb8a0f7
| -rw-r--r-- | tactics/tactics.ml | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/tactics/tactics.ml b/tactics/tactics.ml index c4a7e42881..65a846dc62 100644 --- a/tactics/tactics.ml +++ b/tactics/tactics.ml @@ -735,13 +735,17 @@ let exact_proof c gl = let (assumption : tactic) = fun gl -> let concl = pf_concl gl in - let rec arec = function - | [] -> error "No such assumption" + let hyps = pf_hyps gl in + let rec arec only_eq = function + | [] -> + if only_eq then arec false hyps else error "No such assumption" | (id,c,t)::rest -> - if pf_conv_x_leq gl t concl then refine_no_check (mkVar id) gl - else arec rest + if (only_eq & eq_constr t concl) + or (not only_eq & pf_conv_x_leq gl t concl) + then refine_no_check (mkVar id) gl + else arec only_eq rest in - arec (pf_hyps gl) + arec true hyps (*****************************************************************) (* Modification of a local context *) @@ -1679,8 +1683,8 @@ let abstract_subproof name tac gls = constr_of_reference (ConstRef (snd sp)) in exact_no_check - (applist (lemme, - List.map mkVar (List.rev (ids_of_named_context sign)))) + (applist (lemme, + List.rev (Array.to_list (instance_from_named_context sign)))) gls let tclABSTRACT name_op tac gls = |
