Value associated to a key in an omap.
(lookup key map) → val
Function:
(defun lookup (key map) (declare (xargs :guard (mapp map))) (declare (xargs :guard (assoc key map))) (let ((__function__ 'lookup)) (declare (ignorable __function__)) (cdr (assoc key map))))
Theorem:
(defthm lookup-when-emptyp (implies (emptyp map) (not (lookup key map))) :rule-classes (:rewrite :type-prescription))
Theorem:
(defthm acl2-count-lookup-<-map (implies (not (emptyp map)) (< (acl2-count (lookup key map)) (acl2-count map))))
Theorem:
(defthm lookup-of-tail-when-assoc-tail (implies (assoc key (tail map)) (equal (lookup key (tail map)) (lookup key map))))