Pasting Lemma
The pasting lemma is a fundamental result that allows us to construct continuous functions by defining them piecewise on closed (or open) subsets of the domain. It is used constantly in algebraic topology for constructing homotopies, paths, and maps on CW complexes.
Closed Pasting Lemma
Let be a topological space with where and are closed subsets of . Let and be continuous functions such that for all . Then the function defined by is continuous.
Since and agree on , the function is well-defined.
Let be closed. We show is closed in .
We have , where we interpret and .
Since is continuous (in the subspace topology on ), is closed in . Since is closed in , the set is closed in .
Similarly, is closed in , and since is closed in , is closed in .
Therefore is a finite union of closed sets, hence closed in .
Open Pasting Lemma
Let where each is open in . Let be continuous functions such that on for all . Then the function defined by for is well-defined and continuous.
Well-definedness follows from the compatibility condition. For continuity, let be open. Then:
Each is open in (since is continuous), hence open in (since is open in ). Therefore is a union of open sets, hence open.
The closed pasting lemma generalizes to finitely many closed sets . However, it does not extend to arbitrary families of closed sets. For example, consider and for each . Define by . Each is trivially continuous, but the pasted function is the characteristic function of the rationals, which is nowhere continuous.
The open version has no such restriction because arbitrary unions of open sets are open.
Applications
Let and be continuous paths with . The concatenation is defined by:
The two pieces are continuous (compositions of continuous maps), defined on the closed sets and , and agree at :
By the pasting lemma, is continuous.
Many homotopy constructions rely on the pasting lemma. For instance, to show that path homotopy is transitive: if and are path homotopies, define by:
The domain is divided into two closed rectangles and , the restrictions are continuous, and they agree on the intersection where both give . By the pasting lemma, is a continuous homotopy .
In the theory of CW complexes, one builds spaces inductively by attaching cells. At each stage, maps are defined on closed cells and pasted together. The pasting lemma (in its finite and locally finite versions) ensures continuity of the resulting global map.
More precisely, CW complexes carry the weak topology: is closed if and only if is closed for every cell . This is a colimit topology that makes pasting automatic.