TITLE: If two transitive models of ZFC have the same sets of ordinals, they are equal
QUESTION [5 upvotes]: Let M and N be transitive models of ZFC such that for every set x of ordinals, $x \in M \iff x \in N$. I want to show M=N. It will suffice to show $M \subset N$ by symmetry. I was thinking of assuming the contrary, and letting $x \in M$, $x \notin N$ be of least rank. So, we know that for all $y \in x$, $y \in N$. So now I just need to show that these $y$'s form a set in N. If there was a function in N enumerating these $y$'s whose domain is an ordinal, I could apply replacement and be done. I still haven't used the hypothesis of the models having the same sets of ordinals, and I'm not sure how to proceed.

REPLY [3 votes]: HINT: Take any set $x\in M$, show that by knowing $\operatorname{tc}(\{x\})$ we know what $x$ is; then use the axiom of choice to find a set of ordinals $A$ such that by decoding $A$ into a set of ordered pairs of ordinals, we obtain a structure isomorphic to $\operatorname{tc}(\{x\})$, finally use Mostowski's collapse lemma.