The two sets are, of course, supposed infinite. 

This question is related to that one 
https://mathoverflow.net/questions/200442/commutation-of-tensor-products-with-inverse-limits-in-a-specific-case/200443#200443
where it received a (partial) answer ($A$ noetherian is suff). 

I can complement a bit: in any case, $A$ is supposed a commutative ring with unit and $1\not= 0$. 

When $A$ is a domain (no zero divisor) and if $A^X\otimes_A A^Y$ is torsion-free (which I do not know 
in general) then the natural arrow  $f\otimes g\mapsto ((x,y)\mapsto f(x)g(y))$
$$
A^X\otimes_A A^Y\rightarrow A^{X\times Y}
$$
is an embedding. 
> Let $\Phi$ be the natural arrow $A^X\otimes_A A^Y\rightarrow A^{X\times Y}$ and  $t\in ker(\Phi)$. Among all expressions 
$$
\alpha\, t=\sum_{i=1}^n f_i\otimes g_i\ , 
$$ 
with $\alpha\not=0$ choose one with $n$ minimal. 

>**(H)** _We suppose that the tensor product $A^X\otimes_A A^Y$ is **torsion-free**_ 

>if $n=0$, one has $\alpha\, t=0$ and then $t=0$, we are done. If $n>0$, the family $(g_i)_{i=1}^n$ is free and for all $(x,y)\in X\times Y$ 
$$
\Phi(\alpha\, t)[x,y]=\sum_{i=1}^n f_i(x)g_i(y)
$$
which means that $(\forall x\in X)(\sum_{i=1}^n f_i(x)g_i=0)$ and then $(\forall x\in X)(\forall i\in [1..n])(f_i(x)=0)$. This implies $\alpha\, t=0$ and then, under **(H)**, $t=0$.

Who knows more ? (I am specially interested in ness and suff conditions but, of course, any partial further result is welcome).

On the way I cannot prove **(H)**, any kind of hint will be appreciated. Hence

> **Subquestion** We know that, if  Then, if $A^X\otimes_A A^Y$ is torsionless (as a $A$-module), the ring $A$ is a domain. Is the converse true ? otherwise can one provide a counterexample ?