TITLE: Cancelling a graph join from a graph homomorphism
QUESTION [12 upvotes]: Given (finite, simple) graphs $G$, $H$ and $K$ and a homomorphism
$$
G+K\to H+K
$$
where $+$ denotes the join, does it follow that there also exists a graph homomorphism $G\to H$?
If this is known, I'd also appreciate a reference.

REPLY [13 votes]: If $|K|=\infty$, then this is false, as a counterexample $G=K_2$, $H=K_1$, $K=K_\infty$ shows.
Let us prove that the claim is true if $K$ is finite (with no such assumption for $G$ and $H$). Induction on $|K|$; if $|K|=0$, the claim is trivial.
For the inductive step, consider a homomorphism $\psi\colon G+K\to H+K$. Set $G_1=\psi(G)\cap K$, $K_1=\psi(K)\cap K$, $H_1=\psi(K)\cap H$. If $G_1=\varnothing$, then $\psi\big|_G$ is a required homomorphism $G\to H$. So now we assume that $|G_1|>0$.
Each vertex of $G_1$ is connected with each of $K_1$ since $\psi$ is a homomorphism (thus in particulat $|K_1|<|K|$). Each vertex of $H_1$ is connected with each of $K_1$ by the definition of join. Thus, the induced subgraphs on $G_1\cup K_1(\subseteq K)$ and $H_1\cup K_1$ are isomorphic to $G_1+K_1$ and $H_1+K_1$, respectively. So $\psi\big|_{G_1\cup K_1}$ provides a homomorphism $G_1+K_1\to H_1+K_1$ which by the induction hypothesis implies the existence of a homomorphism $\varphi\colon G_1\to H_1$.
Finally, set $M=\psi(G)\cap H$. Each vertex of $M$ is connected with each of $K_1$, since $\psi$ is a homomorphism. Thus the map $\eta\colon G\to H$, 
$$
  \eta(g)=\begin{cases}
    \psi(g), &\psi(g)\in M;\\
    \varphi(\psi(g)), &\psi(g)\in G_1
  \end{cases}
$$
is a sought homomorphism. The step is proved.