Basic equivalence relation for floating-point-value structures.
Function:
(defun floating-point-value-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (floating-point-valuep acl2::x) (floating-point-valuep acl2::y)))) (equal (floating-point-value-fix acl2::x) (floating-point-value-fix acl2::y)))
Theorem:
(defthm floating-point-value-equiv-is-an-equivalence (and (booleanp (floating-point-value-equiv x y)) (floating-point-value-equiv x x) (implies (floating-point-value-equiv x y) (floating-point-value-equiv y x)) (implies (and (floating-point-value-equiv x y) (floating-point-value-equiv y z)) (floating-point-value-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm floating-point-value-equiv-implies-equal-floating-point-value-fix-1 (implies (floating-point-value-equiv acl2::x x-equiv) (equal (floating-point-value-fix acl2::x) (floating-point-value-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm floating-point-value-fix-under-floating-point-value-equiv (floating-point-value-equiv (floating-point-value-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-floating-point-value-fix-1-forward-to-floating-point-value-equiv (implies (equal (floating-point-value-fix acl2::x) acl2::y) (floating-point-value-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-floating-point-value-fix-2-forward-to-floating-point-value-equiv (implies (equal acl2::x (floating-point-value-fix acl2::y)) (floating-point-value-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm floating-point-value-equiv-of-floating-point-value-fix-1-forward (implies (floating-point-value-equiv (floating-point-value-fix acl2::x) acl2::y) (floating-point-value-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm floating-point-value-equiv-of-floating-point-value-fix-2-forward (implies (floating-point-value-equiv acl2::x (floating-point-value-fix acl2::y)) (floating-point-value-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)