Nicer warning when invalid rule index
Add synthesis rules for simplification, inlining