Check if an omap is empty.
This is similar to set::emptyp for osets.
Function:
(defun emptyp (map) (declare (xargs :guard (mapp map))) (let ((__function__ 'emptyp)) (declare (ignorable __function__)) (null (mfix map))))
Theorem:
(defthm booleanp-of-emptyp (b* ((yes/no (emptyp map))) (booleanp yes/no)) :rule-classes :rewrite)
Theorem:
(defthm mapp-when-not-emptyp (implies (not (emptyp map)) (mapp map)))
Theorem:
(defthm mfix-when-emptyp (implies (emptyp x) (equal (mfix x) nil)))
Theorem:
(defthm mapp-non-nil-implies-not-emptyp (implies (and (mapp map) map) (not (emptyp map))))
Theorem:
(defthm acl2-count-head-when-not-emptyp (implies (not (emptyp map)) (< (+ (acl2-count (car (car map))) (acl2-count (cdr (car map)))) (acl2-count map))))