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