Recognizer for envmap.
(envmap-p x) → *
Function:
(defun envmap-p (x) (declare (xargs :guard t)) (let ((__function__ 'envmap-p)) (declare (ignorable __function__)) (if (atom x) t (and (consp (car x)) (pseudo-termp (caar x)) (svex-alist-p (cdar x)) (envmap-p (cdr x))))))
Theorem:
(defthm envmap-p-of-update-nth (implies (envmap-p (double-rewrite x)) (iff (envmap-p (update-nth acl2::n y x)) (and (and (consp y) (pseudo-termp (car y)) (svex-alist-p (cdr y))) (or (<= (nfix acl2::n) (len x)) (and (consp nil) (pseudo-termp (car nil)) (svex-alist-p (cdr nil))))))) :rule-classes ((:rewrite)))
Theorem:
(defthm envmap-p-of-take (implies (envmap-p (double-rewrite x)) (iff (envmap-p (take acl2::n x)) (or (and (consp nil) (pseudo-termp (car nil)) (svex-alist-p (cdr nil))) (<= (nfix acl2::n) (len x))))) :rule-classes ((:rewrite)))
Theorem:
(defthm envmap-p-of-revappend (equal (envmap-p (revappend x y)) (and (envmap-p (list-fix x)) (envmap-p y))) :rule-classes ((:rewrite)))
Theorem:
(defthm envmap-p-of-remove (implies (envmap-p x) (envmap-p (remove acl2::a x))) :rule-classes ((:rewrite)))
Theorem:
(defthm envmap-p-of-nthcdr (implies (envmap-p (double-rewrite x)) (envmap-p (nthcdr acl2::n x))) :rule-classes ((:rewrite)))
Theorem:
(defthm envmap-p-of-last (implies (envmap-p (double-rewrite x)) (envmap-p (last x))) :rule-classes ((:rewrite)))
Theorem:
(defthm envmap-p-of-union-equal (equal (envmap-p (union-equal x y)) (and (envmap-p (list-fix x)) (envmap-p (double-rewrite y)))) :rule-classes ((:rewrite)))
Theorem:
(defthm envmap-p-of-intersection-equal-2 (implies (envmap-p (double-rewrite y)) (envmap-p (intersection-equal x y))) :rule-classes ((:rewrite)))
Theorem:
(defthm envmap-p-of-intersection-equal-1 (implies (envmap-p (double-rewrite x)) (envmap-p (intersection-equal x y))) :rule-classes ((:rewrite)))
Theorem:
(defthm envmap-p-of-set-difference-equal (implies (envmap-p x) (envmap-p (set-difference-equal x y))) :rule-classes ((:rewrite)))
Theorem:
(defthm envmap-p-set-equiv-congruence (implies (set-equiv x y) (equal (envmap-p x) (envmap-p y))) :rule-classes :congruence)
Theorem:
(defthm envmap-p-when-subsetp-equal (and (implies (and (subsetp-equal x y) (envmap-p y)) (envmap-p x)) (implies (and (envmap-p y) (subsetp-equal x y)) (envmap-p x))) :rule-classes ((:rewrite)))
Theorem:
(defthm envmap-p-of-rcons (iff (envmap-p (acl2::rcons acl2::a x)) (and (and (consp acl2::a) (pseudo-termp (car acl2::a)) (svex-alist-p (cdr acl2::a))) (envmap-p (list-fix x)))) :rule-classes ((:rewrite)))
Theorem:
(defthm envmap-p-of-repeat (iff (envmap-p (repeat acl2::n x)) (or (and (consp x) (pseudo-termp (car x)) (svex-alist-p (cdr x))) (zp acl2::n))) :rule-classes ((:rewrite)))
Theorem:
(defthm envmap-p-of-rev (equal (envmap-p (rev x)) (envmap-p (list-fix x))) :rule-classes ((:rewrite)))
Theorem:
(defthm envmap-p-of-list-fix (equal (envmap-p (list-fix x)) (envmap-p x)) :rule-classes ((:rewrite)))
Theorem:
(defthm envmap-p-of-append (equal (envmap-p (append acl2::a acl2::b)) (and (envmap-p acl2::a) (envmap-p acl2::b))) :rule-classes ((:rewrite)))
Theorem:
(defthm envmap-p-when-not-consp (implies (not (consp x)) (envmap-p x)) :rule-classes ((:rewrite)))
Theorem:
(defthm envmap-p-of-cdr-when-envmap-p (implies (envmap-p (double-rewrite x)) (envmap-p (cdr x))) :rule-classes ((:rewrite)))
Theorem:
(defthm envmap-p-of-cons (equal (envmap-p (cons acl2::a x)) (and (and (consp acl2::a) (pseudo-termp (car acl2::a)) (svex-alist-p (cdr acl2::a))) (envmap-p x))) :rule-classes ((:rewrite)))
Theorem:
(defthm envmap-p-of-fast-alist-clean (implies (envmap-p x) (envmap-p (fast-alist-clean x))) :rule-classes ((:rewrite)))
Theorem:
(defthm envmap-p-of-hons-shrink-alist (implies (and (envmap-p x) (envmap-p y)) (envmap-p (hons-shrink-alist x y))) :rule-classes ((:rewrite)))
Theorem:
(defthm envmap-p-of-hons-acons (equal (envmap-p (hons-acons acl2::a acl2::n x)) (and (pseudo-termp acl2::a) (svex-alist-p acl2::n) (envmap-p x))) :rule-classes ((:rewrite)))
Theorem:
(defthm svex-alist-p-of-cdr-of-hons-assoc-equal-when-envmap-p (implies (envmap-p x) (iff (svex-alist-p (cdr (hons-assoc-equal acl2::k x))) (or (hons-assoc-equal acl2::k x) (svex-alist-p nil)))) :rule-classes ((:rewrite)))
Theorem:
(defthm svex-alist-p-of-cdar-when-envmap-p (implies (envmap-p x) (iff (svex-alist-p (cdar x)) (or (consp x) (svex-alist-p nil)))) :rule-classes ((:rewrite)))
Theorem:
(defthm pseudo-termp-of-caar-when-envmap-p (implies (envmap-p x) (iff (pseudo-termp (caar x)) (or (consp x) (pseudo-termp nil)))) :rule-classes ((:rewrite)))