# Link between a Dense subset and a Continuous mapping

arising out of comment made by Yuval Filmus in what is the cardinality of set of all smooth functions in $L^1$ ? I got this idea (forgive me for my ignorance for if it is nothing but an elementary definition/result in real analysis). The idea is like this Let $f:X\to Y$ is a mapping, where $X$ is a complete metric space (not sure if its strictly needed or whether a looser condition would do). If $f$ is a continuous mapping then $f$ is uniquely specified by a mapping $g:E\to Y$ where $E$ is a dense subset of $X$. What are the condition under which it is valid ? also the validity of the converse statement.

-

If $Y$ is a Hausdorff topological space, then the value of a continuous function $f\colon X\to Y$ is completely determined by the value of $f$ on a dense subset $E$ of $X$; to see this, suppose $f$ and $g$ are two functions that agree on a dense subset $E$ of $X$, and let $u\in X\setminus E$. If $f(u)\neq g(u)$, then there are open neighborhoods $U$ and $V$ of $f(u)$ and $g(u)$, respectively, such that $U\cap V=\emptyset$. Then $f^{-1}(U)$ is an open neighborhood of $u$, as is $g^{-1}(V)$. Their intersection is an open neighborhood of $u$, and therefore must contain elements of $E$; but then any $e\in E$ in the intersection has $f(e)=g(e)$, with $f(e)\in U$ and $g(e)\in V$, contradicting that $U\cap V=\emptyset$. Therefore, $f(u)=g(u)$, hence $f=g$.

In this situation, it does not matter if $X$ is a complete metric space (or even a metric space); the key is $Y$.

To see that the key is $Y$, consider the extreme case in which $Y$ has the indiscrete topology (the only open sets are the empty set and the set $Y$). Then any function into $Y$ is continuous, so you can make your $X$ anything you want, and have two functions that agree on any subspace you care to specify and yet differ somewhere else.

