In material set theory, the axiom of extensionality says that the global membership relation $\in$ is an extensional relation on the class of all pure sets.

Since any relation becomes extensional on its extensional quotient, one can interpret this axiom as a definition of equality. However, because the extensional quotient map need not reflect the relation, there is still content to the axiom: if two sets would be identified in the extensional quotient, then they must be members of the same sets and have the same sets as members.

If one models pure sets in structural set theory, then this property may be made to hold by construction.

If two sets have the same members, then they are equal.

Or taking equality as defined:

Axiom

If two sets have the same members, then they are members of the same sets.

Here we define two sets to be equal if they have the same members.

Note that we may prove, using the axiom of separation (bounded separation is enough), the converse: two sets must be equal if they are members of the same sets (as long as we have something, such as the axiom of pairing or power sets, to guarantee that each set is a member of some set).