More formal treatment of multivariable chain rule