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