(bitset-cardinality x) determines the cardinality of the set
(bitset-cardinality x) → *
We prefer to reason about
Function:
(defun acl2::bitset-cardinality$inline (x) (declare (type unsigned-byte x)) (declare (xargs :guard (natp x))) (declare (xargs :split-types t)) (let ((__function__ 'bitset-cardinality)) (declare (ignorable __function__)) (the unsigned-byte (logcount (the unsigned-byte (lnfix x))))))
Theorem:
(defthm bitset-cardinality-removal (equal (bitset-cardinality x) (cardinality (bitset-members x))))