Let $X,Y,Z$ be metric spaces. If we have continuous map $\varphi : X\times Y \rightarrow Z$, we can get continuous map for each $x\in X$ $\widehat{\varphi}(x) : Y\rightarrow Z$ defined by $\widehat{\varphi}(x)(y)=\varphi(x,y)$. It is proven in If the function $\varphi \colon Z\rightarrow C(X,Y)$ is continuous then $F\colon Z\times X\rightarrow Y$, $F(z,x)=\varphi (z)(x)$ will be continuous. if $Y$ is locally compact, we even get $\widehat{\varphi} : X \rightarrow C(Y,Z)$ is continuous where $C(Y,Z)$ is set of all continuous functions from $Y$ to $Z$. My question is, if $Y$ is not locally compact, can $\widehat{\varphi}$ is also continuous? My lecturer said there is counterexample but he did not mention one.
If $\varphi : X\times Y\rightarrow Z$ is continuous, $\widehat{\varphi} : X\rightarrow C(Y,Z)$ is not necessary continuous.
compactnesscontinuityexamples-counterexamplesgeneral-topologymetric-spaces
Related Solutions
Answering so that this isn't unanswered. In the comments, Alex Ravsky suggested the following example which was just what I needed.
Consider any infinite group $G$ equipped with the cofinite topology. Then the multiplication map $G \times G \rightarrow G$ defined by $(x,y) \mapsto xy$ is separately continuous everywhere, but is not jointly continuous at any point.
Let
$$X=\Bbb R \text{ with the usual topology};$$ $$Y=\Bbb R \text{ with the cocountable topology };$$ $$Z=\Bbb R \text{ with the cofinite topology};$$ $$f:X\times Y\rightarrow Z$$ $$f(x,y)= \begin{cases} \frac{xy}{x^2+y^2}, & \text{if } (x,y)\neq(0,0) \\[2ex] 0, & \text{if } (x,y)=(0,0) \end{cases} $$
Then $f$ is not continuous, otherwise, $f$ restricted to the diagonal $\Delta$ of $X\times Y$ will be continuous. But $f(x,x)=\frac{1}{2}$ for $(x,x)\neq (0,0)$; Thus $(f|_{\Delta})^{-1}(\frac{1}{2})=\Delta \setminus \{(0,0)\}$, which is not closed in $\Delta$, though $\{\frac{1}{2}\}$ is closed in $Z$.
Lemma 1:
Every continuous function $g:\Bbb R \to \Bbb R_{\text{cocountable}}$ must be constant.
proof: $f(\Bbb Q)$ is countable, hence closed in $\Bbb R_{\text{cocountable}}$. $f^{-1}(f(\Bbb Q))$ is a closed set containing $\Bbb Q$, hence equal to $\Bbb R$. $f^{-1}(f(\Bbb Q))=\Bbb R$ implies $f(\Bbb R)=f(f^{-1}(f(\Bbb Q)))\subseteq f(\Bbb Q) $, hence $f(\Bbb R)$ is countable. A countable, connected subset of $\Bbb R_{\text{cocountable}}$ must be a one-point set. Hence $f$ is constant. $\square$
Claim 1:
For every continuous function $g: \Bbb R \to \Bbb R\times \Bbb R_{\text{cocountable}}$, the image must be contained in $\Bbb R\times \{y_0\}$ for some $y_0$.
proof: $\pi_2\circ g$ is a continuous function from $\Bbb R$ to $\Bbb R_{\text{cocountable}}$. ($\pi_2$ is the projection onto the second coordinate). By lemma 1, $\pi_2\circ g$ is constant. Hence the result follows. $\square$
Hence for every continuous function $g: \Bbb R \to \Bbb R\times \Bbb R_{\text{cocountable}}$, the precomposition $f\circ g:\Bbb R\to \Bbb R_{\text{cofinite}}$ is equal to $f(x,y_0)=\frac{x^2y_0^2}{x^2+y_0^2}$ ($y_0$ fixed). Replacing $\Bbb R_{\text{cofinite}}$ by the finer topology $\Bbb R$, the function is easily seen to be continuous by standard calculus argument. Hence $f\circ g:\Bbb R\to \Bbb R_{\text{cofinite}}$ is continuous.
Lemma 2:
Every continuous function $h:\Bbb R_{\text{cocountable}} \to \Bbb R$ must be constant.
proof: (continuity on co-countable topology drhab's answer) Let $h$ be such a function with e.g. $0,1\in h\left(\mathbb{R}\right)$. Suppose $f$ is continuous and let $D_0,D_1$ be disjoint open sets containing $0$ and $1$ respectively. Then $h^{-1}\left(D_0 \right)$ and $h^{-1}\left(D_1\right)$ must be disjoint sets both having a countable complement. Then $h^{-1}\left(D_0\right)$ as a subset of the complement of $h^{-1}\left(D_1\right)$ is countable and consequently $\mathbb{R}=h^{-1}\left(D_0 \right)\cup h^{-1}\left(D_0\right)^{c}$ is countable. Contradiction. $\square$
Claim 2:
For every continuous function $h: \Bbb R_{\text{cocountable}} \to \Bbb R\times \Bbb R_{\text{cocountable}}$, the image must be contained in $\{x_0\}\times\Bbb R_{\text{cocountable}}$ for some $x_0$.
proof: $\pi_1\circ h$ is a continuous function from $\Bbb R_{\text{cocuntable}}$ to $\Bbb R$. ($\pi_1$ is the projection onto the first coordinate). By lemma 2, $\pi_1\circ h$ is constant. Hence the result follows. $\square$
Hence for every continuous function $h: \Bbb R_{\text{cocountable}} \to \Bbb R\times \Bbb R_{\text{cocountable}}$, the precomposition $f\circ h:\Bbb R_{\text{cocountable}}\to \Bbb R_{\text{cofinite}}$ is equal to $f(x_0,y)=\frac{x_0^2y^2}{x_0^2+y^2}$ ($x_0$ fixed). $(f\circ h)^{-1}(A)$ is closed (i.e. countable) for every closed (i.e. finite) set $A$. In fact, the preimage of each element can have cardinality at most $2$ (by looking at the $\text{graph}^1$). Hence $f\circ h:\Bbb R_{\text{cocountable}}\to \Bbb R_{\text{cofinite}}$ is continuous.
Best Answer
Note that all spaces below are Hausdorff (not sure if this is needed, but I'm assuming this to not state false theorems).
We consider $C(Y, Z)$ with compact-open topology here.
There is a misunderstanding, if $\varphi:X\times Y\to Z$ is continuous, then $\hat\varphi:X\to C(Y, Z)$ is always continuous. It's the implication $\hat\varphi$ continuous $\implies$ $\varphi$ continuous that isn't always true.
Namely, witness the following proposition (see e.g. Dugundji's Topology):
Proposition. If $\hat\varphi:X\to C(Y, Z)$ is continuous and $Y$ is locally compact (or $X\times Y$ is a $k$-space), then $\varphi:X\times Y\to Z$ is continuous.
Since every metric space is a $k$-space, in your setting of metric spaces we have:
Theorem. If $X, Y, Z$ are metric spaces then $\varphi$ is continuous iff $\hat\varphi$ is continuous.
So actually both implications are always true!
Edit: Since the OP was asking for it, here's a counter-example when we're not in the real of metric spaces. Let $Y$ be a Tychonoff space that's not locally compact, for example $Y = \mathbb{Q}$, say $y_0\in Y$ doesn't have a compact neighbourhood. If we take $\varphi:C(Y, [0, 1])\times Y\to [0, 1]$ to be the evaluation map, that is $\varphi(f, y) = f(y)$ then $\varphi$ is not continuous. The proof is relatively easy:
Proof: Suppose otherwise, that $\varphi$ is continuous, let $0:Y\to [0, 1]$ denote tha map $0(x) = 0$, then there are neighbourhoods $U$ of $y_0$ and $V = \bigcap_{i=1}^n (K_i, V_i)$ of $0$ such that $\varphi[U\times V]\subseteq [0, 1)$ (from continuity of $\varphi$ at $(0, y_0)$). Here $K_i\subseteq Y$ are compact, and $V_i\subseteq [0, 1]$ are open.
Since $\overline{U}$ is not compact, we can't have $U\subseteq \bigcup_{i=1}^n K_i$, so that there is $y_1\in U\setminus \bigcup_{i=1}^n K_i$. Since $Y$ is Tychonoff we can find a continuous function $h:Y\to [0, 1]$ such that $h[\bigcup_{i=1}^n K_i] = \{0\}$ and $h(y_1) = 1$. Then $(h, y_1)\in V\times U$ but $\varphi(h, y_1) = 1$, which is impossible. The contradiction shows that $\varphi$ can't be continuous at the point $(0, y_0)$. $\square$
Here $Z = [0, 1]$ and $X = C(Y, [0, 1])$. The corrsponding map $\hat\varphi:C(Y, [0, 1])\to C(Y, [0, 1])$ is just the identity map $\text{Id}_{C(Y, [0, 1])}$ and as such is continuous.
This shows that from continuity of $\hat\varphi$ it doesn't follow that $\varphi$ is continuous.