nLab
contractible type

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

logiccategory theorytype theory
trueterminal object/(-2)-truncated objecth-level 0-type/unit type
falseinitial objectempty type
proposition(-1)-truncated objecth-level 1-type/h-prop
proofgeneralized elementprogram
conjunctionproductproduct type
disjunctioncoproduct ((-1)-truncation of)sum type (bracket type of)
implicationinternal homfunction type
negationinternal hom into initial objectfunction type into empty type
universal quantificationdependent productdependent product type
existential quantificationdependent sum ((-1)-truncation of)dependent sum type (bracket type of)
equivalencepath space objectidentity type
equivalence classquotientquotient type
inductioncolimitinductive type, W-type, M-type
higher inductionhigher colimithigher inductive type
completely presented setdiscrete object/0-truncated objecth-level 2-type/preset/h-set
setinternal 0-groupoidBishop set/setoid
universeobject classifiertype of types
modalityclosure operator monadmodal type theory, monad (in computer science)

homotopy levels

semantics

Contractible types

Idea

In homotopy type theory, the notion of contractible type is an internalization of the notion of contractible space / (-2)-truncated object.

Contractible types are also called of h-level 0. They represent the notion true in homotopy type theory.

Definition

We work in intensional type theory with dependent sums, dependent products, and identity types,

Definition

For X a type, let

isContr(X) x:X y:X(y=x)isContr(X) \coloneqq \sum_{x\colon X} \prod_{y\colon X} (y=x)

be the dependent sum in one variable x:X over the dependent product on the other variable y:X of the x,y-dependent identity type (x=y).

We say that X is a contractible type if isContr(X) is an inhabited type.

Remark

In propositions as types language, this can be pronounced as “there exists a point x:X such that every other point y:X is equal to x.”

Under the homotopy-theoretic interpretation, it should be thought of as the type of contractions of X — since the dependent product describes continuous functions, the paths from y to x depend continuously on y and thus exhibit a contraction of X to x.

Proposition

A provably equivalent definition is the product type of X with the isProp-type of X:

isContr(X)X×isProp(X).isContr(X) \coloneqq X \;\times\; isProp(X) \,.

(Here of course we have to use a definition of isProp which doesn’t refer to isContr).

Remark

This now says that X is contractible iff X is inhabited and an h-proposition.

Properties

Proposition

For any type A, the type isContr(A) is an h-proposition. In particular, we can show isContr(A)isContr(isContr(A)): if a type is contractible, then its space of contractions is also contractible.

Proposition

A type is contractible if and only if it is equivalent to the unit type.

Categorical semantics

We discuss the categorical semantics of contractible types.

Let 𝒞 be a locally cartesian closed category with sufficient structure to intepret all the above type theory. This means that C has a weak factorization system with stable path objects, and that acyclic cofibrations are preserved by pullback along fibrations between fibrant objects. (We ignore questions of coherence, which are not important for this discussion.)

In this categorical semantics, the interpretation of a type A:Type is a fibrant object [A:Type], which for short we will just write A. The interpretation of the identity type x,y:A(x=y):Type is as the path space object A IA×A. The interpretation of isContr(A) is the object obtained by taking the dependent product of the path space object along one projection p 2:A×AA and then forgetting the remaining morphism to A.

[isContr(A)]= p 2A I A *.[isContr(A)] \;\; = \;\; \array{ \prod_{p_2} A^I \\ \downarrow \\ A \\ \downarrow \\ * } \,.

The interpretation [a^:isContr(A)] of a term of isContr(A) is precisely a morphism a^:* p 2A I.

Proposition

Let 𝒞 be a type-theoretic model category. Write [isContr(A)] for the interpretation of isContr(A) in 𝒞. Then:

Global points *[isContr(A)] in 𝒞 are in bijection with contraction right homotopies of the object A, hence to diagrams in 𝒞 of the form

A η A I (id,const a) A×A,\array{ A &\stackrel{\eta}{\to}& A^I \\ & {}_{\mathllap{(id, const_a)}}\searrow & \downarrow \\ && A \times A } \,,

where const a is a morphism of the form A*aA and where A I is the path space object of A in 𝒞.

Proof

Given a global point a^:* p 2A I, write a:*A for the corresponding composite

* a^ p 2A I a A.\array{ * &\stackrel{\hat a}{\to} & \prod_{p_2} A^I \\ &{}_{\mathllap{a}}\searrow & \downarrow \\ && A } \,.

in 𝒞. This is an element in the hom set 𝒞 /A(a, p 2A I) of the slice category over A. By the (base change dependent product)-adjunction this is equivalently an element in 𝒞 /A×A(p 2 *a,A I).

Notice that the pullback p 2 *a is the left morphism in

A * (id,const a) a A×A p 2 A.\array{ A &\to& * \\ {}^{\mathllap{(id,const_a)}}\downarrow && \downarrow^{\mathrlap{a}} \\ A \times A &\stackrel{p_2}{\to}& A } \,.

Therefore a morphism p 2 *aA I in 𝒞 /A×A is equivalently in 𝒞 a diagram of the form

A η A I (id,const a) A×A.\array{ A &&\stackrel{\eta}{\to}&& A^I \\ & {}_{\mathllap{(id,const_a)}}\searrow && \swarrow \\ && A \times A } \,.

This is by definition a contraction right homotopy of A.

Remark

Thus if isContr(A), then A1 is a (right) homotopy equivalence, and hence (since A is fibrant) an acyclic fibration.

Conversely, if 𝒞 is a model category, A and 1 are cofibrant, and A1 is an acyclic fibration, then A1 is a right homotopy equivalence, and hence isContr(A) has a global element. Thus, in most cases, the existence of a global element of isContr(A) (which is unique up to homotopy, since isContr(A) is an h-proposition) is equivalent to A1 being an acyclic fibration.

More generally, we may apply this locally. Suppose that AB is a fibration, which we can regard as a dependent type

x:BA(x):Type.x\colon B \vdash A(x)\colon Type.

Then we have a dependent type

x:BisContr(A(x)):Typex\colon B \vdash isContr(A(x))\colon Type

represented by a fibration isContr(A)B. By applying the above argument in the slice category 𝒞/B, we see that (if 𝒞 is a model category, and A and B are cofibrant) isContr(A)B has a section exactly when AB is an acyclic fibration.

We can also construct the type

x:BisContr(A(x))\prod_{x\colon B} isContr(A(x))

in global context, which has a global element precisely when isContr(A)B has a section. Thus, a global element of this type is also equivalent to AB being an acyclic fibration.

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)-truncated(-1)-groupoid/truth valueh-proposition
h-level 20-truncateddiscrete space0-groupoid/setsheafh-set
h-level 31-truncatedhomotopy 1-type1-groupoid/groupoid(2,1)-sheaf/stackh-groupoid
h-level 42-truncatedhomotopy 2-type2-groupoidh-2-groupoid
h-level 53-truncatedhomotopy 3-type3-groupoidh-3-groupoid
h-level n+2n-truncatedhomotopy n-typen-groupoidh-n-groupoid
h-level untruncatedhomotopy type∞-groupoid(∞,1)-sheaf/∞-stackh--groupoid

References

Coq-code for contractible types is at

Revised on September 10, 2012 20:18:21 by Urs Schreiber (131.174.188.17)