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