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