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