I do not know the rules (mathematica rules) in order to perform the following calculation:
Lets say we have a $2$ particle system. Each particle has its own eigenbasis:
$|\phi_r\rangle$ is an ONS of System $S$ (particle 1).
$|\phi_a^\prime\rangle$ is an ONS of System $S'$ (particle 2).
Then if the whole system is in an arbitrary state $|\psi\rangle$, we can write:
$|\psi\rangle = \sum\limits_{r,a} c_{ra}\, |\phi_r\rangle \bigotimes |\phi_a^\prime\rangle $
Now if I want to find the expectation value of an observable in the system $S$ (and ignore $S'$) I would do the following:
$\langle \psi|A\bigotimes I|\psi\rangle = ( \sum\limits_{r,a} c_{ra}^*\, \langle \phi_r| \bigotimes \langle \phi_a^\prime|) A\bigotimes I( \sum\limits_{s,b} c_{sb}\, |\phi_s\rangle \bigotimes |\phi_b^\prime\rangle$
How do I solve this equation? Like what are the rules in this case?