Using the wiki convention that paths follow the written order of the binary relations, composition of relations is
Some treatments reverse the naming convention; stating it explicitly avoids ambiguity. The powers of the single relation below are the same under either convention.
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.
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 .
True. Fix . Reflexivity supplies and . In the definition of composition of relations, choose the intermediate element to be itself. Then . This holds for every , so the composite binary relation is reflexive.
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.
Power of a relation 2026-10-31
For a binary relation on a set , define and for nonnegative integers , using composition of relations. A pair belongs to precisely when a sequence has for every . This follows by mathematical induction, splitting off one step in the recurrence. Thus records paths with exactly steps, rather than at most steps. The union is the transitive closure of a relation; including gives its reflexive transitive closure. The powers of a single relation agree under the two common composition-order conventions.
Reflexive closure 2026-10-14
The reflexive closure of a binary relation is , where . Every reflexive relation containing must contain the diagonal, so this is the least such extension.
Represent a finite simple graph by a domain of vertices and a symmetric, irreflexive binary relation for graph adjacency. Introduce three unary second-order relation variables , one for each fixed named colour. Define the following abbreviations for first-order formulas in this expanded first-order signature:
Then the existential second-order logic sentence
asserts that every vertex receives exactly one of the three colours and adjacent vertices receive different colours. The first clause gives coverage and pairwise disjointness of the three subsets; the second makes each subset an independent set. Empty colour classes are allowed, so expresses existence of a proper vertex coloring using at most three colours.
For the complete graph on the fixed vertices , one witness is , , . Each vertex satisfies exactly one predicate, and each of the three edges joins different predicates. Every valid witness assigns different colours to all three vertices; there are witness triples with these fixed vertex labels and fixed named colours. We are counting assignments, without identifying them under colour permutations or graph isomorphisms. For the complete graph , the pigeonhole principle forces two of its four vertices to share a colour, and those vertices are adjacent. Thus it has no witness triple. This calculation illustrates a complexity certificate without requiring the reader to reconstruct a machine computation.
Figure 1.
Six relation witnesses for the labeled complete graph K3, and why K4 has none
. Details.
Reproduce the diagram by running python ../second-order-coloring-witness.py from the repository's _media directory. The script checks all witness triples for these two complete graphs before drawing them.
Second-order logic Created 2026-10-06 Updated 2026-10-14
Second-order logic extends first-order logic by allowing existential quantification and universal quantification over second-order relation variables, as well as over individual objects. In the relational presentation used here, an individual variable ranges over a domain , while a second-order relation variable of arity denotes a subset of . Unary second-order relation variables denote subsets of ; binary ones denote binary relations. Presentations with function variables can instead describe their graphs by second-order relation variables, with first-order formulas requiring a unique output for every input.
For a graph with vertices and fixed graph adjacency , the first-order sentence says that every vertex has a neighbour. It selects individual vertices while retains its given interpretation. By contrast,
selects an entire subset and says that it is a nonempty independent set. Here is a unary second-order relation variable, rather than a symbol in the input first-order signature. This particular property also has a simple first-order sentence on simple graphs; the example illustrates the change in what can be selected, rather than proving a separation in expressive power.
The usefulness of second-order logic is that one can describe a whole proposed solution, such as a graph coloring, and then impose local constraints on it. Syntax alone does not specify which proposed relations are available: full semantics for second-order logic permits all external subsets of , whereas Henkin semantics supplies designated ranges. The second-order encoding of three-colorability makes this distinction concrete.
Serial relation Created 2026-10-25 Updated 2026-10-31
A binary relation is serial when every domain element has at least one outgoing related element. A serial relation may have cycles; combining seriality with an irreflexive relation and a transitive relation instead forces a nonempty domain to be infinite, by the infinite-model property of a serial strict partial order.
Set theory Created 2026-09-24 Updated 2026-10-18
Set theory studies sets, their set elements, and the constructions and sizes possible for them. It supplies a shared vocabulary for mathematics: a function connects two sets, a binary relation specifies which pairs of objects are related, and a probability space starts with a set of possible outcomes. Giving these objects a common language lets a construction from one subject be used in another without repeating its underlying bookkeeping.
A particularly beautiful question is how to compare sizes without first assigning a number. Two sets have the same cardinality when a bijection pairs every member of one with exactly one member of the other. For finite sets, this agrees with ordinary counting. For infinite sets, it produces surprises: bijects the natural numbers with the nonnegative even integers, and the Cantor pairing function bijects the Cartesian product with . A proper subset can have the same cardinality as its containing set.
This does not make all infinite sets equally large. Cantor's diagonal argument shows that all infinite binary sequences cannot be listed by the natural numbers. Cantor's theorem gives the wider principle: the power set of any set has strictly greater cardinality. The contrast between an explicit enumeration and an impossibility argument makes the meaning of infinity much sharper than a picture of something merely continuing forever.
Set formation itself requires care. Russell's paradox shows why not every condition defines a set of all objects satisfying it. Zermelo–Fraenkel set theory instead uses axioms specifying permitted constructions, including set comprehension within a previously given set. The restrictions are useful: they let us form the collections ordinary arguments need while blocking the unrestricted construction that produces the paradox.