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