# 等价关系

集合上的等价关系是一种自反、对称且传递的二元关系，因此它的行为类似于相等，同时把具有某种共同性质的不同元素归为一类。形式上，集合 \( S \) 上的一个关系是子集 \( R \subseteq S \times S \)，对于 \( (x,y) \in R \) 常写作 \( xRy \) 或 \( x \sim y \)；当它满足三条性质时即为等价关系：自反性（对所有 \( s \in S \) 有 \( (s,s) \in R \)）、对称性（\( (s,t) \in R \) 蕴含 \( (t,s) \in R \)）和传递性（\( (s,t) \in R \) 且 \( (t,u) \in R \) 蕴含 \( (s,u) \in R \)）。<sup>[1](https://terpconnect.umd.edu/~pbrosnan/notes/ugalg/sect0018.html)</sup> 同样的三条件定义出现在离散数学与代数的多种教材中。<sup>[2](https://www.geneseo.edu/~heap/courses/333/equivalence_relation.pdf)</sup><sup> • </sup><sup>[3](https://cbseacademic.nic.in/web_material/Manuals/appliedmaths/Chapter4_Relations.pdf)</sup>

| 关键事实 | 细节 |
|---|---|
| 定义性质 | 自反、对称且传递；\( S \) 上的关系是子集 \( R \subseteq S \times S \)<sup>[1](https://terpconnect.umd.edu/~pbrosnan/notes/ugalg/sect0018.html)</sup> |
| 平凡例子 | 相等关系 \( R = \{(x,x) : x \in S\} \) 是任意集合上的等价关系<sup>[1](https://terpconnect.umd.edu/~pbrosnan/notes/ugalg/sect0018.html)</sup> |
| 核构造 | 对任意映射 \( f : S \to T \)，\( K(f) = \{(x,y) : f(x) = f(y)\} \) 是 \( S \) 上的等价关系<sup>[1](https://terpconnect.umd.edu/~pbrosnan/notes/ugalg/sect0018.html)</sup> |
| 等价类 | 商集 \( A/E = \{[a]_E : a \in A\} \) 是等价类的集合，并带典范映射 \( \pi : A \to A/E \)<sup>[4](https://jamielittle.uk/modules/discrete-maths/02-sets-relations/13-equivalence-partitions/)</sup> |
| 划分对应 | \( S \) 上的等价关系与 \( S \) 的划分一一对应，对应由 \( R \mapsto S/R \) 与 \( P \mapsto K(\pi_P) \) 给出<sup>[1](https://terpconnect.umd.edu/~pbrosnan/notes/ugalg/sect0018.html)</sup> |
| 代数升级 | 同余是泛代数上与所有运算相容的等价关系；其等价类构成同类型的商代数<sup>[5](https://encyclopediaofmath.org/wiki/Congruence_%28in_algebra%29)</sup> |

## 等价类与商集

给定集合 \( A \) 上的等价关系 \( E \)，元素 \( a \) 的等价类是与 \( a \) 相关的所有元素构成的集合 \( [a]_E \)。商集 \( A/E \) 是所有等价类构成的集合，\( A/E = \{[a]_E : a \in A\} \)，而典范映射 \( \pi : A \to A/E \) 把每个元素送到它的等价类。<sup>[4](https://jamielittle.uk/modules/discrete-maths/02-sets-relations/13-equivalence-partitions/)</sup>

关于等价类的两条事实直接来自定义性质。由对称性与传递性，若 \( aEa' \) 则 \( [a]_E = [a']_E \)，因此相关的元素具有完全相同的等价类。又因关系是自反的，每个元素都落在自己的等价类中。<sup>[4](https://jamielittle.uk/modules/discrete-maths/02-sets-relations/13-equivalence-partitions/)</sup> 于是所有等价类构成 \( A \) 的一个划分，这是本主题的核心定理。<sup>[6](https://math.libretexts.org/Courses/Monroe_Community_College/MTH_220_Discrete_Math/6%3A_Relations/6.3%3A_Equivalence_Relations_and_Partitions)</sup>

## 与划分的对应

\( S \) 的划分是 \( S \) 的一族互不相交的非空子集构成的集合 \( P \)，其并为 \( S \) 本身。<sup>[1](https://terpconnect.umd.edu/~pbrosnan/notes/ugalg/sect0018.html)</sup> 等价关系与划分是同一结构的两种描述。

**从关系到划分。** 等价类 \( S/R \) 非空（每个类含有自己的元素），其并为 \( S \)，且互不相交，因此构成一个划分。<sup>[1](https://terpconnect.umd.edu/~pbrosnan/notes/ugalg/sect0018.html)</sup>

**从划分到关系。** 给定划分 \( P \)，当 \( a \) 与 \( b \) 位于同一块中时定义 \( a \sim b \)。该关系是自反的，因为 \( a \) 恰好落在一个块中；是对称的，因为同属一块是相互的；是传递的，因为若 \( a, b \) 同块且 \( b, c \) 同块，块的互不相交性迫使这两块相同，于是 \( a \) 与 \( c \) 也同块。<sup>[4](https://jamielittle.uk/modules/discrete-maths/02-sets-relations/13-equivalence-partitions/)</sup> 驱动这两个方向的关键事实只有一条：每个 \( a \in A \) 恰好落在一个块中——不会更少，因为各块覆盖 \( A \)；也不会更多，因为各块互不相交。<sup>[4](https://jamielittle.uk/modules/discrete-maths/02-sets-relations/13-equivalence-partitions/)</sup>

**对应是双射。** 用马里兰大学笔记的记号，记 \( \operatorname{Equiv} \) 为 \( S \) 上等价关系的集合、\( \operatorname{Part} \) 为划分的集合，则映射 \( R \mapsto S/R \) 是从 \( \operatorname{Equiv} \) 到 \( \operatorname{Part} \) 的一一对应，其逆为 \( P \mapsto K(\pi_P) \)，其中 \( K \) 提取被映到同一值的元素对。<sup>[1](https://terpconnect.umd.edu/~pbrosnan/notes/ugalg/sect0018.html)</sup> 用另一种记号，\( \Phi^{-1}(\Phi(E)) = E \) 且 \( \Phi(\Phi^{-1}(P)) = P \)：从关系出发取其等价类再返回，得到原来的关系；从划分出发取同块关系再返回，得到原来的各块。<sup>[4](https://jamielittle.uk/modules/discrete-maths/02-sets-relations/13-equivalence-partitions/)</sup>

## 产生等价关系的方式

**映射的核。** 若 \( f : S \to T \) 是任意映射，则关系 \( K(f) = \{(x,y) \in S : f(x) = f(y)\} \) 是 \( S \) 上的等价关系；两个元素相关，当且仅当 \( f \) 无法区分它们。<sup>[1](https://terpconnect.umd.edu/~pbrosnan/notes/ugalg/sect0018.html)</sup> 这一构造具有普遍性：每个等价关系都可由其自身的典范映射 \( \pi \) 如此得到，因为 \( K(\pi_{S/R}) = R \)。<sup>[1](https://terpconnect.umd.edu/~pbrosnan/notes/ugalg/sect0018.html)</sup>

**代数中的同余。** 泛代数 \( \mathcal{A} = (A, \Omega) \) 上的同余是 \( A \) 上的等价关系 \( \pi \)，它与所有运算相容：只要对每个坐标 \( i \) 有 \( a_i \,\pi\, b_i \)，则对每个 \( n \) 元运算 \( \omega \) 有 \( (a_1, \ldots, a_n) \,\omega\,\pi\, (b_1, \ldots, b_n) \)。模一个同余的等价类于是构成与 \( \mathcal{A} \) 同类型的商代数 \( \mathcal{A}/\pi \)。<sup>[5](https://encyclopediaofmath.org/wiki/Congruence_%28in_algebra%29)</sup> 正是这一相容性条件使得在等价类的代表元上进行算术是良定义的。

**定义新的数系。** 等价关系是从已有对象构造数学对象的标准手段。有理数 \( \mathbb{Q} \) 就被定义为一个商集，即整数对在适当关系下的等价类的集合。<sup>[7](https://personal.colby.edu/personal/s/sataylor/teaching/S15/MA274/EquivalenceRelations.pdf)</sup>

## 历史背景

发表在 *Synthese* 上的一项关于该概念的历史研究指出，等价的大多数早期出现都处于非集合论的语境中，在这些语境里，现代把等价理解为一种关系的观念尚无法区分不同语境下等价经验的历史差异。冯·诺依曼在 1936 年的一则评论中，将康托尔定义“一种新的量”的经典程序视为构造等价类并把它们作为对象来处理的起源。罗素对数的定义综合了弗雷格的哲学地位、戴德金 1890 年未发表手稿的精确性，以及康托尔 1895 年与 1897 年集合论相对成熟的发展状态。<sup>[8](https://link.springer.com/article/10.1007/s11229-018-1674-2)</sup>

## 证明助手形式化

在 Lean 数学库 Mathlib 中，给定类型上的等价关系，商类型把相关的项等同起来，使“关系到商”的构造成为该形式化库的一个原语。<sup>[9](https://leanprover-community.github.io/papers/mathlib-paper.pdf)</sup> Mathlib 还带有类型间等价 \( \alpha \simeq \beta \) 的独立概念，即一个双射映射与其逆打包在一起，它被有意用来代替相等以表达两个类型等价；这与单个集合上的等价关系是不同的概念。<sup>[10](https://leanprover.github.io/hex/docs/Mathlib/Logic/Equiv/Defs.html)</sup>

## References

1. [Partitions of sets and equivalence relations, UMD Undergraduate Algebra notes](https://terpconnect.umd.edu/~pbrosnan/notes/ugalg/sect0018.html)
2. [Equivalence Relation, course notes, SUNY Geneseo](https://www.geneseo.edu/~heap/courses/333/equivalence_relation.pdf)
3. [Equivalence relations, CBSE Academic applied mathematics manual](https://cbseacademic.nic.in/web_material/Manuals/appliedmaths/Chapter4_Relations.pdf)
4. [Equivalence Relations and Partitions, Discrete Mathematics, Jamie Little](https://jamielittle.uk/modules/discrete-maths/02-sets-relations/13-equivalence-partitions/)
5. [Congruence (in algebra), Encyclopedia of Mathematics](https://encyclopediaofmath.org/wiki/Congruence_%28in_algebra%29)
6. [Equivalence Relations and Partitions, Mathematics LibreTexts](https://math.libretexts.org/Courses/Monroe_Community_College/MTH_220_Discrete_Math/6%3A_Relations/6.3%3A_Equivalence_Relations_and_Partitions)
7. [Equivalence Relations and Partitions, Colby College MA274 notes](https://personal.colby.edu/personal/s/sataylor/teaching/S15/MA274/EquivalenceRelations.pdf)
8. [Equivalence: an attempt at a history of the idea, Synthese, Springer](https://link.springer.com/article/10.1007/s11229-018-1674-2)
9. [The Lean Mathematical Library, mathlib paper](https://leanprover-community.github.io/papers/mathlib-paper.pdf)
10. [Mathlib.Logic.Equiv.Defs documentation](https://leanprover.github.io/hex/docs/Mathlib/Logic/Equiv/Defs.html)

---
*Initially written Sep 17, 2026 · Reviewed: Oct 15, 2026 · Edited: Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 数与代数 › Algebraic structures › Abstract algebra — overview

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/equivalence-relation

English original: https://www.edgepedia.org/equivalence-relation
