Now, a hacked version that generates rewrite rules for induction but I believe we can have a better version