Discovering the Chain Rule