nLab extensional function

Context

Category theory

Relations

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
propositionsetobjecttype
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
propositional 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

semantics

Contents

Definition

Given two sets (A, A)(A, \equiv_A) and (B, B)(B, \equiv_B) equipped with equivalence relations, we say that a function f:ABf:A \to B is \equiv-extensional if it preserves the equivalence relation \equiv: for all xAx \in A and yAy \in A, if x Ayx \equiv_A y, then f(x) Bf(y)f(x) \equiv_B f(y).

In category theory, this means that an extensional function is a functor between two thin groupoids or a dagger functor between two thin dagger categories, since equivalence relations can be modeled via the hom-sets of thin dagger categories or groupoids.

This definition is common in the dependent type theory literature that uses equivalence relations for defining setoids, but note that the carrier types are usually defined as general types instead of h-sets in this case.

Extensional functions are important in defining algebraic structures that use equivalence relations instead of equality for the equational axioms, such as prelattices and Heyting prealgebras.

Generalizations

One can generalize the definition of extensional function from equivalence relations to other structures

As functions between pseudo-equivalence relations

A pseudo-equivalence relation on a set TT is a quiver structure hom T(x,y)\mathrm{hom}_T(x, y) on TT (called the hom-sets), with identity morphisms id T(x)\mathrm{id}_T(x) in hom T(x,x)\mathrm{hom}_T(x, x), composition of morphisms gfg \circ f in hom T(x,z)\mathrm{hom}_T(x, z) for morphisms ff in hom T(x,y)\mathrm{hom}_T(x, y) and gg in hom T(y,z)\mathrm{hom}_T(y, z), and dagger operation f f^\dagger in hom T(y,x)\mathrm{hom}_T(y, x) for morphism ff in hom T(x,y)\mathrm{hom}_T(x, y).

An extensional function between two sets (A,hom A)(A, \mathrm{hom}_A) and (B,hom B)(B, \mathrm{hom}_B) equipped with a pseudo-equivalence relation is then a function f:ABf:A \to B with a family of functions f hom(x,y):hom A(x,y)hom B(f(x),f(y))f_\mathrm{hom}(x, y):\mathrm{hom}_A(x, y) \to \mathrm{hom}_B(f(x), f(y)).

This definition is common in the dependent type theory literature that uses pseudo-equivalence relations for defining setoids, but note that the hom-sets and carrier types are usually defined as general types instead of h-sets. If the pseudo-equivalence relations are the identity types, then every function is extensional in this sense by the action on identifications.

As functions between quivers

One doesn’t actually need the full structure of a pseudo-equivalence relation to define an extensional function: only the quiver structure of the hom-sets are needed. Thus, an extensional function between two quivers (A,hom A)(A, \mathrm{hom}_A) and (B,hom B)(B, \mathrm{hom}_B) is a function f:ABf:A \to B with a family of functions f hom(x,y):hom A(x,y)hom B(f(x),f(y))f_\mathrm{hom}(x, y):\mathrm{hom}_A(x, y) \to \mathrm{hom}_B(f(x), f(y)).

References

  • Erik Palmgren, On equality of objects in categories in constructive type theory, In 23rd International Conference on Types for Proofs and Programs (TYPES 2017). Leibniz International Proceedings in Informatics (LIPIcs), Volume 104, pp. 7:1-7:7, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2019) [10.4230/LIPIcs.TYPES.2017.7, arXiv:1708.01924]

Last revised on July 7, 2026 at 14:11:42. See the history of this page for a list of all contributions to it.