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