let inverse : term -> term = function 
  | PInv t -> t 
  | t -> PInv t