Lift member-type->name to lists.
(member-type-list->name-list x) → names
This is an ordinary std::defprojection.
Function:
(defun member-type-list->name-list-exec (x acc) (declare (xargs :guard (member-type-listp x))) (let ((__function__ 'member-type-list->name-list-exec)) (declare (ignorable __function__)) (if (consp x) (member-type-list->name-list-exec (cdr x) (cons (member-type->name (car x)) acc)) acc)))
Function:
(defun member-type-list->name-list-nrev (x acl2::nrev) (declare (xargs :stobjs (acl2::nrev))) (declare (xargs :guard (member-type-listp x))) (let ((__function__ 'member-type-list->name-list-nrev)) (declare (ignorable __function__)) (if (atom x) (acl2::nrev-fix acl2::nrev) (let ((acl2::nrev (acl2::nrev-push (member-type->name (car x)) acl2::nrev))) (member-type-list->name-list-nrev (cdr x) acl2::nrev)))))
Function:
(defun member-type-list->name-list (x) (declare (xargs :guard (member-type-listp x))) (let ((__function__ 'member-type-list->name-list)) (declare (ignorable __function__)) (mbe :logic (if (consp x) (cons (member-type->name (car x)) (member-type-list->name-list (cdr x))) nil) :exec (if (atom x) nil (acl2::with-local-nrev (member-type-list->name-list-nrev x acl2::nrev))))))
Theorem:
(defthm ident-listp-of-member-type-list->name-list (b* ((names (member-type-list->name-list x))) (ident-listp names)) :rule-classes :rewrite)
Theorem:
(defthm member-type-list->name-list-nrev-removal (equal (member-type-list->name-list-nrev acl2::x acl2::nrev) (append acl2::nrev (member-type-list->name-list acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm member-type-list->name-list-exec-removal (equal (member-type-list->name-list-exec acl2::x acl2::acc) (revappend (member-type-list->name-list acl2::x) acl2::acc)) :rule-classes ((:rewrite)))
Theorem:
(defthm member-type-list->name-list-of-rev (equal (member-type-list->name-list (rev acl2::x)) (rev (member-type-list->name-list acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm member-type-list->name-list-of-list-fix (equal (member-type-list->name-list (list-fix acl2::x)) (member-type-list->name-list acl2::x)) :rule-classes ((:rewrite)))
Theorem:
(defthm member-type-list->name-list-of-append (equal (member-type-list->name-list (append acl2::a acl2::b)) (append (member-type-list->name-list acl2::a) (member-type-list->name-list acl2::b))) :rule-classes ((:rewrite)))
Theorem:
(defthm cdr-of-member-type-list->name-list (equal (cdr (member-type-list->name-list acl2::x)) (member-type-list->name-list (cdr acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm car-of-member-type-list->name-list (equal (car (member-type-list->name-list acl2::x)) (and (consp acl2::x) (member-type->name (car acl2::x)))) :rule-classes ((:rewrite)))
Theorem:
(defthm member-type-list->name-list-under-iff (iff (member-type-list->name-list acl2::x) (consp acl2::x)) :rule-classes ((:rewrite)))
Theorem:
(defthm consp-of-member-type-list->name-list (equal (consp (member-type-list->name-list acl2::x)) (consp acl2::x)) :rule-classes ((:rewrite)))
Theorem:
(defthm len-of-member-type-list->name-list (equal (len (member-type-list->name-list acl2::x)) (len acl2::x)) :rule-classes ((:rewrite)))
Theorem:
(defthm true-listp-of-member-type-list->name-list (true-listp (member-type-list->name-list acl2::x)) :rule-classes :type-prescription)
Theorem:
(defthm member-type-list->name-list-when-not-consp (implies (not (consp acl2::x)) (equal (member-type-list->name-list acl2::x) nil)) :rule-classes ((:rewrite)))
Theorem:
(defthm member-type-list->name-list-of-cons (equal (member-type-list->name-list (cons acl2::a acl2::b)) (cons (member-type->name acl2::a) (member-type-list->name-list acl2::b))) :rule-classes ((:rewrite)))
Theorem:
(defthm member-type-list->name-list-of-member-type-list-fix-x (equal (member-type-list->name-list (member-type-list-fix x)) (member-type-list->name-list x)))
Theorem:
(defthm member-type-list->name-list-member-type-list-equiv-congruence-on-x (implies (member-type-list-equiv x x-equiv) (equal (member-type-list->name-list x) (member-type-list->name-list x-equiv))) :rule-classes :congruence)