(vl-remove-keys keys x) removes all bindings for the given
(vl-remove-keys keys x) → ans
BOZO name consistency with remove-from-alist.
Function:
(defun vl-remove-keys (keys x) (declare (xargs :guard (true-listp keys))) (let ((__function__ 'vl-remove-keys)) (declare (ignorable __function__)) (cond ((atom x) nil) ((atom (car x)) (vl-remove-keys keys (cdr x))) ((member-equal (caar x) keys) (vl-remove-keys keys (cdr x))) (t (cons (car x) (vl-remove-keys keys (cdr x)))))))
Theorem:
(defthm alistp-of-vl-remove-keys (b* ((ans (vl-remove-keys keys x))) (alistp ans)) :rule-classes :rewrite)
Theorem:
(defthm vl-remove-keys-when-not-consp (implies (not (consp x)) (equal (vl-remove-keys keys x) nil)))
Theorem:
(defthm vl-remove-keys-of-cons (equal (vl-remove-keys keys (cons a x)) (if (atom a) (vl-remove-keys keys x) (if (member-equal (car a) (double-rewrite keys)) (vl-remove-keys keys x) (cons a (vl-remove-keys keys x))))))
Theorem:
(defthm true-listp-of-vl-remove-keys (true-listp (vl-remove-keys keys x)) :rule-classes :type-prescription)
Theorem:
(defthm consp-of-car-of-vl-remove-keys (equal (consp (car (vl-remove-keys keys x))) (consp (vl-remove-keys keys x))))
Theorem:
(defthm acl2-count-of-vl-remove-keys (<= (acl2-count (vl-remove-keys keys x)) (acl2-count x)) :rule-classes ((:rewrite) (:linear)))