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