Let $Y$ be a topological space that is $T_i$ for some $i\in \left\{0,1,2,3,4\right\}$, i.e. $Y$ might be Hausdorff, normal etc. Let $f:X\rightarrow Y$ be a continuous function that is constant in some $A\subset X$. We need to find the minimal $i$ such that $f$ will be constant in $\bar A$ as well.
I managed to prove the result for $T_2$, and provide a counterexample for $T_0$, but I'm struggling with $T_1$.
These are my results thus far:
Starting with the counterexample, choose $Y=\left\{a,b\right\},\;T_Y=\left\{\varnothing,\left\{a\right\},Y\right\}$, which can be easily shown to be $T_0$, and $X=\left\{a,b,c\right\},\;T_X=\left\{\varnothing,\left\{a\right\},\left\{a,b\right\},X\right\}$, and finally $f(a)=f(b)=a,\;f(c)=b$. We can easily show continuity by looking at the open sets in $Y$, and if we choose $A=\left\{a,b\right\}$ as a subset of X, then f is constant in $A$ but its closure is $X$, for which $f$ is not constant.
Moving on to Hausdorff, it is enough to show the result for $A$ that is not closed. So let $a\in\partial A$, and denote $f(x)=y$ for all $x\in A$. Assume $f(a)\neq y$, then since $Y$ is Hausdorff, we have adjoint open sets $U,V\subset Y$ that contain (and are of course open nbhds of) $y,f(a)$ respectively. This means that $$f^{-1}\left(U\right)\cap f^{-1}\left(V\right)=\varnothing$$ But every open set that contains $a\in \partial A$ must intersect $A$, and since $A\subset f^{-1}\left(U\right)$ we have $$f^{-1}\left(U\right)\cap f^{-1}\left(V\right)\ne\varnothing$$ and contradiction. Therefore $f(a)=y$, and the result follows.
Any ideas for $T_1$ or problems with the above proof sketches are very much welcome.
The minimal $i$ is $1$. Suppose $f: X\to Y$ is continuous and that $Y$ is $T_1$, and suppose $f(x)=y_0$ for all $x\in A\subseteq X$.
Let $x\in \partial A$. Our goal is to show that $f(x)=y_0$. Suppose this is not the case, so that $f(x)=y\neq y_0$. Since $Y$ is $T_1$, there exists an open neighborhood $U$ of $y$ such that $y_0\notin U$. $f^{-1}(U)$ is an open neighborhood of $x$, and since $x\in \partial A$, there exists $z\in A$ such that $z\in f^{-1}(U)$, so we have that $f(z)=y_0\in U$, a contradiction.