Soit ##\phi: \longrightarrow \mathbb{R}## makes no sense. And as long as ##f## isn't defined, you can only calculate the derivative under the condition that it exists for ##f## and in dependency of ##\nabla f## in which case you have to use the chain rule.