Optimize some invariants to detect properties when proven