nLab setoid



Category theory


Constructivism, Realizability, Computability

Type theory

natural deduction metalanguage, practical foundations

  1. type formation rule
  2. term introduction rule
  3. term elimination rule
  4. computation rule

type theory (dependent, intensional, observational type theory, homotopy type theory)

syntax object language

computational trinitarianism =
propositions as types +programs as proofs +relation type theory/category theory

logicset theory (internal logic of)category theorytype theory
predicatefamily of setsdisplay morphismdependent type
proofelementgeneralized elementterm/program
cut rulecomposition of classifying morphisms / pullback of display mapssubstitution
introduction rule for implicationcounit for hom-tensor adjunctionlambda
elimination rule for implicationunit for hom-tensor adjunctionapplication
cut elimination for implicationone of the zigzag identities for hom-tensor adjunctionbeta reduction
identity elimination for implicationthe other zigzag identity for hom-tensor adjunctioneta conversion
truesingletonterminal object/(-2)-truncated objecth-level 0-type/unit type
falseempty setinitial objectempty type
proposition, truth valuesubsingletonsubterminal object/(-1)-truncated objecth-proposition, mere proposition
logical conjunctioncartesian productproductproduct type
disjunctiondisjoint union (support of)coproduct ((-1)-truncation of)sum type (bracket type of)
implicationfunction set (into subsingleton)internal hom (into subterminal object)function type (into h-proposition)
negationfunction set into empty setinternal hom into initial objectfunction type into empty type
universal quantificationindexed cartesian product (of family of subsingletons)dependent product (of family of subterminal objects)dependent product type (of family of h-propositions)
existential quantificationindexed disjoint union (support of)dependent sum ((-1)-truncation of)dependent sum type (bracket type of)
logical equivalencebijection setobject of isomorphismsequivalence type
support setsupport object/(-1)-truncationpropositional truncation/bracket type
n-image of morphism into terminal object/n-truncationn-truncation modality
equalitydiagonal function/diagonal subset/diagonal relationpath space objectidentity type/path type
completely presented setsetdiscrete object/0-truncated objecth-level 2-type/set/h-set
setset with equivalence relationinternal 0-groupoidBishop set/setoid with its pseudo-equivalence relation an actual equivalence relation
equivalence class/quotient setquotientquotient type
inductioncolimitinductive type, W-type, M-type
higher inductionhigher colimithigher inductive type
-0-truncated higher colimitquotient inductive type
coinductionlimitcoinductive type
presettype without identity types
set of truth valuessubobject classifiertype of propositions
domain of discourseuniverseobject classifiertype universe
modalityclosure operator, (idempotent) monadmodal type theory, monad (in computer science)
linear logic(symmetric, closed) monoidal categorylinear type theory/quantum computation
proof netstring diagramquantum circuit
(absence of) contraction rule(absence of) diagonalno-cloning theorem
synthetic mathematicsdomain specific embedded programming language

homotopy levels


Graph theory



The basis of it all

 Set theory

set theory

Foundational axioms

foundational axioms

Removing axioms



In constructive mathematics, such as in intuitionistic type theory, the notion of setoids [Hofmann (1995)] is a formalization of the idea of Bishop sets (following Bishop (1967)) and serves as a way of “constructively” speaking about quotient sets without, in a sense, actually constructing these: A setoid is essentially a set equipped with an equivalence relation or a similar structure (such as a pseudo-equivalence relation), and thought of as a stand-in for the would-be quotient set (quotient type) by that relation.

Accounts which take setoids to be…

Here the definition of setoids in terms of equivalence relations may be closer to the original intention of Bishop (1967) (though this remains a little vague) and is natural from the point of view of category theory/homotopy theory where setoids in this sense, and with equivalence of elements regarded as isomorphism, are exactly those groupoids which are equivalent to sets (the 0-truncated groupoids).

Another perspective is that setoids in the sense of equivalence relations consitute the ex/reg completion of Sets, while those in terms of pseudo-equivalence relations constitute the ex/lex completion of Sets.

In terms of type theory, the definition in terms of equivalence relations is natural under the propositions as some types-paradigm, while the definition in terms of pseudo-equivalence relations is natural under the types as propositions-paradigm.

In any case, beware that terminology and definitions may differ significantly across authors, cf. Palmgren (2005) p. 9.

Setoids are also sometimes used in “impoverished” foundations of mathematics that lack a primitive notion of quotient set; see for instance Bishop set.


In constructive mathematics, we want the real numbers to form a linearly ordered Heyting field RR with completeness for located Dedekind cuts. Using power sets and a set NN of natural numbers, one may form RR directly as a subset of 𝒫N\mathcal{P}N (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 N NN^N, 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 RR as a subquotient of the set of presequences of natural numbers.

The construction of RR 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.

Fixing inadequate foundations

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+ ϵ \epsilon .


The notion of “Bishop sets” goes to back the definition of sets in constructive mathematics/constructive analysis according to:

The connection to dependent type theory and the term setoid is due to

Survey of further developments:

See also:

category: disambiguation

Last revised on July 7, 2023 at 18:15:36. See the history of this page for a list of all contributions to it.