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