aboutsummaryrefslogtreecommitdiffhomepage
path: root/tactics/tauto.ml4
diff options
context:
space:
mode:
Diffstat (limited to 'tactics/tauto.ml4')
-rw-r--r--tactics/tauto.ml415
1 files changed, 13 insertions, 2 deletions
diff --git a/tactics/tauto.ml4 b/tactics/tauto.ml4
index ad6d02230..6ce54c5a2 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>>