Let X be a topological space, A a dense subset of X, f : A → Y a mapping of A into a regular space Y. A necessary and sufficient condition for f to extend to a continuous mapping f:X→Y is that, for each x∈X, f(y) tends to a limit in Y when y tends to x while remaining in A. The continuous extension f of f to X is then unique.
The uniqueness of f follows from the principle of extension of identities (no. 1, Proposition 2, Corollary 1). It is clear that the condition is necessary, for if f is continuous on X, then for each x∈X we have
f(x)=y→x,y∈Alimf(y)=y→x,y∈Alimf(y) (§ 7, no. 5). Conversely, suppose that the condition is satisfied and define
f(x)=y→x,y∈Alimf(y) for each
x∈X;
f(x) is a well-defined element of Y, since Y is Hausdorff. We have to show that
f is continuous at each point
x∈X. Let then V' be a closed neighbourhood of
f(x) in Y; then by hypothesis there is an open neighbourhood V of x in X such that
f(V∩A)⊂V′. Since V is a neighbourhood of each of its points, we have
f(z)=y→z,y∈V∩Alimf(y) for each
z∈V, and from this it follows that
f(z)∈f(V∩A)⊂V′, since V' is closed. The result now follows from the fact that the closed neighbourhoods of
f(x) form a fundamental system of neighbourhoods of
f(x) in Y.
The mapping f is said to be obtained by extending f by continuity to X.
In the statement of Theorem 1 the hypothesis that Y is regular cannot be weakened without imposing additional restrictions on X, A or f (Exercise 19).
Bourbaki puts the proof directly after the statement, so what is above is the statement and its proof together.