TITLE: Extending sets to extensional sets
QUESTION [14 upvotes]: Let us say a set $X$ is extensional if, for all distinct $a,b$ in $X$, $X$ contains a member of the symmetric difference of $a$ and $b$. (id est $\langle X,=,\in\rangle$ is a model of the axiom of extensionality).
My question is: ``Does every finite set have a finite extensional superset?''
I thought the answer should be an easy `yes' but i haven't been able to find a proof (even allowing myself both foundation and choice!) and i'm now beginning to doubt it.   Of course now that i have posted this question i shall see the answer immediately!  At some point, if people are interested, i shall narrate how this question arose....

REPLY [23 votes]: No, here is a counterexample (I thought about this question some time ago and also expected it would be easy to prove, but in the end couldn't do it, and arrived at this counterexample): We will construct a set $p = \{x, y\}$ with no extensional finite superset. First define
a set $n^*$ for $n<\omega$ recursively by:
$0^* = \emptyset$,
$1^* = \{0^*\}$,
$2^* = \{1^*\}$,
$3^* = \{0^*, 2^*\}$,
$4^* = \{1^*, 3^*\}$,
etc, so
$(2n+1)^* = \{0^*, 2^*, \ldots, (2n)^*\}$,
$(2n+2)^* = \{1^*, 3^*, \ldots, (2n+1)^*\}$.
Then let
$x = \{0^*, 2^*, \ldots, (2n)^*, \ldots \}$
$y = \{1^*, 3^*, \ldots, (2n+1)^*, \ldots \}$
and $p = \{x, y\}$.
Suppose that $p \subseteq q$ and $q$ is finite and extensional.
There must be some $n^*$ in $q$, in order to distinguish between $x$ and $y$.
Let $N$ be largest such that $N^*$ is in $q$.
If $N = 2n+1$ then $N^* \cap q = x \cap q$, but then $q$ is not extensional.
Likewise with $y$ if $N = 2n$. Contradiction.
(Remark: e.g. let $q = \{x, y, 0^*\}$. Then $q$ is "weakly extensional",
meaning that there are no membership-automorphisms of $q$.)