(vl-lucidmergealist-count x) → count
Function:
(defun vl-lucidmergealist-count (x) (declare (xargs :guard (vl-lucidmergealist-p x))) (let ((__function__ 'vl-lucidmergealist-count)) (declare (ignorable __function__)) (let ((x (mbe :logic (vl-lucidmergealist-fix x) :exec x))) (if (atom x) 1 (+ 1 (vl-lucidmergealist-count (cdr x)))))))
Theorem:
(defthm natp-of-vl-lucidmergealist-count (b* ((count (vl-lucidmergealist-count x))) (natp count)) :rule-classes :type-prescription)
Theorem:
(defthm vl-lucidmergealist-count-of-vl-lucidmergealist-fix-x (equal (vl-lucidmergealist-count (vl-lucidmergealist-fix x)) (vl-lucidmergealist-count x)))
Theorem:
(defthm vl-lucidmergealist-count-vl-lucidmergealist-equiv-congruence-on-x (implies (vl-lucidmergealist-equiv x x-equiv) (equal (vl-lucidmergealist-count x) (vl-lucidmergealist-count x-equiv))) :rule-classes :congruence)
Theorem:
(defthm vl-lucidmergealist-count-of-cons (>= (vl-lucidmergealist-count (cons acl2::a acl2::b)) (vl-lucidmergealist-count acl2::b)) :rule-classes :linear)
Theorem:
(defthm vl-lucidmergealist-count-of-cdr (<= (vl-lucidmergealist-count (cdr x)) (vl-lucidmergealist-count x)) :rule-classes :linear)
Theorem:
(defthm vl-lucidmergealist-count-of-cdr-strong (implies (and (vl-lucidmergealist-p x) (consp x)) (< (vl-lucidmergealist-count (cdr x)) (vl-lucidmergealist-count x))) :rule-classes :linear)