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