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