Equivalence relation

A relation that formalizes when two elements should be regarded as the same type.
Equivalence relation

An equivalence relation on a set AA is a A×A\sim\,\subseteq A\times A satisfying the following three properties for all a,b,cAa,b,c\in A:

  • Reflexive: aaa\sim a.
  • Symmetric: if aba\sim b, then bab\sim a.
  • Transitive: if aba\sim b and bcb\sim c, then aca\sim c.

Equivalence relations partition AA into , and the set of all classes forms a .

Examples:

  • On Z\mathbb{Z}, define aba\sim b iff aba-b is divisible by a fixed nNn\in\mathbb{N} (congruence modulo nn).
  • On any set AA, the equality relation ab    a=ba\sim b \iff a=b is an equivalence relation.