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