diff options
| author | msozeau | 2008-07-24 20:48:15 +0000 |
|---|---|---|
| committer | msozeau | 2008-07-24 20:48:15 +0000 |
| commit | 72add906154ce22894a41cf04543a7c096456e09 (patch) | |
| tree | 5dd21c4198789c6791b845008120c71b2058c95e /tactics | |
| parent | 2337b9bfc662981a2630df8c173d54b32fa2b2b6 (diff) | |
Tauto breaking not only binary "conjunctions" seems like a bad idea
after all...
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@11259 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'tactics')
| -rw-r--r-- | tactics/tauto.ml4 | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/tactics/tauto.ml4 b/tactics/tauto.ml4 index ad6d022306..6ce54c5a29 100644 --- a/tactics/tauto.ml4 +++ b/tactics/tauto.ml4 @@ -45,10 +45,21 @@ let is_record t = let (mib,mip) = Global.lookup_inductive ind in mib.Declarations.mind_record | _ -> false - + +let is_binary t = + let (hdapp,args) = decompose_app t in + match (kind_of_term hdapp) with + | Ind ind -> + let (mib,mip) = Global.lookup_inductive ind in + mib.Declarations.mind_nparams = 2 + | _ -> false + let is_conj ist = let ind = assoc_last ist in - if (is_conjunction ind) && (is_nodep_ind ind) && not (is_record ind) then + if (is_conjunction ind) && (is_nodep_ind ind) && not (is_record ind) + && is_binary ind (* for compatibility, as (?X _ _) matches + applications with 2 or more arguments. *) + then <:tactic<idtac>> else <:tactic<fail>> |
