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