Equivalence relation

https://en.wikipedia.org/wiki/Equivalence_relation

An equivalence relation is a binary relation that is at the same time reflexive, symmetric and transitive.

A given binary relation \sim on a set XX is said to be an equivalence relation iff it is reflexive, symmetric and transitive.

That is, a,b,cX\forall a, b, c \in X:

  • reflexivity: a:aa\forall a : a \sim a

  • symmetry: a,b:(ab)(ba)\forall a,b : (a \sim b) \to (b \sim a)

  • transitivity, a,b,c:(abbc)(ac)\forall a,b,c :(a \sim b \land b \sim c) \to (a \sim c)

A set XX together with the relation \sim is called a setoid.

As a consequence of these 3 properties an equivalence relation provides a partition of a set into equivalence classes. Two elements of the given set are equivalent to each other iff they belong to the same equivalence class.

The equivalence class of aa under \sim, denoted [a][a], is defined as: [a]={bXab}[a] = \{b \in X | a \sim b \}. For example, if XX is the set of all cars, and \sim is the equivalence relation has-the-same-color-as, then one particular equivalence class consists of all green cars.

The relation is-equal-to

The relation is-equal-to (=), is the canonical example of an equivalence relation, where a,b,c\forall a, b, c:

  • reflexivity: a=aa = a

  • symmetry: if a=ba = b then b=ab = a

  • transitivity: if a=ba = b and b=cb = c then a=ca = c

Example #1

The relation RR is defined by the set of the ordered pairs, R={(1,1),(2,2),(3,3),(1,2),(2,1),(2,3),(3,2),(1,3),(3,1)}R=\{(1,1),(2,2),(3,3),(1,2),(2,1),(2,3),(3,2),(1,3),(3,1)\}, on the set A={1,2,3}A=\{1,2,3\}. Is RR an equivalence relation?

Reflexivity:

  • aaa \sim a

  • it needs to have 3 ordered pairs (x,x)(x,x) to be reflexive, which it does:

  • {(1,1),(2,2),(3,3)}\{(1,1),(2,2),(3,3)\}

Symmetry:

  • if aba \sim b then bab \sim a

  • if it has a pair (x,y)(x,y) then it must also have a pair (x,y)(x,y)

  • {(1,2),(2,1)}\{(1,2),(2,1)\}

  • {(2,3),(3,2)}\{(2,3),(3,2)\}

  • {(1,3),(3,1)}\{(1,3),(3,1)\}

Transitivity:

  • if aba \sim b and bcb \sim c then aca \sim c

  • if there's a pair (x,y)(x,y) and (y,z)(y,z) then there must be (x,z)(x,z)

  • if {(1,2),(2,3)}\{(1,2),(2,3)\} then {(1,3)}\{(1,3)\}: it does have it

All 3 properties hold so RR an equivalence relation.

Last updated