Equivalence class: certify a complete finite relation first, then form classes, with a non-equivalence as contrast

On this page
  1. Goal and scope
  2. Givens and symbols
  3. Rules and sources
  4. Main derivation
  5. Substeps and lemmas
  6. Reverse audits
  7. Error controls and negative controls
  8. Result and limitations
  9. Verification and source binding

← Guide index · Original MKO

derivation-mko-equivalence-class-01 · production-20261019-adopted-96

Goal and scope

On X={0,1,2,3,4,5}, R is given by 12 explicitly listed ordered pairs. First certify completely that R is an equivalence relation, then compute every class from the definition [a]={x∈X ∣ aRx}; prove that aRb ⇒ [a]=[b], that any two classes are equal or disjoint and that the classes cover X, giving K(R)={{0,3},{1,4},{2,5}}. Finally use S=R∪{(0,1),(1,0)} to show that a relation failing transitivity cannot form equivalence classes.

Works inside the MKO's scope: the carrier 0 to 5 and the complete set of relation pairs are explicit and first pass full reflexivity, symmetry and transitivity checks (assumption a1); the classes use that same relation and carrier, not a visual guess at clustering (assumption a2). It does not set up the quotient-set node or quotient rings, and does not change the canonical MKO or its English edition.

Givens and symbols

  • set_builder
  • set_extensionality
  • subset_def
  • division_algorithm
  • eq_refl_symm_trans
  • finite_counting_basics
  • G1 — The carrier X={0,1,2,3,4,5} (MKO assumption a1).
  • G2 — R consists of exactly 12 ordered pairs: (0,0), (0,3), (3,0), (3,3), (1,1), (1,4), (4,1), (4,4), (2,2), (2,5), (5,2), (5,5); this is the complete set of relation pairs.
  • G3 — Definition: after R passes complete checks of reflexivity, symmetry and transitivity, [a]={x∈X ∣ aRx}, and K(R) is the set of all [a] (MKO statement).
  • G4 — Contrast relation: S=R∪{(0,1),(1,0)}, 14 ordered pairs in all.
  • X — the carrier {0,1,2,3,4,5}
  • aRb — (a,b)∈R
  • r(a) — the remainder of a on division by 3
  • [a] — the class {x∈X ∣ aRx} of a
  • K(R) — the set of all equivalence classes

Rules and sources

  • set_builder · prerequisite — Set-builder notation: x∈{y∈A ∣ P(y)} if and only if x∈A and P(x).
  • set_extensionality · prerequisite — Set equality: A=B if and only if A⊆B and B⊆A, i.e. they have the same elements.
  • subset_def · prerequisite — Subset: A⊆B means every element of A is an element of B, i.e. ∀x (x∈A⇒x∈B).
  • division_algorithm · prerequisite — Division algorithm: for an integer a and a positive integer b there are unique integers q, r with a=bq+r and 0≤r<b.
  • eq_refl_symm_trans · prerequisite — Properties of equality: u=u; if u=v then v=u; if u=v and v=w then u=w.
  • finite_counting_basics · prerequisite — Finite counting: for disjoint finite sets A, B, |A∪B|=|A|+|B|; |A×B|=|A|·|B|; there is a bijection between finite sets ⇔ they have the same number of elements.
  • numeric_evaluation · prerequisite — Exact evaluation of an explicit integer or rational expression; independently recomputable.
  • forall_intro · prerequisite — ∀-introduction (generalization): if a statement is proved for an arbitrary element x, with no extra assumption on x, it holds for every x in the domain.
  • def_unfold · prerequisite — Unfolding a definition: replacing a defined term by its definition (or folding it back) does not change whether a statement is true.
  • contrapositive · prerequisite — Contrapositive: P⇒Q is equivalent to ¬Q⇒¬P. The converse Q⇒P is in general not equivalent to P⇒Q.
  • set_operations_def · prerequisite — Set operations: x∈A∪B ⇔ x∈A or x∈B; x∈A∩B ⇔ x∈A and x∈B; x∈A∖B ⇔ x∈A and x∉B; in a universe U, Aᶜ=U∖A.
  • and_intro_elim · prerequisite — Conjunction: from P and Q infer P∧Q; from P∧Q infer P and infer Q.
  • quantifier_negation · prerequisite — Negating quantifiers: ¬(∀x, P(x)) is equivalent to ∃x, ¬P(x), and ¬(∃x, P(x)) is equivalent to ∀x, ¬P(x).
  • mko_eqclass_def · cited — Given a complete finite carrier X and a certified equivalence relation R, define [a]={x in X:aRx}. If aRb then [a]=[b]; any two equivalence classes are equal or disjoint. Sampled relations or relations that fail the equivalence axioms must not be used to form canonical classes. · mko-equivalence-class
  • equiv_rel_def · prerequisite — Equivalence relation: reflexive (aRa for all a), symmetric (aRb⇒bRa) and transitive (aRb and bRc ⇒ aRc).
  • L_rel_desc · lemma — R={(a,b)∈X×X ∣ r(a)=r(b)}, where r(a) is the remainder of a on division by 3.
  • L_same_class · lemma — For an equivalence relation R: aRb ⇒ [a]=[b].

