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