diff options
| author | glondu | 2010-12-02 09:24:31 +0000 |
|---|---|---|
| committer | glondu | 2010-12-02 09:24:31 +0000 |
| commit | a281f908a65ba7ba0678f42e20b3a0ed78250b18 (patch) | |
| tree | 269e09b6faf1dcb43bfd97f1f64451ad9557e33a | |
| parent | 75ed3a811a215a2a4130cb58970588c42879bbd8 (diff) | |
Add tactic is_evar (Closes: #2433)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13663 85f007b7-540e-0410-9357-904b9bb8a0f7
| -rw-r--r-- | doc/refman/RefMan-tac.tex | 10 | ||||
| -rw-r--r-- | tactics/extratactics.ml4 | 13 |
2 files changed, 23 insertions, 0 deletions
diff --git a/doc/refman/RefMan-tac.tex b/doc/refman/RefMan-tac.tex index c1d6b1d0c9..3f9f03c40f 100644 --- a/doc/refman/RefMan-tac.tex +++ b/doc/refman/RefMan-tac.tex @@ -989,6 +989,16 @@ Assumptions} (see Section~\ref{PrintAssumptions}). Admitted subgoals have names of the form {\ident}\texttt{\_admitted} possibly followed by a number. +\subsection{\tt is\_evar \term +\tacindex{is\_evar} +\label{isevar}} + +This tactic applies to any goal. It checks whether its argument is an +existential variable. Existential variables are uninstantiated +variables generated by e.g. {\tt eapply} (see Section~\ref{apply}). + +\ErrMsg \errindex{Not an evar} + \subsection{Bindings list \index{Binding list} \label{Binding-list}} diff --git a/tactics/extratactics.ml4 b/tactics/extratactics.ml4 index f9c8e47fd7..393934abfa 100644 --- a/tactics/extratactics.ml4 +++ b/tactics/extratactics.ml4 @@ -705,3 +705,16 @@ END (* ********************************************************************* *) + +TACTIC EXTEND constr_eq +| [ "constr_eq" constr(x) constr(y) ] -> [ + if eq_constr x y then tclIDTAC else tclFAIL 0 (str "Not equal") ] +END + +TACTIC EXTEND is_evar +| [ "is_evar" constr(x) ] -> + [ match kind_of_term x with + | Evar _ -> tclIDTAC + | _ -> tclFAIL 0 (str "Not an evar") + ] +END |