Main derivation

S01 · equivalent

Before

R=\{(0,0),(0,3),(3,0),(3,3),(1,1),(1,4),(4,1),(4,4),(2,2),(2,5),(5,2),(5,5)\}

After

R=\{(a,b)\in X\times X\mid r(a)=r(b)\}

Conditions: none

Rule: L_rel_desc · Uses: G1, G2

Leaf basis: set_extensionality + division_algorithm + finite_counting_basics

By Lemma L_rel_desc (proved in S01.1 and S01.2), the 12 listed pairs are exactly all pairs with the same remainder on division by 3. This description lets the three axioms be checked for all pairs at once, rather than by sampling.

S02 · implies

Before

a\in X

After

aRa

Conditions: none

Rule: eq_refl_symm_trans · Uses: S01, eq_refl_symm_trans

Leaf basis: eq_refl_symm_trans + forall_intro

Reflexivity: for every a, r(a)=r(a), so S01 gives aRa. These are the 6 diagonal pairs (0,0), (1,1), (2,2), (3,3), (4,4), (5,5) of G2.

S03 · implies

Before

aRb

After

bRa

Conditions: none

Rule: eq_refl_symm_trans · Uses: S01, eq_refl_symm_trans

Leaf basis: eq_refl_symm_trans

Symmetry: aRb means r(a)=r(b); symmetry of equality gives r(b)=r(a), so bRa.

S04 · implies

Before

aRb,\ bRc

After

aRc

Conditions: none

Rule: eq_refl_symm_trans · Uses: S01, eq_refl_symm_trans

Leaf basis: eq_refl_symm_trans + equiv_rel_def

Transitivity: r(a)=r(b) and r(b)=r(c) give r(a)=r(c) by transitivity of equality, so aRc. This handles all 6·2·2=24 composable pairs at once (each b has 2 incoming and 2 outgoing pairs; N8). By S02 to S04, R is a certified equivalence relation (MKO assumption a1).

S05 · equivalent

Before

[a]=\{x\in X\mid aRx\}

After

[0]=[3]=\{0,3\},\ [1]=[4]=\{1,4\},\ [2]=[5]=\{2,5\}

Conditions: none

Rule: set_builder · Uses: G2, G3, S04

Leaf basis: set_builder + def_unfold

Only now that R is certified are the classes formed from the definition: [a] collects the second entries of all pairs whose first entry is a. The pairs starting with 0 are (0,0), (0,3), so [0]={0,3}; those starting with 3 are (3,0), (3,3), so [3]={0,3}; likewise [1]=[4]={1,4} and [2]=[5]={2,5}.

