nLab h-set

h-Sets

Context

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

Constructivism, Realizability, Computability

h-Sets

Idea

In homotopy type theory an h-set is a type XX – hence a homotopy type – with the special property that any two of its terms x,y:Xx,y : X are equal (equivalent) in an at most essentially unique way, hence that the identity type (x=y):Type(x = y) : Type is an h-proposition.

The notion of h-set is an internalization of the notion of 0-truncated object into homotopy type theory, essentially an internalization of the notion of set (or possibly of preset). See below in Relation to internal sets for more on this.

h-Sets can also be regarded as a way of embedding extensional type theory into intensional type theory.

Definition

Let AA be a type in dependent type theory with dependent sums, dependent products, and identity types. We define a new type isSet(A)isSet(A) as follows:

isSet(A) x:A y:AisProp(Id A(x,y))isSet(A) \coloneqq \prod_{x\colon A} \prod_{y\colon A} isProp(\mathrm{Id}_{A}(x, y))

(using any equivalent definition of the predicate isProp for h-propositions; and where “\prod” denotes dependent product types and “Id A\mathrm{Id}_A” denotes identity types on AA).

In other words, the only relationship between two elements of an h-set is whether they are equal; there is no room for more than one path between them. By beta-reducing this definition, we can express it as

isSet(A) x,y:A p,q:Id A(x,y)Id Id A(x,y)(p,q)isSet(A) \coloneqq \prod_{x,y\colon A} \prod_{p,q\colon \mathrm{Id}_A(x, y)} \mathrm{Id}_{\mathrm{Id}_A(x, y)}(p, q)

In other words, any two parallel paths in AA are equal.

A provably equivalent definition is

isSet(A) x:A p:Id A(x,x)Id Id A(x,x)(p,refl A(x))isSet(A) \coloneqq \prod_{x\colon A} \prod_{p\colon \mathrm{Id}_A(x, x)} \mathrm{Id}_{\mathrm{Id}_A(x, x)}(p, \mathrm{refl}_A(x))

This says that a version of Streicher’s “axiom K” holds for h-sets. (See also at axiom UIP.)

Another definition of a h-set is an S 1S^1-local type, a type for which the canonical function const A,S 1:A(S 1A)\mathrm{const}_{A, S^1}:A \to (S^1 \to A), which takes elements of AA to constant functions S 1AS^1 \to A from the circle type S 1S^1 to AA, is an equivalence of types:

isSet(A) f:S 1A y: x:AId S 1A(const A,S 1(x),f) z: x:AId S 1A(const A,S 1(x),f)Id x:AId S 1A(const A,S 1(x),f)(y,z)\mathrm{isSet}(A) \coloneqq \prod_{f:S^1 \to A} \sum_{y:\sum_{x:A} \mathrm{Id}_{S^1 \to A}(\mathrm{const}_{A, S^1}(x), f)} \prod_{z:\sum_{x:A} \mathrm{Id}_{S^1 \to A}(\mathrm{const}_{A, S^1}(x), f)} \mathrm{Id}_{\sum_{x:A} \mathrm{Id}_{S^1 \to A}(\mathrm{const}_{A, S^1}(x), f)}(y, z)

Examples

Properties

Equivalent characterizations

There are some equivalent characterizations of a type AA being an h-set:

  • A type AA is an h-set if and only if all its identity types x= Ayx=_A y have split support, i.e. (x,y:A)x=y(x=y)\prod_{(x,y:A)} \Vert x=y\Vert \to (x=y). This is proven in (KECA).

  • More generally, AA is an h-set if and only if there is some R:AAPropR:A\to A\to Prop which is reflexive (i.e. (x:A)R(x,x)\prod_{(x:A)} R(x,x)) and such that (x,y:A)R(x,y)(x=y)\prod_{(x,y:A)} R(x,y) \to (x=y). This is Theorem 7.2.2 in the HoTT Book.

Hedberg’s theorem

Hedberg's theorem states that

Theorem

