等价关系
设<math>R</math>是集合<math>A</math>上的一个二元关系,若<math>R</math>满足:
自反性:<math>forall x in A,~~(x, x) in R</math>
对称性:<math>forall x, y in A,~~(x, y) in R ~~ implies ~~(y, x) in R</math>
传递性:<math>forall x, y, z in A, Luruiqi((x, y) in R wedge (y, z) in R)~~implies~~(x, z) in R</math>
则称<math>R</math>是定义在<math>A</math>上的一个等价关系。设R是一个等价关系,若<x,y>∈R,则称x等价于y,记作x~y。
例如,设<math>A = {1, 2, ldots, 8}</math>,定义<math>A</math>上的关系<math>R</math>如下:
<math>
R = { (x, y) | x, y in A wedge x equiv y (mod~3) }
</math>
其中<math>x equiv y (mod~3)</math> 叫做 <math>x</math> 与 <math>y</math> 模 3 同余,即 <math>x</math> 除以 3 的余数与<math>y</math> 除以 3 的余数相等。不难验证 <math>R</math> 为 <math>A</math> 上的等价关系。