(sbitset-pair-members x) extracts the members of a single sbitset-pairp.
(sbitset-pair-members x) → set
For instance, if the pair is
This serves as the logical definition we use to reason about member extraction.
Normally this function isn't executed. When the block size is 32 or 60, we
can instead use the optimized bits-0-31 or 60bits-0-59 routines
instead. But, if you change the block size to something else, this function
will be executed and its performance will probably be bad. In this
case, you might want to write a custom
Function:
(defun sbitset-pair-members (x) (declare (xargs :guard (sbitset-pairp x))) (let ((__function__ 'sbitset-pair-members)) (declare (ignorable __function__)) (add-to-each (* (sbitset-pair-offset x) *sbitset-block-size*) (bits-between 0 *sbitset-block-size* (sbitset-pair-block x)))))
Theorem:
(defthm sbitset-pair-members-of-nil (equal (sbitset-pair-members nil) nil))
Theorem:
(defthm true-listp-of-sbitset-pair-members (true-listp (sbitset-pair-members x)) :rule-classes :type-prescription)
Theorem:
(defthm integer-listp-of-sbitset-pair-members (implies (force (sbitset-pairp x)) (integer-listp (sbitset-pair-members x))))
Theorem:
(defthm member-equal-sbitset-pair-members (implies (force (sbitset-pairp x)) (iff (member-equal a (sbitset-pair-members x)) (and (natp a) (equal (floor a *sbitset-block-size*) (sbitset-pair-offset x)) (logbitp (mod a *sbitset-block-size*) (sbitset-pair-block x))))))
Theorem:
(defthm no-duplicatesp-equal-of-sbitset-pair-members (implies (force (sbitset-pairp x)) (no-duplicatesp-equal (sbitset-pair-members x))))
Theorem:
(defthm offsets-must-agree-when-sbitset-pair-members-intersect (implies (and (force (sbitset-pairp x)) (force (sbitset-pairp y)) (intersectp-equal (sbitset-pair-members x) (sbitset-pair-members y)) (syntaxp (term-order y x))) (equal (sbitset-pair-offset x) (sbitset-pair-offset y))))
Theorem:
(defthm consp-of-sbitset-pair-members (implies (force (sbitset-pairp x)) (and (true-listp (sbitset-pair-members x)) (consp (sbitset-pair-members x)))) :rule-classes :type-prescription)
Theorem:
(defthm setp-of-sbitset-pair-members (implies (force (sbitset-pairp a)) (setp (sbitset-pair-members a))))
Theorem:
(defthm in-of-sbitset-pair-members (implies (force (sbitset-pairp x)) (equal (in a (sbitset-pair-members x)) (and (natp a) (equal (floor a *sbitset-block-size*) (sbitset-pair-offset x)) (logbitp (mod a *sbitset-block-size*) (sbitset-pair-block x))))))
Theorem:
(defthm emptyp-of-sbitset-pair-members (implies (force (sbitset-pairp x)) (not (emptyp (sbitset-pair-members x)))))