(bitset-singleton a) constructs the singleton set
This is perhaps slightly more efficient than the equivalent,
Function:
(defun acl2::bitset-singleton$inline (a) (declare (type unsigned-byte a)) (declare (xargs :guard (natp a))) (declare (xargs :split-types t)) (let ((__function__ 'bitset-singleton)) (declare (ignorable __function__)) (the unsigned-byte (ash 1 (the unsigned-byte (lnfix a))))))
Theorem:
(defthm acl2::natp-of-bitset-singleton (b* ((bitset (acl2::bitset-singleton$inline a))) (natp bitset)) :rule-classes :type-prescription)
Theorem:
(defthm bitset-singleton-when-not-natp (implies (not (natp a)) (equal (bitset-singleton a) (bitset-singleton 0))))
Theorem:
(defthm bitset-singleton-of-nfix (equal (bitset-singleton (nfix a)) (bitset-singleton a)))
Theorem:
(defthm bitset-members-of-bitset-singleton (equal (bitset-members (bitset-singleton a)) (insert (nfix a) nil)))