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