aboutsummaryrefslogtreecommitdiffhomepage
path: root/theories/Vectors
diff options
context:
space:
mode:
authorGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2011-07-16 20:35:17 +0000
committerGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2011-07-16 20:35:17 +0000
commitb341c644ed7ad52779b148e7ba6e3dd9158c2174 (patch)
treec554a697bfa97f3c813e6e90a1d76dbe1c35f3b6 /theories/Vectors
parent30a54a6db8190ae1dea5a9182148cb4f38ec7e02 (diff)
Tentative abbreviation "rew Heq in H" for eq_rect. (feedback welcome)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@14281 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'theories/Vectors')
-rw-r--r--theories/Vectors/VectorDef.v8
1 files changed, 4 insertions, 4 deletions
diff --git a/theories/Vectors/VectorDef.v b/theories/Vectors/VectorDef.v
index 777e68b45..adc2c09a3 100644
--- a/theories/Vectors/VectorDef.v
+++ b/theories/Vectors/VectorDef.v
@@ -197,18 +197,18 @@ Fixpoint rev_append_tail {A n p} (v : t A n) (w: t A p)
| a :: v' => rev_append_tail v' (a :: w)
end.
+Import EqdepFacts.
+
(** This one has a better type *)
Definition rev_append {A n p} (v: t A n) (w: t A p)
:t A (n + p) :=
-eq_rect _ (fun n => t A n) (rev_append_tail v w) _
- (eq_sym _ _ _ (plus_tail_plus n p)).
+ rew <- (plus_tail_plus n p) in (rev_append_tail v w).
(** rev [a₁ ; a₂ ; .. ; an] is [an ; a{n-1} ; .. ; a₁]
Caution : There is a lot of rewrite garbage in this definition *)
Definition rev {A n} (v : t A n) : t A n :=
- eq_rect _ (fun n => t A n) (rev_append v [])
- _ (eq_sym _ _ _ (plus_n_O _)).
+ rew <- (plus_n_O _) in (rev_append v []).
End BASES.
Local Notation "v [@ p ]" := (nth v p) (at level 1).