(vl-maybe-driven-by-gateinsts x) applies vl-maybe-driven-by-gateinst to every member of the list
This is an ordinary defmapappend.
Function:
(defun vl-maybe-driven-by-gateinsts (x) (declare (xargs :guard (vl-gateinstlist-p x))) (mbe :logic (if (consp x) (append (vl-maybe-driven-by-gateinst (car x)) (vl-maybe-driven-by-gateinsts (cdr x))) nil) :exec (reverse (vl-maybe-driven-by-gateinsts-exec x nil))))
Function:
(defun vl-maybe-driven-by-gateinsts-exec (x acc) (declare (xargs :guard (vl-gateinstlist-p x))) (if (consp x) (vl-maybe-driven-by-gateinsts-exec (cdr x) (revappend (vl-maybe-driven-by-gateinst (car x)) acc)) acc))
Function:
(defun vl-maybe-driven-by-gateinsts (x) (declare (xargs :guard (vl-gateinstlist-p x))) (mbe :logic (if (consp x) (append (vl-maybe-driven-by-gateinst (car x)) (vl-maybe-driven-by-gateinsts (cdr x))) nil) :exec (reverse (vl-maybe-driven-by-gateinsts-exec x nil))))
Theorem:
(defthm vl-maybe-driven-by-gateinsts-exec-removal (equal (vl-maybe-driven-by-gateinsts-exec acl2::x acl2::acc) (revappend (vl-maybe-driven-by-gateinsts acl2::x) acl2::acc)) :rule-classes ((:rewrite)))
Theorem:
(defthm set-equiv-congruence-over-vl-maybe-driven-by-gateinsts (implies (set-equiv acl2::x acl2::y) (set-equiv (vl-maybe-driven-by-gateinsts acl2::x) (vl-maybe-driven-by-gateinsts acl2::y))) :rule-classes ((:congruence)))
Theorem:
(defthm subsetp-of-vl-maybe-driven-by-gateinsts-when-subsetp (implies (subsetp acl2::x acl2::y) (subsetp (vl-maybe-driven-by-gateinsts acl2::x) (vl-maybe-driven-by-gateinsts acl2::y))) :rule-classes ((:rewrite)))
Theorem:
(defthm member-in-vl-maybe-driven-by-gateinsts (implies (and (member acl2::k (vl-maybe-driven-by-gateinst acl2::j)) (member acl2::j acl2::x)) (member acl2::k (vl-maybe-driven-by-gateinsts acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm vl-maybe-driven-by-gateinsts-of-list-fix (equal (vl-maybe-driven-by-gateinsts (list-fix acl2::x)) (vl-maybe-driven-by-gateinsts acl2::x)) :rule-classes ((:rewrite)))
Theorem:
(defthm vl-maybe-driven-by-gateinsts-of-append (equal (vl-maybe-driven-by-gateinsts (append acl2::a acl2::b)) (append (vl-maybe-driven-by-gateinsts acl2::a) (vl-maybe-driven-by-gateinsts acl2::b))) :rule-classes ((:rewrite)))
Theorem:
(defthm vl-maybe-driven-by-gateinsts-when-not-consp (implies (not (consp acl2::x)) (equal (vl-maybe-driven-by-gateinsts acl2::x) nil)) :rule-classes ((:rewrite)))
Theorem:
(defthm vl-maybe-driven-by-gateinsts-of-cons (equal (vl-maybe-driven-by-gateinsts (cons acl2::a acl2::b)) (append (vl-maybe-driven-by-gateinst acl2::a) (vl-maybe-driven-by-gateinsts acl2::b))) :rule-classes ((:rewrite)))