Fixing function for hash-op structures.
Function:
(defun hash-op-fix$inline (x) (declare (xargs :guard (hash-opp x))) (let ((__function__ 'hash-op-fix)) (declare (ignorable __function__)) (mbe :logic (case (hash-op-kind x) (:hash.bhp256 (cons :hash.bhp256 (list))) (:hash.bhp512 (cons :hash.bhp512 (list))) (:hash.bhp768 (cons :hash.bhp768 (list))) (:hash.bhp1024 (cons :hash.bhp1024 (list))) (:hash.ped64 (cons :hash.ped64 (list))) (:hash.ped128 (cons :hash.ped128 (list))) (:hash.psd2 (cons :hash.psd2 (list))) (:hash.psd4 (cons :hash.psd4 (list))) (:hash.psd8 (cons :hash.psd8 (list)))) :exec x)))
Theorem:
(defthm hash-opp-of-hash-op-fix (b* ((new-x (hash-op-fix$inline x))) (hash-opp new-x)) :rule-classes :rewrite)
Theorem:
(defthm hash-op-fix-when-hash-opp (implies (hash-opp x) (equal (hash-op-fix x) x)))
Function:
(defun hash-op-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (hash-opp acl2::x) (hash-opp acl2::y)))) (equal (hash-op-fix acl2::x) (hash-op-fix acl2::y)))
Theorem:
(defthm hash-op-equiv-is-an-equivalence (and (booleanp (hash-op-equiv x y)) (hash-op-equiv x x) (implies (hash-op-equiv x y) (hash-op-equiv y x)) (implies (and (hash-op-equiv x y) (hash-op-equiv y z)) (hash-op-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm hash-op-equiv-implies-equal-hash-op-fix-1 (implies (hash-op-equiv acl2::x x-equiv) (equal (hash-op-fix acl2::x) (hash-op-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm hash-op-fix-under-hash-op-equiv (hash-op-equiv (hash-op-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-hash-op-fix-1-forward-to-hash-op-equiv (implies (equal (hash-op-fix acl2::x) acl2::y) (hash-op-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-hash-op-fix-2-forward-to-hash-op-equiv (implies (equal acl2::x (hash-op-fix acl2::y)) (hash-op-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm hash-op-equiv-of-hash-op-fix-1-forward (implies (hash-op-equiv (hash-op-fix acl2::x) acl2::y) (hash-op-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm hash-op-equiv-of-hash-op-fix-2-forward (implies (hash-op-equiv acl2::x (hash-op-fix acl2::y)) (hash-op-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm hash-op-kind$inline-of-hash-op-fix-x (equal (hash-op-kind$inline (hash-op-fix x)) (hash-op-kind$inline x)))
Theorem:
(defthm hash-op-kind$inline-hash-op-equiv-congruence-on-x (implies (hash-op-equiv x x-equiv) (equal (hash-op-kind$inline x) (hash-op-kind$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm consp-of-hash-op-fix (consp (hash-op-fix x)) :rule-classes :type-prescription)