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