# Cofibration

In mathematics, in particular homotopy theory, a continuous mapping between topological spaces
    $i:A\to X$,
is a cofibration if it has the homotopy extension property with respect to all topological spaces $S$. That is, $i$ is a cofibration if for each topological space $S$, and for any continuous maps $f,f':A\to S$ and $g:X\to S$ with $g\circ i=f$, for any homotopy $h:A\times I\to S$ from $f$ to $f'$, there is a continuous map $g':X\to S$ and a homotopy $h':X\times I\to S$ from $g$ to $g'$ such that $h'(i(a),t)=h(a,t)$ for all $a\in A$ and $t\in I$. (Here, $I$ denotes the unit interval $[0,1]$.)
This definition is formally dual to that of a fibration, which is required to satisfy the homotopy lifting property with respect to all spaces; this is one instance of the broader Eckmann–Hilton duality in topology.
Cofibrations are a fundamental concept of homotopy theory. Quillen has proposed the notion of model category as a formal framework for doing homotopy theory in more general categories; a model category is endowed with three distinguished classes of morphisms called fibrations, cofibrations and weak equivalences satisfying certain lifting and factorization axioms.

## Definition
### Homotopy theory

In what follows, let $I=[0,1]$ denote the unit interval.
A map $i\colon A\to X$ of topological spaces is called a cofibration$^{pg51}$ if for any map $f:A\to S$ such that there is an extension to $X$ (meaning: there is a map $f':X\to S$ such that $f'\circ i=f$), we can extend a homotopy of maps $H:A\times I\to S$ to a homotopy of maps $H':X\times I\to S$, where
   ${\begin{aligned}H(a,0)&=f(a)\\H'(x,0)&=f'(x)\end{aligned}}$
We can encode this condition in the following commutative diagram
where $S^{I}$ is the path space of $S$ equipped with the compact-open topology.
For the notion of a cofibration in a model category, see model category.

## Examples
### In topology

Topologists have long studied notions of "good subspace embedding", many of which imply that the map is a cofibration, or the converse, or have similar formal properties with regards to homology. In 1937, Borsuk proved that if $X$ is a binormal space ($X$ is normal, and its product with the unit interval $X\times I$ is normal) then every closed subspace of $X$ has the homotopy extension property with respect to any absolute neighborhood retract. Likewise, if $A$ is a closed subspace of $X$ and the subspace inclusion $A\times I\cup X\times {1}\subset X\times I$ is an absolute neighborhood retract, then the inclusion of $A$ into $X$ is a cofibration. Hatcher's introductory textbook Algebraic Topology uses a technical notion of good pair which has the same long exact sequence in singular homology associated to a cofibration, but it is not equivalent. The notion of cofibration is distinguished from these because its homotopy-theoretic definition is more amenable to formal analysis and generalization.
If $f:X\to Y$ is a continuous map between topological spaces, there is an associated topological space $Mf$ called the mapping cylinder of $f$. There is a canonical subspace embedding $i:X\to Mf$ and a projection map $r:Mf\to Y$ such that $r\circ i=f$ as pictured in the commutative diagram below. Moreover, $i$ is a cofibration and $r$ is a homotopy equivalence. This result can be summarized by saying that "every map is equivalent in the homotopy category to a cofibration."
Arne Strøm has proved a strengthening of this result, that every map $f:X\to Y$ factors as the composition of a cofibration and a homotopy equivalence which is also a fibration.
A topological space $X$ with distinguished basepoint $x$ is said to be well-pointed if the inclusion map ${x}\to X$ is a cofibration.
The inclusion map $S^{n-1}\to D^{n}$ of the boundary sphere of a solid disk is a cofibration for every $n$.
A frequently used fact is that a cellular inclusion is a cofibration (so, for instance, if $(X,A)$ is a CW pair, then $A\to X$ is a cofibration). This follows from the previous fact and the fact that cofibrations are stable under pushout, because pushouts are the gluing maps to the $n-1$ skeleton.

### In chain complexes

Let ${\mathcal {A}}$ be an Abelian category with enough projectives.
If we let $C_{+}({\mathcal {A}})$ be the category of chain complexes which are $0$ in degrees $q<<0$, then there is a model category structure$^{pg1.2}$ where the weak equivalences are the quasi-isomorphisms, the fibrations are the epimorphisms, and the cofibrations are maps
   $i:C_{\bullet }\to D_{\bullet }$
which are degreewise monic and the cokernel complex ${\text{Coker}}(i)_{\bullet }$ is a complex of projective objects in ${\mathcal {A}}$. It follows that the cofibrant objects are the complexes whose objects are all projective.

### Simplicial sets

The category ${\textbf {SSet}}$ of simplicial sets$^{pg1.3}$ there is a model category structure where the fibrations are precisely the Kan fibrations, cofibrations are all injective maps, and weak equivalences are simplicial maps which become homotopy equivalences after applying the geometric realization functor.

## Properties

* For Hausdorff spaces, every cofibration is a closed inclusion (injective with closed image); the result also generalizes to weak Hausdorff spaces.
* The pushout of a cofibration is a cofibration. That is, if $g\colon A\to B$ is any (continuous) map (between compactly generated spaces), and $i\colon A\to X$ is a cofibration, then the induced map $B\to B\cup _{g}X$ is a cofibration.
* The mapping cylinder can be understood as the pushout of $i\colon A\to X$ and the embedding (at one end of the unit interval) $i_{0}\colon A\to A\times I$. That is, the mapping cylinder can be defined as $Mi=X\cup _{i}(A\times I)$. By the universal property of the pushout, $i$ is a cofibration precisely when a mapping cylinder can be constructed for every space X.
* There is a cofibration (A, X), if and only if there is a retraction from $X\times I$ to $(A\times I)\cup (X\times \{0\})$, since this is the pushout and thus induces maps to every space sensible in the diagram.
* Similar equivalences can be stated for deformation-retract pairs, and for neighborhood deformation-retract pairs.

## Constructions with cofibrations
### Cofibrant replacement

Note that in a model category ${\mathcal {M}}$ if $i:*\to X$ is not a cofibration, then the mapping cylinder $Mi$ forms a cofibrant replacement. In fact, if we work in just the category of topological spaces, the cofibrant replacement for any map from a point to a space forms a cofibrant replacement.

### Cofiber

For a cofibration $A\to X$ we define the cofiber to be the induced quotient space $X/A$. In general, for $f:X\to Y$, the cofiber$^{pg59}$ is defined as the quotient space
   $C_{f}=M_{f}/(X\times \{0\})$
which is the mapping cone of $f$. Homotopically, the cofiber acts as a homotopy cokernel of the map $f:X\to Y$. In fact, for pointed topological spaces, the homotopy colimit of
   ${\underset {\to }{\text{hocolim}}}\left({\begin{matrix}X&\xrightarrow {f} &Y\\\downarrow &&\\\end{matrix}}\right)=C_{f}$
In fact, the sequence of maps $X\to Y\to C_{f}$ comes equipped with the cofiber sequence which acts like a distinguished triangle in triangulated categories.