Instance Bvector_EqDec n : EqDec (Bvector n).Instance nat_EqDec : EqDec nat.Definition eqbPair (A B : Set)(dA : EqDec A)(dB : EqDec B)(p1 p2 : (A*B)) :=
  (eqb (fst p1) (fst p2)) && (eqb (snd p1) (snd p2)).Instance pair_EqDec (A B : Set) (dA : EqDec A) (dB : EqDec B) : EqDec (prod A B).Definition eqbSum(A B : Set)(dA : EqDec A)(dB : EqDec B)(s1 s2 : (A + B)) :=
  match s1 with
    | inl a1 =>
    match s2 with
      | inl a2 => eqb a1 a2
      | inr b2 => false
    end
    | inr b1 =>
    match s2 with
      | inl a2 => false
      | inr b2 => eqb b1 b2
    end
  end.Instance sum_EqDec (A B : Set) (dA : EqDec A) (dB : EqDec B) :
    EqDec (sum A B).Definition eqbOption (A : Set)(dA : EqDec A)(o1 o2 : option A) :=
  match o1 with
    | None => 
      match o2 with
        | None => true
        | Some _ => false
      end
    | Some a1 =>
      match o2 with
        | None => false
        | Some a2 => (eqb a1 a2)
      end
  end.Instance option_EqDec (A : Set) (dA : EqDec A) : EqDec (option A).Fixpoint eqbList(A : Set)(eqd : EqDec A)(ls1 ls2 : list A) :=
  match ls1 with
    | nil => 
      match ls2 with
        | nil => true
        | _ :: _ => false
      end
    | a1 :: ls1' =>
      match ls2 with
        | nil => false 
        | a2 :: ls2' =>
          (eqb a1 a2) && (eqbList _ ls1' ls2')
      end
  end.

Lemma eqbList_correct2 : forall (A : Set)(eqd : EqDec A) ls1 ls2, ls1 = ls2 -> eqbList eqd ls1 ls2 = true.