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