Rel, bicategory of relations, allegory
left and right euclidean;
extensional, well-founded relations.
constructive mathematics, realizability, computability
propositions as types, proofs as programs, computational trinitarianism
natural deduction metalanguage, practical foundations
type theory (dependent, intensional, observational type theory, homotopy type theory)
computational trinitarianism =
propositions as types +programs as proofs +relation type theory/category theory
basic constructions:
strong axioms
further
A setoid is a set equipped with a pseudo-equivalence relation. In the same way that magmoids are the raw structure used to build semicategories and pseudo-prosets are the raw structure used to build categories, setoids are the raw structure used to build dagger categories and groupoids (i.e. a groupoid without associativity, unital laws, and inverse laws). Setoids are also sometimes used in “impoverished” foundations of mathematics that lack a primitive notion of quotient set; see for instance Bishop set.
Sometimes, the term “setoid” is used in the mathematics literature for a set equipped with an equivalence relation, rather than a set equipped with a pseudo-equivalence relation. However, in the nLab we shall by default take setoids as those sets equipped with a pseudo-equivalence relation, which is required for the category to be the ex/lex completion of .
Using graph theoretic terminology, a setoid is a loop directed pseudograph, a set of vertices with a family of sets of edges for each vertex and , which comes with the following additional structure
for each vertex a family of edges
for each vertex and a family of functions
for each vertex , , and , a family of functions
The edge family is called a pseudo-equivalence relation.
A setoid is a set with a set and functions , (a loop directed pseudograph), with with functions , , and
such that
The structure is called a pseudo-equivalence relation.
We define an extensional function between two setoids and to be a function and a family of functions
Composition of extensional functions is defined as composition of the vertex function and of each edge function.
An extensional function between two setoids is full if every edge function is a surjection, and an extensional function is faithful if every edge function is an injection. An extensional function is injective-on-objects? if the vertex function is an injection, surjective-on-objects if the vertex function is a surjection, and bijective-on-objects if the vertex function is a bijection.
An extensional function is a dagger functor if additionally it preserves the functions , ,
An isomorphism of setoids is a full and faithful bijective-on-objects dagger functor.
Given a one-set-of-edges setoid , we define a family-of-sets-of-edges setoid by taking to be the preimage of under the function . Conversely, given a family-of-sets-of-edges setoid we define a one-set-of-edges setoid by taking to be the disjoint union of the families of edges .
…
Every category with a contravariant endofunctor that is the identity-on-objects is a setoid where
for every vertex , , , and and edge , , and
for every vertex , and edge
for every vertex , and edge
This includes dagger categories, where additionally
for every vertex , and edge
for every vertex , , and edge ,
for every vertex
and groupoids, where
for every vertex , and edge
for every vertex , and edge
Additionally, a setoid with one vertex is equivalent to a pointed magma with an endofunction.
Recall in graph theory that a loop directed pseudograph is simple or a loop digraph if for every vertex and , the set of edges is a subsingleton: for every edge and , . In the other definition, a loop directed pseudograph is a loop digraph if the functions and are jointly monic.
A setoid is thin or simple if its underlying loop directed pseudograph is a loop digraph. In both cases, the pseudo-equivalence relation becomes an equivalence relation. The term “thin” originates from category theory, while the term “simple” originates from graph theory.
A thin setoid is equivalently a thin dagger category, or a dagger category enriched in truth values. A thin setoid is also a thin groupoid, or a groupoid enriched in truth values.
Sometimes in the mathematical literature, setoids are thin by default.
For any setoid , the core of is defined as the maximal subgroupoid? of .
More specifically, a subsetoid of a setoid is a setoid with an faithful injective-on-objects dagger functor . A subsetoid of is a subgroupoid if the pseudo-equivalence relation of additionally satisfy the groupoid equational axioms:
for every vertex , , , and and edge , , and
for every vertex , and edge
for every vertex , and edge
for every vertex , and edge
for every vertex , and edge
A subgroupoid of a setoid is a maximal subgroupoid if the dagger functor is bijective-on-objects, and additionally if, for every other subgroupoid of with faithful injective-on-objects dagger functor , there is a unique faithful injective-on-objects dagger functor such that .
Let the category be defined as a category that is finitely complete and well-pointed (i.e. whose terminal object is a extremal generating object). This category of sets is not even a regular category, let alone an exact category, as can happen in certain foundations of mathematics, such as bare set-level Martin-Löf type theory, or ZFC and ETCS without the powerset axiom. The category of setoids is then the ex/lex completion of Set.
More specifically, using the definition of setoid with two sets: if and are two setoids, a morphism between them in is defined to be a function with functions with and . Moreover, we declare two such functions to be equal if there exists a function such that and . Because is a pseudo-equivalence relation, this defines an actual equivalence relation on the morphisms , which is compatible with composition; thus we have a well-defined category of setoids, which is the ex/lex completion of .
We have a full and faithful functor sending an object to the pseudo-equivalence relation . One can then verify directly that is exact, that this embedding preserves finite limits, and that it is universal with respect to lex functors from into exact categories.
If the presentation axiom (a weak form of the full axiom of choice) holds in , as a subcategory of , could be thought of as the category of completely presented sets, the category of sets with a projective presentation. If the axiom of choice holds in , then is equivalent to , as the axiom of choice implies that is its own free exact completion, and is equivalent to because the free functor from to is an equivalence of categories.
This construction could be generalized to any finitely complete category , from which the category of setoid objects of is the ex/lex completion of , and denoted as . If every epimorphism in is additionally a split epimorphism, then is its own free exact completion.
Many set-level type theories use types which are 0-truncated and thus h-sets by default because of the inclusion of uniqueness of identity proofs or axiom K to the rule system of the type theory. Sometimes, these type theories do not have quotients and image factorizations, and as a result, setoids are used instead of the native h-sets.
In homotopy type theory, and more generally in any intensional type theory where not all types are h-sets, such as in a type theory without uniqueness of identity proofs or axiom K, the notion of “setoid” bifurcates into multiple distinct notions. In analogy with category, the definitions used above in this article could be called a strict setoid. When the vertex types are only required to be a type rather than a set, then this defines a presetoid. There is also the notion of a univalent setoid, where equality of vertices is isomorphism of vertices in the core of a presetoid.
In constructive mathematics, we want the real numbers to form a linearly ordered Heyting field with completeness for located Dedekind cuts. Using power sets and a set of natural numbers, one may form directly as a subset of (or something equivalent), but what if you wish to be (at least weakly) predicative? Using function sets, one may form the Cauchy reals as a subquotient of , but these are complete in the desired sense only if a weak form of countable choice (which follows from either the presentation axiom or excluded middle) holds. (Essentially, there may not be enough sequences of natural numbers.) Alternatively, if you have them, you can use prefunction sets and form as a subquotient of the set of presequences of natural numbers.
The construction of above may also be done with entire relations if the axiom of fullness holds (see also real numbers object). Conversely, the axiom of fullness follows from the existence of sets of prefunctions; in addition to defining a functional entire prerelation, a prefunction between sets also defines an entire relation, and the set of these satisfies fullness. (This is related to the idea that prefunctions between sets may be formalised as entire relations.)
See also the discussion at net about how to force the domain of a net to be partial order, by using either entire relations or prefunctions as nets.
Sometimes one finds a foundation of predicative mathematics in which it appears to be impossible to construct quotient sets, leading to much hand-wringing. (For a simple example, simply remove the axiom of power sets from ZFC as normally presented.)
Assuming (as usual) that the original foundation had equality relations on its sets, there will be identity prerelations on the presets, leading to a special class of sets which we may again call the completely presented sets.
When you do this, the new kind of set is called a setoid, and then there may be hand-wringing about the need to use setoids instead of sets as one would like. But if you didn't have quotient sets originally, then you shouldn't have been talking about ‘sets’ in the first place; theories of sets without quotient sets are really theories of presets.
Some foundations also adopt an axiom of choice for functions which do not preserve the equivalence relation that, together with the identity relations, proves the presentation axiom for general sets, which means that free sets are completely presented sets.
If you are willing to accept the presentation axiom, then you can define a notion of setoid internal to a given theory of sets: as a projective set. (With the full axiom of choice, therefore, a setoid is simply a set.) Alternatively, you might forgo setoid as such but define a prefunction between sets to be an entire relation.
A similar result holds for SEAR+.
computational trinitarianism =
propositions as types +programs as proofs +relation type theory/category theory
The notion of “Bishop sets” goes to back the definition of sets in constructive mathematics/constructive analysis according to:
Errett Bishop, Foundations of Constructive Analysis, Mcgraw-Hill (1967)
Errett Bishop, Douglas Bridges, p. 15 of: Constructive Analysis, Grundlehren der mathematischen Wissenschaften 279, Springer (1985) [doi:10.1007/978-3-642-61667-9]
The connection to dependent type theory and the term setoid is due to
Survey of further developments:
Last revised on February 9, 2023 at 08:21:16. See the history of this page for a list of all contributions to it.