Let $k$ be an algebraically closed field and let $X$, $Y$ be varieties over $k$. Let us denote by $\mathcal{O}(X)$ and $\mathcal{O}(Y)$ the $k$algebra of regular functions on $X$ and $Y$ respectively. There exists a natural homomorphism of $k$algebras: $$ \theta \colon \mathcal{O}(X) \otimes_k \mathcal{O}(Y) \to \mathcal{O}(X \times Y) \, , \quad f \otimes g \mapsto \left( (x,y) \mapsto f(x)g(y) \right) \, . $$ It is wellknown, that $\theta$ is an isomorphism in case $X$ and $Y$ are affine. Is it true that $\theta$ is an isomorphism if $X$ and $Y$ are just quasiaffine (i.e. not necessarily affine)? Is this true for arbitrary varieties $X$ and $Y$? Any proof or counterexample or any reference to a text book would be perfect.

2$\begingroup$ I asked this question already on MathStackExchange, but didn't got an answer. See math.stackexchange.com/questions/2211697/…. $\endgroup$ – Anonymous Apr 14 '17 at 12:42

1$\begingroup$ Dear Anonymous, I took the liberty to correct a typo in your displayed formula. $\endgroup$ – Georges Elencwajg Apr 14 '17 at 20:04
This is true for $X$ and $Y$ any quasicompact quasiseparated schemes over any field $k$. Consider a finite open cover $\{Y_i\}$ of $Y$ with quasicompact $Y_i$, so the overlaps $Y_{ij} = Y_i \cap Y_j$ are quasicompact since $Y$ is quasiseparated. Then we have an evident leftexact sequence of $k$vector spaces $$0 \rightarrow O(Y) \rightarrow \prod_i O(Y_i) \rightarrow \prod_{ij} O(Y_{ij}).$$ Since tensor product passes through finite direct products, tensoring by $O(X)$ gives a leftexact sequence $$0 \rightarrow O(X) \otimes_k O(Y) \rightarrow \prod_i (O(X) \otimes_k O(Y_i)) \rightarrow \prod_{ij} (O(X) \otimes_k O(Y_{ij}))$$ that is easily seen to be compatible (via the comparison maps of interest) with the leftexact sequence $$0 \rightarrow O(X \times Y) \rightarrow \prod_i O(X \times Y_i) \rightarrow \prod_{ij} O(X \times Y_{ij})$$ attached to the quasicompact open cover $\{X \times Y_i\}$ of $X \times Y$ (whose overlaps are the $X \times Y_{ij}$).
In this way, we see that the isomorphism problem for $(X, Y)$ reduces to the cases of each $(X, Y_i)$ and $(X, Y_{ij})$. Hence, if $X$ and $Y$ are separated then without changing $X$ we can reduce to the case of affine $Y$ (all $Y_{ij}$ are affine when all $Y_i$ are so, provided $Y$ is separated) and then likewise without changing $Y$ (that is now affine) we can reduce to $X$ also being affine. But the case of $X$ and $Y$ both affine is clear, so this settles the general case when $X$ and $Y$ are separated (and quasicompact).
Now for qcqs $X$ and $Y$ we can run through the exact same formal game upon replacing "affine open" with "quasicompact separated open" everywhere (the latter class of opens is stable under finite intersection inside any qcqs scheme!), so just as we bootstrapped from the affine case to the quasicompact & separated case we can bootstrap from the settled quasicompact & separated case to the qcqs case.
The only role of $k$ being a field was to ensure that $O(X)$ is $k$flat.

$\begingroup$ Dear nfdc, may I be so bold as to ask why you decided to make this complete answer to a non trivial question community wiki? $\endgroup$ – Georges Elencwajg Apr 14 '17 at 19:55