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