Lemmas about hons-assoc-equal available in the std/alists library.
NOTE: It is a good idea to be very clear on the relationship
between
Theorem:
(defthm hons-assoc-equal-when-atom (implies (atom alist) (equal (hons-assoc-equal a alist) nil)))
Theorem:
(defthm hons-assoc-equal-of-cons (equal (hons-assoc-equal key (cons entry map)) (if (and (consp entry) (equal key (car entry))) entry (hons-assoc-equal key map))))
Theorem:
(defthm list-equiv-implies-equal-hons-assoc-equal-2 (implies (list-equiv alist alist-equiv) (equal (hons-assoc-equal key alist) (hons-assoc-equal key alist-equiv))) :rule-classes (:congruence))
Theorem:
(defthm hons-assoc-equal-of-hons-acons (equal (hons-assoc-equal key (hons-acons key2 val map)) (if (equal key key2) (cons key val) (hons-assoc-equal key map))))
Theorem:
(defthm consp-of-hons-assoc-equal (equal (consp (hons-assoc-equal x alist)) (if (hons-assoc-equal x alist) t nil)))
Theorem:
(defthm car-hons-assoc-equal (implies (hons-assoc-equal k a) (equal (car (hons-assoc-equal k a)) k)))
Theorem:
(defthm car-hons-assoc-equal-split (equal (car (hons-assoc-equal key alist)) (if (hons-assoc-equal key alist) key nil)))
Theorem:
(defthm hons-assoc-equal-append (equal (hons-assoc-equal x (append a b)) (or (hons-assoc-equal x a) (hons-assoc-equal x b))))
Theorem:
(defthm hons-assoc-equal-of-hons-shrink-alist (equal (hons-assoc-equal a (hons-shrink-alist x y)) (or (hons-assoc-equal a y) (hons-assoc-equal a x))))
Theorem:
(defthm cons-key-cdr-hons-assoc-equal (implies (hons-assoc-equal k a) (equal (cons k (cdr (hons-assoc-equal k a))) (hons-assoc-equal k a))))