Remove keys, and associated values, from an omap.
This lifts delete from a single key to a set of keys.
Function:
(defun delete* (keys map) (declare (xargs :guard (and (setp keys) (mapp map)))) (let ((__function__ 'delete*)) (declare (ignorable __function__)) (cond ((set::emptyp keys) (mfix map)) (t (delete (set::head keys) (delete* (set::tail keys) map))))))
Theorem:
(defthm mapp-of-delete* (b* ((map1 (delete* keys map))) (mapp map1)) :rule-classes :rewrite)
Theorem:
(defthm delete*-when-left-emptyp (implies (set::emptyp keys) (equal (delete* keys map) (mfix map))))
Theorem:
(defthm delete*-when-right-emptyp (implies (emptyp map) (equal (delete* keys map) nil)))