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