TITLE: Hom and tensor with a flat module
QUESTION [17 upvotes]: Let $A$ be a commutative noetherian ring. Let $M, N$ be $A$-modules, and assume that $M$ is finite over $A$. Let $P$ be a flat $A$-module.
Is it true that there is an isomorphism
$\operatorname{Hom}_A(M,N)\otimes_A P \cong \operatorname{Hom}_A(M,N\otimes_A P)$ ?
It appears that it holds at least locally (that is, when $P$ is free). Is it true in general?
If so, is there a reference for this?
Thank you!

REPLY [15 votes]: Here is   sufficient condition for obtaining the isomorphism you are after.
Let $A$ be an arbitrary commutative ring (not supposed noetherian)  and  $M, N$   arbitrary modules . We have a canonical morphism
     $$ M^*\otimes_A N\to Hom (M,N):\phi \otimes n \mapsto [m\mapsto\phi(m)n]  \quad (\star)$$ 
Proposition ($\star$) is an isomorphism as soon as $M$ is finitely generated projective.
Proof:
 It is an isomorphism for $M=A$, then for  finitely generated  free modules $M=A^r$, and finally for  summands of such i.e. finitely generated projectives.    
Corollary:
Given three arbitrary modules $M,N,P$ over the commutative ring $A$ , with $M $  finitely generated projective, we have a natural isomorphism
$$Hom_A(M,N)\otimes_A P \cong Hom_A(M,N\otimes_A P)$$
Proof:
 Replace all $Hom$'s by $\otimes$'s and use associativity of tensor product.       
Edit:
a) The Corollary fails if $P$  is finitely generated but not projective.
Take for example $A=\mathbb Z, N=\mathbb Z, M=P=\mathbb Z/(2)$.
 Then the left-hand side in the Corollary is $0$ and the right-hand side is    $\mathbb Z/(2)$    
b) As QiL pertinently comments, the Corollary also fails if $P$ is not assumed finitely generated.
Take for example $N=A$ and $M=P=$ an arbitrary non finitely generated module.
Then our canonical  morphism $u: M^*\otimes M \to Hom(M,M)$    cannot be surjective.
  Indeed any element $t\in  M^*\otimes M$ gets sent to an endomorphism $u(t)=f:M\to M$  such that $u(M)$ is finitely generated,  so that the identity $Id_M$ of $M$ will never be in  the image of $u$.