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