Tensoring with Hom and evaluation map Let $S$ and $E$ be a finitely generated projective $B-A$ bimodules where $A,B$ are some algebras. Consider $F=Hom_B(S,E)$. Why is it true that the map $S \otimes_A F \cong E$ defined by $s \otimes t \mapsto t(s)$ is an isomorphism?
EDIT: Let me be very careful with the right-left confusion. Here $S$ is a $B-A$ bimodule ($B$ acts from the left, $A$ acts from the right), so is $E$. We consider $F$ to be a module of $B$ linear maps so it is $A-A$ bimodule. Tensoring both of them we get $B-A$ bimodule again. According to the comment below: I'm not pretty sure how does it works for rank one free bimodule. Such module is just $A$ with some left $B$ action and $A \otimes_A F$ should be $B-A$ bimodule but from the other side tensoring (over $A$) with $A$ should give us just $F$ (and this is $A-A$ bimodule!) therefore we get $Hom_B(A,E)$ which apparently is not the same as $E$. I'm affraid that I've messed something.
LATER EDIT: I tried to avoid the discussion from where this question comes from, since I was told that this should be true in general (finitely generated and projective case). However my context is somehow broader: $A$ and $B$ are Morita equivalent and $S$ is an $B-A$ equivalence bimodule which means that $S \otimes_A S' \cong A$ as an $A-A$ bimodule and $S' \otimes_B S \cong B$ as a $B-B$ bimodule where $S':=Hom_B(S,B)$ is the dual module. Maybe now the statement will be correct?
 A: Let $S'=\mathrm{Hom}_B(S,B)$. Then $S'$ is an $A-B$ bimodule, called the left dual of $S$ (the right dual would be $\mathrm{Hom}_A(S,A)$). There is a natural evaluation map $\varepsilon:S\otimes_A S'\to B$ of $B-B$ modules. If $S$ is finitely generated and projective as a left $B$ module then there exists a map $\eta:A\to S'\otimes_B S$ of $A-A$ modules such that the equations $(\varepsilon\otimes_B\mathrm{id}_S)(\mathrm{id}_{S}\otimes_A\eta)=\mathrm{id}_S$ and $(\mathrm{id}_{S'}\otimes_B\varepsilon)(\eta\otimes_A\mathrm{id}_{S'})=\mathrm{id}_{S'}$ both hold (see here).
Now, I claim that $F=\mathrm{Hom}_B(S,E)\simeq S'\otimes_BE$. I'll define maps $\alpha:\mathrm{Hom}_B(S,E)\to S'\otimes_BE$ and $\beta:S'\otimes_BE\to \mathrm{Hom}_B(S,E)$, and prove that they're inverse. The map $\alpha$ is defined by $\alpha(f)=(\mathrm{id}_{S'}\otimes_Bf)\eta(1)$. To define the map $\beta$ we have to specify for each element $t\in S'\otimes_BE$ how the map $\beta(t)\in\mathrm{Hom}_B(S,E)$ acts on each $s\in S$. Define $\beta(t)(s)=(\varepsilon\otimes_B\mathrm{id}_E)(s\otimes_A t)$.
Then
$$(\beta\circ\alpha)(f)(s)=(\varepsilon\otimes_B\mathrm{id}_E)(s\otimes_A \alpha(f))=(\varepsilon\otimes_B\mathrm{id}_E)(s\otimes_A (\mathrm{id}_{S'}\otimes_Bf)\eta(1))=f(\varepsilon\otimes_B\mathrm{id}_S)(\mathrm{id}_{S}\otimes_A\eta)(s\otimes_A 1)=f(s)$$
and
$$(\alpha\circ\beta)(t)=(\mathrm{id}_{S'}\otimes_B\beta(t))\eta(1)=(\mathrm{id}_{S'}\otimes_B\varepsilon\otimes_B\mathrm{id}_E)(\eta(1)\otimes_At)=\left((\mathrm{id}_{S'}\otimes_B\varepsilon)(\eta\otimes_A\mathrm{id}_{S'})\otimes_B\mathrm{id}_E\right)(1\otimes_Bt)=t$$
so $\alpha$ and $\beta$ are inverse.
Now let $\gamma:S\otimes_AF=S\otimes_A\mathrm{Hom}_B(S,E)\to E$ be defined by $s\otimes_A f \mapsto f(s)$. Then we may write
$$\gamma=(\varepsilon\otimes_B\mathrm{id}_E)(\mathrm{id}_S\otimes_A\alpha)$$
since $(\varepsilon\otimes_B\mathrm{id}_E)(\mathrm{id}_S\otimes_A\alpha)(s\otimes_A f)=(\varepsilon\otimes_B\mathrm{id}_E)(s\otimes_A \alpha(f))=(\beta\circ\alpha)(f)(s)=f(s)$.
Since $\mathrm{id}_E$, $\mathrm{id}_S$ and $\alpha$ are isomorphisms, we have that if $\varepsilon$ is an isomorphism then so is $\gamma$ (since it is the composite of the two isomorphisms $(\varepsilon\otimes_B\mathrm{id}_E)$ and $(\mathrm{id}_S\otimes_A\alpha)$).
