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