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