natural deduction metalanguage, practical foundations
type theory (dependent, intensional, observational type theory, homotopy type theory)
computational trinitarianism = propositions as types +programs as proofs +relation type theory/category theory
equality (definitional, propositional, computational, judgemental, extensional, intensional, decidable)
isomorphism, weak equivalence, homotopy equivalence, weak homotopy equivalence, equivalence in an (∞,1)-category
Examples.
In homotopy type theory, the notion of equivalence is an internalization of the notion of equivalence or homotopy equivalence.
These are sometimes called weak equivalences, but there is nothing weak about them (in particular, they always have homotopy inverses).
We work in intensional type theory with dependent sums, dependent products, and identity types.
For $f\colon A\to B$ a term of function type; we define new dependent types as follows:
the homotopy fiber
and the proposition that the homotopy fiber is a (dependently) contractible type:
We say $f$ is an equivalence if $isEquiv(f)$ is an inhabited type.
That is, a function is an equivalence if all of its homotopy fibers are contractible types (in a way which depends continuously on the base point).
For $X, Y : Type$ two types, the type of equivalences from $X$ to $Y$ is the dependent sum
Three variations of this definition are, informally:
$f\colon A\to B$ is an equivalence if there is a map $g\colon B\to A$ and homotopies $p\colon \prod_{a\colon A} (g(f(a)) = a)$ and $q\colon \prod_{b\colon B} (f(g(b)) = b)$ (a homotopy equivalence)
$f\colon A\to B$ is an equivalence if there is the above data, together with a higher homotopy expressing one triangle identity for $f$ and $g$ (an adjoint equivalence).
$f\colon A\to B$ is an equivalence if there are maps $g,h\colon B\to A$ and homotopies $p\colon \prod_{a\colon A} (g(f(a)) = a)$ and $q\colon \prod_{b\colon B} (f(h(b)) = b)$ (sometimes called a homotopy isomorphism).
By formalizing these, we obtain types $homotopyEquiv(f)$, $isAdjointEquiv(f)$, and $isHIso(f)$. All four of these types are co-inhabited: we have a function from any one of them to any of the others. Moreover, at least if we assume function extensionality, the types $isAdjointEquiv(f)$ and $isHIso(f)$ are themselves equivalent to $isEquiv(f)$, and all three are h-propositions.
This is not true for $homotopyEquiv(f)$, which is not in general an h-prop even with function extensionality. However, often the most convenient way to show that $f$ is an equivalence is by exhibiting a term in $homotopyEquiv(f)$ (although such a term could just as well be interpreted to lie in $isHIso(f)$ with $h\coloneqq g$).
We discuss the categorical semantics of equivalences in homotopy type theory.
Let $\mathcal{C}$ be a locally cartesian closed category which is a model category, in which the (acyclic cofibration, fibration) weak factorization system has stable path objects, and acyclic cofibrations are preserved by pullback along fibrations between fibrant objects. (We ignore questions of coherence, which are not important for this discussion.) For instance $\mathcal{C}$ could be a type-theoretic model category.
For $A, B$ to cofibrant-fibrant objects in $\mathcal{C}$, a morphism $f\colon A\to B$ is a weak equivalence or equivalently a homotopy equivalence in $\mathcal{C}$ precisely when the interpretation of $isEquiv(f)$ has a global point $* \to isEquiv(f)$.
For $f\colon A\to B$, the categorical semantics of the dependent type
is by the rules for the interpretation of identity types and substitution the mapping path space construction $P f$, given by the pullback
which, by the factorization lemma, is one way to factor $f$ as an acyclic cofibration followed by a fibration
By definition and the semantics of contractible types, therefore, if $A$ and $B$ are cofibrant, then $isEquiv(f)$ has a global element
precisely when in this factorization, the fibration $P f \to B$ is an acyclic fibration. (See for instance (Shulman, page 49) for more details.)
But by the 2-out-of-3 property, this is equivalent to $f$ being a weak equivalence — and hence a homotopy equivalence, since it is a map between fibrant-cofibrant objects.
In the above we fixed one function $f : A \to X$. But the type $isEquiv$ is actually a dependent type
on the type of all functions. To obtain the categorical semantics of this general dependent $isEquiv$-construction, first notice that the interpretation of
$f : A \to B,\; a : A,\; b : B \;\vdash\; (f(a) = b) \colon Type$
is by the rules for interpretation of identity types, evaluation and substitution the left vertical morphism in the pullback diagram
where $eval : [A, B] \times A \to B$ is the evaluation map for the internal hom. This means that the interpretation of further dependent sum yielding $hfib$
is the composite left vertical morphism in
(…)
An introduction to equivalence in homotopy type theory is in
and basic ideas are also indicated from slide 60 of part 2, slide 49 of part 3 of
Coq code for homotopy equivalences is at