Added: Note that any metric space is necessarily Hausdorff, so if your maps are between metric spaces, then the property holds (as in the case of Yuval's answer). This because you have the property that $d(x,y)\geq 0$ and $d(x,y)=0$ if and only if $x=y$. Thus, given $x,y\in Y$, $x\neq y$, let $\epsilon=d(x,y)\gt 0$. Then $B(x,\frac{\epsilon}{2})$ and $B(y,\frac{\epsilon}{2})$ are open neighborhoods of $x$ and $y$ (respectively) that are disjoint: if $z$ were in the intersection, then $d(x,z)\lt \frac{\epsilon}{2}$, $d(z,y)\lt\frac{\epsilon}{2}$, and by the triangle inequality we would conclude that $d(x,y)\lt\epsilon$, a contradiction.

Final Addition: See here for a discussion of the converse.

Added 2: A result towards a possible converse: certainly we need some separation on $Y$. Suppose that there exist points $x,y\in Y$, $x\neq y$, such that every open subset that contains $x$ also contains $y$ (so $Y$ could be $T_0$, but cannot be $T_1$). Let $X$ be the Sierpinski space, $X=\{a,b\}$ with topology $\tau = \{\emptyset, \{b\}, X\}$. Let $f,g\colon X\to Y$ be the following maps: $f$ is the constant function that maps everything to $x$; $g$ is the function that maps $a\mapsto x$, $b\mapsto y$. The constantfunction is certainly continuous. For $g$, if $U$ is an open subset that contains $y$ but not $x$, then $g^{-1}(U)=\{b\}$, which is open; so $g$ is continuous. And $g$ and $f$ agree on the dense set $\{a\}$, but are not equal. I'm still trying to figure out the $T_1$ case (for all $x,y\in Y$, $x\neq y$, there exist open sets $U,V$ such that $x\in U-V$ and $y\in V-U$).

Added 3: Another step: $T_1$ is not sufficient; a colleague came up with this one (I kept trying the cofinite topology on $\mathbb{N}$ and not getting anywhere): take two copies of the real line and identify every point except the origin; this is $Y$. The result is a $T_1$ space, but not Hausdorff since no neighborhoods of the two copies of the origin are disjoint. Now let $X$ be the real line, and let $E = (-\infty,0)\cup(0,\infty)$ be the dense subset. The two obvious injections, one mapping $0$ to the first copy in $Y$ and the other mapping it to the other copy, are both continuous and agree on $E$ but not on all of $X$, so $T_1$ does not suffice for the property. At least, then, in the hierarchy of $T$-spaces, the first level at which we are guaranteed the property is Hausdorff. This does not, however, establish whether the converse property characterises Hausdorff-ness.

Added 4. I almost have the following:

Conjecture. Assuming the Axiom of Choice, the following are equivalent for a topological space $Y$:

1. $Y$ is Hausdorff.
2. For every topological space $X$, every dense subset $E$ of $X$, and every pair of continuous maps $f,g\colon X\to Y$, if $f$ and $g$ agree on $E$, then $f=g$.

Argument. Suppose that $Y$ is not Hausdorff. If there exist points $x,y\in Y$, $x\neq y$, such that every open neighborhood of $x$ contains $y$, then the map from the Sierpinski space indicated above shows that $Y$ does not have property 2. So we may assume that $Y$ is at least a $T_1$ space. But since $Y$ is not Hausdorff, there exist points $s,t\in Y$, $s\neq t$, such that for every neighborhoods $U$ of $s$ and $V$ of $t$ such that $s\in U-V$ and $t\in V-U$, we have $U\cap V\neq \emptyset$. Let $\mathfrak{U}\_s$ be the family of open neighborhoods of $s$ that do not contain $t$, and let $\mathfrak{V}\_t$ be the family of open neighborhoods of $t$ that do not contain $s$. Let $P=\mathfrak{U}\_s\times \mathfrak{V}\_t$, and partially order $P$ by letting $(U,V)\leq (U',V')$ if and only if $U'\subseteq U$ and $V'\subseteq V$. This makes $P$ into a directed partially ordered set (given any $(U,V),(R,S)\in P$, there exists $(U',V')\in P$ such that $(U,V)\leq (U',V')$ and $(R,S)\leq (U',V')$. Now, for each $(U,V)\in P$, we are assuming that $U\cap V\neq\emptyset$, so using the Axiom of Choice let $y_{(U,V)}\in Y$ be an element of $U\cap V$. Note that $y_{(U,V)}\neq s$ and $y_{(U,V)}\neq t$ for all $(U,V)\in P$.

Now let $X = \{y_{(U,V)}\mid (U,V)\in P\}\cup\{s,t\}$, and give $X$ the induced topology from $Y$, so that the inclusion maps $X\hookrightarrow Y$ is continuous. Note that the set $E=\{y_{(U,V)}\mid (U,V)\in P\}$ is dense in $X$: for every open neighborhood $B$ of $s$ in $X$, there exists an open set $\mathcal{O}\_B\in Y$ such that $\mathcal{O}\_B\cap X = B$; in particular, $\mathcal{O}\_B$ is a neighborhood of $s$; let $\mathcal{V}$ be any open neighborhood of $t$ that does not contain $S$, and let $B'=\mathcal{V}\cap X$; let $\mathcal{U}$ be any open neighborhood of $s$ that does not contain $t$. Then $\mathcal{U}\cap\mathcal{O}\_B$ is open, hence $B'=\mathcal{U}\cap\mathcal{O}\_B\cap X$ is an open subset of $X$ that is contained in $B$. Consider now $y_{(\mathcal{U}\cap\mathcal{O}\_B,\mathcal{V})}$. This is in $\mathcal{U}\cap\mathcal{O}_B\cap\mathcal{V}\cap X \subseteq B'$, and is plainly in $E$. In particular, in $X$ we have that $B'\cap E\neq\emptyset$, and hence $B\cap E\neq \emptyset$. Thus, every open neighborhood of $s$ in $X$ contains points of $E$, hence $x$ lies in the closure of $E$. A symmetric argument holds for $t$. Thus, $E$ is dense in $X$.

Now consider the maps $f,g\colon X\to Y$ defined as follows: $f$ and $g$, restricted to $E$, are the identity; $f(s)=f(t)=s$; and $g(s)=g(t)=t$. I claim that $f$ and $g$ are both continuous. Indeed, let $\mathcal{O}$ be an open set in $Y$. If $\mathcal{O}\cap\{s,t\}=\emptyset$ or $\{s,t\}\subseteq\mathcal{O}$, there is nothing to do: the inverse image under both $f$ and $g$ is just the intersection with $X$, hence open in $X$. So assume without loss of generality that $s\in\mathcal{O}$ but $t\notin \mathcal{O}$. Note that $g^{-1}(\mathcal{O}) = (\mathcal{O}-\{s\})\cap X$, and since $Y$ is $T_1$ removing a single point from an open set results in an open set, so $g^{-1}(\mathcal{O})$ is open. So we just need to show that $f^{-1}(\mathcal{O}) = (\mathcal{O}\cap X)\cup\{t\}$ is open in $X$.

And that is where I am a bit stuck at present. Can anyone either verify or falsify this?

-
Thanks Arturo. That was a very nice answer. –  Rajesh D Nov 9 '10 at 5:09
@Rajesh D: I'm actually trying to figure out if the converse holds: suppose $Y$ has the property that for any topological space $X$ and dense subset $E$ of $X$, if $f,g\colon X\to Y$ agree on $E$ then $f=g$. Does it follow that $Y$ is Hausdorff? I'm not sure yet. –  Arturo Magidin Nov 9 '10 at 5:11
Does the converse hold ? –  Rajesh D Nov 9 '10 at 14:22
Thank you for the reply. I am tryin to catch up with your attempt to prove the converse. I was not even aware of even elementary concepts of a Topological spaces before I read your answer.Serving as a nice motivation to learn. –  Rajesh D Nov 9 '10 at 16:33
@Arturo: thanks for pointing out. I was reading a book on introduction to functional analysis few months back.The first chapter was on metric spaces and in the middle of that chapter, after defining the concepts of metric space and open set, the author just mentioned (for no apparent reason) that there is something called a Topology on a set X which is nothing but the set X and the collection all its open sets. Only after seeing your comment and having a look at wikipaedia i realize that the definition of an open set in topology and that in Metric space are different.... –  Rajesh D Nov 11 '10 at 19:57