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