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