aboutsummaryrefslogtreecommitdiffhomepage
path: root/theories/Vectors
diff options
context:
space:
mode:
authorGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2015-09-01 12:19:59 +0200
committerGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2015-09-08 12:45:58 +0200
commitdf7bc187e4cff19f717771223b7ea56db117cad0 (patch)
treef04aefc11abf65677d99b858bb1a8dc2238a1afd /theories/Vectors
parent108ede6e7aa4383474581bc428ff05b94097c92d (diff)
Adding a proof of eta on Vector.t of non-zero size.
Diffstat (limited to 'theories/Vectors')
-rw-r--r--theories/Vectors/VectorSpec.v10
1 files changed, 10 insertions, 0 deletions
diff --git a/theories/Vectors/VectorSpec.v b/theories/Vectors/VectorSpec.v
index 7f4228dd6..46b537737 100644
--- a/theories/Vectors/VectorSpec.v
+++ b/theories/Vectors/VectorSpec.v
@@ -22,6 +22,16 @@ Definition cons_inj {A} {a1 a2} {n} {v1 v2 : t A n}
with | eq_refl => conj eq_refl eq_refl
end.
+Lemma eta {A} {n} (v : t A (S n)) : v = hd v :: tl v.
+Proof.
+ change
+ (match S n with
+ | 0 => fun v : t A 0 => v = v
+ | S n => fun v => v = hd v :: tl v
+ end v).
+ destruct v; reflexivity.
+Defined.
+
(** Lemmas are done for functions that use [Fin.t] but thanks to [Peano_dec.le_unique], all
is true for the one that use [lt] *)