(sbitsetp x) determines whether
(sbitsetp x) → bool
Function:
(defun sbitsetp (x) (declare (xargs :guard t)) (let ((__function__ 'sbitsetp)) (declare (ignorable __function__)) (if (atom x) (not x) (and (sbitset-pairp (first x)) (if (atom (cdr x)) (not (cdr x)) (and (sbitset-pairp (second x)) (< (sbitset-pair-offset (first x)) (sbitset-pair-offset (second x))))) (sbitsetp (cdr x))))))
Theorem:
(defthm true-listp-when-sbitsetp (implies (sbitsetp x) (true-listp x)) :rule-classes :compound-recognizer)
Theorem:
(defthm sbitsetp-when-atom (implies (atom x) (equal (sbitsetp x) (not x))))
Theorem:
(defthm sbitsetp-of-cons (equal (sbitsetp (cons a x)) (and (sbitset-pairp a) (sbitsetp x) (or (atom x) (< (sbitset-pair-offset a) (sbitset-pair-offset (first x)))))))
Theorem:
(defthm sbitset-pairp-of-car (implies (sbitsetp x) (equal (sbitset-pairp (car x)) (consp x))))
Theorem:
(defthm sbitsetp-of-cdr (implies (sbitsetp x) (sbitsetp (cdr x))))
Theorem:
(defthm sbitset-pairp-when-member-equal-of-sbitsetp (implies (and (member-equal a x) (sbitsetp x)) (sbitset-pairp a)) :rule-classes ((:rewrite) (:rewrite :corollary (implies (and (sbitsetp x) (member-equal a x)) (sbitset-pairp a)))))