Delete vl-portdecls by name.
(vl-delete-portdecls names x) → filtered-x
Function:
(defun vl-delete-portdecls (names x) (declare (xargs :guard (and (string-listp names) (vl-portdecllist-p x)))) (let ((__function__ 'vl-delete-portdecls)) (declare (ignorable __function__)) (mbe :logic (cond ((atom x) nil) ((member-equal (vl-portdecl->name (car x)) (string-list-fix names)) (vl-delete-portdecls names (cdr x))) (t (cons (vl-portdecl-fix (car x)) (vl-delete-portdecls names (cdr x))))) :exec (b* (((when (atom names)) (list-fix x)) ((when (atom x)) nil) ((unless (longer-than-p 10 names)) (vl-slow-delete-portdecls names x)) (fal (make-lookup-alist names)) (ans (with-local-nrev (vl-fast-delete-portdecls names fal x nrev))) (- (fast-alist-free fal))) ans))))
Theorem:
(defthm vl-portdecllist-p-of-vl-delete-portdecls (b* ((filtered-x (vl-delete-portdecls names x))) (vl-portdecllist-p filtered-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-delete-portdecls-when-atom (implies (atom x) (equal (vl-delete-portdecls names x) nil)))
Theorem:
(defthm vl-delete-portdecls-of-cons (equal (vl-delete-portdecls names (cons a x)) (if (member-equal (vl-portdecl->name a) (string-list-fix names)) (vl-delete-portdecls names x) (cons (vl-portdecl-fix a) (vl-delete-portdecls names x)))))
Theorem:
(defthm member-equal-of-vl-delete-portdecls (iff (member-equal a (vl-delete-portdecls names x)) (and (member-equal a (vl-portdecllist-fix x)) (not (member-equal (vl-portdecl->name a) (string-list-fix names))))))
Theorem:
(defthm subsetp-equal-of-vl-delete-portdecls (subsetp-equal (vl-delete-portdecls names x) (vl-portdecllist-fix x)))
Theorem:
(defthm vl-delete-portdecls-when-atom-of-names (implies (atom names) (equal (vl-delete-portdecls names x) (vl-portdecllist-fix (list-fix x)))))
Theorem:
(defthm vl-slow-delete-portdecls-removal (equal (vl-slow-delete-portdecls names x) (vl-delete-portdecls names x)))
Theorem:
(defthm vl-fast-delete-portdecls-removal (equal (vl-fast-delete-portdecls names fal x nrev) (append nrev (vl-delete-portdecls names x))))
Theorem:
(defthm vl-delete-portdecls-of-string-list-fix-names (equal (vl-delete-portdecls (string-list-fix names) x) (vl-delete-portdecls names x)))
Theorem:
(defthm vl-delete-portdecls-string-list-equiv-congruence-on-names (implies (str::string-list-equiv names names-equiv) (equal (vl-delete-portdecls names x) (vl-delete-portdecls names-equiv x))) :rule-classes :congruence)
Theorem:
(defthm vl-delete-portdecls-of-vl-portdecllist-fix-x (equal (vl-delete-portdecls names (vl-portdecllist-fix x)) (vl-delete-portdecls names x)))
Theorem:
(defthm vl-delete-portdecls-vl-portdecllist-equiv-congruence-on-x (implies (vl-portdecllist-equiv x x-equiv) (equal (vl-delete-portdecls names x) (vl-delete-portdecls names x-equiv))) :rule-classes :congruence)