Remove a particular key from a "modern" alist.
The
Theorem:
(defthm hons-remove-assoc-of-cons (equal (hons-remove-assoc k (cons x y)) (if (and (consp x) (not (equal (car x) k))) (cons x (hons-remove-assoc k y)) (hons-remove-assoc k y))))
Theorem:
(defthm hons-remove-assoc-of-atom (implies (not (consp x)) (equal (hons-remove-assoc k x) nil)) :rule-classes ((:rewrite :backchain-limit-lst 0)))
Theorem:
(defthm hons-remove-assoc-commutes (equal (hons-remove-assoc k (hons-remove-assoc j x)) (hons-remove-assoc j (hons-remove-assoc k x))) :rule-classes ((:rewrite :loop-stopper ((j k)))))
Theorem:
(defthm hons-assoc-equal-remove-assoc (equal (hons-assoc-equal k (hons-remove-assoc j x)) (and (not (equal k j)) (hons-assoc-equal k x))))
Theorem:
(defthm hons-remove-assoc-of-fast-alist-fork (equal (hons-remove-assoc k (fast-alist-fork x y)) (fast-alist-fork (hons-remove-assoc k x) (hons-remove-assoc k y))))
Theorem:
(defthm hons-remove-assoc-of-append (equal (hons-remove-assoc k (append x y)) (append (hons-remove-assoc k x) (hons-remove-assoc k y))))
Theorem:
(defthm hons-remove-assoc-when-not-hons-assoc-equal (implies (not (hons-assoc-equal k x)) (equal (hons-remove-assoc k x) (alist-fix x))))
Theorem:
(defthm alistp-of-hons-remove-assoc (alistp (hons-remove-assoc k x)))
Theorem:
(defthm hons-remove-assoc-of-alist-fix (equal (hons-remove-assoc k (alist-fix x)) (hons-remove-assoc k x)))