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