Fixing function for integral-value structures.
(integral-value-fix acl2::x) → new-x
Function:
(defun integral-value-fix$inline (acl2::x) (declare (xargs :guard (integral-valuep acl2::x))) (let ((__function__ 'integral-value-fix)) (declare (ignorable __function__)) (mbe :logic (case (integral-value-kind acl2::x) (:char (b* ((get (char-value-fix acl2::x))) get)) (:byte (b* ((get (byte-value-fix acl2::x))) get)) (:short (b* ((get (short-value-fix acl2::x))) get)) (:int (b* ((get (int-value-fix acl2::x))) get)) (:long (b* ((get (long-value-fix acl2::x))) get))) :exec acl2::x)))
Theorem:
(defthm integral-valuep-of-integral-value-fix (b* ((new-x (integral-value-fix$inline acl2::x))) (integral-valuep new-x)) :rule-classes :rewrite)
Theorem:
(defthm integral-value-fix-when-integral-valuep (implies (integral-valuep acl2::x) (equal (integral-value-fix acl2::x) acl2::x)))
Function:
(defun integral-value-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (integral-valuep acl2::x) (integral-valuep acl2::y)))) (equal (integral-value-fix acl2::x) (integral-value-fix acl2::y)))
Theorem:
(defthm integral-value-equiv-is-an-equivalence (and (booleanp (integral-value-equiv x y)) (integral-value-equiv x x) (implies (integral-value-equiv x y) (integral-value-equiv y x)) (implies (and (integral-value-equiv x y) (integral-value-equiv y z)) (integral-value-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm integral-value-equiv-implies-equal-integral-value-fix-1 (implies (integral-value-equiv acl2::x x-equiv) (equal (integral-value-fix acl2::x) (integral-value-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm integral-value-fix-under-integral-value-equiv (integral-value-equiv (integral-value-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-integral-value-fix-1-forward-to-integral-value-equiv (implies (equal (integral-value-fix acl2::x) acl2::y) (integral-value-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-integral-value-fix-2-forward-to-integral-value-equiv (implies (equal acl2::x (integral-value-fix acl2::y)) (integral-value-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm integral-value-equiv-of-integral-value-fix-1-forward (implies (integral-value-equiv (integral-value-fix acl2::x) acl2::y) (integral-value-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm integral-value-equiv-of-integral-value-fix-2-forward (implies (integral-value-equiv acl2::x (integral-value-fix acl2::y)) (integral-value-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm integral-value-kind$inline-of-integral-value-fix-x (equal (integral-value-kind$inline (integral-value-fix acl2::x)) (integral-value-kind$inline acl2::x)))
Theorem:
(defthm integral-value-kind$inline-integral-value-equiv-congruence-on-x (implies (integral-value-equiv acl2::x x-equiv) (equal (integral-value-kind$inline acl2::x) (integral-value-kind$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm consp-of-integral-value-fix (consp (integral-value-fix acl2::x)) :rule-classes :type-prescription)