Check if a values occurs in an obag.
This is similar to set::in on osets.
Function:
(defun in (x bag) (declare (xargs :guard (bagp bag))) (let ((__function__ 'in)) (declare (ignorable __function__)) (and (not (emptyp bag)) (or (equal x (head bag)) (in x (tail bag))))))
Theorem:
(defthm booleanp-of-in (b* ((yes/no (in x bag))) (booleanp yes/no)) :rule-classes :rewrite)