nLab cohomology in homotopy type theory



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


Homotopy theory

homotopy theory, (∞,1)-category theory, homotopy type theory

flavors: stable, equivariant, rational, p-adic, proper, geometric, cohesive, directed

models: topological, simplicial, localic, …

see also algebraic topology



Paths and cylinders

Homotopy groups

Basic facts




The ordinary cohomology groups are algebraic invariants of homotopy types, and hence of types in homotopy type theory. Typically they are much easier to compute than homotopy groups. There are many theorems in classical algebraic topology relating them other invariants such as the universal coefficient /theorem and the Hurewicz theorem.


There are many different flavours of cohomology, but it’s usually best to start simple and add features according to its use.

Let K(G,n)K(G,n) be the Eilenberg-MacLane space of an abelian group GG for some n:n : \mathbb{N}. The (reduced) ordinary cohomology group (of degree nn with coefficients in GG) of a pointed space XX is the following set:

H¯ n(X;G)X *K(G,n) 0 \bar{H}^n(X ; G) \equiv \| X \to^* K(G,n) \|_0

Note that there is an H-space structure on K(G,n)K(G,n) naturally, so for any |f|,|g|:H n(X;G)|f|,|g| : H^n(X;G) we can construct an element |λx.μ(f(x),g(x))|:H n(X;G)|\lambda x . \mu(f(x),g(x))| : H^n(X; G), hence we have a group.

Note for any type XX we can make this the unreduced cohomology (and call it HH instead of H¯\bar{H}) by simply adding a disjoint basepoint to XX giving us X +X+1X_+ \equiv X + 1 making it pointed.

Let EE be a spectrum, we can define the (reduced) generalized cohomology group of degree nn of a pointed space XX is defined as:

H¯ n(X;E)XE n 0 \bar{H}^n (X; E) \equiv \| X \to E_n \|_0

note that E nE_n has a natural H-space structure as by definition we have E nΩE n+1E_n \simeq \Omega E_{n+1} giving us the same group operation as before. In fact, ordinary cohomology becomes a special case of generalized cohomology just by taking coefficients in the Eilenberg-MacLane spectrum HGHG with (HG) nK(G,n)(HG)_n \equiv K(G,n).


Generalized reduced cohomology satisfies the Eilenberg-Steenrod axioms:

  • ( Suspension ) There is a natural isomorphism

    H¯ n+1(ΣX;E)H¯ n(X;E). \bar{H}^{n+1} (\Sigma X; E) \simeq \bar{H}^{n} (X; E).
  • ( Exactness ) For any cofiber sequence XYZ,X \to Y \to Z, the sequence

    H¯ n(X;E)H¯ n(Y;E)H¯ n(Z;E)\bar{H}^{n} (X; E) \to \bar{H}^{n} (Y; E) \to \bar{H}^{n} (Z; E)

    is an exact sequence of abelian groups.

  • ( Additivity ) Given an indexing type II satisfying 00-choice (e.g. a finite set) and a family X:IU,X: I \to U, the canonical homomorphism

    H¯ n( i:IX i;E) i:IH¯ n(X i;E)\bar{H}^{n} (\bigvee_{i:I} X_i; E) \to \prod_{i:I}\bar{H}^{n} (X_i; E)

    is an isomorphism.

Ordinary cohomology also satisfies the dimension axiom:

  • H¯ n(X,G)=0\bar{H}^{n} (X, G) = 0 if n0.n \neq 0.

See also


The notion of Whitehead generalized cohomology, i.e. with coefficients in any spectrum type:

  • Evan Cavallo, Section 3.2 of: Synthetic Cohomology in Homotopy Type Theory (2015) [pdf, pdf]

In the further generality of twisted cohomology with coefficients in any spectrum type:

Implementation of ordinary integral cohomology (i.e. with coefficients in the Eilenberg-MacLane spaces/-spectra) in cubical Agda:

Implementation of ordinary\;cohomology rings in cubical agda:

Last revised on April 26, 2023 at 03:19:39. See the history of this page for a list of all contributions to it.