Section Vector_EqDec.
Variable A : Set.
Context `{eqd_A : EqDec A}.
Instance Vector_EqDec :
forall (n : nat),
EqDec (Vector.t A n).
intuition.
eapply (Build_EqDec (@eqb_vector A eqd_A n)).
intuition.
eapply eqb_vector_leibniz.
trivial.
subst.
apply eqb_vector_refl.
Qed.
End Vector_EqDec.
(* Fixpoint BvIsZero n (v : Bvector n) : bool  := match v with | Vector.nil => true | Vector.cons b _ v' => (andb (if (bool_dec b false) then true else false) (BvIsZero v')) end. *)
Instance unit_EqDec : EqDec unit.
refine {| eqb := (fun x y => true) |}.
intuition.
destruct x.
destruct y.
trivial.
Qed.
Instance bool_EqDec : EqDec bool.
refine {| eqb := Bool.eqb |}.
eapply eqb_true_iff.
Qed.
(* Bvector decidable equality was added before Vector.t decidable equality.  Definitions remain for compatibility. *)
Definition eqbBvector n (v1 v2 : Bvector n) : bool :=
(eqb_vector _ v1 v2).
intuition.
unfold eqbBvector in *.
eapply eqb_vector_leibniz.
trivial.
Qed.

Theorem eqbBvector_complete : forall n (v : Bvector n),
eqbBvector v v = true.