The rank-nullity theorem states that for $U, V$ finite dimensional vector spaces and $T:U \to V$ a linear map $$\dim(U) = \dim(im(T)) + \dim(ker(T)) $$ Let $M \subset B(H) $ be a finite von Neumann algebra with a trace $tr$, let $p \in M$ be a projection and $T: pH \to H$ a linear map such that $im(T)=q_1H$ and $ker(T)=q_2H$ with $q_1, q_2 \in M$ projections.
Question: Is it true that $tr(p) = tr(q_1) + tr(q_2)$ ?