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