Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Indeed, this answers also my question 3. Thanks! But I am actually also curious about the case you mentioned where $f$ is everywhere defined and $B$ is a von Neumann subalgebra.