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