Lemmas about remove-duplicates-equal available in the std/lists library.
Theorem:
(defthm remove-duplicates-equal-when-atom (implies (atom x) (equal (remove-duplicates-equal x) nil)))
Theorem:
(defthm remove-duplicates-equal-of-cons (equal (remove-duplicates-equal (cons a x)) (if (member a x) (remove-duplicates-equal x) (cons a (remove-duplicates-equal x)))))
Theorem:
(defthm consp-of-remove-duplicates-equal (equal (consp (remove-duplicates-equal x)) (consp x)))
Theorem:
(defthm len-of-remove-duplicates-equal (<= (len (remove-duplicates-equal x)) (len x)) :rule-classes ((:rewrite) (:linear)))
Theorem:
(defthm remove-duplicates-equal-of-list-fix (equal (remove-duplicates-equal (list-fix x)) (remove-duplicates-equal x)))
Theorem:
(defthm list-equiv-implies-equal-remove-duplicates-equal-1 (implies (list-equiv x x-equiv) (equal (remove-duplicates-equal x) (remove-duplicates-equal x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm set-equiv-implies-set-equiv-remove-duplicates-equal-1 (implies (set-equiv x x-equiv) (set-equiv (remove-duplicates-equal x) (remove-duplicates-equal x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm no-duplicatesp-equal-of-remove-duplicates-equal (no-duplicatesp-equal (remove-duplicates-equal x)))
Theorem:
(defthm duplicity-in-of-remove-duplicates-equal (equal (duplicity a (remove-duplicates-equal x)) (if (member a x) 1 0)))
Theorem:
(defthm remove-duplicates-equal-of-remove (equal (remove-duplicates-equal (remove a x)) (remove a (remove-duplicates-equal x))))