Fixpoint getUnique(A : Set)(ls : list A)(pf : eq_dec A) : list A :=
  match ls with
    | nil => nil
    | a :: ls' => 
      let ls'' := (getUnique ls' pf) in
        if (in_dec pf a ls'') 
          then ls''
          else a :: ls''
  end.

Theorem length_getUnique_nz : forall (A :Set)(eqd : eq_dec A)(ls : list A), length ls > 0 -> length (getUnique ls eqd) > 0.