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