Exercise 4.6. A subset $S \subseteq X$ is dense in $X$ if $cl(S) = X$. Let $f, g : X → Y$ be continuous. If $f_{|S} = g_{|S}$ on some dense subset $S$ of $X$ then $f = g$.

I've seem this topic $f,g$ continuous from $X$ to $Y$. if they are agree on a dense set $A$ of $X$ then they agree on $X$ but in my class we have not formaly defined Hausdorff spaces. So I attempt a proof.

Attempted proof:

Proof: Let $f, g: X \rightarrow Y$ be continuous. If $S$ is closed, $cl(S) = X = S$ and $X - S$ = $\emptyset$ so the result follows trivially. Assume that S is not closed. Let $x_0 \in X - S$ such that $f(x_0) \neq g(x_0)$.

Fix $\varepsilon > 0$ small enough such that $|f(x_0) - g(x_0)| > 2\varepsilon$. Then $B_y(f(x), \varepsilon) \bigcap B_y(g(x), \varepsilon) = \emptyset$. Observe that $x_0$ belongs to the pre-images of both balls. Since $f,g$ are continuous, define $\delta := min(\delta_{f}, \delta_{g})$ where $\delta_{f}, \delta_{g}$ are such that

$B_x(x, \delta_{f}) \subseteq f^{-1} B_y(f(x), \varepsilon)$ and $B_x(x, \delta_{g}) \subseteq g^{-1} B_y(g(x), \varepsilon)$.

Since $x \in cl(S)$, we have that $A = (B_x(x, \delta) \bigcap S) \neq \emptyset$. Then $\exists y \in A$ s.t. $f(y) \neq g(y)$. This is a contradiction since $y \in f^{-1} B_y(f(x), \varepsilon)$ and $y \in g^{-1} B_y(g(x), \varepsilon)$ implies that $f(y) \in B_y(f(x), \varepsilon)$ and $g(y) \in B_y(g(x),\varepsilon$), but $f(y) = g(y)$ and these two sets are disjoint.

Is it ok? Anything I could enhance? Language, more straightforwardness?

P.S. "Since $x \in cl(S)$..." in this part I used the property that if $x$ belongs to the closure of a set, then any open ball in $x$ must intersect the set.



Your proof seems fine to me, but this one might be sligthly more straightforward.

A function is continuous at $c$ if $$\lim_{x \mapsto c} f(x)=f(c).$$ Since both function are continuous and agree on a dense set, it means that there exists a sequence $x_n$ in your dense set where they both agree. Then you get $$f(c) = \lim_{n \to \infty} f(x_n) = \lim_{n \to \infty} g(x_n)=g(c)$$

  • $\begingroup$ The moral of the history is that any sequence in S can converge to cl(S), right? $\endgroup$ – jpugliese Feb 15 '18 at 15:59
  • $\begingroup$ By that I mean that I need a sequence $x_n$ in my dense set that converges to a point in $X - S$ and both agree. So $c$ needs to be in $X- S$. $\endgroup$ – jpugliese Feb 15 '18 at 16:10
  • $\begingroup$ In fact, you can do it for any $c$ in $X$, but you are already aware of the fact that both $f$ and $g$ agree on your dense set $S$. The only important point is that the sequence converging to $c$ is in your dense set $S$ $\endgroup$ – Maxime Scott Feb 16 '18 at 14:13

The trouble is, the statement is false in general topological spaces. Let $X=\mathbb R$ with usual topology, $S=\mathbb Q$ and $Y=\{0,1\}$ with indiscrete topology (only $\emptyset$ and $Y$ are open). Then the functions $f(x)=0$, $g(x)=\begin{cases}0&x\in S\\1&x\not\in S\end{cases}$ are both continuous, both agree on $S$, but not on $X$.

So, we need to impose additional criteria (e.g. that the topological space $Y$ is Hausdorff, or, stronger, that it is a metric space). Then you can prove the following (fairly trivial) statement (see: $X$ is Hausdorff if and only if the diagonal of $X\times X$ is closed):

(1) In $Y\times Y$, the diagonal $D_Y=\{(y,y)\mid y\in Y\}$ is closed.

In a metric space, the proof that the diagonal is closed is much easier: note the map $d:Y\times Y\to\mathbb R$ (distance) is continuous, and the diagonal is the pre-image of the closed set $\{0\}$.

Also, the following is always valid (see: Continuity of cartesian product of functions between topological spaces):

(2) The function $f\times g:X\to Y\times Y$, where we define: $(f\times g)(x)=(f(x), g(x))\in Y\times Y$, is continuous.

Thus, combining (1) and (2): the pre-image of $D_Y$ in $f\times g$ is a closed subset of $X$ containing $S$, so it must contain $\overline{S}=X$.

  • $\begingroup$ The function, in your statement, $g(x)$ is not continuous on $X=\Bbb{R}.$ The user specified that both $f,$ and $g$ are continuous on all of $X,$ and agree on a dense subset. $\endgroup$ – Chickenmancer Feb 15 '18 at 15:39
  • $\begingroup$ I'm confused. Is that true, or not? My professor is excellent at mathematics and I'm inclined to doubt he would make such a mistake. As Chickenmancer stated, both f and g are continuous. And X is a metric space. $\endgroup$ – jpugliese Feb 15 '18 at 15:58
  • $\begingroup$ @jpugliese It is continuous, but note that $Y$ has a weird topology. Every sequence in $Y$ converges, and it converges to both $0$ and $1$. This is what it (kind-of) means that it is not Hausdorff - bad things happen! $X$ may be a metric space; $Y$ most certainly is not in my example. $\endgroup$ – user491874 Feb 15 '18 at 16:28
  • $\begingroup$ @Chickenmancer See my previous comment addressed at jpugliese. $\endgroup$ – user491874 Feb 15 '18 at 16:29
  • $\begingroup$ $g(x)$ cannot be continuous on $\Bbb{R}$ since the sequence $\frac{1}{n\pi}\to 0$ in limit but $g(\frac{1}{n\pi})=1$ for all $n.$ $\endgroup$ – Chickenmancer Feb 15 '18 at 17:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.