induction ls2; intuition; simpl in *.
inversion H.
destruct (in_dec eqd a (getUnique ls2 eqd)).
apply IHls2 in H.
destruct H.
destruct H.
intuition.
subst.
econstructor.
econstructor.
split.
eapply app_comm_cons.
trivial.
inversion H; clear H; subst.
econstructor.
econstructor.
intuition.
rewrite app_nil_l.
trivial.
Qed.

(* Specifications: *)
Lemma getUnique_eq_inv :
forall (A : Set)(a : A)(eqd1 eqd2 : eq_dec A)(ls1 ls2 : list A),
getUnique ls1 eqd1 = getUnique ls2 eqd2 ->
In a ls1 ->
In a ls2.