Recognizer for scope.
(scopep x) → *
Function:
(defun scopep (x) (declare (xargs :guard t)) (if (atom x) (null x) (and (consp (car x)) (identp (caar x)) (valuep (cdar x)) (or (null (cdr x)) (and (consp (cdr x)) (consp (cadr x)) (acl2::fast-<< (caar x) (caadr x)) (scopep (cdr x)))))))
Theorem:
(defthm booleanp-of-scopep (booleanp (scopep x)))
Theorem:
(defthm mapp-when-scopep (implies (scopep x) (omap::mapp x)) :rule-classes (:rewrite :forward-chaining))
Theorem:
(defthm scopep-of-tail (implies (scopep x) (scopep (omap::tail x))))
Theorem:
(defthm identp-of-head-key-when-scopep (implies (and (scopep x) (not (omap::emptyp x))) (identp (mv-nth 0 (omap::head x)))))
Theorem:
(defthm valuep-of-head-val-when-scopep (implies (and (scopep x) (not (omap::emptyp x))) (valuep (mv-nth 1 (omap::head x)))))
Theorem:
(defthm scopep-of-update (implies (and (scopep x) (identp k) (valuep v)) (scopep (omap::update k v x))))
Theorem:
(defthm scopep-of-update* (implies (and (scopep x) (scopep y)) (scopep (omap::update* x y))))
Theorem:
(defthm scopep-of-delete (implies (scopep x) (scopep (omap::delete k x))))
Theorem:
(defthm scopep-of-delete* (implies (scopep x) (scopep (omap::delete* k x))))
Theorem:
(defthm identp-when-assoc-scopep-binds-free-x (implies (and (omap::assoc k x) (scopep x)) (identp k)))
Theorem:
(defthm identp-of-car-of-assoc-scopep (implies (and (scopep x) (omap::assoc k x)) (identp (car (omap::assoc k x)))))
Theorem:
(defthm valuep-of-cdr-of-assoc-scopep (implies (and (scopep x) (omap::assoc k x)) (valuep (cdr (omap::assoc k x)))))
Theorem:
(defthm valuep-of-lookup-when-scopep (implies (and (scopep x) (omap::assoc k x)) (valuep (omap::lookup k x))))