diff options
author | Hugo Herbelin <Hugo.Herbelin@inria.fr> | 2015-09-01 12:19:59 +0200 |
---|---|---|
committer | Hugo Herbelin <Hugo.Herbelin@inria.fr> | 2015-09-08 12:45:58 +0200 |
commit | df7bc187e4cff19f717771223b7ea56db117cad0 (patch) | |
tree | f04aefc11abf65677d99b858bb1a8dc2238a1afd | |
parent | 108ede6e7aa4383474581bc428ff05b94097c92d (diff) |
Adding a proof of eta on Vector.t of non-zero size.
-rw-r--r-- | theories/Vectors/VectorSpec.v | 10 |
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] *) |