Fixing function for float-value structures.
(float-value-fix x) → new-x
Function:
(defun float-value-fix$inline (x) (declare (xargs :guard (float-valuep x))) (let ((__function__ 'float-value-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((float (float-value-abs-fix (std::da-nth 0 (cdr x))))) (cons :float (list float))) :exec x)))
Theorem:
(defthm float-valuep-of-float-value-fix (b* ((new-x (float-value-fix$inline x))) (float-valuep new-x)) :rule-classes :rewrite)
Theorem:
(defthm float-value-fix-when-float-valuep (implies (float-valuep x) (equal (float-value-fix x) x)))
Function:
(defun float-value-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (float-valuep acl2::x) (float-valuep acl2::y)))) (equal (float-value-fix acl2::x) (float-value-fix acl2::y)))
Theorem:
(defthm float-value-equiv-is-an-equivalence (and (booleanp (float-value-equiv x y)) (float-value-equiv x x) (implies (float-value-equiv x y) (float-value-equiv y x)) (implies (and (float-value-equiv x y) (float-value-equiv y z)) (float-value-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm float-value-equiv-implies-equal-float-value-fix-1 (implies (float-value-equiv acl2::x x-equiv) (equal (float-value-fix acl2::x) (float-value-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm float-value-fix-under-float-value-equiv (float-value-equiv (float-value-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-float-value-fix-1-forward-to-float-value-equiv (implies (equal (float-value-fix acl2::x) acl2::y) (float-value-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-float-value-fix-2-forward-to-float-value-equiv (implies (equal acl2::x (float-value-fix acl2::y)) (float-value-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm float-value-equiv-of-float-value-fix-1-forward (implies (float-value-equiv (float-value-fix acl2::x) acl2::y) (float-value-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm float-value-equiv-of-float-value-fix-2-forward (implies (float-value-equiv acl2::x (float-value-fix acl2::y)) (float-value-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)