Lifted Inference Rules with Constraints