A binary relation on is an equivalence relation exactly when it is reflexive, symmetric, and transitive:The equivalence class of is . The equivalence classes partition : every element belongs to its own class, and two classes are either equal or disjoint.
For positive integer pairs, reflexivity is . If , reversing the equality gives , establishing symmetry. For transitivity, suppose and . Then and , whenceSince , cancellation gives . Thus , and is an equivalence relation.
Membership in the equivalence class of means , or . Since and are coprime, and for a positive integer . Conversely every such pair satisfies the equality. ThereforeThese pairs are precisely the positive numerator-denominator representations of the rational number .
False. Use the same two equivalence relations as in part (ii). They are both symmetric relations. The composite contains , since and . It does not contain , as shown there. Hence composition of relations need not preserve symmetry of a relation, even when both factors are also reflexive and transitive.
False, even for two equivalence relations. On , let have equivalence classes and , and let have equivalence classes and . Both binary relations are transitive. For , we have , using the intermediate element , and , using the intermediate element . However, fails: the only -successor of is , and is false. Thus the composite fails transitivity. The order of composition here means first , then .
A binary relation is an equivalence relation precisely when it is reflexive, symmetric, and transitive.
Every nonzero integer has , proving reflexivity. Because , the relation is symmetric. If and , then , proving transitivity. Thus this is an equivalence relation, whose two equivalence classes are the positive integers and the negative integers:
This binary relation is not an equivalence relation, because it is not symmetric: since , but is false. In fact the injective encoding gives a total order. There are no equivalence classes for this binary relation.
Choose the first unclassified element as the next equivalence class representative:Assume the
equiv :: Eq a => [a] -> [[a]]
equiv [] = []
equiv (x:xs) = (x:same) : equiv rest
where ~(same,rest) = partition (== x) xsEq instance is an equivalence relation. The stable list partition collects every later occurrence equivalent to x, and rest contains none of that equivalence class. Induction therefore gives exactly one group per class, preserving order within each group and ordering groups by their first occurrence. For distinct classes, each input element is tested against at most representatives: the cost is and in the all-distinct worst case; a single class takes .The equality-only grouping lower bound shows that this worst case is unavoidable in the unrestricted equality-oracle model. On an all-distinct input, an untested pair could instead be equal without changing any observed comparison. Certifying that all elements belong to different classes therefore requires all pairwise equality tests.
For every , both and hold, so the intersection of equivalence relations is reflexive. If , symmetry of both component binary relations gives and , hence . Finally, if and , transitivity in each component gives and , hence . These are precisely the three conditions for an equivalence relation.
Path component Created 2026-09-24 Updated 2026-10-14
A path component of a topological space is a nonempty subset maximal among its path-connected subsets. The path component through can be described asEvery point along such a continuous path also belongs to : the initial part of the path reaches that point. Thus the paths witnessing membership stay inside . This makes path components useful for deciding which allowed positions can be reached from one another by continuous motion.
Every path component lies inside one connected component, because every path-connected space is connected. Thus each connected component is a union of path components. In a locally path-connected space the two classifications agree, by connected locally path-connected spaces are path-connected. For a subset of the real line with its usual subspace topology, the classifications also agree: every connected component is a real interval, and interpolation supplies a continuous path within it.
The topologist's sine curve shows why the distinction matters in general. Use specifically the closed versionwith the subspace topology from the usual Euclidean plane. It has one connected component, , but two path components, and . The graph of a function is a continuous image of a connected space, and its closure is , so closure of a connected set gives connectedness. Each of is path-connected, but a continuous path crossing from into would force its second coordinate to oscillate between and arbitrarily near its departure time, contradicting continuity; the topologist's sine curve article gives the short argument. Also is not closed in , so path components need not be closed, unlike connected components.[ref]
General Topology by Tom Leinster. p. 78, and the discussion after Lemma C4.12, p. 84: the sine-curve obstruction and nonclosed path components; here the positive graph is restricted to
Being joined by a continuous path is an equivalence relation. Proof outline: the constant path joins a point to itself; reverses a path; and a path from to followed by one from to gives a path from to . For the last construction, run each path on half of ; their values agree at , so the pasting lemma for closed subspaces gives continuity. The equivalence classes are path-connected, are maximal, and form a partition of a set of into path components.[ref]
Prime-support equivalence relation 2026-10-06
Positive integers are equivalent when they have the same finite set of prime factors. Equivalently, each divides a positive power of the other. This equivalence relation is induced by the radical of an integer; its equivalence classes correspond to finite prime supports. The empty support gives the singleton , and every nonempty support gives an infinite class by varying exponents.
Quotient set Created 2026-09-28 Updated 2026-10-14
A quotient set packages each equivalence class as a single new set element. It remembers which class an original set element belongs to and forgets which member of that class it was. For an equivalence relation on a set ,Each set element of the quotient set is itself a nonempty subset of . The canonical projection of a quotient set sends an original set element to this entire equivalence class. [ref]
https://www.math.umd.edu/~pbrosnan/notes/ugalg/sect0018.html. Patrick Brosnan, Undergraduate Algebra, §2.10, Definitions 2.78 and 2.80
For integer congruence modulo three restricted to , the quotient set isIt has cardinality three. The set is a choice of equivalence class representatives, not literally this quotient set: is an integer, while is a set. The function sending each chosen equivalence class representative to its equivalence class is a bijection between these two different sets.
The quotient projection sends nine elements to three classes, with each class appearing as one fiber
. Details. A quotient set alone specifies no arithmetic. To obtain the familiar modular arithmetic example with addition, use integer congruence on the whole set of integers. Its quotient set is , where is an infinite residue class. Define addition byThe answer must be independent of the equivalence class representatives. If and , then , so both sums have the same residue class. This is what it means for the group operation to be well-defined. With this addition, the quotient set is a cyclic group, with identity and inverse for . [ref]
https://math-cs.gordon.edu/ntic/ntic2017/section-cong-props.html. Karl-Dieter Crisman, Number Theory: In Context and Interactive, §4.3, Proposition 4.3.2: congruence arithmetic is well-defined
For example, . Choosing and as different representatives of an equivalence class for gives the same sum; choosing and gives again. These calculations use residue classes of all integers. Raw addition on the finite does not stay in : . The formula for addition on therefore cannot be applied as a raw inherited operation on that finite example.
Quotient topology Created 2026-09-24 Updated 2026-10-14
The quotient topology turns an instruction to glue points together into a precise topological space. Start with a topological space and an equivalence relation . The quotient set consists of equivalence classes, and its canonical projection of a quotient set isThe quotient topology is defined by the rule using preimages of open sets:Thus a subset of the quotient space is open if and only if its entire preimage is open in . Each fiber is the whole equivalence class , so the preimage includes every point glued to any of its members.[ref]
This is the finest topology making a continuous map: every topology with that property can contain only subsets whose preimages are open. It really is a topology, because preimages preserve the empty set, the whole set, arbitrary unions, and finite intersections. The gluing example below shows why checking a complete preimage matters, especially at the seam.
The quotient topology also makes continuous maps out of a glued space easy to construct. A continuous map descends to a unique continuous map exactly when it is constant on every fiber of , meaning . Define ; the equivalence class representative cannot affect the answer. For every open set ,The right side is open, so the quotient topology makes open. Conversely, if for a continuous map , then composition of continuous functions makes continuous, and equal equivalence classes force equal values. This is the universal property of the quotient topology. [ref]
A surjective continuous map is not automatically a quotient map. On the same two-point set , take the identity map from the discrete topology to the indiscrete topology. It is continuous and surjective, but is not open in the target even though its preimage is open in the domain. The quotient topology for this identity map would be the discrete topology. Thus continuity supplies only one direction of the rule using preimages of open sets; a quotient map requires both.
Set partition Created 2026-09-24 Updated 2026-10-13
A set partition of a finite set is a set of nonempty subsets, called blocks of a set partition, withThus every set element of belongs to exactly one block of a set partition. This is the finite counting version of a partition of a set. The blocks of a set partition are unlabelled: their subscripts help describe them, but give them no roles or order. Stanley uses this definition in his classification of counting problems.[ref]
Enumerative Combinatorics, Volume 1 (second-edition draft) by Richard Stanley. section 1.9: set partitions and their blocks
All possibilities for three elements. The set has exactly five set partitions:For two blocks of a set partition, one must have size two and the other size one; the three choices of the lone element give the middle row. One block of a set partition forces the whole set, and three blocks of a set partition force three singleton sets. This proves the enumeration complete, with counts by number of blocks of a set partition. Their sum is the Bell number .
Exact enumeration of the five set partitions of : outlines show blocks of a set partition, whose positions and colours carry no labels
. Details. What information is kept? Exchanging the two blocks of a set partition in leaves the same set partition; writing the tuple instead makes an ordered list, different from . Exchanging elements within a block of a set partition also changes nothing. In contrast, is a different set partition, because the actual memberships differ. Both have the same integer partition of sizes. An integer partition, or its Ferrers diagram, forgets which distinct objects were grouped together.
For four named people, and therefore describe different ways of making two unnamed teams, although both have sizes . If every team must have exactly two people, only three set partitions qualify; if any nonempty team sizes are permitted, the Stirling number of the second kind counts them. Naming the teams changes the counting problem again.
A set partition is useful whenever membership matters but category names do not. Define when and belong to the same block of a set partition. This is an equivalence relation, and its equivalence classes recover the set partition. Conversely, an equivalence relation supplies its set partition of equivalence classes. The beautiful simplification is that one grouping can be described by whole subsets or by a rule comparing two elements. Additional distinctions are organized by refinement of a set partition.
The empty set has one set partition, the empty collection , with zero blocks of a set partition. This differs from , which is forbidden because its proposed block of a set partition is empty.
Strict weak order 2026-10-31
An irreflexive transitive comparison whose induced incomparability relation is transitive. Incomparability is then an equivalence relation, and its classes are totally ordered by the comparison. A comparison-based sorting algorithm can treat incomparable elements as ties; a merge algorithm that takes from the left input on ties preserves stable sorting. Ordinary ordering on real numbers is an example; machine NaN values require separate handling.
In the language containing one binary equivalence relation , require all classes to have size at most two and infinitely many classes of each of the two sizes. This is a complete theory: every countable model has countably many singleton classes and countably many doubleton classes, giving a class-by-class isomorphism; Downward Lowenheim-Skolem theorem then rules out a sentence separating arbitrary models. It is also an aleph-zero-categorical theory.
It is not finitely axiomatizable. Any finite fragment of the explicit infinitude schemes has a finite model with sufficiently many classes of each size; compactness theorem would make such a finite fragment suffice if any finite axiomatization existed. It is not model-complete: adjoining a new singleton preserves the theory, and subsequently giving that new point a partner also preserves the theory, while changing the existential partner formula at that point. Naming the singleton-class predicate removes this particular obstruction to elementary embeddings.
Union of equivalence relations Created 2026-10-07 Updated 2026-10-14
A union of equivalence relations on the same set is reflexive and symmetric, but can fail transitivity. On a three-point set, partitions into blocks and make the union relate to and to without relating to . An equivalence relation containing both requires transitive closure as well.
Unreduced rational representation 2026-10-14
Consider an original abstract data type whose values are rational numbers. Store an ordered pair of integers, interpreted as a numerator and a denominator. Use exact, unbounded integer arithmetic in this model. The storage space, representation invariant and abstraction function areThe representation invariant does not require a positive denominator or a reduced fraction. Consequently , and are three different concrete states with the same abstract rational number . Similarly, and both represent zero. The abstraction function is a surjection: every rational number has an integer numerator and a nonzero integer denominator, so every abstract value has a representation.
Both and violate the representation invariant; neither has a value under this abstraction function. By contrast, is completely valid. Simplifying it to the reduced fraction may be a useful implementation choice, but is not a requirement of this representation. Strengthening the representation invariant to require a positive denominator and a greatest common divisor of one would choose a unique stored representative for each rational number; every constructor and operation would then need to establish that stronger condition.
Equality of abstract values is therefore different from equality of stored ordered pairs. For valid and ,This defines an equivalence relation on : each equivalence class contains all representations of one rational number. An API equality operation can compare these cross-products using exact integer arithmetic. Comparing the two fields individually would incorrectly declare and unequal as rational numbers. The general reason is that an abstraction function may map several concrete values to one abstract value.[ref]
8.3 Module Documentation. Section 8.3.1, Abstraction Functions: several concrete values mapping to one abstract value; Section 8.3.4, Representation Invariants: valid domain of AF
Value equality 2026-10-31
Equality according to the abstract content a software class exposes, rather than object identity. Distinct software objects can be equal by value. A Java
equals(Object) override should define an equivalence relation and agree with its hash code. Equal content can have different internal subdivisions: occupied colour runs, for example, can be equal despite different brick boundaries. Zeroth law of thermodynamics Created 2026-10-14 Updated 2026-10-20
If two thermodynamic systems are each in thermal equilibrium with the same third system in the same equilibrium state, they are in thermal equilibrium with each other. Write for this relation. The zeroth law of thermodynamics supplies transitivity:Its symmetric relation property and self-equilibrium (reflexivity), together with transitivity, make thermal equilibrium an equivalence relation. Its equivalence classes can be labelled by a common empirical temperature; choosing an absolute numerical scale requires the further structure of thermodynamic temperature.[ref]
4 Classical Thermodynamics. §4.1, printed pp. 109–110: thermal contact, transitivity and temperature labels
The comparison assumes internally equilibrated macroscopic bodies, unchanged composition and mechanical constraints, and contact permitting only heat exchange. Use rigid, impermeable diathermal walls so that neither matter transfer nor boundary work spoils the test. The same state of matters: letting warm while measuring , then cool while measuring , does not supply the premise. Ordinary nonrelativistic laboratory thermodynamics is assumed; the Tolman temperature law treats gravitational qualifications. Equal temperatures establish the thermal condition, without requiring mechanical equilibrium or chemical equilibrium.
This explains why a thermometer can compare unlike materials: it supplies a reusable third system. A temperature is a property of an equilibrium state, while heat is energy transferred because of a temperature difference. Two bodies at the same temperature can have different internal energies and heat capacities. A thermometer therefore does not measure a body's stored amount of heat; the finite-body disturbance and waiting-time calculations in thermometer describe how making the comparison can change the state being measured.[ref]
The name “zeroth” reflects logical order rather than the date of the first thermometer: this premise about thermal equilibrium precedes the already numbered first law of thermodynamics, Second law of thermodynamics and third law of thermodynamics. This is the naming explanation given in University Physics Volume 2 by Samuel J. Ling and others (§1.1, “Thermal Equilibrium”).[ref]
University Physics Volume 2 by Samuel J. Ling and others. §1.1, paragraph introducing the zeroth law: retrospective numbering; the textbook credits the name to Ralph Fowler in the 1930s
The corresponding Zeroth law of black-hole mechanics states constancy of surface gravity over an equilibrium horizon; Hawking radiation identifies that quantity with physical temperature up to its universal conversion factor.



