How do I write the type of 'inverse'?