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