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