Recognizer for name-alist.
(name-alist-p x) → *
Function:
(defun name-alist-p (x) (declare (xargs :guard t)) (let ((__function__ 'name-alist-p)) (declare (ignorable __function__)) (if (atom x) (eq x nil) (and (consp (car x)) (name-p (caar x)) (name-alist-p (cdr x))))))
Theorem:
(defthm name-alist-p-of-revappend (equal (name-alist-p (revappend x y)) (and (name-alist-p (list-fix x)) (name-alist-p y))) :rule-classes ((:rewrite)))
Theorem:
(defthm name-alist-p-of-remove (implies (name-alist-p x) (name-alist-p (remove acl2::a x))) :rule-classes ((:rewrite)))
Theorem:
(defthm name-alist-p-of-last (implies (name-alist-p (double-rewrite x)) (name-alist-p (last x))) :rule-classes ((:rewrite)))
Theorem:
(defthm name-alist-p-of-nthcdr (implies (name-alist-p (double-rewrite x)) (name-alist-p (nthcdr acl2::n x))) :rule-classes ((:rewrite)))
Theorem:
(defthm name-alist-p-of-butlast (implies (name-alist-p (double-rewrite x)) (name-alist-p (butlast x acl2::n))) :rule-classes ((:rewrite)))
Theorem:
(defthm name-alist-p-of-update-nth (implies (name-alist-p (double-rewrite x)) (iff (name-alist-p (update-nth acl2::n y x)) (and (and (consp y) (name-p (car y))) (or (<= (nfix acl2::n) (len x)) (and (consp nil) (name-p (car nil))))))) :rule-classes ((:rewrite)))
Theorem:
(defthm name-alist-p-of-repeat (iff (name-alist-p (repeat acl2::n x)) (or (and (consp x) (name-p (car x))) (zp acl2::n))) :rule-classes ((:rewrite)))
Theorem:
(defthm name-alist-p-of-take (implies (name-alist-p (double-rewrite x)) (iff (name-alist-p (take acl2::n x)) (or (and (consp nil) (name-p (car nil))) (<= (nfix acl2::n) (len x))))) :rule-classes ((:rewrite)))
Theorem:
(defthm name-alist-p-of-union-equal (equal (name-alist-p (union-equal x y)) (and (name-alist-p (list-fix x)) (name-alist-p (double-rewrite y)))) :rule-classes ((:rewrite)))
Theorem:
(defthm name-alist-p-of-intersection-equal-2 (implies (name-alist-p (double-rewrite y)) (name-alist-p (intersection-equal x y))) :rule-classes ((:rewrite)))
Theorem:
(defthm name-alist-p-of-intersection-equal-1 (implies (name-alist-p (double-rewrite x)) (name-alist-p (intersection-equal x y))) :rule-classes ((:rewrite)))
Theorem:
(defthm name-alist-p-of-set-difference-equal (implies (name-alist-p x) (name-alist-p (set-difference-equal x y))) :rule-classes ((:rewrite)))
Theorem:
(defthm name-alist-p-when-subsetp-equal (and (implies (and (subsetp-equal x y) (name-alist-p y)) (equal (name-alist-p x) (true-listp x))) (implies (and (name-alist-p y) (subsetp-equal x y)) (equal (name-alist-p x) (true-listp x)))) :rule-classes ((:rewrite)))
Theorem:
(defthm name-alist-p-of-rcons (iff (name-alist-p (acl2::rcons acl2::a x)) (and (and (consp acl2::a) (name-p (car acl2::a))) (name-alist-p (list-fix x)))) :rule-classes ((:rewrite)))
Theorem:
(defthm name-alist-p-of-append (equal (name-alist-p (append acl2::a acl2::b)) (and (name-alist-p (list-fix acl2::a)) (name-alist-p acl2::b))) :rule-classes ((:rewrite)))
Theorem:
(defthm name-alist-p-of-rev (equal (name-alist-p (rev x)) (name-alist-p (list-fix x))) :rule-classes ((:rewrite)))
Theorem:
(defthm name-alist-p-of-duplicated-members (implies (name-alist-p x) (name-alist-p (duplicated-members x))) :rule-classes ((:rewrite)))
Theorem:
(defthm name-alist-p-of-difference (implies (name-alist-p x) (name-alist-p (difference x y))) :rule-classes ((:rewrite)))
Theorem:
(defthm name-alist-p-of-intersect-2 (implies (name-alist-p y) (name-alist-p (intersect x y))) :rule-classes ((:rewrite)))
Theorem:
(defthm name-alist-p-of-intersect-1 (implies (name-alist-p x) (name-alist-p (intersect x y))) :rule-classes ((:rewrite)))
Theorem:
(defthm name-alist-p-of-union (iff (name-alist-p (union x y)) (and (name-alist-p (sfix x)) (name-alist-p (sfix y)))) :rule-classes ((:rewrite)))
Theorem:
(defthm name-alist-p-of-mergesort (iff (name-alist-p (mergesort x)) (name-alist-p (list-fix x))) :rule-classes ((:rewrite)))
Theorem:
(defthm name-alist-p-of-delete (implies (name-alist-p x) (name-alist-p (delete acl2::k x))) :rule-classes ((:rewrite)))
Theorem:
(defthm name-alist-p-of-insert (iff (name-alist-p (insert acl2::a x)) (and (name-alist-p (sfix x)) (and (consp acl2::a) (name-p (car acl2::a))))) :rule-classes ((:rewrite)))
Theorem:
(defthm name-alist-p-of-sfix (iff (name-alist-p (sfix x)) (or (name-alist-p x) (not (setp x)))) :rule-classes ((:rewrite)))
Theorem:
(defthm name-alist-p-of-list-fix (implies (name-alist-p x) (name-alist-p (list-fix x))) :rule-classes ((:rewrite)))
Theorem:
(defthm true-listp-when-name-alist-p-compound-recognizer (implies (name-alist-p x) (true-listp x)) :rule-classes :compound-recognizer)
Theorem:
(defthm name-alist-p-when-not-consp (implies (not (consp x)) (equal (name-alist-p x) (not x))) :rule-classes ((:rewrite)))
Theorem:
(defthm name-alist-p-of-cdr-when-name-alist-p (implies (name-alist-p (double-rewrite x)) (name-alist-p (cdr x))) :rule-classes ((:rewrite)))
Theorem:
(defthm name-alist-p-of-cons (equal (name-alist-p (cons acl2::a x)) (and (and (consp acl2::a) (name-p (car acl2::a))) (name-alist-p x))) :rule-classes ((:rewrite)))
Theorem:
(defthm name-alist-p-of-make-fal (implies (and (name-alist-p x) (name-alist-p y)) (name-alist-p (make-fal x y))) :rule-classes ((:rewrite)))
Theorem:
(defthm name-p-of-car-when-member-equal-of-name-alist-p (and (implies (and (name-alist-p x) (member-equal acl2::a x)) (name-p (car acl2::a))) (implies (and (member-equal acl2::a x) (name-alist-p x)) (name-p (car acl2::a)))) :rule-classes ((:rewrite)))
Theorem:
(defthm consp-when-member-equal-of-name-alist-p (implies (and (name-alist-p x) (member-equal acl2::a x)) (consp acl2::a)) :rule-classes ((:rewrite :backchain-limit-lst (0 0)) (:rewrite :backchain-limit-lst (0 0) :corollary (implies (if (member-equal acl2::a x) (name-alist-p x) 'nil) (consp acl2::a)))))
Theorem:
(defthm name-alist-p-of-remove-assoc (implies (name-alist-p x) (name-alist-p (remove-assoc-equal acl2::name x))) :rule-classes ((:rewrite)))
Theorem:
(defthm name-alist-p-of-put-assoc (implies (and (name-alist-p x)) (iff (name-alist-p (put-assoc-equal acl2::name acl2::val x)) (and (name-p acl2::name) t))) :rule-classes ((:rewrite)))
Theorem:
(defthm name-alist-p-of-fast-alist-clean (implies (name-alist-p x) (name-alist-p (fast-alist-clean x))) :rule-classes ((:rewrite)))
Theorem:
(defthm name-alist-p-of-hons-shrink-alist (implies (and (name-alist-p x) (name-alist-p y)) (name-alist-p (hons-shrink-alist x y))) :rule-classes ((:rewrite)))
Theorem:
(defthm name-alist-p-of-hons-acons (equal (name-alist-p (hons-acons acl2::a acl2::n x)) (and (name-p acl2::a) t (name-alist-p x))) :rule-classes ((:rewrite)))
Theorem:
(defthm alistp-when-name-alist-p-rewrite (implies (name-alist-p x) (alistp x)) :rule-classes ((:rewrite)))
Theorem:
(defthm alistp-when-name-alist-p (implies (name-alist-p x) (alistp x)) :rule-classes :tau-system)
Theorem:
(defthm name-p-of-caar-when-name-alist-p (implies (name-alist-p x) (iff (name-p (caar x)) (or (consp x) (name-p nil)))) :rule-classes ((:rewrite)))