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