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