A strategy for proving sets are equal because they are subsets of one another.
Double containment can be a good way to prove that two sets are equal to one another.
Unfortunately, because this rule targets
On the other hand, there are cases in which this rule works well, and where the backchain limit is detrimental. For this reason, we also provide a version of the rule that has no backchain limit. This version can be enabled as needed.
Theorem:
(defthm double-containment (implies (and (setp x) (setp y)) (equal (equal x y) (and (subset x y) (subset y x)))) :rule-classes ((:rewrite :backchain-limit-lst 1)))
Theorem:
(defthm double-containment-no-backchain-limit (implies (and (setp x) (setp y)) (equal (equal x y) (and (subset x y) (subset y x)))))