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