Fixing function for tlb-key bit structures.
Function:
(defun tlb-key-fix (x) (declare (xargs :guard (tlb-key-p x))) (let ((__function__ 'tlb-key-fix)) (declare (ignorable __function__)) (mbe :logic (loghead 46 x) :exec x)))
Theorem:
(defthm tlb-key-p-of-tlb-key-fix (b* ((fty::fixed (tlb-key-fix x))) (tlb-key-p fty::fixed)) :rule-classes :rewrite)
Theorem:
(defthm tlb-key-fix-when-tlb-key-p (implies (tlb-key-p x) (equal (tlb-key-fix x) x)))
Function:
(defun tlb-key-equiv$inline (x y) (declare (xargs :guard (and (tlb-key-p x) (tlb-key-p y)))) (equal (tlb-key-fix x) (tlb-key-fix y)))
Theorem:
(defthm tlb-key-equiv-is-an-equivalence (and (booleanp (tlb-key-equiv x y)) (tlb-key-equiv x x) (implies (tlb-key-equiv x y) (tlb-key-equiv y x)) (implies (and (tlb-key-equiv x y) (tlb-key-equiv y z)) (tlb-key-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm tlb-key-equiv-implies-equal-tlb-key-fix-1 (implies (tlb-key-equiv x x-equiv) (equal (tlb-key-fix x) (tlb-key-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm tlb-key-fix-under-tlb-key-equiv (tlb-key-equiv (tlb-key-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))