# Definition:Set Equality

## Definition

Let $S$ and $T$ be sets.

### Definition 1

$S$ and $T$ are equal if and only if they have the same elements:

$S = T \iff \paren {\forall x: x \in S \iff x \in T}$

### Definition 2

$S$ and $T$ are equal if and only if both:

$S$ is a subset of $T$

and

$T$ is a subset of $S$

## Axiom of Extension

The concept of set equality is axiomatised as the Axiom of Extension in the axiom schemata of all formulations of axiomatic set theory:

Let $A$ and $B$ be sets.

The axiom of extension states that:

$A$ and $B$ are equal
they contain the same elements.

That is, if and only if:

every element of $A$ is also an element of $B$

and:

every element of $B$ is also an element of $A$.

This can be formulated as follows:

$\forall x: \paren {x \in A \iff x \in B} \iff A = B$

## Equality as applied to Classes

In the context of class theory, the same definition applies:

Let $A$ and $B$ be classes.

### Definition 1

$A$ and $B$ are equal, denoted $A = B$, if and only if:

$\forall x: \paren {x \in A \iff x \in B}$

where $\in$ denotes class membership.

### Definition 2

$A$ and $B$ are equal, denoted $A = B$, if and only if:

$A \subseteq B$ and $B \subseteq A$

where $\subseteq$ denotes the subclass relation.