Oset of the values of an omap.
Function:
(defun values (map) (declare (xargs :guard (mapp map))) (let ((__function__ 'values)) (declare (ignorable __function__)) (cond ((emptyp map) nil) (t (mv-let (key val) (head map) (declare (ignore key)) (insert val (values (tail map))))))))
Theorem:
(defthm setp-of-values (b* ((vals (values map))) (setp vals)) :rule-classes :rewrite)
Theorem:
(defthm values-when-emptyp (implies (emptyp map) (equal (values map) nil)) :rule-classes (:rewrite :type-prescription))
Theorem:
(defthm in-values-when-assoc (implies (equal (assoc a m) (cons a b)) (set::in b (values m))))
Theorem:
(defthm value-of-update-when-not-assoc (implies (not (consp (assoc key map))) (equal (values (update key val map)) (insert val (values map)))))