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