S06 · implies

Before

aRb

After

[a]=[b]

Conditions: none

Rule: L_same_class · Uses: S03, S04

Leaf basis: set_extensionality + subset_def + equiv_rel_def

By Lemma L_same_class (proved in S06.1 and S06.2), related representatives give the same class (MKO paragraph 1). Instance: 0R3, so [0]=[3], in agreement with S05.

S07 · implies

Before

x\in[a]\cap[b]

After

[a]=[b];\ \text{hence}\ [a]=[b]\ \lor\ [a]\cap[b]=\varnothing

Conditions: none

Rule: L_same_class · Uses: S03, S04, S06

Leaf basis: contrapositive + equiv_rel_def + set_operations_def

If x∈[a]∩[b], then aRx and bRx; symmetry gives xRb and transitivity gives aRb, so [a]=[b] by S06. Contrapositive: [a]≠[b] ⇒ [a]∩[b]=∅. So any two classes are equal or disjoint; for example [0]∩[1]=∅.

S08 · implies

Before

a\in[a]\ \text{for every}\ a

After

K(R)=\{\{0,3\},\{1,4\},\{2,5\}\},\ 2+2+2=6=|X|

Conditions: none

Rule: mko_eqclass_def · Uses: S02, S05, S07

Leaf basis: set_operations_def + finite_counting_basics + and_intro_elim

By reflexivity aRa, so a∈[a] and the classes cover X. By S05 the six sets [a] are only three distinct sets, pairwise disjoint (S07), of sizes 2+2+2=6=|X| (N2). So K(R)={{0,3},{1,4},{2,5}} is a partition of X. The quotient set as a node of its own is separate (MKO paragraph 2).

S09 · implies

Before

S=R\cup\{(0,1),(1,0)\}

After

(3,0),(0,1)\in S,\ (3,1)\notin S:\ S\ \text{not transitive}

Conditions: none

Rule: quantifier_negation · Uses: G4, S01

Leaf basis: quantifier_negation + set_operations_def

S contains all 6 diagonal pairs, so it is reflexive; the two added pairs are reverses of each other, so it is still symmetric. But (3,0)∈S and (0,1)∈S, while (3,1) is not in R (r(3)=0≠1=r(1), N3) and is not an added pair, so (3,1)∉S. Transitivity fails, S is not an equivalence relation, and it must not be used to form canonical classes.

S10 · implies

Before

[a]_S=\{x\mid aSx\}

After

[0]_S=\{0,1,3\},\ [3]_S=\{0,3\},\ [1]_S=\{0,1,4\}

Conditions: none

Rule: set_builder · Uses: S09, G4

Leaf basis: set_builder + set_operations_def

If 'classes' are forced from the pairs of S: the pairs starting with 0 are (0,0), (0,1), (0,3), so [0]_S={0,1,3}; [3]_S={0,3}; [1]_S={0,1,4}. [0]_S∩[3]_S={0,3}≠∅ yet [0]_S≠[3]_S, and [0]_S∩[1]_S={0,1} yet they differ. These sets do not form a partition, and the argument of S07 breaks exactly where it needs transitivity.

S11 · implies

Before

\text{visual grouping}\ \{0,1,2\},\ \{3,4,5\}

After

\{0,1,2\}\notin K(R)\ \text{since}\ (0,1)\notin R

Conditions: none

Rule: mko_eqclass_def · Uses: S01, S05

Leaf basis: set_builder + quantifier_negation

Grouping by how close the numbers look gives {0,1,2} and {3,4,5}. But (0,1)∉R, so 1∉[0]={0,3}, and {0,1,2} is not a class. Classes come only from the pairs of the same relation (MKO assumption a2).

S12 · implies

Before

\text{S04, S05, S07, S08, S10}

After

K(R)=\{\{0,3\},\{1,4\},\{2,5\}\};\ S\ \text{yields no classes}

Conditions: none

