(undup-exec x acc) → new-x
Function:
(defun undup-exec (x acc) (declare (xargs :guard (and (true-listp x) (alistp acc)))) (let ((__function__ 'undup-exec)) (declare (ignorable __function__)) (if (atom x) (rev-keys (fast-alist-free acc) nil) (undup-exec (cdr x) (b* ((x1 (car x))) (if (hons-get x1 acc) acc (hons-acons x1 nil acc)))))))
Theorem:
(defthm true-listp-of-undup-exec (b* ((new-x (undup-exec x acc))) (true-listp new-x)) :rule-classes :rewrite)
Theorem:
(defthm undup-exec-of-list-fix-x (equal (undup-exec (list-fix x) acc) (undup-exec x acc)))
Theorem:
(defthm undup-exec-list-equiv-congruence-on-x (implies (list-equiv x x-equiv) (equal (undup-exec x acc) (undup-exec x-equiv acc))) :rule-classes :congruence)