# Pasting Lemma

## Theorem

### Pair of Continuous Mappings on Open Sets

Let $X$ and $Y$ be topological spaces.

Let $A$ and $B$ be open in $X$.

Let $f: A \to Y$ and $g: B \to Y$ be continuous mappings that agree on $A \cap B$.

Let $f \cup g$ be the union of the mappings $f$ and $g$:

$\forall x \in A \cup B: \map {f \cup g} x = \begin {cases} \map f x & : x \in A \\ \map g x & : x \in B \end {cases}$

Then the mapping $f \cup g : A \cup B \to Y$ is continuous.

### Union of Open Sets

Let $T = \struct {X, \tau}$ and $S = \struct {Y, \sigma}$ be topological spaces.

Let $I$ be an indexing set.

Let $\family {C_i}_{i \mathop \in I}$ be a family of open sets of $T$.

Let $f: X \to Y$ be a mapping such that the restriction $f \restriction_{C_i}$ is continuous for all $i \in I$.

Then $f$ is continuous on $C = \ds \bigcup_{i \mathop \in I} C_i$, that is, $f \restriction_C$ is continuous.

### Pair of Continuous Mappings on Closed Sets

Let $X$ and $Y$ be topological spaces.

Let $A$ and $B$ be closed in $X$.

Let $f: A \to Y$ and $g: B \to Y$ be continuous mappings that agree on $A \cap B$.

Let $f \cup g$ be the union of the mappings $f$ and $g$:

$\forall x \in A \cup B: \map {f \cup g} x = \begin {cases} \map f x & : x \in A \\ \map g x & : x \in B \end {cases}$

Then the mapping $f \cup g : A \cup B \to Y$ is continuous.

### Finite Union of Closed Sets

Let $T = \struct {X, \tau}$ and $S = \struct {Y, \sigma}$ be topological spaces.

Let $I$ be a finite indexing set.

Let $\family {C_i}_{i \mathop \in I}$ be a finite family of closed sets of $T$.

Let $f: X \to Y$ be a mapping such that the restriction $f \restriction_{C_i}$ is continuous for all $i \in I$.

Then $f$ is continuous on $C = \ds \bigcup_{i \mathop \in I} C_i$, that is, $f \restriction_C$ is continuous.

### Counterexample of Infinite Union of Closed Sets

Let $f : \closedint {-1} 1 \to \R$ be the function on the closed interval $\closedint {-1} 1$ defined by:

$\map f x = \begin{cases} 1 & : x \ge 0 \\ -1 & : x < 0 \end{cases}$

The function $f$ is discontinuous at $0$.

The function $f$ restricted to the closed intervals:

$\closedint {-1} {-\dfrac 1 2}, \closedint {-1} {-\dfrac 1 3}, \ldots, \closedint {-1} {-\dfrac 1 n}, \ldots, \closedint 0 1$

From Constant Function is Continuous, the function $f$ restricted to the closed intervals:

$\closedint {-1} {-\dfrac 1 2}, \closedint {-1} {-\dfrac 1 3}, \ldots, \closedint {-1} {-\dfrac 1 n}, \ldots, \closedint 0 1$

are continuous.

We have:

$\closedint {-1} 1 = \paren {\ds \bigcup_{n \mathop \in \N_{>1} } \closedint {-1} {- \dfrac 1 n} } \cup \closedint 0 1$

The result follows.