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