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