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