Rule: mko_eqclass_def · Uses: S04, S05, S07, S08, S10

Leaf basis: and_intro_elim

R is fully certified (S04), its classes are {0,3}, {1,4}, {2,5} (S05), and they are equal or disjoint and cover X (S07, S08). S fails transitivity, and the sets it yields meet without being equal (S10), so they cannot serve as equivalence classes.

Substeps and lemmas

S01.1 · implies

Before

(a,b)\in R

After

r(a)=r(b)

Conditions: none

Rule: division_algorithm · Uses: G2, division_algorithm

Leaf basis: division_algorithm + numeric_evaluation

(⊆) Remainders: r(0)=r(3)=0, r(1)=r(4)=1, r(2)=r(5)=2 (3=1·3+0, 4=1·3+1, 5=1·3+2; N4 to N6). Every listed pair lies inside one of {0,3}, {1,4}, {2,5}, so the two entries of each pair have the same remainder.

S01.2 · implies

Before

(a,b)\in X\times X,\ r(a)=r(b)

After

(a,b)\in R

Conditions: none

Rule: finite_counting_basics · Uses: S01.1, G2, finite_counting_basics

Leaf basis: finite_counting_basics + subset_def

(⊇) Each remainder 0, 1, 2 has exactly 2 elements, so there are 3·2²=12 ordered pairs with equal remainders (N1), namely the pairs in {0,3}², {1,4}² and {2,5}². G2 lists 12 distinct pairs, all among these 12 by S01.1; a 12-element subset of a 12-element set is the whole set, so every pair with equal remainders is in R. S01.1 and S01.2 together prove Lemma L_rel_desc.

S06.1 · implies

Before

aRb,\ x\in[b]

After

x\in[a]

Conditions: none

Rule: subset_def · Uses: S04, G3

Leaf basis: subset_def + set_builder

x∈[b] means bRx. From aRb, bRx and transitivity we get aRx, so x∈[a]. Hence [b]⊆[a].

S06.2 · implies

Before

aRb,\ x\in[a]

After

x\in[b],\ \text{so}\ [a]=[b]

Conditions: none

Rule: set_extensionality · Uses: S03, S04, S06.1, G3

Leaf basis: set_extensionality + subset_def + set_builder

Symmetry gives bRa; x∈[a] means aRx; transitivity gives bRx, so x∈[b] and [a]⊆[b]. With [b]⊆[a] from S06.1, set equality gives [a]=[b]. S06.1 and S06.2 together prove Lemma L_same_class.

Reverse audits

  • S12 · sufficient_goal_reduction · S04, S05, S07, S08, S10 — Goal G: the certification, classes, properties and contrast stated in the goal. Sufficient condition H: S04, S05, S07, S08 and S10; H⇒G by conjunction. H is proved forwards from G1 to G4; G is never used as a premise.
  • S11 · premise_audit · S01, S05 — One pair not in R suffices to refute the guessed grouping.
  • S10 · premise_audit · S09, set_builder — The sets can be recomputed from the list of S; two sets that meet without being equal directly violate 'equal or disjoint'.
  • S09 · premise_audit · G4, S01, quantifier_negation — One failing triple (3,0,1) suffices to refute transitivity.
  • S08 · premise_audit · S02, S05, S07 — Covering needs reflexivity and disjointness needs S07; the count is a consistency check.
  • S07 · premise_audit · S03, S04, S06, contrapositive — The argument uses transitivity at 'transitivity gives aRb'; S10 shows exactly this step failing without transitivity.
  • S06.2 · premise_audit · S03, S04, S06.1, set_extensionality — Symmetry is needed here, and both inclusions need transitivity.
  • S06.1 · premise_audit · S04, subset_def — Only transitivity is used; the other inclusion is S06.2.
  • S06 · premise_audit · S03, S04, L_same_class — The lemma needs symmetry and transitivity; the converse ([a]=[b] ⇒ aRb, also true) is not needed or claimed here.
  • S05 · inverse_equivalence · set_builder, G2 — Set-builder membership is two-way: x∈[a] ⇔ (a,x)∈R, checkable against the list of G2 one pair at a time.
  • S04 · premise_audit · S01, eq_refl_symm_trans, equiv_rel_def — The certification rests on the complete description of S01; checking only a few triples could not rule out a failure like that of S (S09).
  • S03 · premise_audit · S01, eq_refl_symm_trans — It holds for all 12 pairs at once.
  • S02 · premise_audit · S01, eq_refl_symm_trans — It holds for all 6 elements, not for a sample.
  • S01.2 · premise_audit · S01.1, finite_counting_basics — It needs the 12 pairs of G2 to be distinct (visible one by one) and the count; a missing pair would show up in the count.
  • S01.1 · premise_audit · G2, division_algorithm — All 12 pairs can be checked one by one; only one inclusion is proved here.
  • S01 · inverse_equivalence · L_rel_desc, set_extensionality — Both inclusions are proved in the sub-steps, so the set equality holds both ways.

