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