If over a commutative ring $R$ we have that $M\otimes N=R^n$, $n\neq 0$, need we have that $M$ and $N$ are finitely generated projective?
We have finite generation, because if $M\otimes N$ is generated by $\sum_i a_{ij} x_i^j\otimes y_i^j$, then we have $x_{i_1}^{j_1}\otimes y_{i_2}^{j_2}\otimes x^{j_3}_{i_3}$ generating $M^n$. Projecting onto $M$, we see that $x_i^j$ generate $M$. My question is can we show that this map splits?
I am able to verify if in the case that $n=1$. I can't personally think of an example where it is not true, but I am having problems constructing a splitting. Any other solution is appreciated too.
$\def\id{\operatorname{id}}$Suppose $M\otimes N$ is isomorphic to $R^n$. Pick a basis $\{x_1,\dots,x_n\}$ of $M\otimes N$, with $x_i=\sum_{j=1}^{r_i}m_{i,j}\otimes n_{i,j}$ for each $i\in\{1,\dots,n\}$. Let $r=r_1+\cdots+r_n$, let $\{e_{i,j}:1\leq i\leq n, 1\leq j\leq r_i\}$ be a basis of $R^r$, and consider the map $f:R^r\to M$ which maps $e_{i,j}$ to $m_{i,j}$. Then $f\otimes\id_N:R^r\otimes N\to M\otimes N$ is obviously surjective. Now $M\otimes N$ is free, so $f\otimes\id_N$ is a split surjection, and therefore so is $f\otimes\id_N\otimes\id_M:R^r\otimes N\otimes M\to M\otimes N\otimes M$. As $R^r\otimes N\otimes M\cong R^r\otimes R^n\cong R^{rn}$ is free, this means that $M\otimes N\otimes M\cong R^n\otimes M\cong M^n$ is projective, as is every one of its obvious $n$ direct summands, each isomorphic to $M$.
Later. We can do this more simply as follows; this is what i wanted to do before out of my comment above, but somehow messed up (in a way, it is a transposed variant of the first paragraph)
Suppose $\phi:M\otimes N\to R^n$ is an isomorphism, let $p:R^n\to R$ be the projection onto the first summand, and suppose $\xi=\sum_{i=1}^rm_i\otimes n_i\in M\otimes N$ is such that $\phi(\xi)=(1,0,\dots,0)$. Then the map $\psi:R^r\otimes N\to R$ such that $\psi(e_i\otimes n)=p(\phi(m_i\otimes n))$ is surjective. Since $R$ is free, $\psi$ is split, so that so is $\psi\otimes\id_M:R^r\otimes N\otimes M\to R\otimes M$. The domain of this last map is free, isomorphic to $R^{rn}$, and the codomain is isomorphic to $M$, so we see that $M$ is projective.