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