(set-unequal-witness x y) finds a member of
This function is useful for basic pick-a-point style reasoning about set equivalence.
Function:
(defun set-unequal-witness (x y) (cond ((not (subsetp x y)) (subsetp-witness x y)) ((not (subsetp y x)) (subsetp-witness y x))))
Theorem:
(defthm set-unequal-witness-correct (equal (set-equiv x y) (iff (member (set-unequal-witness x y) x) (member (set-unequal-witness x y) y))))
Theorem:
(defthm set-unequal-witness-rw (implies (rewriting-positive-literal (cons 'set-equiv (cons x (cons y 'nil)))) (equal (set-equiv x y) (iff (member (set-unequal-witness x y) x) (member (set-unequal-witness x y) y)))))