Error controls and negative controls

Certify equivalence before forming equivalence classes

The MKO's misconception: grouping directly from an uncertified relation. S differs from R by only two pairs and is reflexive and symmetric, yet transitivity fails (S09) and the sets it yields do not form a partition (S10). All three axioms must be passed completely (S02 to S04) before forming classes.

Do not keep classes that meet without being equal

The MKO's second misconception. For an equivalence relation, S07 proves that two classes that meet are equal; holding sets like {0,1,3} and {0,3}, which meet but differ, signals that the relation is not an equivalence or that a computation is wrong, and calls for a recheck rather than keeping both.

Do not group by appearance

MKO assumption a2: classes use the same relation, not a visual guess at clustering. The consecutive numbers {0,1,2} do not form a class, because (0,1)∉R (S11).

  • S is reflexive and symmetric, so its 'classes' partition X → reject — S is not transitive; [0]_S={0,1,3} and [3]_S={0,3} meet without being equal (S10).
  • {0,1,3} and {0,3} can both be kept as equivalence classes → reject — Equivalence classes are equal or disjoint; these meet in {0,3} but differ.
  • {0,1,2} is a class because they are consecutive numbers → reject — (0,1)∉R, so 1∉[0] (S11).
  • The sampled triples (0,3,0) and (1,4,1) satisfy transitivity, so any such relation is certified → reject — S also passes these two triples, yet (3,0,1) fails; certification must cover all composable pairs (S04 handles all 24 at once through the complete description).

Result and limitations

The 12 listed pairs are exactly all pairs with equal remainders on division by 3, so R fully passes reflexivity, symmetry and transitivity. Its classes are [0]=[3]={0,3}, [1]=[4]={1,4}, [2]=[5]={2,5}; aRb ⇒ [a]=[b], any two classes are equal or disjoint, and they cover X, so K(R)={{0,3},{1,4},{2,5}}. S=R∪{(0,1),(1,0)} is reflexive and symmetric but not transitive ((3,0), (0,1)∈S, (3,1)∉S), and its 'classes' {0,1,3} and {0,3} meet without being equal, so they cannot be equivalence classes.

  • The quotient set X/R as a node of its own and quotient rings of finite rings (the MKO's next step) are outside this guide; it only computes K(R) and proves its partition properties.

Verification and source binding

8 declared checks for this guide; only the listed expressions are covered.

  • source commit: b28a5edbd46279b1db2a3f3f48bb3f447e18899f
  • adopted source SHA-256: a49fd6fdffc0b18e8964d08495131e69cf39153f1e976af4811cc47509502b53
  • original source SHA-256: a49fd6fdffc0b18e8964d08495131e69cf39153f1e976af4811cc47509502b53
  • Lean: NOT_RUN · independent AI: NOT_MEASURED

Same-source full JSON (formulas, ASTs, controls and revision log)