(vl-lucidocclist-remove-tails x) → new-x
Function:
(defun vl-lucidocclist-remove-tails (x) (declare (xargs :guard (vl-lucidocclist-p x))) (let ((__function__ 'vl-lucidocclist-remove-tails)) (declare (ignorable __function__)) (cond ((atom x) nil) ((eq (vl-lucidocc-kind (car x)) :tail) (vl-lucidocclist-remove-tails (cdr x))) (t (cons (vl-lucidocc-fix (car x)) (vl-lucidocclist-remove-tails (cdr x)))))))
Theorem:
(defthm vl-lucidocclist-p-of-vl-lucidocclist-remove-tails (b* ((new-x (vl-lucidocclist-remove-tails x))) (vl-lucidocclist-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-lucidocclist-remove-tails-of-vl-lucidocclist-fix-x (equal (vl-lucidocclist-remove-tails (vl-lucidocclist-fix x)) (vl-lucidocclist-remove-tails x)))
Theorem:
(defthm vl-lucidocclist-remove-tails-vl-lucidocclist-equiv-congruence-on-x (implies (vl-lucidocclist-equiv x x-equiv) (equal (vl-lucidocclist-remove-tails x) (vl-lucidocclist-remove-tails x-equiv))) :rule-classes :congruence)