derivation of projection rule