how to tell if a function is an inverse