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