Rest of a non-empty omap after removing its smallest pair.
This is similar to set::tail for osets.
Function:
(defun tail (map) (declare (xargs :guard (mapp map))) (declare (xargs :guard (not (emptyp map)))) (let ((__function__ 'tail)) (declare (ignorable __function__)) (cdr (mfix map))))
Theorem:
(defthm mapp-of-tail (b* ((map1 (tail map))) (mapp map1)) :rule-classes :rewrite)
Theorem:
(defthm tail-when-emptyp (implies (emptyp map) (equal (tail map) nil)) :rule-classes (:rewrite :type-prescription))
Theorem:
(defthm tail-count (implies (not (emptyp map)) (< (acl2-count (tail map)) (acl2-count map))) :rule-classes (:rewrite :linear))
Theorem:
(defthm tail-count-built-in (implies (not (emptyp map)) (o< (acl2-count (tail map)) (acl2-count map))) :rule-classes :built-in-clause)
Theorem:
(defthm head-tail-order (implies (not (emptyp (tail x))) (<< (mv-nth 0 (head x)) (mv-nth 0 (head (tail x))))))
Theorem:
(defthm head-tail-order-contrapositive (implies (not (<< (mv-nth 0 (head x)) (mv-nth 0 (head (tail x))))) (emptyp (tail x))))