sanitycheck: exit with error on incorrect transformation
Fix an incorrect simplification
Delete incorrect an unecessary reduction
Add missing check in reduction