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