If $f:X \to Y$ is a continuous function such that $f|_A =y$ then is $f|_{\bar{A}}=y$? If $f:X \to Y$ is a continuous function such that $f|_A =y$ then is $f|_{\bar{A}}=y$? Here $A \subset X$ and $\bar{A}$ is the closure of $A$.
This statement came across my head as I was looking at the below example.
Let $\chi_n \in C^{1,2}([0,\infty) \times \mathbb{R}^d)$ with compact support, $\chi_n |_{[0,1/2n]\times \mathbb{R}^d}=0$ and $\chi_n |_{[1/n,t]\times B(0,n)}=1$.
For the use of this cut off function, I need $\chi_n$ to be $1$ also on $[1/n,t]\times \bar{B}(0,n)$. And I think this is true by using a sequential argument, i.e., any point on the boundary of $[1/n,t]\times B(0,n)$ is a limit of a sequence of points in $[1/n,t]\times B(0,n)$, and so by continuity we get $1$ on the boundary as well. 
So I was wondering if this result holds in the more general case above. I know it holds for $T_1$ spaces, but I am curious if there's any space that such a result would not hold.
 A: If $Y$ is separated, then $\{y\}\subset Y$ is closed. The inverse image of a closed set is closed, so $B=f^{-1}(\{1\})$ is closed, since $A\subset B, \bar A\subset \bar B=B$.
Otherwise, take $\mathbb{R}$ with the topology for which the open subsets are the empty subset and $\mathbb{R}$, every map $\mathbb{R}\rightarrow \mathbb{R}$ is continuous. The adherence of a non empty subset is $\mathbb{R}$, take $f$ to be the identity map $A=\{1\}, \bar A=\mathbb{R}, f_{\mid \{1\}}=1\neq f_{\mid\mathbb{R}}$.
A: Yes, this is true.
Since $f$ is continuous, it maps convergent sequences to convergent sequences. If $x \in \overline{A}\setminus A$ and $(x_n)$ is a sequence from $A$ converging to $x$, then $(f(x_n))$ converges to $f(x)$. But $f(x_n) = 1$ for all $n$, so we may conclude that $f(x) = 1$.
A: Since an incorrect answer used sequences, I want to present some facts to dispute it and also help elucidate Tsemo Aristide's answer.
Let $X$ be a non-empty topological space with the trivial topology (i.e. with only two open sets). Let $(x_n)$ be any sequence in $X$. Then if $y$ is any point in $X$, the sequence $(x_n)$ converges to $y$. Note that EVERY sequence in $X$ has EVERY point in $X$ as a limit.
Every mapping from $X$ with the trivial topology to itself is continuous.
Since $X$ is a first-countable space (in a trivial way), we have the following (from wikipedia);
Given a subset $A$, a point $x$ lies in the closure of $A$ if and only if there exists a sequence $(x_n)$ in $A$ which converges to $x$.
This is not true for a general topological space.
The identity map on $X$ is a constant function on any singleton subset $A$ (a really trivial fact). But the closure of any subset is all of $X$, and the only way a constant function on $X$ can be the identity function is if $X$ has no more than one point in it.
