(ecut-wirename-alistp x) recognizes association lists where every key satisfies symbolp and each value satisfies ecutnames-p.
This is an ordinary std::defalist.
Function:
(defun ecut-wirename-alistp (x) (declare (xargs :guard t)) (if (consp x) (and (consp (car x)) (symbolp (caar x)) (ecutnames-p (cdar x)) (ecut-wirename-alistp (cdr x))) t))
Function:
(defun ecut-wirename-alistp (x) (declare (xargs :guard t)) (if (consp x) (and (consp (car x)) (symbolp (caar x)) (ecutnames-p (cdar x)) (ecut-wirename-alistp (cdr x))) t))
Theorem:
(defthm ecut-wirename-alistp-of-revappend (equal (ecut-wirename-alistp (revappend x y)) (and (ecut-wirename-alistp (list-fix x)) (ecut-wirename-alistp y))) :rule-classes ((:rewrite)))
Theorem:
(defthm ecut-wirename-alistp-of-remove (implies (ecut-wirename-alistp x) (ecut-wirename-alistp (remove a x))) :rule-classes ((:rewrite)))
Theorem:
(defthm ecut-wirename-alistp-of-last (implies (ecut-wirename-alistp (double-rewrite x)) (ecut-wirename-alistp (last x))) :rule-classes ((:rewrite)))
Theorem:
(defthm ecut-wirename-alistp-of-nthcdr (implies (ecut-wirename-alistp (double-rewrite x)) (ecut-wirename-alistp (nthcdr n x))) :rule-classes ((:rewrite)))
Theorem:
(defthm ecut-wirename-alistp-of-butlast (implies (ecut-wirename-alistp (double-rewrite x)) (ecut-wirename-alistp (butlast x n))) :rule-classes ((:rewrite)))
Theorem:
(defthm ecut-wirename-alistp-of-update-nth (implies (ecut-wirename-alistp (double-rewrite x)) (iff (ecut-wirename-alistp (update-nth n y x)) (and (and (consp y) (symbolp (car y)) (ecutnames-p (cdr y))) (or (<= (nfix n) (len x)) (and (consp nil) (symbolp (car nil)) (ecutnames-p (cdr nil))))))) :rule-classes ((:rewrite)))
Theorem:
(defthm ecut-wirename-alistp-of-repeat (iff (ecut-wirename-alistp (repeat n x)) (or (and (consp x) (symbolp (car x)) (ecutnames-p (cdr x))) (zp n))) :rule-classes ((:rewrite)))
Theorem:
(defthm ecut-wirename-alistp-of-take (implies (ecut-wirename-alistp (double-rewrite x)) (iff (ecut-wirename-alistp (take n x)) (or (and (consp nil) (symbolp (car nil)) (ecutnames-p (cdr nil))) (<= (nfix n) (len x))))) :rule-classes ((:rewrite)))
Theorem:
(defthm ecut-wirename-alistp-of-union-equal (equal (ecut-wirename-alistp (union-equal x y)) (and (ecut-wirename-alistp (list-fix x)) (ecut-wirename-alistp (double-rewrite y)))) :rule-classes ((:rewrite)))
Theorem:
(defthm ecut-wirename-alistp-of-intersection-equal-2 (implies (ecut-wirename-alistp (double-rewrite y)) (ecut-wirename-alistp (intersection-equal x y))) :rule-classes ((:rewrite)))
Theorem:
(defthm ecut-wirename-alistp-of-intersection-equal-1 (implies (ecut-wirename-alistp (double-rewrite x)) (ecut-wirename-alistp (intersection-equal x y))) :rule-classes ((:rewrite)))
Theorem:
(defthm ecut-wirename-alistp-of-set-difference-equal (implies (ecut-wirename-alistp x) (ecut-wirename-alistp (set-difference-equal x y))) :rule-classes ((:rewrite)))
Theorem:
(defthm ecut-wirename-alistp-set-equiv-congruence (implies (set-equiv x y) (equal (ecut-wirename-alistp x) (ecut-wirename-alistp y))) :rule-classes :congruence)
Theorem:
(defthm ecut-wirename-alistp-when-subsetp-equal (and (implies (and (subsetp-equal x y) (ecut-wirename-alistp y)) (ecut-wirename-alistp x)) (implies (and (ecut-wirename-alistp y) (subsetp-equal x y)) (ecut-wirename-alistp x))) :rule-classes ((:rewrite)))
Theorem:
(defthm ecut-wirename-alistp-of-rcons (iff (ecut-wirename-alistp (rcons a x)) (and (and (consp a) (symbolp (car a)) (ecutnames-p (cdr a))) (ecut-wirename-alistp (list-fix x)))) :rule-classes ((:rewrite)))
Theorem:
(defthm ecut-wirename-alistp-of-rev (equal (ecut-wirename-alistp (rev x)) (ecut-wirename-alistp (list-fix x))) :rule-classes ((:rewrite)))
Theorem:
(defthm ecut-wirename-alistp-of-duplicated-members (implies (ecut-wirename-alistp x) (ecut-wirename-alistp (duplicated-members x))) :rule-classes ((:rewrite)))
Theorem:
(defthm ecut-wirename-alistp-of-difference (implies (ecut-wirename-alistp x) (ecut-wirename-alistp (set::difference x y))) :rule-classes ((:rewrite)))
Theorem:
(defthm ecut-wirename-alistp-of-intersect-2 (implies (ecut-wirename-alistp y) (ecut-wirename-alistp (set::intersect x y))) :rule-classes ((:rewrite)))
Theorem:
(defthm ecut-wirename-alistp-of-intersect-1 (implies (ecut-wirename-alistp x) (ecut-wirename-alistp (set::intersect x y))) :rule-classes ((:rewrite)))
Theorem:
(defthm ecut-wirename-alistp-of-union (iff (ecut-wirename-alistp (set::union x y)) (and (ecut-wirename-alistp (set::sfix x)) (ecut-wirename-alistp (set::sfix y)))) :rule-classes ((:rewrite)))
Theorem:
(defthm ecut-wirename-alistp-of-mergesort (iff (ecut-wirename-alistp (set::mergesort x)) (ecut-wirename-alistp (list-fix x))) :rule-classes ((:rewrite)))
Theorem:
(defthm ecut-wirename-alistp-of-delete (implies (ecut-wirename-alistp x) (ecut-wirename-alistp (set::delete k x))) :rule-classes ((:rewrite)))
Theorem:
(defthm ecut-wirename-alistp-of-insert (iff (ecut-wirename-alistp (set::insert a x)) (and (ecut-wirename-alistp (set::sfix x)) (and (consp a) (symbolp (car a)) (ecutnames-p (cdr a))))) :rule-classes ((:rewrite)))
Theorem:
(defthm ecut-wirename-alistp-of-sfix (iff (ecut-wirename-alistp (set::sfix x)) (or (ecut-wirename-alistp x) (not (set::setp x)))) :rule-classes ((:rewrite)))
Theorem:
(defthm ecut-wirename-alistp-of-list-fix (equal (ecut-wirename-alistp (list-fix x)) (ecut-wirename-alistp x)) :rule-classes ((:rewrite)))
Theorem:
(defthm ecut-wirename-alistp-of-append (equal (ecut-wirename-alistp (append a b)) (and (ecut-wirename-alistp a) (ecut-wirename-alistp b))) :rule-classes ((:rewrite)))
Theorem:
(defthm ecut-wirename-alistp-when-not-consp (implies (not (consp x)) (ecut-wirename-alistp x)) :rule-classes ((:rewrite)))
Theorem:
(defthm ecut-wirename-alistp-of-cdr-when-ecut-wirename-alistp (implies (ecut-wirename-alistp (double-rewrite x)) (ecut-wirename-alistp (cdr x))) :rule-classes ((:rewrite)))
Theorem:
(defthm ecut-wirename-alistp-of-cons (equal (ecut-wirename-alistp (cons a x)) (and (and (consp a) (symbolp (car a)) (ecutnames-p (cdr a))) (ecut-wirename-alistp x))) :rule-classes ((:rewrite)))
Theorem:
(defthm ecut-wirename-alistp-of-make-fal (implies (and (ecut-wirename-alistp x) (ecut-wirename-alistp y)) (ecut-wirename-alistp (make-fal x y))) :rule-classes ((:rewrite)))
Theorem:
(defthm ecutnames-p-of-cdr-when-member-equal-of-ecut-wirename-alistp (and (implies (and (ecut-wirename-alistp x) (member-equal a x)) (ecutnames-p (cdr a))) (implies (and (member-equal a x) (ecut-wirename-alistp x)) (ecutnames-p (cdr a)))) :rule-classes ((:rewrite)))
Theorem:
(defthm symbolp-of-car-when-member-equal-of-ecut-wirename-alistp (and (implies (and (ecut-wirename-alistp x) (member-equal a x)) (symbolp (car a))) (implies (and (member-equal a x) (ecut-wirename-alistp x)) (symbolp (car a)))) :rule-classes ((:rewrite)))
Theorem:
(defthm consp-when-member-equal-of-ecut-wirename-alistp (implies (and (ecut-wirename-alistp x) (member-equal a x)) (consp a)) :rule-classes ((:rewrite :backchain-limit-lst (0 0)) (:rewrite :backchain-limit-lst (0 0) :corollary (implies (if (member-equal a x) (ecut-wirename-alistp x) 'nil) (consp a)))))
Theorem:
(defthm ecut-wirename-alistp-of-fast-alist-clean (implies (ecut-wirename-alistp x) (ecut-wirename-alistp (fast-alist-clean x))) :rule-classes ((:rewrite)))
Theorem:
(defthm ecut-wirename-alistp-of-hons-shrink-alist (implies (and (ecut-wirename-alistp x) (ecut-wirename-alistp y)) (ecut-wirename-alistp (hons-shrink-alist x y))) :rule-classes ((:rewrite)))
Theorem:
(defthm ecut-wirename-alistp-of-hons-acons (equal (ecut-wirename-alistp (hons-acons a n x)) (and (symbolp a) (ecutnames-p n) (ecut-wirename-alistp x))) :rule-classes ((:rewrite)))
Theorem:
(defthm ecutnames-p-of-cdr-of-hons-assoc-equal-when-ecut-wirename-alistp (implies (ecut-wirename-alistp x) (iff (ecutnames-p (cdr (hons-assoc-equal k x))) (hons-assoc-equal k x))) :rule-classes ((:rewrite)))
Theorem:
(defthm ecutnames-p-of-cdar-when-ecut-wirename-alistp (implies (ecut-wirename-alistp x) (iff (ecutnames-p (cdar x)) (consp x))) :rule-classes ((:rewrite)))
Theorem:
(defthm symbolp-of-caar-when-ecut-wirename-alistp (implies (ecut-wirename-alistp x) (symbolp (caar x))) :rule-classes ((:rewrite)))