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