Lift swcase->value to lists.
(swcase-list->value-list x) → lits
This is an ordinary std::defprojection.
Function:
(defun swcase-list->value-list-exec (x acc) (declare (xargs :guard (swcase-listp x))) (declare (xargs :guard t)) (let ((__function__ 'swcase-list->value-list-exec)) (declare (ignorable __function__)) (if (consp x) (swcase-list->value-list-exec (cdr x) (cons (swcase->value (car x)) acc)) acc)))
Function:
(defun swcase-list->value-list-nrev (x acl2::nrev) (declare (xargs :stobjs (acl2::nrev))) (declare (xargs :guard (swcase-listp x))) (declare (xargs :guard t)) (let ((__function__ 'swcase-list->value-list-nrev)) (declare (ignorable __function__)) (if (atom x) (acl2::nrev-fix acl2::nrev) (let ((acl2::nrev (acl2::nrev-push (swcase->value (car x)) acl2::nrev))) (swcase-list->value-list-nrev (cdr x) acl2::nrev)))))
Function:
(defun swcase-list->value-list (x) (declare (xargs :guard (swcase-listp x))) (declare (xargs :guard t)) (let ((__function__ 'swcase-list->value-list)) (declare (ignorable __function__)) (mbe :logic (if (consp x) (cons (swcase->value (car x)) (swcase-list->value-list (cdr x))) nil) :exec (if (atom x) nil (acl2::with-local-nrev (swcase-list->value-list-nrev x acl2::nrev))))))
Theorem:
(defthm literal-listp-of-swcase-list->value-list (b* ((lits (swcase-list->value-list x))) (literal-listp lits)) :rule-classes :rewrite)
Theorem:
(defthm swcase-list->value-list-nrev-removal (equal (swcase-list->value-list-nrev acl2::x acl2::nrev) (append acl2::nrev (swcase-list->value-list acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm swcase-list->value-list-exec-removal (equal (swcase-list->value-list-exec acl2::x acl2::acc) (revappend (swcase-list->value-list acl2::x) acl2::acc)) :rule-classes ((:rewrite)))
Theorem:
(defthm swcase-list->value-list-of-take (implies (<= (nfix acl2::n) (len acl2::x)) (equal (swcase-list->value-list (take acl2::n acl2::x)) (take acl2::n (swcase-list->value-list acl2::x)))) :rule-classes ((:rewrite)))
Theorem:
(defthm set-equiv-congruence-over-swcase-list->value-list (implies (set-equiv acl2::x acl2::y) (set-equiv (swcase-list->value-list acl2::x) (swcase-list->value-list acl2::y))) :rule-classes ((:congruence)))
Theorem:
(defthm subsetp-of-swcase-list->value-list-when-subsetp (implies (subsetp acl2::x acl2::y) (subsetp (swcase-list->value-list acl2::x) (swcase-list->value-list acl2::y))) :rule-classes ((:rewrite)))
Theorem:
(defthm member-of-swcase->value-in-swcase-list->value-list (implies (member acl2::k acl2::x) (member (swcase->value acl2::k) (swcase-list->value-list acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm swcase-list->value-list-of-rev (equal (swcase-list->value-list (rev acl2::x)) (rev (swcase-list->value-list acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm swcase-list->value-list-of-list-fix (equal (swcase-list->value-list (list-fix acl2::x)) (swcase-list->value-list acl2::x)) :rule-classes ((:rewrite)))
Theorem:
(defthm swcase-list->value-list-of-append (equal (swcase-list->value-list (append acl2::a acl2::b)) (append (swcase-list->value-list acl2::a) (swcase-list->value-list acl2::b))) :rule-classes ((:rewrite)))
Theorem:
(defthm cdr-of-swcase-list->value-list (equal (cdr (swcase-list->value-list acl2::x)) (swcase-list->value-list (cdr acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm car-of-swcase-list->value-list (equal (car (swcase-list->value-list acl2::x)) (and (consp acl2::x) (swcase->value (car acl2::x)))) :rule-classes ((:rewrite)))
Theorem:
(defthm swcase-list->value-list-under-iff (iff (swcase-list->value-list acl2::x) (consp acl2::x)) :rule-classes ((:rewrite)))
Theorem:
(defthm consp-of-swcase-list->value-list (equal (consp (swcase-list->value-list acl2::x)) (consp acl2::x)) :rule-classes ((:rewrite)))
Theorem:
(defthm len-of-swcase-list->value-list (equal (len (swcase-list->value-list acl2::x)) (len acl2::x)) :rule-classes ((:rewrite)))
Theorem:
(defthm true-listp-of-swcase-list->value-list (true-listp (swcase-list->value-list acl2::x)) :rule-classes :type-prescription)
Theorem:
(defthm swcase-list->value-list-when-not-consp (implies (not (consp acl2::x)) (equal (swcase-list->value-list acl2::x) nil)) :rule-classes ((:rewrite)))
Theorem:
(defthm swcase-list->value-list-of-cons (equal (swcase-list->value-list (cons acl2::a acl2::b)) (cons (swcase->value acl2::a) (swcase-list->value-list acl2::b))) :rule-classes ((:rewrite)))
Theorem:
(defthm swcase-list->value-list-of-swcase-list-fix-x (equal (swcase-list->value-list (swcase-list-fix x)) (swcase-list->value-list x)))
Theorem:
(defthm swcase-list->value-list-swcase-list-equiv-congruence-on-x (implies (swcase-list-equiv x x-equiv) (equal (swcase-list->value-list x) (swcase-list->value-list x-equiv))) :rule-classes :congruence)