Filtering...

def-hash-theory

books/std/stobjs/def-hash-theory
other
(in-package "STOBJS")
other
(include-book "std/alists/alist-defuns" :dir :system)
other
(include-book "std/alists/alist-fix" :dir :system)
other
(local (include-book "std/alists/hons-remove-assoc" :dir :system))
other
(local (include-book "std/alists/hons-put-assoc" :dir :system))
other
(local (include-book "std/alists/alist-equiv" :dir :system))
other
(defthm defhash-member-of-append
  (iff (member-equal k
      (append x y))
    (or (member-equal k x)
      (member-equal k y)))
  :hints (("Goal" :in-theory (enable member-equal append))))
other
(defthm defhash-no-duplicatesp-of-append
  (iff (no-duplicatesp-equal (append x y))
    (and (no-duplicatesp-equal x)
      (no-duplicatesp-equal y)
      (not (intersectp-equal x y))))
  :hints (("Goal" :in-theory (enable no-duplicatesp-equal
       intersectp-equal
       append))))
other
(defcong alist-equiv
  alist-equiv
  (hons-remove-assoc k x)
  2
  :hints (("Goal" :in-theory (enable alist-equiv-when-agree-on-bad-guy))))
other
(defthm defhash-intersectp-of-singleton
  (iff (intersectp-equal x (list k))
    (member-equal k x))
  :hints (("Goal" :in-theory (enable intersectp-equal
       member-equal))))
other
(defthm defhash-member-alist-keys
  (iff (member-equal k (alist-keys x))
    (hons-assoc-equal k x))
  :hints (("Goal" :in-theory (enable alist-keys hons-assoc-equal))))
other
(defthm defhash-alist-keys-of-hons-remove-assoc
  (equal (alist-keys (hons-remove-assoc k x))
    (remove-equal k (alist-keys x)))
  :hints (("Goal" :in-theory (enable alist-keys
       hons-remove-assoc
       remove-equal))))
other
(defthm defhash-member-of-remove
  (implies (not (member-equal j x))
    (not (member-equal j
        (remove-equal k x)))))
other
(defthm defhash-no-duplicates-of-remove
  (implies (no-duplicatesp-equal x)
    (no-duplicatesp-equal (remove-equal k x)))
  :hints (("Goal" :in-theory (enable no-duplicatesp-equal
       remove-equal))))
other
(defthm defhash-alist-keys-of-alist-fix
  (equal (alist-keys (alist-fix x))
    (alist-keys x))
  :hints (("Goal" :in-theory (enable alist-fix alist-keys))))
other
(defthm defhash-alist-fix-under-alist-equiv
  (alist-equiv (alist-fix x) x)
  :hints (("Goal" :in-theory (enable alist-equiv-iff-agree-on-bad-guy))))
other
(defthm defhash-alist-equiv-of-hons-put-assoc
  (alist-equiv (cons (cons k v) x)
    (hons-put-assoc k v x))
  :hints (("Goal" :in-theory (enable alist-equiv-iff-agree-on-bad-guy))))
other
(defcong alist-equiv
  alist-equiv
  (hons-put-assoc k v x)
  3
  :hints (("Goal" :in-theory (enable alist-equiv-when-agree-on-bad-guy))))
other
(defthm defhash-duplicate-keys-of-hons-put-assoc
  (implies (no-duplicatesp-equal (alist-keys x))
    (no-duplicatesp-equal (alist-keys (hons-put-assoc k v x)))))
other
(defthm defhash-alistp-of-hons-put-assoc
  (implies (alistp x)
    (alistp (hons-put-assoc k v x))))
other
(defcong alist-equiv
  equal
  (hons-assoc-equal k x)
  2)