(duplicity-badguy x) finds an element that occurs multiple times
in the list
This function is central to our proof of no-duplicatesp-equal-same-by-duplicity, a pick-a-point style strategy for proving that no-duplicatesp holds of a list by reasoning about duplicity of an arbitrary element.
Function:
(defun duplicity-badguy (x) (declare (xargs :guard t)) (duplicity-badguy1 x x))
Theorem:
(defthm duplicity-badguy-exists (implies (duplicity-badguy x) (member-equal (car (duplicity-badguy x)) x)))
Theorem:
(defthm duplicity-badguy-has-high-duplicity (implies (duplicity-badguy x) (< 1 (duplicity (car (duplicity-badguy x)) x))))
Theorem:
(defthm duplicity-badguy-is-complete (implies (< 1 (duplicity a x)) (duplicity-badguy x)))
Theorem:
(defthm duplicity-badguy-under-iff (iff (duplicity-badguy x) (not (no-duplicatesp-equal x))))