A Theoretical Framework for Target Propagation