Section Count.
Variable (X : eqType).
Definition count (n : nat) (x : X) (xs : t X n) :=
fold_right (fun y c => if Dec (x = y) then S c else c) xs 0.

Lemma countDupfree (n : nat) (xs : t X n) :
(forall x : X, In x xs -> count x xs = 1) <-> dupfree xs.