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