Parameter A : Set.
Inductive set : Set :=
| Empty : set
| Add : A -> set -> set.
Fixpoint In (a : A) (s : set) {struct s} : Prop :=
match s with
| Empty => False
| Add b s' => a = b \/ In a s'
end.
Definition same (s t : set) : Prop := forall a : A, In a s <-> In a t.
unfold same; split ; red.
red; auto.
red.
intros.
elim (H a); auto.
intros.
elim (H a); elim (H0 a).
split; auto.
Qed.
Add Setoid set same setoid_set as setsetoid.
Add Morphism In with signature (eq ==> same ==> iff) as In_ext.

Lemma add_aux :
forall s t : set,
same s t -> forall a b : A, In a (Add b s) -> In a (Add b t).