aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--tactics/tauto.ml415
-rw-r--r--theories/QArith/Qreduction.v4
-rw-r--r--theories/ZArith/Znumtheory.v3
3 files changed, 16 insertions, 6 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>>
diff --git a/theories/QArith/Qreduction.v b/theories/QArith/Qreduction.v
index f289b6106..6b16cfff4 100644
--- a/theories/QArith/Qreduction.v
+++ b/theories/QArith/Qreduction.v
@@ -49,7 +49,7 @@ Proof.
Open Scope Z_scope.
intuition.
rewrite <- H in H0,H1; clear H.
- rewrite H5; rewrite H6.
+ rewrite H3; rewrite H4.
assert (0 <> g).
intro; subst g; discriminate.
@@ -57,7 +57,7 @@ Proof.
apply Zmult_gt_0_lt_0_reg_r with g.
omega.
rewrite Zmult_comm.
- rewrite <- H6; compute; auto.
+ rewrite <- H4; compute; auto.
rewrite Z2P_correct; auto.
ring.
Close Scope Z_scope.
diff --git a/theories/ZArith/Znumtheory.v b/theories/ZArith/Znumtheory.v
index f4e5bfc15..93ec1081b 100644
--- a/theories/ZArith/Znumtheory.v
+++ b/theories/ZArith/Znumtheory.v
@@ -521,8 +521,7 @@ Qed.
Lemma Zis_gcd_mult :
forall a b c d:Z, Zis_gcd a b d -> Zis_gcd (c * a) (c * b) (c * d).
Proof.
- intros a b c d; simple induction 1; constructor.
- intuition. intuition. intros.
+ intros a b c d; simple induction 1; constructor; intuition.
elim (Zis_gcd_bezout a b d H). intros.
elim H3; intros.
elim H4; intros.