Suppose that AA is a type with untruncated decidable equality, a type such that for every element a:Aa:A and b:Ab:A, there is an element in the sum type of the identity type a= Aba =_A b and the type of functions from a= Aba =_A b to the empty type.

a:A,b:Aδ(a,b):(a= Ab)+(a= Ab)a:A, b:A \vdash \delta(a, b):(a =_A b) + (a =_A b) \to \emptyset

Then AA is a h-set.

A proof of this theorem could be found in Hedberg's theorem.

Relation to internal sets

When using homotopy type theory as the ambient foundations, h-sets generally play the role of the sets. When homotopy type theory is the internal logic of some (∞,1)-category, then the h-sets are the “internal sets” in this internal logic. (Not to be confused with the other meaning of internal set.)

Note, though, that this notion of “internal set” is of a different sort from the usual notions of internal category or internal groupoid. If an internal set is an h-set, then an “internal groupoid” should mean a 1-truncated type, whereas an internal groupoid usually means some kind of groupoid object in an (∞,1)-category. Conversely, the usual meaning of “internal groupoid” suggests that the meaning of “internal set” should be something more like a setoid, with the h-sets being more like presets. This latter meaning is how “sets” are more often defined by constructive type theorists.

The point is that to be worthy of the name “set”, a notion ought to come with “quotients of equivalence relations”. If we start with a notion which does not have quotients, such as the types in ordinary Martin-Löf dependent type theory, then in order to get a good notion of “set” we need to “freely add quotients”, which semantically means passing to the exact completion whose objects are setoids. But if we start with a notion that does have quotients, then this is unnecessary. In homotopy type theory, h-sets do have quotients, which can be constructed using higher inductive types; thus it makes sense to call them “sets” rather than “presets”.

A good way to reconcile these seemingly clashing terminologies is to talk about exact completions of unary sites or (∞,1)-sites. The presence of a Grothendieck topology allows us to “remember” to what extent our given notion has well-behaved quotients: if we have no quotients, then we use the trivial topology, whereas if we have quotients, we can use the regular topology. And the exact completion builds in quotients “freely” but preserving those which the topology asserts to already exist. In particular, if we start with quotients (an exact category or (,1)(\infty,1)-category), then the exact completion of the regular topology is idempotent, whereas if we start with a trivial topology, then the exact completion gives a category of setoids. Thus, in general, the good notion of “internal set” in a unary site is “object of the exact completion”.

Pretopos of hsets

The h-sets in HoTT form a ΠW-pretopos (Rijke-Spitters 13). See also at structural set theory.

homotopy leveln-truncationhomotopy theoryhigher category theoryhigher topos theoryhomotopy type theory
h-level 0(-2)-truncatedcontractible space(-2)-groupoidtrue/​unit type/​contractible type
h-level 1(-1)-truncatedcontractible-if-inhabited(-1)-groupoid/​truth value(0,1)-sheaf/​idealmere proposition/​h-proposition
h-level 20-truncatedhomotopy 0-type0-groupoid/​setsheafh-set
h-level 31-truncatedhomotopy 1-type1-groupoid/​groupoid(2,1)-sheaf/​stackh-groupoid
h-level 42-truncatedhomotopy 2-type2-groupoid(3,1)-sheaf/​2-stackh-2-groupoid
h-level 53-truncatedhomotopy 3-type3-groupoid(4,1)-sheaf/​3-stackh-3-groupoid
h-level n+2n+2nn-truncatedhomotopy n-typen-groupoid(n+1,1)-sheaf/​n-stackh-nn-groupoid
h-level \inftyuntruncatedhomotopy type∞-groupoid(∞,1)-sheaf/​∞-stackh-\infty-groupoid

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

References

Formalization of set theory via h-sets in homotopy type theory (see at Set in homotopy type theory)

  • Egbert Rijke, Bas Spitters, Sets in homotopy type theory, Mathematical Structures in Computer Science, Volume 25, Issue 5 (From type theory and homotopy theory to Univalent Foundations of Mathematics) (arXiv:1305.3835)

which became one chapter in

Last revised on January 25, 2023 at 15:50:45. See the history of this page for a list of all contributions to it.