aboutsummaryrefslogtreecommitdiff
path: root/theories
diff options
context:
space:
mode:
authormsozeau2008-04-27 11:16:15 +0000
committermsozeau2008-04-27 11:16:15 +0000
commite961ace331ec961dcec0e2525d7b9142d04b5154 (patch)
tree08ffca7a4fdb28b5a79f3409d8478deecb099c3d /theories
parentfc10282837971f8f0648841d944dd64b11d3a3db (diff)
- Fix bug in unification not taking into account the right meta
substitution. Makes unification succeed a bit more often, hence auto works better in some cases. - Backtrack the changes of auto using Hint Unfold to do more delta and add a new tactic "new auto" which does that, for compatibility. The first fix may have a big impact on the contribs, whereas the second should make them compile again... we'll see. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@10855 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'theories')
-rw-r--r--theories/Ints/num/NMake.v20
-rw-r--r--theories/Lists/List.v4
-rw-r--r--theories/Sets/Powerset_Classical_facts.v1
-rw-r--r--theories/Strings/String.v4
-rw-r--r--theories/ZArith/Zpow_facts.v9
5 files changed, 9 insertions, 29 deletions
diff --git a/theories/Ints/num/NMake.v b/theories/Ints/num/NMake.v
index ab7b4a2549..5cc8f0284a 100644
--- a/theories/Ints/num/NMake.v
+++ b/theories/Ints/num/NMake.v
@@ -5177,9 +5177,6 @@ Qed.
rewrite H1; simpl Z_of_nat; change (2^1) with (2).
unfold base.
apply Zpower_le_monotone; split; auto with zarith.
- rewrite Zmult_comm; repeat rewrite <- Zmult_assoc.
- repeat rewrite <- Zpos_xO.
- refine (Zle_refl _).
intros n; case n; clear n.
intros H1; rewrite spec_reduce_2; unfold to_Z.
apply (znz_of_pos_correct w2_spec).
@@ -5187,19 +5184,13 @@ Qed.
rewrite H1; simpl Z_of_nat; change (2^2) with (2 * 2).
unfold base.
apply Zpower_le_monotone; split; auto with zarith.
- rewrite Zmult_comm; repeat rewrite <- Zmult_assoc.
- repeat rewrite <- Zpos_xO.
- refine (Zle_refl _).
intros n; case n; clear n.
intros H1; rewrite spec_reduce_3; unfold to_Z.
apply (znz_of_pos_correct w3_spec).
apply Zlt_le_trans with (1 := pheight_correct x).
rewrite H1; simpl Z_of_nat; change (2^3) with (2 * 2 * 2).
unfold base.
- apply Zpower_le_monotone; split; auto with zarith.
- rewrite Zmult_comm; repeat rewrite <- Zmult_assoc.
- repeat rewrite <- Zpos_xO.
- refine (Zle_refl _).
+ apply Zpower_le_monotone; split; auto with zarith.
intros n; case n; clear n.
intros H1; rewrite spec_reduce_4; unfold to_Z.
apply (znz_of_pos_correct w4_spec).
@@ -5207,9 +5198,6 @@ Qed.
rewrite H1; simpl Z_of_nat; change (2^4) with (2 * 2 * 2 * 2).
unfold base.
apply Zpower_le_monotone; split; auto with zarith.
- rewrite Zmult_comm; repeat rewrite <- Zmult_assoc.
- repeat rewrite <- Zpos_xO.
- refine (Zle_refl _).
intros n; case n; clear n.
intros H1; rewrite spec_reduce_5; unfold to_Z.
apply (znz_of_pos_correct w5_spec).
@@ -5217,9 +5205,6 @@ Qed.
rewrite H1; simpl Z_of_nat; change (2^5) with (2 * 2 * 2 * 2 * 2).
unfold base.
apply Zpower_le_monotone; split; auto with zarith.
- rewrite Zmult_comm; repeat rewrite <- Zmult_assoc.
- repeat rewrite <- Zpos_xO.
- refine (Zle_refl _).
intros n; case n; clear n.
intros H1; rewrite spec_reduce_6; unfold to_Z.
apply (znz_of_pos_correct w6_spec).
@@ -5227,9 +5212,6 @@ Qed.
rewrite H1; simpl Z_of_nat; change (2^6) with (2 * 2 * 2 * 2 * 2 * 2).
unfold base.
apply Zpower_le_monotone; split; auto with zarith.
- rewrite Zmult_comm; repeat rewrite <- Zmult_assoc.
- repeat rewrite <- Zpos_xO.
- refine (Zle_refl _).
intros n.
intros H1; rewrite spec_reduce_n; unfold to_Z.
simpl minus; rewrite <- minus_n_O.
diff --git a/theories/Lists/List.v b/theories/Lists/List.v
index 5ab27cfc7d..78a2db5347 100644
--- a/theories/Lists/List.v
+++ b/theories/Lists/List.v
@@ -686,8 +686,7 @@ Section ListOps.
rewrite app_nth1; auto.
rewrite (minus_plus_simpl_l_reverse (length l) n 1).
replace (1 + length l) with (S (length l)); auto with arith.
- rewrite <- minus_Sn_m; auto with arith; simpl.
- apply IHl; auto.
+ rewrite <- minus_Sn_m; auto with arith.
rewrite rev_length; auto.
Qed.
@@ -1363,7 +1362,6 @@ End Fold_Right_Recursor.
destruct n; destruct d; simpl; auto.
destruct a; destruct (split l); simpl; auto.
destruct a; destruct (split l); simpl in *; auto.
- rewrite IHl; simpl; auto.
Qed.
Lemma split_length_l : forall (l:list (A*B)),
diff --git a/theories/Sets/Powerset_Classical_facts.v b/theories/Sets/Powerset_Classical_facts.v
index ac36640549..8116045b69 100644
--- a/theories/Sets/Powerset_Classical_facts.v
+++ b/theories/Sets/Powerset_Classical_facts.v
@@ -101,6 +101,7 @@ Section Sets_as_an_algebra.
intros X x H'; red in |- *.
intros x0 H'0; try assumption.
elim (classic (x = x0)); intro K; auto with sets.
+ elim K; auto with sets.
Qed.
Lemma add_soustr_1 :
diff --git a/theories/Strings/String.v b/theories/Strings/String.v
index 4057ba022e..6826e0c51f 100644
--- a/theories/Strings/String.v
+++ b/theories/Strings/String.v
@@ -110,8 +110,8 @@ Proof.
intros s1; elim s1; simpl in |- *; auto.
intros s2 n; rewrite plus_comm; simpl in |- *; auto.
intros a s1' Rec s2 n; case n; simpl in |- *; auto.
-generalize (Rec s2 0); simpl in |- *; auto.
-intros n0; rewrite <- Plus.plus_Snm_nSm; auto.
+generalize (Rec s2 0); simpl in |- *; auto. intros.
+rewrite <- Plus.plus_Snm_nSm; auto.
Qed.
(** *** Substrings *)
diff --git a/theories/ZArith/Zpow_facts.v b/theories/ZArith/Zpow_facts.v
index b862d663b8..9524bd44f5 100644
--- a/theories/ZArith/Zpow_facts.v
+++ b/theories/ZArith/Zpow_facts.v
@@ -171,12 +171,11 @@ Qed.
Theorem Zpower_ge_0: forall x y, 0 <= x -> 0 <= x^y.
Proof.
intros x y; case y; auto with zarith.
- simpl; auto with zarith.
intros p H1; assert (H: 0 <= Zpos p); auto with zarith.
- generalize H; pattern (Zpos p); apply natlike_ind; auto.
- intros p1 H2 H3 _; unfold Zsucc; rewrite Zpower_exp; simpl; auto with zarith.
- apply Zmult_le_0_compat; auto with zarith.
- generalize H1; case x; compute; intros; auto; discriminate.
+ generalize H; pattern (Zpos p); apply natlike_ind; auto with zarith.
+ intros p1 H2 H3 _; unfold Zsucc; rewrite Zpower_exp; simpl; auto with zarith.
+ apply Zmult_le_0_compat; auto with zarith.
+ generalize H1; case x; compute; intros; auto; try discriminate.
Qed.
Theorem Zpower_le_monotone2: