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