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