Check if an obag is empty.
This is similar to set::emptyp for osets.
Function:
(defun emptyp (bag) (declare (xargs :guard (bagp bag))) (let ((__function__ 'emptyp)) (declare (ignorable __function__)) (null (bfix bag))))
Theorem:
(defthm booleanp-of-emptyp (b* ((yes/no (emptyp bag))) (booleanp yes/no)) :rule-classes :rewrite)
Theorem:
(defthm bagp-when-not-emptyp (implies (not (emptyp bag)) (bagp bag)))
Theorem:
(defthm bfix-when-emptyp (implies (emptyp x) (equal (bfix x) nil)))