This is probably well known to people who work with algebras but I couldn't find a reference.
Say I have a ring A and a module P and I take B = End(P), the endomorphism ring. Let N be a B-module, is it true that
$Hom_A(P, N\otimes_B P) = N$?
maybe I want to assume for N and P to be projective (over B and over A respectively).
Is this still true if now A is a dg-algebra (or simplicial algebra or ring spectrum or...) and in the identity above everything is derived?
The reason I think it's plausible is because morally
$$ Hom_A(P, N \otimes_B P) = (N \otimes_B P) \otimes_A P^\vee = N \otimes_B B $$
but I want to make sure I haven't "cheated" with the identity above.
thanks