aboutsummaryrefslogtreecommitdiffhomepage
path: root/theories/Vectors
diff options
context:
space:
mode:
authorGravatar msozeau <msozeau@85f007b7-540e-0410-9357-904b9bb8a0f7>2011-03-23 16:16:46 +0000
committerGravatar msozeau <msozeau@85f007b7-540e-0410-9357-904b9bb8a0f7>2011-03-23 16:16:46 +0000
commit0714753208a4c9c85c33f72f05245674a842eba2 (patch)
treeda716d88d20865c0f0a0f60817444cfd99e86b76 /theories/Vectors
parentcdc52320d764eb7cd005e2b535bc1c1dab59bbb5 (diff)
- Fix solve_simpl_eqn which was cheking instances types in the wrong environment sometimes.
- Remove compilation warning in classes.ml due to (as yet) unused code. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13924 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'theories/Vectors')
-rw-r--r--theories/Vectors/VectorDef.v15
1 files changed, 4 insertions, 11 deletions
diff --git a/theories/Vectors/VectorDef.v b/theories/Vectors/VectorDef.v
index d26af7876..cac37ae28 100644
--- a/theories/Vectors/VectorDef.v
+++ b/theories/Vectors/VectorDef.v
@@ -38,11 +38,7 @@ Definition rectS {A} (P:forall {n}, t A (S n) -> Type)
(bas: forall a: A, P (a :: []))
(rect: forall a {n} (v: t A (S n)), P v -> P (a :: v)) :=
fix rectS_fix {n} (v: t A (S n)) : P v :=
- match v in t _ n' return match n' return t _ n' -> Type with
- | 0 => fun _ => ID
- | S n => fun v => P v
- end v
- with
+ match v with
|nil => @id
|cons a 0 v =>
match v as vnn in t _ nn
@@ -67,9 +63,7 @@ fix rect2_fix {n} (v1:t A n):
match v1 as v1' in t _ n1
return forall v2 : t B n1, P v1' v2 with
|[] => fun v2 =>
- match v2 as v2' in t _ n2
- return match n2 as n2' return t B n2' -> Type with
- |0 => fun v2 => P [] v2 |S _ => fun _ => @ID end v2' with
+ match v2 with
|[] => bas
|_ :: _ => @id
end
@@ -89,15 +83,14 @@ end.
(** A vector of length [0] is [nil] *)
Definition case0 {A} (P:t A 0 -> Type) (H:P (nil A)) v:P v :=
-match v as v0 in t _ n return match n return t _ n -> Type with 0 => fun v => P v | S n => fun v => ID end v0 with
+match v with
|[] => H
- | _ => @id
end.
(** A vector of length [S _] is [cons] *)
Definition caseS {A} (P : forall n, t A (S n) -> Type)
(H : forall h {n} t, @P n (h :: t)) {n} v : P n v :=
-match v as v0 in t _ n return match n return t _ n -> Type with 0 => fun v => ID | S n => fun v => P n v end v0 with
+match v with
|[] => @id (* Why needed ? *)
|h :: t => H h t
end.