In mathematics, in particular homotopy theory, a continuous mapping between topological spaces

- ,

is a *cofibration* if it has the homotopy extension property with respect to all topological spaces . That is, is a cofibration if for each topological space , and for any continuous maps and with , for any homotopy from to , there is a continuous map and a homotopy from to such that for all and . (Here, denotes the unit interval .)

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.

In what follows, let denote the unit interval.

A map of topological spaces is called a **cofibration**^{[1]}^{pg 51} if for any map such that there is an extension to , meaning there is a map such that , we can extend a homotopy of maps to a homotopy of maps , where

We can encode this condition in the following commutative diagram

where is the path space of equipped with the compact-open topology.

For the notion of a cofibration in a model category, see model category.

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 is a *binormal space* ( is normal, and its product with the unit interval is normal) then every closed subspace of has the homotopy extension property with respect to any absolute neighborhood retract. Likewise, if is a closed subspace of and the subspace inclusion is an absolute neighborhood retract, then the inclusion of into is a cofibration.^{[2]}^{[3]}
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 is a continuous map between topological spaces, there is an associated topological space called the mapping cylinder of . There is a canonical subspace embedding and a projection map such that as pictured in the commutative diagram below. Moreover, is a cofibration and 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 factors as the composition of a cofibration and a homotopy equivalence which is also a fibration.^{[4]}

A topological space with distinguished basepoint is said to be *well-pointed* if the inclusion map is a cofibration.

The inclusion map of the boundary sphere of a solid disk is a cofibration for every .

A frequently used fact is that a cellular inclusion is a cofibration (so, for instance, if is a CW pair, then 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 skeleton.

Let be an Abelian category with enough projectives.

If we let be the category of chain complexes which are in degrees , then there is a model category structure^{[5]}^{pg 1.2} where the weak equivalences are the quasi-isomorphisms, the fibrations are the epimorphisms, and the cofibrations are maps

which are degreewise monic and the cokernel complex is a complex of projective objects in . It follows that the cofibrant objects are the complexes whose objects are all projective.

The category of simplicial sets^{[5]}^{pg 1.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.

- 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 is any (continuous) map (between compactly generated spaces), and is a cofibration, then the induced map is a cofibration.
- The mapping cylinder can be understood as the pushout of and the embedding (at one end of the unit interval) . That is, the mapping cylinder can be defined as . By the universal property of the pushout, 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 to , 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.

Note that in a model category if is not a cofibration, then the mapping cylinder 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.

For a cofibration we define the **cofiber** to be the induced quotient space . In general, for , the **cofiber**^{[1]}^{pg 59} is defined as the quotient space

which is the mapping cone of . Homotopically, the cofiber acts as a homotopy cokernel of the map . In fact, for pointed topological spaces, the homotopy colimit of

In fact, the sequence of maps comes equipped with the cofiber sequence which acts like a distinguished triangle in triangulated categories.